odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.38k stars 561 forks source link

Can't use full features on arch linux #2488

Closed sltu closed 1 year ago

sltu commented 1 year ago

Hi gingerBill

I have just watched on youtube your talk with Primeagen and immeditely I wanted to try Odin with Raylib but I could not install it on linux. Arch is too modern for Odin (vendor llvm issue). This is not a complaint but I want to point that with Zig, Dlang and Go I had no issues to install them. They were promptly ready to go.

If you and community want to spread this lovely language to bigger audience - an installation process should be smoothly regardless OS to feel it's top notch programming language.

Thank you guys Regards

akmubi commented 1 year ago

If I'm understanding correctly, you had trouble with building the compiler? If that's the case, I might have the solution for you, as I experienced the same issue on Arch. To resolve it, I installed the llvm14 package and compiled the compiler using the following command:

LLVM_CONFIG=llvm-config-14 ./build_odin.sh release
dmitsuki commented 1 year ago

Building odin requires specific versions of llvm.

https://odin-lang.org/docs/install/

It's documented on this page on how to install odin. If you want to build odin the recommended llvm is here. On Arch you can also just get odin from the AUR.

gingerBill commented 1 year ago

@sltu Sorry for the late reply.

This is not a complaint but I want to point that with Zig, Dlang and Go I had no issues to install them.

That is a complain but that is okay 😛 Of those languages, only Zig uses LLVM, and Zig uses the latest version of LLVM (for all of the issues with the current versions of LLVM).

Odin only officially supports LLVM versions 11.1.0, 12.0.1, and 13.x. LLVM 14 does work but we cannot guarantee that code generation will work as well (LLVM keeps breaking things).

As for Arch Linux, this is completely Arch's fault because it doesn't keep older versions of packages (beyond a couple versions) and tries to be "bleeding edge" (which is an extremely bad idea in the case of LLVM). The easiest solution that I have done on Arch is do go to the release page on the LLVM GitHub Release and download the prebuilt Linux release (e.g. https://github.com/llvm/llvm-project/releases/tag/llvmorg-14.0.6).

P.S.

We rarely if ever get complaints from people other Linux Distro users, if there is an issue it's pretty much 99.9% of the time always an Arch Linux user. I absolutely hate Arch as a distro, but that's why I force myself to use it when I use Linux. But once I have the LLVM version installed, I'm done with my Odin development needs.

sltu commented 1 year ago

Hi gingerBill

I swear - it was not a complain :). I will return to Odin if I have free time. To me Odin looks like a perfect fit for my needs - 2d game programming.