Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 575458

Summary: media-libs/mesa: segfaults on ABI=x32 when built with USE=nptl
Product: Gentoo Linux Reporter: Dainius Masiliūnas <pastas4>
Component: Current packagesAssignee: Gentoo X packagers <x11>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=94512
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 393673    

Description Dainius Masiliūnas 2016-02-23 12:15:55 UTC
It looks like the assembly used by Mesa is not x32 compatible yet, and the Mesa build system does not detect that x32 needs assembly disabled either. So without an explicit "--disable-asm", any calls to /usr/libx32/libGL.so.1 result in a segfault in whatever is the first function being accessed. This means that even things like glxinfo and glxgears segfault every time, and also X segfaults when GLAMOR is used.

At the moment all mesa ebuilds only use the "--disable-asm" configure flag when on x86 and with +pic. However, it should also be used for x32 unconditionally.
Comment 1 Dainius Masiliūnas 2016-07-27 20:10:47 UTC
Looks like there's an upstream bug about this, and it might suffice to mask the nptl USE flag on x32. I'll see if I can test this.
Comment 2 Dainius Masiliūnas 2016-07-29 14:28:56 UTC
I just tested, and confirmed that indeed it is sufficient to disable the nptl USE flag for Mesa to work properly in x32, as per the upstream bug. One does not need to disable assembly altogether.

Can the nptl USE flag be hardmasked in x32 for the time being, then?
Comment 3 Matt Turner gentoo-dev 2017-01-13 00:39:03 UTC
Fixed upstream by

commit 89458366585c34879b70110758bb4fd3acb62ce0
Author: Grazvydas Ignotas <notasas@gmail.com>
Date:   Sun Jan 8 19:38:09 2017 +0200

    mapi: update the asm code to support x32

should be in the 17.0 release and perhaps backported to 13.0.x.
Comment 4 Matt Turner gentoo-dev 2017-01-29 06:54:22 UTC
Fixed in the 17 series, and will be in 13.0.4.