gcc installation problem

Emmanuel Thomé emmanuel.thome at gmail.com
Tue Feb 4 21:17:46 UTC 2014


[To list: answer was in PM to me, quoted in full at the end of this message]

On Tue, Feb 4, 2014 at 6:57 PM, Francesca Belloni
<francescabelloni at gmail.com> wrote:
> gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-53)
> Copyright (C) 2002 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Ouch. It's about as old as one could have feared.

There's no reason to spend a minute with this old compiler except for
building a new one. Gmp is not among the "safe" pieces of code that
old and buggy compilers can handle (much the contrary, in fact).

Please follow the procedure suggested by Marc.

If things get awry in that gcc 3.2.x proves unable to properly compile
gcc 4.8.x, which could well happen, then you might even have to
consider doing intermediary steps.

Down the road, expect another set of difficulties. Your libc is also
inevitably 10-years old as well. This might yield nasty issues, for
example with respect to the threading model. This all depends on how
much the code you're willing to compile eventually asks from the
glibc.

> I tried to follow what you wrote, but at the make, I obtain
> make[3]: Leaving directory `/np/linac/belloni/programs/gcc/gcc-build/gcc'
> make[2]: *** [all-stage1-gcc] Error 2
> make[2]: Leaving directory `/np/linac/belloni/programs/gcc/gcc-build'
> make[1]: *** [stage1-bubble] Error 2
> make[1]: Leaving directory `/np/linac/belloni/programs/gcc/gcc-build'
> make: *** [all] Error 2
>    Have you any idea of how solving the problem, please?

Divinatory skills are rare. The complete configuration and compilation
transcript would be more usable. But again, please try the script
pointed to by marc, first.

Good luck ! (on such an old system, I think most people would give up
pretty quick).

E.


On Tue, Feb 4, 2014 at 6:57 PM, Francesca Belloni
<francescabelloni at gmail.com> wrote:
> Hello,
>    thanks for your answer!
> I am not sure I understood what you asked. The already installed gcc version
> is
>
> gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-53)
> Copyright (C) 2002 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> and the result of the configure is
>
>
>   Version:           GNU MP 5.1.3
>   Host type:         pentium4-unknown-linux-gnu
>   ABI:               64
>   Install prefix:    /home/belloni/programs/usr
>   Compiler:          gcc -std=gnu99
>   Static libraries:  yes
>   Shared libraries:  yes
> I tried to follow what you wrote, but at the make, I obtain
> make[3]: Leaving directory `/np/linac/belloni/programs/gcc/gcc-build/gcc'
> make[2]: *** [all-stage1-gcc] Error 2
> make[2]: Leaving directory `/np/linac/belloni/programs/gcc/gcc-build'
> make[1]: *** [stage1-bubble] Error 2
> make[1]: Leaving directory `/np/linac/belloni/programs/gcc/gcc-build'
> make: *** [all] Error 2
>    Have you any idea of how solving the problem, please?
> Otherwise I will wait for un update of the cluster, which is forseen, but in
> some time.
>
>   Thank you and have a nice evevning!
>
> Francesca
>
>
> On 4 February 2014 18:36, Emmanuel Thomé <emmanuel.thome at gmail.com> wrote:
>>
>> Hi,
>>
>> > Linux cluster 2.4.21-32.0.1.ELsmp #1 SMP Tue May 17 17:46:36 EDT 2005
>> > x86_64 x86_64 x86_64 GNU/Linux
>>
>> The output of uname -a hints at a severely outdated system install !
>>
>> Could you please indicate the compiler version which you used to
>> compile gmp itself ? (i.e., not the compiler version you intend to
>> build later on). I suspect this to also be very old, and most likely
>> to miscompile gmp.
>>
>> gcc has (or had, at some point) provision for building its
>> requirements gmp/mpfr/mpc with its own stage1 compiler, which maybe
>> works better at compiling gmp. For this, you would do, after
>> unpacking:
>>
>> cd gcc-*
>> ln -s ../gmp-*/ gmp
>> ln -s ../mpfr-*/ mpfr
>> ln -s ../mpc-*/ mpc
>> cd ../
>> mkdir gcc-build
>> cd gcc-build
>> ../gcc-4.8.2/configure .......... && make -j4 && make install
>>
>> Alas, I'm not sure it still works as is, out of the box (I'm pretty
>> sure it once did).
>>
>> Regards,
>>
>> E.
>>
>> On Tue, Feb 4, 2014 at 4:57 PM, Francesca Belloni
>> <francescabelloni at gmail.com> wrote:
>> > Hello!
>> >     I am trying to install gcc4.8.2 in a directory on a cluster. To make
>> > this I am downloading and expanding   gmp-5.1.3.tar.bz2, but at the make
>> > check, I always get the same mistake.
>> >
>> > The system is (result of uname -a)
>> > Linux cluster 2.4.21-32.0.1.ELsmp #1 SMP Tue May 17 17:46:36 EDT 2005
>> > x86_64 x86_64 x86_64 GNU/Linux
>> >
>> > I digit:
>> >
>> > tar -zxvf gcc-*.tar.gz
>> > tar -jxvf gmp-*.tar.bz2
>> > tar -zxvf mpfr-*.tar.gz
>> > tar -zxvf mpc-*.tar.gz
>> >
>> > # configure/make gmp
>> > cd gmp*
>> > mkdir build
>> > cd build
>> > ../configure --prefix=/np/linac/belloni/programs/usr
>> > make
>> > make check
>> >
>> > but at the make check the following error is given:
>> >
>> >
>> > make[4]: Entering directory
>> > `/np/linac/belloni/programs/gcc/gmp-5.1.3/build/tests/mpz'
>> > PASS: t-addsub
>> > PASS: t-cmp
>> > PASS: t-mul
>> > PASS: t-mul_i
>> > PASS: t-tdiv
>> > PASS: t-tdiv_ui
>> > PASS: t-fdiv
>> > PASS: t-fdiv_ui
>> > PASS: t-cdiv_ui
>> > PASS: t-gcd
>> > PASS: t-gcd_ui
>> > PASS: t-lcm
>> > PASS: t-invert
>> > PASS: dive
>> > PASS: dive_ui
>> > PASS: t-sqrtrem
>> > PASS: convert
>> > PASS: io
>> > PASS: t-inp_str
>> > PASS: logic
>> > PASS: bit
>> > PASS: t-powm
>> > PASS: t-powm_ui
>> > PASS: t-pow
>> > PASS: t-div_2exp
>> > PASS: reuse
>> > PASS: t-root
>> > PASS: t-perfsqr
>> > PASS: t-perfpow
>> > PASS: t-jac
>> > GNU MP: Cannot allocate memory (size=11068046444225727904)
>> > FAIL: t-bin
>> > PASS: t-get_d
>> > PASS: t-get_d_2exp
>> > PASS: t-get_si
>> > PASS: t-set_d
>> > PASS: t-set_si
>> > GNU MP: Cannot allocate memory (size=6148914691236515192)
>> > FAIL: t-fac_ui
>> > GNU MP: Cannot allocate memory (size=11068046444225727720)
>> > FAIL: t-mfac_uiui
>> > FAIL: t-primorial_ui
>> > PASS: t-fib_ui
>> > PASS: t-lucnum_ui
>> > PASS: t-scan
>> > PASS: t-fits
>> > PASS: t-divis
>> > PASS: t-divis_2exp
>> > PASS: t-cong
>> > PASS: t-cong_2exp
>> > PASS: t-sizeinbase
>> > PASS: t-set_str
>> > PASS: t-aorsmul
>> > PASS: t-cmp_d
>> > PASS: t-cmp_si
>> > FAIL: t-hamdist
>> > PASS: t-oddeven
>> > FAIL: t-popcount
>> > PASS: t-set_f
>> > PASS: t-io_raw
>> > PASS: t-import
>> > PASS: t-export
>> > PASS: t-pprime_p
>> > PASS: t-nextprime
>> > PASS: t-remove
>> >
>> > ======================================================================================
>> > 6 of 62 tests failed
>> > Please report to gmp-bugs at gmplib.org, see
>> > http://gmplib.org/manual/Reporting-Bugs.html
>> >
>> > ======================================================================================
>> > make[4]: *** [check-TESTS] Error 1
>> > make[4]: Leaving directory
>> > `/np/linac/belloni/programs/gcc/gmp-5.1.3/build/tests/mpz'
>> > make[3]: *** [check-am] Error 2
>> > make[3]: Leaving directory
>> > `/np/linac/belloni/programs/gcc/gmp-5.1.3/build/tests/mpz'
>> > make[2]: *** [check-recursive] Error 1
>> > make[2]: Leaving directory
>> > `/np/linac/belloni/programs/gcc/gmp-5.1.3/build/tests'
>> > make[1]: *** [check-recursive] Error 1
>> > make[1]: Leaving directory
>> > `/np/linac/belloni/programs/gcc/gmp-5.1.3/build'
>> > make: *** [check] Error 2
>> >
>> >
>> >
>> > I have no idea of what is getting wrong... usually, in the past, by
>> > following the procedure  here reported everything was fine (on my
>> > laptop)
>> >
>> > ==============================================================================
>> >
>> > # instructions on
>> > http://gcc.gnu.org/install/index.html
>> >
>> > # get source
>> > wget http://ftp.gnu.org/gnu/gcc/gcc-4.6.2/gcc-4.6.2.tar.gz
>> > wget http://ftp.gnu.org/gnu/gmp/gmp-5.0.3.tar.bz2
>> > wget http://ftp.gnu.org/gnu/mpfr/mpfr-3.1.0.tar.gz
>> > wget http://www.multiprecision.org/mpc/download/mpc-0.9.tar.gz
>> >
>> > tar -zxvf gcc-4.6.1.tar.gz
>> > tar -jxvf gmp-5.0.3.tar.bz2
>> > tar -zxvf mpfr-3.1.0.tar.gz
>> > tar -zxvf mpc-0.9.tar.gz
>> >
>> > # configure/make gmp
>> > cd  gmp*
>> > mkdir build
>> > cd build
>> > ../configure --prefix=/home/gpfs/manip/mnt23/mnm/ntof/programs/usr
>> > make; make check; make install
>> >
>> > # configure/make mpfr
>> > cd ../../mpfr*
>> > mkdir build
>> > cd build
>> > ../configure --prefix=/home/gpfs/manip/mnt23/mnm/ntof/programs/usr
>> > --with-gmp=/home/gpfs/manip/mnt23/mnm/ntof/programs/usr
>> > make;  make install
>> >
>> > cd ../../mpc*
>> > mkdir build
>> > cd build
>> > ../configure --prefix=/home/gpfs/manip/mnt23/mnm/ntof/programs/usr
>> > --with-gmp=/home/gpfs/manip/mnt23/mnm/ntof/programs/usr
>> > --with-mpfr=/home/gpfs/manip/mnt23/mnm/ntof/programs/usr
>> > make;  make install
>> >
>> > # add path, if not make fails
>> > setenv LD_LIBRARY_PATH /home/gpfs/manip/mnt23/mnm/ntof/programs/usr/lib
>> >
>> > cd ../../gcc*
>> > mkdir build
>> > cd build
>> > ../configure --prefix=/home/gpfs/manip/mnt23/mnm/ntof/programs/usr \
>> >   --enable-languages=c,c++,fortran \
>> >   --with-gmp=/home/gpfs/manip/mnt23/mnm/ntof/programs/usr/ \
>> >   --with-mpfr=/home/gpfs/manip/mnt23/mnm/ntof/programs/usr/ \
>> >   --with-mpc=/home/gpfs/manip/mnt23/mnm/ntof/programs/usr/ \
>> >   --program-prefix=my-
>> > make -j 4
>> > make install
>> >
>> >
>> > ------
>> >
>> > Could anyone help me, please?
>> >
>> > Thx,
>> > regards,
>> > Francesca Belloni
>> > _______________________________________________
>> > gmp-bugs mailing list
>> > gmp-bugs at gmplib.org
>> > https://gmplib.org/mailman/listinfo/gmp-bugs
>
>


More information about the gmp-bugs mailing list