Hazel Russman <hazeldebian <at> googlemail.com> writes:
> > I am trying to build a 64-bit lfs-7.4 system using a host system based > on Slackware-14. Currently I am having a problem with the first pass of > building gcc. During the internal build of libmpc, a search is made for > /usr/lib64/libgmp.la. It is not found, so the build crashes. > > libtool: link: ar rc .libs/libmpc.a abs.o acos.o acosh.oo add_ui.o > arg.o asin.o asinh.o atan.o atanh.o clear.o cmcos.o cosh.o div_2si.o > div_2ui.o div.o div_fr.o div_ui.o _sub.o get_prec2.o get_prec.o > get_version.o get_x.o imag.tr.o log.o log10.o mem.o mul_2si.o mul_2ui.o > mul.o mul_fr_ui.o neg.o norm.o out_str.o pow.o pow_fr.o pow_ld.o > pow_ow_z.o proj.o real.o urandom.o set.o set_prec.o set_str.oo sin_cos.o > sinh.o sqr.o sqrt.o strtoc.o sub.o sub_fr.o snh.o uceil_log2.o ui_div.o > ui_ui_sub.o > libtool: link: ranlib .libs/libmpc.a > /bin/sed: can't read /usr/lib64/libgmp.la: No such file or directory > libtool: link: `/usr/lib64/libgmp.la' is not a valid libtool archive > make[4]: *** [libmpc.la] Error 1 > make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/mpc/src > make[3]: *** [all-recursive] Error 1 > make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/mpc > make[2]: *** [all] Error 2 > make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/mpc > make[1]: *** [all-mpc] Error 2 > make[1]: Leaving directory `/mnt/lfs/sources/gcc-build' > make: *** [all] Error 2 > > I have tried two experimental builds. In the first, I used two > additional configuration parameters in the hope that they would tell the > compiler the correct place to look for information on gmp: > --with_gmp_include=$(pwd)/gmp and --with_gmp_lib=$(pwd)/gmp/.libs. But > this did not have any effect on the error. > > For the second try, I simply put a symbolic link into /usr/lib64 > pointing to /mnt/lfs/sources/gcc-build/gmp/.libs/libgmp.la. Then the > build was successful. > > I have not installed this build because it was not done "by the book" > and I am afraid of polluting my tool chain. Can someone please tell me: > 1) If it is safe to install it? > 2) Why the error occurred, given that the configuration options and > global edits set out in the book should prevent this kind of > back-reference to the host system? > 3) What would be the proper way to correct an error like this? My way > feels rather kludgy. > G'day, I was coming across that error while trying to cross compile mpc for later use with gcc using Optware building system (nothing to do with LFS I agree). In my case it was mpc which did complain but mpfr was the one causing it. In the libmpfr.la there was the path to /opt/lib/libgmp.la (/opt/lib in my case cause of Optware). MPC seems to look at the libmpfr.la (and libgmp.la) I assume. --- <path to the libmpfr.la> --- ... # Libraries that this one depends upon. dependency_libs=' -L<some-path-to-my-project> opt/lib/libgmp.la' ... --------------------------- I still don't know the source of the problem but I simply did sed the /opt/lib/*.la out of the libmpfr.la file and mpc and gcc compiled fine. And I may add that "/opt/lib/libgmp.la" is is not in 'dependency_libs the libmpfr.la file right after compilation in ./src/.libs/libmpfr.la and ./src/libmpfr.la. Instead the complete path to were it really gets copied. It seems to happen during the "$make install" phase. Maybe that a) helps someone else too - as did your post me - and b) maybe someone with deeper knowledge of libs/libtool and compiling knows what's the source of the problem is. The method with linking to - in my case - /opt/lib would be a bit more work since I do cross compile for i686 and x86_64 bit. Additionally, in libmpc.la the two paths to /opt/lib/libgmp.la and /opt/lib/libmpfr.la appear again but gcc seems not to mind and compiles fine anyway. Below the sed I used, although probaly obvious: $ sed -i 's%^\(dependency_libs=.*\) \(/opt/lib/.*la\)%/\1%g' \ /home/jane/Projects/slug/optware/asustor-i686/staging/opt/lib/libmpfr.la System involved: - Ubuntu 12.04 32-bit, 4 logical CPU's, 4GB RAM (Parallels VM) - cross compiler : gcc 4.6.3 - latest Optware and latest GMP,MPFR and MPC -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page