Bug 55080

Summary: [build error with -flto] relocation R_386_GOTOFF against undefined symbol `x86_entry_end.2334.4268' can not be used when making a shared object
Product: Mesa Reporter: Fabio Pedretti <pedretti.fabio>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: medium CC: compnerd, jrch2k10
Version: 9.0   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Fabio Pedretti 2012-09-19 08:18:27 UTC
When trying to build git mesa with gcc LTO (gcc 4.7.1-9ubuntu2), it fails with this error:

  CCLD   libglapi.la
/usr/bin/ld: /tmp/cc2u7Pv8.ltrans0.ltrans.o: relocation R_386_GOTOFF against undefined symbol `x86_entry_end.2334.4268' can not be used when making a shared object
/usr/bin/ld: final link failed: Bad value

Full build log here:
https://launchpadlibrarian.net/116598460/buildlog_ubuntu-quantal-i386.mesa_9.1~git1209190941.9aa8ba~gd~q_FAILEDTOBUILD.txt.gz

(This may be a gcc bug)
Comment 1 Fabio Pedretti 2012-11-09 17:10:42 UTC
*** Bug 55599 has been marked as a duplicate of this bug. ***
Comment 2 Saleem Abdulrasool 2012-11-25 18:15:06 UTC
Changing the version as it is reproducible with the 9.0.1 release tarball.
Comment 3 Ian Romanick 2012-11-26 18:29:18 UTC
I believe that they way Mesa does dispatch backpatching is incompatible with link-time optimization.  You might try defining GLX_X86_READONLY_TEXT.  Either way, I don't think this is something we can fix.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.