Hello,
I started to build a Guix definition package for ODIN programming language. You can find it here.
This package provides two executables:
odin
: the compilerdemo-odin
: the demo from the examples directory
Odin relies on clang for the linker, you´ll need to add the clang-toolchain
to build an executable.
It’s really a first draft but for me, it’s already enough to start learning and exploring the language.
Third party libraries are available as pre-compiled static libraries for different architectures. For linux platform, most of them need to be compiled. For safety reasons and overall size, those libraries have been removed. If dynamic libraries are available, they will be used by the linker (glfw, sdl2, opengl).
Execution of compiled application can lead to failure due to a library missing at runtime. Some work around based on the usage of patchelf
or prepend the execution by using an environment variable like LD_LIBRARY_PATH
or LD_PRELOAD
can fix the issue.
Current limitations:
- x86_64 only
- some third party vendor libraries are not available (Raylib, box2d, …)
- Raylib was working but I removed the provided libraries since …
- Find a way to provide extra packages for ODIN and bind them to an immutable folder called
vendor
. - or if feasible use the additional
-collection:shared=path/to/shared/libs
to the compiler.
- some tests leads to segmentation fault (tests/core and tests/benchmark),
whereas other works:odin test tests/internal
To experiment with this package, one can use this basic manifest.scm:
(specifications->manifest
(list "odin"
"clang-toolchain@18"
;; "raylib"
"glfw@3.4"
"sdl2"
"coreutils"
;; "patchelf"
;; "libtree"
;; "strace"
))
There are more examples to play with available here.
Examples based on glfw, opengl or sdl2 should run out of the box.
guix shell -m manifest.scm -- odin run more-examples/glfw/window
guix shell -m manifest.scm -- odin run more-examples/sdl2/chase_in_space
I’m currently building and running this package on this laptop:
~/projects/odin/src [env]$ odin report
Where to find more information and get into contact when you encounter a bug:
Website: https://odin-lang.org
GitHub: https://github.com/odin-lang/Odin/issues
Useful information to add to a bug report:
Odin: dev-2025-02
OS: Guix System, Linux 5.15.167.4-microsoft-standard-WSL2
CPU: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz
RAM: 3826 MiB
Backend: LLVM 18.1.8
Feel free to give me feedback or advices of some sort.
To be continued and Happy coding, Arnaud.