> Date: Sat, 01 Mar 2014 18:17:42 -0600 > From: Bruce Dubbs <bruce.du...@gmail.com> > To: LFS Developers Mailinglist <lfs-dev@linuxfromscratch.org> > Subject: Re: [lfs-dev] gcc pass 1/2 instructions re mpfr/gmp/mpc. > > akhiezer wrote: > >> Date: Sat, 01 Mar 2014 17:04:38 -0600 > >> From: Bruce Dubbs <bruce.du...@gmail.com> > >> To: LFS Developers Mailinglist <lfs-dev@linuxfromscratch.org> > >> Subject: Re: [lfs-dev] gcc pass 1/2 instructions re mpfr/gmp/mpc. > >> > >> Pierre Labastie wrote: > >>> Le 01/03/2014 23:31, Bruce Dubbs a écrit : > >>>> Pierre Labastie wrote: > >>>>> Le 01/03/2014 21:14, Bruce Dubbs a écrit : > >>>>>> Pierre Labastie wrote: > >>>>>> > >>>>>>>> It sounds like we need to add a check for libgmp on the host. > >>>>>>>> Perhaps > >>>>>>>> libmpfr and libmpc also. > >>>>>> > >>>>>>> It is the .la files, which fire the issue. I could reproduce the > >>>>>>> error with > >>>>>>> lfs-7.5-rc1 as the host, by removing libgmp.la. > >>>>>>> > >>>>>>> Actually, neither Debian nor Arch provide those .la files. I have not > >>>>>>> checked > >>>>>>> Fedora yet. > >>>>>>> > >>>>>>> I am not sure what should be done. If users accept to install > >>>>>>> libgmp-dev, > >>>>>>> libmpfr-dev, libmpc-dev on their host, the easiest would be to > >>>>>>> completely > >>>>>>> remove the build of those packages for gcc-pass1. I'll try that. This > >>>>>>> would > >>>>>>> imply that the host requirement be augmented with both libraries > >>>>>>> _and_ headers > >>>>>>> checks. > >>>>>>> > >>>>>>> Otherwise, maybe just a note telling to remove the .la files > >>>>>>> (completely > >>>>>>> removing them gives the cleanest build), at least for the course of > >>>>>>> the build? > >>>>>> > >>>>>> Yes, on my system I have /usr/lib/libmpfr.la which contains > >>>>>> dependency_libs=' /usr/lib/libgmp.la'. > >>>>>> > >>>>>> If we add the following to the host system requirements, would that be > >>>>>> enough? > >>>>>> > >>>>>> [ -e /usr/lib/libmpfr.la ] && [ ! -e /usr/lib/libgmp.la ] && > >>>>>> echo "libgmp is missing" > >>>>>> > >>>>>> I'm going to hold off releasing 7.5 until we get this settled. > >>>>>> > >>>>>> -- Bruce > >>>>>> > >>>>> I think it is the idea of the fix, except that the libs may be in > >>>>> /usr/lib64 > >>>>> (as in Slackware64). The message should be changed though, since > >>>>> libgmp.so > >>>>> might be installed without libgmp.la. Do not know exactly what to say: > >>>>> "please > >>>>> install a package with libgmp.la, or remove libmpfr.la" (too long...) > >>>> > >>>> Hmm. How about: > >>>> > >>>> if [ $(ls /usr/lib*/lib{mpfr,gmp,mpc}.so|wc -l) != 3 ]; then > >>>> echo one of lib{mpfr,gmp,mpc}.so is missing > >>>> fi > >>>> > > > > > > This would give a false-negatve on e.g. host-os multilib slackware - there's > > a '/usr/lib/libmpc.so' as well as the three 'usual suspects' > > (i.e. /usr/lib64/lib{mpfr,gmp,mpc}.so) in /usr/lib64 . > > > > > > The test - if using that approach - would really need to do (loop across) > > each of mpfr/mpc/gmp separately, and check that iindivid value is e.g. '>=1' > > && '<=2' . > > > Gawd. > > How about $(ls /usr/lib*/lib{mpfr,gmp,mpc}.so|sort|uniq|wc -l) != 3 >
Had written (it seems to've not appeared on list): ==== No; you'd need to strip out the paths - or sed out the '64' &c - to get uniqueness. Can see by inspection: and verified on nearby machine, that still get =4 . Could may be do: $(ls /usr/lib*/lib{mpfr,gmp,mpc}.so|rev|cut -d'/' -f1|rev|sort|uniq|wc -l) != 3 , if it's ok to assume 'rev' present on host-os; probly ok as is usually in util-linux. Or could use find(). ==== But, that'd still be not right: for, you could be inadvertently mixing'n'matching 32-bit & 64-bit: e.g. (just an example) 32-bit gmp under /usr/lib , and 64-bit mpfr & mpc under /usr/lib64 . You'd really want to keep them separate: $(\ls /usr/lib/lib{mpfr,gmp,mpc}.so|rev|cut -d'/' -f1|rev|sort|uniq|wc -l) != 3 $(\ls /usr/lib64/lib{mpfr,gmp,mpc}.so|rev|cut -d'/' -f1|rev|sort|uniq|wc -l) != 3 , with a conditional test beforehand to ensure the dir (/usr/lib , /usr/lib64) exists. That'd still allow a reasonably concise and accurate test. rgds, akh -- -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page