Ticket #956 (new task)

Opened 3 years ago

Last modified 16 months ago

Do away with /tools and /cross-tools symlinks

Reported by: chris@… Owned by: clfs-commits@…
Priority: minor Milestone:
Component: BOOK Version:
Keywords: Cc: berzerkula@…, jonathan@…

Description (last modified by kb0iic) (diff)

I believe there's no real reason to keep the /tools and /cross-tools symlinks, so they can just be disposed of. We already use --with-sysroot in the cross-toolchain, so we may as well take full advantage of it. This would also allow for building the whole temp-system without the need for any root access, or testing multiple builds at once with jhalfs or similar tools. Plus, I believe in general that reducing host system modifications is a good thing.

I've managed to get almost a complete temp system this way, so far. Of course I modified most references to "/tools" and "/cross-tools" in the cross-tools, temp-system and boot sections by prefixing them with "${CLFS}", and added "DESTDIR=${CLFS}" to the installation commands for temp-system/boot packages. Aside from those, the only changes I've had to make was adding "--with-sysroot" to temp-system MPFR and MPC, due to libtool problems (not finding libgmp.la), and modifying Util-linux instructions so that it links to libpthread, as it does not do so automatically. I've hit similar problems with boot/e2fsprogs, as apparently dependent libraries are not being automatically found. If something links to librt, it will be located in ${CLFS}/tools, but then libpthread, which librt links to, will not. However, it works fine if both are explicitly specified. In other words, if I create a dummy.c with "main(){}"...

${CC} dummy.c -lrt

fails due to not finding libpthread, but

${CC} dummy.c -lrt -libpthread

works just fine. I've been trying to find the cause for this, with assistance from William Harrington in the chat room, who suspects there might be a problem with -rpath or something similar. Compiling Glibc with LDFLAGS="-Wl,rpath,/tools/lib:${CLFS}/tools/lib" does not seem to help, though.

I have a patch with the changes I've made so far on my local copy -  http://www.clfs.org/~chris/no-tools.patch


no-tools.patch Download (75.4 KB) - added by kb0iic 16 months ago.
Original patch from Chris

Change History

comment:1 Changed 3 years ago by chris@…

  • Description modified (diff)

comment:2 Changed 3 years ago by chris@…

  • Priority changed from major to minor

comment:3 Changed 16 months ago by kb0iic

Chris, the patch isn't in your home directory. I hope you still have it saved somewhere. Can you attach it to this ticket rather than linking it to the web server. I want to test some things and maybe get this in the book sometime.

Changed 16 months ago by kb0iic

Original patch from Chris

comment:4 Changed 16 months ago by kb0iic

  • Description modified (diff)
Note: See TracTickets for help on using tickets.