Ticket #154 (closed task: fixed)

Opened 9 years ago

Last modified 9 years ago

/usr/lib64 created by binutils in pure64

Reported by: ken Owned by: ken
Priority: blocker Milestone: CLFS Standard 1.1.0
Component: BOOK Version: CLFS Standard 1.1.0
Keywords: Cc:


On at least x86_64-64, binutils installs libiberty.a into /usr/lib64.

Now that I've been bitten by this (openjade assumes opensp is in /usr/lib64 if that directory exists, because that is supposedly how it is on ppc64!), I think someone mentioned this on the lists last year.

Change History

comment:1 Changed 9 years ago by ken

  • Version set to CLFS Standard 1.1.0

OK, I can see what is going on. From my build log

make[2]: Entering directory `/building/binutils-build/libiberty'
make[3]: Entering directory `/building/binutils-build/libiberty/testsuite'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/building/binutils-build/libiberty/testsuite'
/bin/sh ../../binutils-2.18/libiberty/../mkinstalldirs /usr/lib/`gcc -g -O2 -print-multi-os-directory`
mkdir -p -- /usr/lib/../lib64
/tools/bin/install -c -m 644 ./libiberty.a /usr/lib/`gcc -g -O2 -print-multi-os-directory`/./libiberty.an
( cd /usr/lib/`gcc -g -O2 -print-multi-os-directory` ; chmod 644 ./libiberty.an ;ranlib ./libiberty.an )
mv -f /usr/lib/`gcc -g -O2 -print-multi-os-directory`/./libiberty.an /usr/lib/`gcc -g -O2 -print-multi-os-directory`/./libiberty.a

At this stage gcc is, of course, in /tools - it hasn't been patched for pure64 so for -print-multi-os-directory (in 64-bit) it returns ../lib64. If I run this against the final gcc it returns ../lib.

The following has had minimal testing (haven't used it in a build, just hacked it and confirmed it will install correctly). The offending line is, fortunately, copied unchanged from libiberty/Makefile.in to libiberty/Makefile so we can just sed it before we cd to binutils-build (the Makefile itself is created when make runs the configure-libiberty target).

sed -i 's%\(^MULTIOSDIR = \).*%\1 ../lib%' libiberty/Makefile.in

Looks as if this will be appropriate to all the pure64 versions of multilib archs (i.e. not alpha).

I'm nowhere close to testing this in a build, so I'll post it here.

comment:2 Changed 9 years ago by ken

  • Owner changed from clfs-commits@… to ken

Hmm, didn't work. In the meantime, I've found /usr/lib64/libstdc++.so* symlinks are needed to allow the glibc-2.7 and ld testsuites to all pass, perhaps there is a connection.

comment:3 Changed 9 years ago by ken

Looks like I missed the middle '%' when I put that into my script. <sigh/> Seems to be back on the road.

comment:4 Changed 9 years ago by ken

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in r3908 (the tests) and r3909 (libiberty.a).

Note: See TracTickets for help on using tickets.