Bug 531496
| Summary: | configure.ac should use 'ld' from $PATH for checking version-script syntax, not hardcode /usr/bin/ld | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Community] Virtualization Tools | Reporter: | Steve Yarmie <steve.yarmie> | ||||||
| Component: | libvirt | Assignee: | Libvirt Maintainers <libvirt-maint> | ||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |||||||
| Severity: | low | Docs Contact: | |||||||
| Priority: | low | ||||||||
| Version: | unspecified | CC: | berrange, crobinso, jtomko, xen-maint | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2015-03-16 14:43:33 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: | 
 | ||||||||
| 
        
          Description
        
        
          Steve Yarmie
        
        
        
        
        
          2009-10-28 15:43:49 UTC
        
       Created attachment 366456 [details]
patch to add ws in src/Makefile.in
There is not supposed to be any whitespace in there. $(VERSION_SCRIPT_FLAGS) expands to "-Wl,--version-script=" which thus results in -Wl,--version-script=libvirt.syms being passed to GCC. Adding in whitespace would break this. Thanks. For some reason on my systems it's expanding as : VERSION_SCRIPT_FLAGS = -Wl,-M -Wl, without "--version-script=" I used two different toolchains and still got the same result. I'm investigating further... I found that line 69 of configure.in does a check to see if `ld` supports the --version-script option. The test is written with hard-coded /path/to/ld (/usr/bin/ld is assumed). I keep my toolchain segregated from the system software - e.g.:in /opt/dev/* so the check failed for me - causing the option to be omitted from VERSION_SCRIPT_FLAGS. Perhaps there needs to be a check for path to `ld` I can imagine someone simply installing binutils in /usr/local while some other `ld` is in /usr/bin and possibly getting unexpected results... just a thought So if we just change the configure script too run 'ld' instead of '/usr/bin/ld' would that be sufficient for you ? I assume you'd have your desired /opt/dev/<BLAH> directory in $PATH before running configure .. If I just edit the configure script to run `ld` everything works perfectly If I edit configure.in and then run autogen.sh the src/Makefile results for VERSION_SCRIPT_FLAGS is fine but: the build failed because the generated libtool script dies with errors. _This is probably unrelated to the original problem_, but instead could be because my toolchain is very new (autoconf-2.6.4 automake-1.11 libtool-2.2.6 binutils-2.19.1 gcc-4.4.2 ) Yeah that second issue is almost certainly a compatibility problem with the autotools versions Created attachment 368114 [details]
here's the corrected patch
corrected patch simply adjusts configure.in to use 'ld' from PATH
Fixed by:
commit 98fb83ce25f46e0236706fa6e0943032d921935f
Author:     Matthias Bolte <matthias.bolte>
AuthorDate: 2010-04-27 09:43:55 +0200
Commit:     Matthias Bolte <matthias.bolte>
CommitDate: 2010-04-28 23:49:00 +0200
    cygwin/mingw: Fix version script handling
    
    Let configure detect ld instead of hardcoding /usr/bin/ld, because
    MinGW may have ld in /bin.
    
    Only use a .def file to export symbols on MinGW. Cygwin's ld supports
    the normal .syms file used on Linux.
git describe: v0.8.0-136-g98fb83c contains: v0.8.1~27
 |