On Tue, Nov 01, 2016 at 09:47:11PM +0000, Jeremy Huntwork wrote: > I notice that in chapter 5 make, you have added the flag `--without-guile` > with the explanation that we don't want to potentially link against the > host system. > > While I'm sure this does what is expected, the possibility of linking > against the host there is a little alarming. At that point in the process, > we should have made it near impossible for our toolchain to link against > the host. The toolchain itself shouldn't look in '/' or '/usr' at all. >
Nice idea. But it sounds hard - prevent the temporary tools finding anything (headers, libs) in /usr or /usr/local at some point. All our build method guarantees is that once you enter chroot you will be separate from the host. > Just kind of walking through it in my mind, one possibility is that > pkg-config is returning flags that tell the compiler/linker to search in > '/lib/' '/usr/lib' or wherever, on the host. Indeed, looking at the build > logs for make, it does seem that it tries to find guile by using pkg-config. > The current switch apparently works (I don't know if I have ever built on a host where guile was installed), so what does the change buy us ? As for "Looking at the build logs" - easier to read the configure script, and search for guile ;-) The switch stops it looking. > I propose that it would be better and more complete/safe to add pkg-config > in the /tools path, but just have it exit with an error. Like `ln -s false > /tools/bin/pkg-config`. I haven't tested this yet, but if it does what I > expect, it should make it just that more certain that the host wouldn't > pollute anything i /tools and we wouldn't have to add explicit flags like > this anywhere. > > JH I'm sure there are other approaches, but what we have is good enough (we've been doing it since Make-4.0 came out, just over 3 years ago - and Bruce found the problem because he had installed guile). Yes, from time to time people link to the host - the general cause is that they stopped, exited the environment, and did not correctly re-enter the environment when they tried to resume. At that point a few people don't ask, and become root :-( So, I don't think there will ever be a totally foolproof way of building LFS. If you want to disable pkg-config, do it as early as is practical in chapter 5 - 'make' is comparatively late. And the proof of the pudding, at least for 'make', would be building on a host with guile installed. ĸen -- `I shall take my mountains', said Lu-Tze. `The climate will be good for them.' -- Small Gods -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
