Gentoo Archives: gentoo-osx

From: Kito <kito@g.o>
To: gentoo-osx@l.g.o
Subject: Re: [gentoo-osx] [PREFIX] SUCCESS!!! system installed
Date: Sat, 25 Mar 2006 02:22:26
Message-Id: 2417E9B4-2805-4CB1-A83B-591A9864B7C1@gentoo.org
In Reply to: Re: [gentoo-osx] [PREFIX] SUCCESS!!! system installed by m h
On Mar 24, 2006, at 6:56 PM, m h wrote:

> On 3/24/06, m h <sesquile@×××××.com> wrote: >> On 3/24/06, Grobian <grobian@g.o> wrote: >>> On 23-03-2006 21:07:21 -0600, Kito wrote: >>>> On Mar 23, 2006, at 7:52 PM, m h wrote: >>>>>> I get: >>>>>> /usr/bin/ld: cannot find /lib/libz.so >>>>>> collect2: ld returned 1 exit status >>>>>> >>>>>> Very weird..... >>>>>> >>>> >>>> Hrmm, your gcc is using the system ld.... we need to fix that >>>> first I think. >>> >>> Probably forgot to update the symlink to ld? >>> >>>> Yeah, lets go back to the first problem of getting gcc using the >>>> portage >>>> binutils....I don't like this one ;) >>> >>> Please try. >>> >> >> So I tried re-emerging binutils. I guess it fails at the end, but >> gets far enough that it thinks it's installed... Here's the tail end: >> --- !empty dir /data1/tmp/Mar21 >> --- !empty dir /data1/tmp >> --- !empty dir /data1 >> !!! EBUILD_PHASE=postrm >> !!! D=/data1/tmp/Mar21/var/tmp/binpkgs/binutils-2.16.1-r1/image/ >> data1/tmp/Mar21 >> !!! DEST=/data1/tmp/Mar21/var/tmp/binpkgs/binutils-2.16.1-r1/image/ >> !!! PREFIX=/data1/tmp/Mar21 >> !!! ROOT=/data1/tmp/Mar21 >> /data1/tmp/Mar21/usr/bin/binutils-config: line 14: >> /etc/init.d/functions.sh: No such file or directory >> /data1/tmp/Mar21/usr/bin/binutils-config: line 14: >> /etc/init.d/functions.sh: No such file or directory >> !!! EBUILD_PHASE=clean >> !!! D=/data1/tmp/Mar21/var/tmp/binpkgs/binutils-2.16.1-r1/image/ >> data1/tmp/Mar21 >> !!! DEST=/data1/tmp/Mar21/var/tmp/binpkgs/binutils-2.16.1-r1/image/ >> !!! PREFIX=/data1/tmp/Mar21 >> !!! ROOT=/data1/tmp/Mar21 >>>>> Original instance of package unmerged safely. >> !!! EBUILD_PHASE=postinst >> !!! D=/data1/tmp/Mar21/var/tmp/portage/binutils-2.16.1-r1/image/ >> data1/tmp/Mar21 >> !!! DEST=/data1/tmp/Mar21/var/tmp/portage/binutils-2.16.1-r1/image/ >> !!! PREFIX=/data1/tmp/Mar21 >> !!! ROOT=/data1/tmp/Mar21 >> /data1/tmp/Mar21/usr/bin/binutils-config: line 14: >> /etc/init.d/functions.sh: No such file or directory >> /data1/tmp/Mar21/usr/bin/binutils-config: Could not source >> /etc/init.d/functions.sh! >>>>> Regenerating /etc/ld.so.cache... >>>>> sys-devel/binutils-2.16.1-r1 merged. >> !!! EBUILD_PHASE=clean >> !!! D=/data1/tmp/Mar21/var/tmp/portage/binutils-2.16.1-r1/image/ >> data1/tmp/Mar21 >> !!! DEST=/data1/tmp/Mar21/var/tmp/portage/binutils-2.16.1-r1/image/ >> !!! PREFIX=/data1/tmp/Mar21 >> !!! ROOT=/data1/tmp/Mar21 >> >>>>> No packages selected for removal by clean. >> >>>>> Auto-cleaning packages... >> >>>>> No outdated packages were found on your system. >> >> >> * error scanning /etc >> >> ------------------------------- >> Then it dies.... >> >> Also looking over the directories when it's trying to install, it >> seems like there are some places where it's trying to install/remove >> from ${PREFIX}/${PREFIX}! >> >> Here's an example of what I mean... >> --- !empty dir /data1/tmp/Mar21/data1/tmp/Mar21/usr/lib/binutils/ >> i686-pc-linux-gnu/2.16.1/ldscripts >> --- !empty dir /data1/tmp/Mar21/data1/tmp/Mar21/usr/lib/binutils/ >> i686-pc-linux-gnu/2.16.1/include >> --- !empty dir /data1/tmp/Mar21/data1/tmp/Mar21/usr/lib/binutils/ >> i686-pc-linux-gnu/2.16.1 >> --- !empty dir /data1/tmp/Mar21/data1/tmp/Mar21/usr/lib/binutils/ >> i686-pc-linux-gnu >> >> My PREFIX is /data1/tmp/Mar21 so there are a lot of ${PREFIX}/$ >> {PREFIX} >> >> Ideas about dealing with the double PREFIX? I guess Mac people are >> running binutils issues since they use the host linker? >> >> -matt >> > > Some detective work. > > It appears that the Makefile for binutils is combining together 2 > variables. $(DESTDIR)$(prefix) and storing it in a variable called > $(MAKEDIRS). DESTDIR is equal to ${D} (this is set in > toolchain-binutils.eclass). And ${prefix} is ... ${PREFIX} (which > also comes from the eclass where --prefix=${PREFIX}/usr). Since ${D} > ends with ${PREFIX} there ends up being a double prefix.....
Nice work. I'll fix this in the next big commit. In the meantime you can try changing that ${D} to ${DEST}. FYI, in the ebuild environment from now on we will be using the $ {EDEST} variable, which equates to ${D} without the appended PREFIX. --Kito -- gentoo-osx@g.o mailing list