Artix Linux Forum

Artix Linux => Package management => Topic started by: nokangaroo on 02 March 2023, 15:55:33

Title: llvm: missing static libs break the mesa build
Post by: nokangaroo on 02 March 2023, 15:55:33
Code: [Select]
ERROR: Subproject directory not found and llvm.wrap file not found
Please reinstate the static libs for those of us who want to build mesa from source. The missing static libs will break building mesa with static llvm (which is ~100MB smaller). I don't use llvm except as a build dependency. I still have llvm-15.0.7-1 in my cache, fortunately, which is identical except for the static libs which it has and 15.0.7-2 doesn't. I am currently building llvm-git from source, but that will take forever.
Title: Re: llvm: missing static libs break the mesa build
Post by: Dudemanguy on 02 March 2023, 16:10:58
This was originally done upstream by Arch (https://github.com/archlinux/svntogit-packages/commit/bc5ab1d4b61a7d2221cfdd9154e01ccd14073333). It's true that you won't be able to build mesa with static llvm because of that, but you can still build it dynamically. I'm pretty sure llvm is only a make/build dependency. You can remove it after you're done building as long as you have llvm-libs installed. I didn't actually measure the space savings, but I can't imagine there would be much difference between a dynamically linked mesa + llvm-libs vs a statically linked mesa with no llvm or llvm-libs on your system at all. The dynamic version might even save you some space.
Title: Re: llvm: missing static libs break the mesa build
Post by: nokangaroo on 02 March 2023, 17:51:13
You are wrong. My installed mesa, according to "pacman -Qii mesa", is 66.84 MiB (and that's all, no llvm, no llvm-libs, no libglvnd; mesa-amber, which doesn't require llvm (i965 unlike iris doesn't depend on swrast), is even smaller, its pkg folder is 17.2 MiB). The "llvm-libs" package is 120.48 Mib. So you just bloated my system by 54 MiB (I guess I'll permanently switch to amber, which works perfectly for me).
Title: Re: llvm: missing static libs break the mesa build
Post by: nokangaroo on 02 March 2023, 20:24:09
I just rebuilt mesa with llvm disabled, and it works (upgrade size: -45 MiB). llvm isn't required for swrast (my early attempts to build iris only failed; the driver built without errors but wouldn't load. Apparently swrast is required for kernel mode setting (the package contains a kms_swrast driver). So I should thank you for trying to bloat my system - I found another piece of junk that I can do without :)