LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   what is the use of mpfr and gmp is they are not used ? Manual error ? (https://www.linuxquestions.org/questions/linux-from-scratch-13/what-is-the-use-of-mpfr-and-gmp-is-they-are-not-used-manual-error-784338/)

centguy 01-24-2010 03:17 AM

what is the use of mpfr and gmp is they are not used ? Manual error ?
 
I refer to the LFS 6.5



http://www.linuxfromscratch.org/lfs/...gcc-pass1.html

Here they
say


Quote:

tar -jxf ../mpfr-2.4.1.tar.bz2
mv -v mpfr-2.4.1 mpfr
tar -jxf ../gmp-4.3.1.tar.bz2
mv -v gmp-4.3.1 gmp
but then I don't see mpfr and gmp mentioned anywhere else in the page.

Can I proceed with ../gcc-4.4.1/configure without worrying about such
weird thing ?

centguy 01-24-2010 03:25 AM

http://www.linuxquestions.org/questi...2.3.0.-690426/

post #11 seems to answer my quesiton. Man.. the manual page should be rewritten !

druuna 01-24-2010 04:42 AM

Hi,

Both GMP and MPFR are needed by GCC (math and arithmetic library dependencies). There's no need to mention them on the commandline (./configure .... step), gcc will look for them and fail if both are not present.

Take a look at chapter 6 (6.13 and 6.14) for some more details about these packages.

Hope this clears things up a bit.

centguy 01-24-2010 06:45 PM

I am building gcc for pass-1.

Quote:

lfs:/mnt/lfs/build-dir$ cp ../sources/gcc-4.4.1.tar.bz2 .
lfs:/mnt/lfs/build-dir$ cp ../sources/gmp-4.3.1.tar.bz2 .
lfs:/mnt/lfs/build-dir$ cp ../sources/mpfr-2.4.1.tar.bz2 .
lfs:/mnt/lfs/build-dir$ tar -xjvf gcc-4.4.1.tar.bz2
lfs:/mnt/lfs/build-dir$ tar -xjvf mpfr-2.4.1.tar.bz2
lfs:/mnt/lfs/build-dir$ tar -xjvf gmp-4.3.1.tar.bz2
lfs:/mnt/lfs/build-dir$ mv gmp-4.3.1 gcc-4.4.1/mpfr
lfs:/mnt/lfs/build-dir$ mv mpfr-2.4.1 gcc-4.4.1/mpfr
lfs:/mnt/lfs/build-dir$ cd gcc-4.4.1
lfs:/mnt/lfs/build-dir/gcc-4.4.1$ mkdir -v ../gcc-build
lfs:/mnt/lfs/build-dir/gcc-4.4.1$ cd ../gcc-build/
lfs:/mnt/lfs/build-dir/gcc-build$ ../gcc-4.4.1/configure --target=$LFS_TGT --prefix=/tools --disable-nls --disable-shared --disable-multilib --disable-decimal-float --disable-threads --disable-libmudflap --disable-libssp --disable-libgomp --enable-languages=c
make

crashed at

Quote:

gcc -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition -Wc++-compat -Wmissing-format-attribute -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.4.1/gcc -I../../gcc-4.4.1/gcc/. -I../../gcc-4.4.1/gcc/../include -I../../gcc-4.4.1/gcc/../libcpp/include -I/mnt/lfs/build-dir/gcc-build/./mpfr -I/mnt/lfs/build-dir/gcc-4.4.1/mpfr -I../../gcc-4.4.1/gcc/../libdecnumber -I../../gcc-4.4.1/gcc/../libdecnumber/dpd -I../libdecnumber ../../gcc-4.4.1/gcc/bt-load.c -o bt-load.o
gcc -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition -Wc++-compat -Wmissing-format-attribute -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.4.1/gcc -I../../gcc-4.4.1/gcc/. -I../../gcc-4.4.1/gcc/../include -I../../gcc-4.4.1/gcc/../libcpp/include -I/mnt/lfs/build-dir/gcc-build/./mpfr -I/mnt/lfs/build-dir/gcc-4.4.1/mpfr -I../../gcc-4.4.1/gcc/../libdecnumber -I../../gcc-4.4.1/gcc/../libdecnumber/dpd -I../libdecnumber ../../gcc-4.4.1/gcc/builtins.c -o builtins.o
../../gcc-4.4.1/gcc/builtins.c: In function 'fold_builtin_1':
../../gcc-4.4.1/gcc/builtins.c:10289: error: 'mpfr_j0' undeclared (first use in this function)
../../gcc-4.4.1/gcc/builtins.c:10289: error: (Each undeclared identifier is reported only once
../../gcc-4.4.1/gcc/builtins.c:10289: error: for each function it appears in.)
../../gcc-4.4.1/gcc/builtins.c:10295: error: 'mpfr_j1' undeclared (first use in this function)
../../gcc-4.4.1/gcc/builtins.c:10301: error: 'mpfr_y0' undeclared (first use in this function)
../../gcc-4.4.1/gcc/builtins.c:10307: error: 'mpfr_y1' undeclared (first use in this function)
../../gcc-4.4.1/gcc/builtins.c: In function 'fold_builtin_2':
../../gcc-4.4.1/gcc/builtins.c:10428: error: 'mpfr_jn' undeclared (first use in this function)
../../gcc-4.4.1/gcc/builtins.c:10434: error: 'mpfr_yn' undeclared (first use in this function)
../../gcc-4.4.1/gcc/builtins.c:10442: error: 'mpfr_remainder' undeclared (first use in this function)
../../gcc-4.4.1/gcc/builtins.c: In function 'do_mpfr_remquo':
../../gcc-4.4.1/gcc/builtins.c:13342: warning: implicit declaration of function 'mpfr_remquo'
../../gcc-4.4.1/gcc/builtins.c: In function 'do_mpfr_lgamma_r':
../../gcc-4.4.1/gcc/builtins.c:13420: warning: implicit declaration of function 'mpfr_lgamma'
make[2]: *** [builtins.o] Error 1
make[2]: Leaving directory `/mnt/lfs/build-dir/gcc-build/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/mnt/lfs/build-dir/gcc-build'
make: *** [all] Error 2
lfs:/mnt/lfs/build-dir/gcc-build$
I hope it is not my CentOS 5.4 host problem.

centguy 01-24-2010 07:52 PM

can i revert to lfs 6.4 ?
 
I highly suspect the combination of gcc4.4.1,mpfr2.4.2 and gmp4.3.1 is
having problem.

if i had a chance to build lfs 6.4.. that would be nice. how can i find the source and the manual for lfs6.4 ?

centguy 01-24-2010 08:09 PM

Found http://www.linuxfromscratch.org/lfs/downloads/

Seriously considering 6.4.

druuna 01-25-2010 02:21 AM

Hi,

First thing I noticed when looking at the output posted in reply #4: You extracted all three packets at the wrong location.

Steps to take for 5.5 GCC 4.1 pass 1:

Code:

cd /mnt/lfs/sources (all packages/patches should be here)
tar jxf gcc-4.4.1.tar.bz2
cd gcc-4.4.1
tar -jxf ../mpfr-2.4.1.tar.bz2 (here both mpfr and gmp are unpacked)
mv -v mpfr-2.4.1 mpfr
tar -jxf ../gmp-4.3.1.tar.bz2
mv -v gmp-4.3.1 gmp
mkdir -v ../gcc-build (create and enter temp build directory)
cd ../gcc-build

You are now standing in the temporary build dir and can continue with the next step (configure).

I also see that you use CentOS as a base system, I hope you did check (and corrected if needed) this: iv. Host System Requirements. It is very important that these are correct/up to specs.

Jope this helps.

centguy 01-25-2010 05:04 AM

Thanks for extra eyes. I did it too fast. I copied the gmp wrongly! Will report back

centguy 01-25-2010 05:57 AM

I redo the gcc part, it is working now ! Thanks ! There is no problem
between gcc4.4.1, mpfr-2.4.1 and gmp4.3.1. Sorry for the confusion.

Quote:

168 rm -rf /mnt/lfs/build-dir/*
169 cd /mnt/lfs/build-dir/
170 cp /mnt/lfs/sources/gcc-4.4.1.tar.bz2 .
171 cp /mnt/lfs/sources/mpfr-2.4.1.tar.bz2 .
172 cp /mnt/lfs/sources/gmp-4.3.1.tar.bz2 .
173 tar -xjvf gcc-4.4.1.tar.bz2
174 tar -xjvf gmp-4.3.1.tar.bz2
175 tar -xjvf mpfr-2.4.1.tar.bz2
176 mv mpfr-2.4.1 gcc-4.4.1/mpfr
177 mv gmp-4.3.1 gcc-4.4.1/gmp
178 mkdir build-gcc
179 cd build-gcc
180 ../gcc-4.4.1/configure --target=$LFS_TGT --prefix=/tools --disable-nls --disable-shared --disable-multilib --disable-decimal-float --disable-threads --disable-libmudflap --disable-libssp --disable-libgomp --enable-languages=c
181 make
182 make install
183 history


All times are GMT -5. The time now is 12:18 PM.