Bug 5524 - ld: I/O error, file "/xxx/gnu/binutils/objdir/opcodes/../bfd/.libs/libbfd.so": No such file or directory
Summary: ld: I/O error, file "/xxx/gnu/binutils/objdir/opcodes/../bfd/.libs/libbfd.so"...
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.19
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-28 21:42 UTC by John David Anglin
Modified: 2008-02-14 12:34 UTC (History)
2 users (show)

See Also:
Host: hppa64-hp-hpux11.00
Target: hppa64-hp-hpux11.00
Build: hppa64-hp-hpux11.00
Last reconfirmed:


Attachments
Use the correct file extension for HPUX shared libraries (379 bytes, patch)
2008-01-07 16:52 UTC, Nick Clifton
Details | Diff
Use the correct file extension for Mac OS X shared libraries (248 bytes, patch)
2008-02-12 03:29 UTC, Finn Thain
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2007-12-28 21:42:29 UTC
/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
Comment 1 John David Anglin 2007-12-28 21:57:55 UTC
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
Comment 2 H.J. Lu 2007-12-31 19:33:30 UTC
It must be an HP-UX specific issue. I have no problems with --enable-shared
on Linux/Intel64.
Comment 3 dave@hiauly1.hia.nrc.ca 2007-12-31 20:36:03 UTC
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
Comment 4 Nick Clifton 2008-01-07 16:52:52 UTC
Created attachment 2178 [details]
Use the correct file extension for HPUX shared libraries
Comment 5 Nick Clifton 2008-01-07 16:54:31 UTC
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
Comment 6 Finn Thain 2008-02-12 03:28:22 UTC
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.
Comment 7 Finn Thain 2008-02-12 03:29:56 UTC
Created attachment 2245 [details]
Use the correct file extension for Mac OS X shared libraries
Comment 8 Nick Clifton 2008-02-14 12:34:07 UTC
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.