Description of problem: libvirt-0.7.2/src/Makefile.in line 1918 missing a space here: $(VERSION_SCRIPT_FLAGS)<SPACE>libvirt.syms Version-Release number of selected component (if applicable): libvirt-0.7.2 How reproducible: ./configure && make ... Steps to Reproduce: 1. ./configure ... 2. make 3. Actual results: [...] ../gnulib/lib/.libs/libgnu.a(vasnprintf.o) (--whole-archivelibvirt.syms: file not recognized: File format not recognized collect2: ld returned 1 exit status ) make[3]: *** [libvirt.la] Error 1 make[3]: Leaving directory `/mnt/iscsi/1/src/kvm/src/libvirt/libvirt-0.7.2-bin-amd-001/src' Expected results: clean build ;) Additional info: Patch attached...
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