/bin/sh ./libtool --tag=CC --mode=link gcc -W -Wall -Wstrict-prototypes -Wmissin g-prototypes -Werror -g -O2 -o libopcodes.la -rpath /opt/gnu64/lib -release `c at ../bfd/libtool-soversion` dis-buf.lo disassemble.lo dis-init.lo hppa-dis.lo -Wl,/xxx/gnu/binutils/objdir/opcodes/../bfd/.libs/libbfd.so libtool: link: gcc -shared -Wl,+h -Wl,libopcodes-2.18.50.20071228.sl -o .libs/li bopcodes-2.18.50.20071228.sl .libs/dis-buf.o .libs/disassemble.o .libs/dis-init .o .libs/hppa-dis.o -lc -Wl,/xxx/gnu/binutils/objdir/opcodes/../bfd/.libs/lib bfd.so ld: I/O error, file "/xxx/gnu/binutils/objdir/opcodes/../bfd/.libs/libbfd.so": N o such file or directory Fatal error. collect2: ld returned 1 exit status It seems like the make file is using the wrong shared library extension. SHARED_LIBADD = -Wl,/xxx/gnu/binutils/objdir/opcodes/../bfd/.libs/libbfd.so
Looks like the configure.in files need updating. For example, we have this in opcodes: if test "$enable_shared" = "yes"; then case "${host}" in *-*-cygwin*) SHARED_LDFLAGS="-no-undefined" SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/ ../intl -lintl -lcygwin" ;; *) SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so" SHARED_DEPENDENCIES="../bfd/libbfd.la" ;; esac fi
It must be an HP-UX specific issue. I have no problems with --enable-shared on Linux/Intel64.
Subject: Re: ld: I/O error, file "/xxx/gnu/binutils/objdir/opcodes/../bfd/.libs/libbfd.so": No such file or directory > It must be an HP-UX specific issue. Yes, the shared library suffix on PA-RISC HP-UX is ".sl". That's why the file isn't found. Dave
Created attachment 2178 [details] Use the correct file extension for HPUX shared libraries
Hi Dave, Please could you try out the uploaded patch and let me know if it works for you ? (Obvioulsy you will need to regenerate opcodes/configure as well). There appears to be several different configure variables we can test for HPUX OSes, but I based this patch on similar code in ld/configure.in. Cheers Nick
binutils-2.18.50.0.4 (20080208) has a similar problem on Mac OS X where the shared libraries are named *.dylib. It fails to compile there too. I will attach a patch.
Created attachment 2245 [details] Use the correct file extension for Mac OS X shared libraries
Hi Finn, Thanks for that. I have now checked both patches in along with this ChangeLog entry. Cheers Nick opcodes/ChangeLog 2008-02-14 Nick Clifton <nickc@redhat.com> PR binutils/5524 * configure.in (SHARED_LIBADD): Select the correct host specific file extension for shared libraries. * configure: Regenerate.