FS#35066 - [mesa] Crash with statically linked llvm
Attached to Project:
Arch Linux
Opened by John Kåre Alsaker (JKA) - Thursday, 02 May 2013, 21:21 GMT
Last edited by Andreas Radke (AndyRTR) - Saturday, 25 May 2013, 08:50 GMT
Opened by John Kåre Alsaker (JKA) - Thursday, 02 May 2013, 21:21 GMT
Last edited by Andreas Radke (AndyRTR) - Saturday, 25 May 2013, 08:50 GMT
|
Details
mesa doesn't build correctly when llvm is statically linked.
llvm needs to be built with --enable-shared and mesa with
--with-llvm-shared-libs for things to work correctly.
A crash happens when mesa loads multiple libraries which are statically linked to llvm. Related upstream bug: https://bugs.freedesktop.org/show_bug.cgi?id=61364 |
This task depends upon
# --with-llvm-shared-libs \ # enabling this would force us to move llvm-amdgpu-snapshot from community to extra, delay it until llvm 3.3 / Mesa 9.2/10.0
Only Tom Stellar branch is the only one certified to work with mesa-9.1.x.
Your AUR package is only certifed to work with mesa from the mesa git trunk (9.2-devel).
@Other
I will try to provide mesa packages with tstellar's llvm lib dynamically linked, then let say if it work without regressions.
I've also suggested to include *official* Tom Stellard's patches into ArchLinux llvm, but you can see the answer for yourself.
https://mailman.archlinux.org/pipermail/arch-general/2013-March/033029.html
Just add this on the top of your pacman.conf repo list:
[mesa-llvm-shared]
Server = http://pkgbuild.com/~lcarlier/mesa-llvm-shared/$arch
Currently only x86_64 is provided.
The problem we have now is that if we patch our LLVM build with Tom Stellards patches, we will be forced to keep LLVM at 3.2 until Mesa 9.2 gets released. Your solution adds shared libraries to the amdgpu snapshot, which doesn't conflict with our default LLVM build, so your solution is probably the best way to fix this.
Mesa 9.1.2 can be built with LLVM 3.3svn revision 181113, and I built the package two or three days before 3.3 was branched, so I see no problems why you'd need to wait for Mesa 9.2 to upgrade LLVM to 3.3. When Arch upgraded LLVM to 3.2, Mesa 9.0 needed several upstream patches.
I've used these patches to get 9.1.2 to build against LLVM 3.3svn rev 181113
http://cgit.freedesktop.org/mesa/mesa/patch/?id=ead4db420e9e5408f41c70768a290592a384aedb
http://cgit.freedesktop.org/mesa/mesa/patch/?id=4742f9b00b804dd01eb9955dd386a2373cd8eb36
http://cgit.freedesktop.org/mesa/mesa/patch/?id=6249db73ea580e6a54874235ffb3a7d42ac63bb4
http://cgit.freedesktop.org/mesa/mesa/patch/?id=7cd248aa7938a068663fcd605169b7d4e21636bf
http://cgit.freedesktop.org/mesa/mesa/patch/?id=a0c8942bb4742b4bd22f494cea4dcd59d9ca99ab
http://cgit.freedesktop.org/mesa/mesa/patch/?id=cd84353d576246273d1c6ae8e96b65217be15ebc
My initial suggestion was to split shared llvm library into libllvm package. The pastebin links containing PKGBUILDs in my mailing list RFC are gone though and I don't have them arround anymore.
/usr/lib/llvm/libLLVM-3.2.so and
/usr/lib/llvm/libLLVM-3.2svn.so.