Hide Forgot
Description of problem: Installing gcc to a non-default --installroot location results in a broken ld Version-Release number of selected component (if applicable): Fedora-14-x86_64-Live-Desktop.iso [liveuser@localhost home]$ yum --version 3.2.28 Installed: rpm-4.8.1-5.fc14.x86_64 at 2010-10-22 18:31 Built : Fedora Project at 2010-08-10 07:43 Committed: Panu Matilainen <pmatilai> at 2010-08-10 Installed: yum-3.2.28-5.fc14.noarch at 2010-10-22 18:31 Built : Fedora Project at 2010-10-05 13:03 Committed: Seth Vidal <skvidal at fedoraproject.org> at 2010-10-05 [liveuser@localhost home]$ [liveuser@localhost home]$ uname -a Linux localhost.localdomain 2.6.35.6-45.fc14.x86_64 #1 SMP Mon Oct 18 23:57:44 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux [liveuser@localhost home]$ How reproducible: See steps below. Steps to Reproduce: 1. Install gcc in a non-default location: yum --installroot=/media/OS/home/26blahfc14/26blahfc14 -y -v install gcc Actual results: Observe that ld is broken because the softlinks are to _absolute_ paths!: $ cd /media/OS/home/26blahfc14 $ find . -name ld | xargs ls -laF lrwxrwxrwx. 1 liveuser liveuser 38 Mar 4 16:30 ./etc/alternatives/ld -> /usr/bin/ld.bfd lrwxrwxrwx. 1 liveuser liveuser 48 Mar 4 16:30 ./usr/bin/ld -> /etc/alternatives/ld -rwxrwxrwx. 1 liveuser liveuser 57 Mar 4 16:30 ./var/lib/alternatives/ld* $ find . -name ld.bfd | xargs ls -laF -rwxrwxrwx. 1 liveuser liveuser 587984 Nov 15 05:43 ./usr/bin/ld.bfd* Expected results: Either (A) soft-links should be to _relative_ paths, or (B) the --installroot should be pre-fixed to the absolute paths. To elaborate, Either (A): $ cd /media/OS/home/26blahfc14 $ pwd /media/OS/home/26blahfc14 $ find . -name ld | xargs ls -laF lrwxrwxrwx. 1 liveuser liveuser 48 Mar 4 17:58 ./etc/alternatives/ld -> ../../usr/bin/ld.bfd* lrwxrwxrwx. 1 liveuser liveuser 58 Mar 4 17:57 ./usr/bin/ld -> ../../etc/alternatives/ld* -rwxrwxrwx. 1 liveuser liveuser 57 Mar 4 16:30 ./var/lib/alternatives/ld* $ find . -name ld.bfd | xargs ls -laF -rwxrwxrwx. 1 liveuser liveuser 587984 Nov 15 05:43 ./usr/bin/ld.bfd* $ Or (B): $ cd /media/OS/home/26blahfc14 $ pwd /media/OS/home/26blahfc14 $ find . -name ld | xargs ls -laF lrwxrwxrwx. 1 liveuser liveuser 48 Mar 4 17:58 ./etc/alternatives/ld -> /media/OS/home/26blahfc14/usr/bin/ld.bfd* lrwxrwxrwx. 1 liveuser liveuser 58 Mar 4 17:57 ./usr/bin/ld -> /media/OS/home/26blahfc14/etc/alternatives/ld* -rwxrwxrwx. 1 liveuser liveuser 57 Mar 4 16:30 ./var/lib/alternatives/ld* $ find . -name ld.bfd | xargs ls -laF -rwxrwxrwx. 1 liveuser liveuser 587984 Nov 15 05:43 ./usr/bin/ld.bfd* $ Additional info: Work-around is to delete installed soft-links, and to create soft-links as in (A) or (B) above.
Pretty sure this is not considered a bug, use "chroot /media/OS/home/26blahfc14/26blahfc14" to run commands within the install root. If there is a Fedora policy against absolute symlinks, feel free to file it against GCC/ld.
chroot is for using a different root directory -- but in this case the tools are installed in a different location -- and the root directory continues to be /. So it is bug in how yum installs in a different location (not under a different root directory).
I've tweaked the man page to make the function of --installroot clearer: http://yum.baseurl.org/gitweb?p=yum.git;a=commitdiff;h=a6efb65474cb2b023e4e021de0fbafad847f472d