Fixing Odin's broken Raylib library
I tried to run a small Odin program with Raylib. The linker failed with this error:
libraylib.a: file format not recognized
libraylib.a:1: syntax error
The odin-git package from the AUR included libraylib.a as a Git LFS pointer instead of the real library.
The fix
I removed the broken odin-git package.
Then I built Odin from its source.
Git LFS must run before the build.
sudo pacman -S --needed base-devel clang llvm git git-lfs
git lfs install
git clone https://github.com/odin-lang/Odin.git ~/.local/share/odin
cd ~/.local/share/odin
git lfs pull
make release-native
sudo pacman -Rns odin-git
I also configured Fish:
set -Ux ODIN_ROOT "$HOME/.local/share/odin"
fish_add_path "$ODIN_ROOT"
The Raylib archive was now a real binary.
odin run . linked and opened the window.