On Tue, 17 Dec 2013 15:11:29 +0000 lf...@cruziero.com (akhiezer) wrote: > Hazel, > > > I gather that you've sent a reply - in which you substantially or > completely solve the issue - that hasn't reached the list yet since > the weekend: it might be the attachment that's causing the trouble; > could you re-send to list but omitting the attachment for now; or if > you like I can try and hook it in from here.
That's right. Your list manager snagged it. I've printed out my reply below. It isn't a solution but it *is* an explanation, and that was mainly what I wanted. But it might be worth someone patching the gcc/configure script so that gcc/Makefile exports an explicit library path that does not contain host directories whenever there is both an alien target architecture and local libraries. On Thu, 12 Dec 2013 11:41:03 +0000 lf...@cruziero.com (akhiezer) wrote: > Could you put the following stuff that's shown between the two '----' > delimiter lines, at the top of each of the four files > './gcc-4.8.1/{,{gmp,mpfr,mpc}/}ltmain.sh' - after their respective > opening chunks of comments and just before the 'PROGRAM=libtool' and > 'PACKAGE=libtool' lines (that exact positioning is of course not > strictly essential): ---- > > export PS4=" _zoiks_(${0})__ ${PS4}"; > > set -v; > set -x; > set -o functrace; > shopt -s extdebug; > > echo "PS4:${PS4}"; > > ---- > (Sorry that's not sent as a patch - could've checked out the > attachments thing in practice; any larger changeset &/or > files-to-be-modified, then would've.) > > > And then run the configure and make sections again, but capturing > everything to file and not outputting anything to screen, with e.g.: > > { configure-command-line ; } 1>cfg.stoe 2>&1 > > { make-command-line ; } 1>mkbld.stoe 2>&1 > > That part about not outputting anything to screen is not essential: > but it helps ensure/verify that we're not missing anything being > captured into the logfiles. Done. The build log is rather large even though I removed gmp from the host system again to force a crash after the error. I'm attaching a small extract which shows exactly how mpfr and mpc create their libtool archive files. If you want, I can send you the whole log privately. The root of the problem is that they both search for libraries along a path which includes standard host directories like /usr/lib64 *ahead of* the local in-tree ones. To check the effects of this, I did four builds that covered all possible host combinations of gmp and mpfr and checked the libtool archives made by mpfr and mpc. Here is the full 2x2 matrix: 0.0. Neither libgmp.la nor libmpfr.la on host. mpfr finds the local libgmp.la and writes it into libmpfr.la as a dependency. mpc finds the local libmpfr.la, reads the address of libgmp.la out of it and writes both of them as dependencies in libmpc.la. The build goes to completion. This is ideal behaviour. 0.1. Host has libmpfr.la but not libgmp.la (my original setup). mpfr finds the local libgmp.la and writes it into libmpfr.la as a dependency. mpc finds both the host and the local libmpfr.la files. The former contains a reference to /usr/lib64/libgmp.la as a dependency, the latter refers to the local libgmp.la. mpc puts *both* gmp files in as dependencies but can't find the former, so the build crashes. 1.0. Host has libgmp.la but not libmpfr.la mpfr finds the host libgmp.la in /usr/lib64 and puts it into libmpfr.la as a dependency. mpc finds the local mpfr.la file and reads the address /usr/lib64/libgmp.la out of it. Since this is a valid address, the build goes to completion. 1.1. Host has both libgmp.la and libmpfr.la (the standard Slackware setup) mpfr finds the host libgmp.la and writes it into libmpfr.la as a dependency. mpc finds both the host and the local libmpfr.la files. They both refer to /usr/lib64/libgmp.la, so mpc puts that into libmpc.la as a dependency. The build goes to completion. For both 1.0 and 1.1, there is some dependence on host libraries which is not really appropriate in a cross-compilation. If the library search path could somehow be set to exclude the normal host directories when an alien target architecture is given, this would not happen. Hazel -- -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page