https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84554

Bennet Fauber <bennet at umich dot edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bennet at umich dot edu

--- Comment #8 from Bennet Fauber <bennet at umich dot edu> ---
I believe the problem related below is related to this issue.

I am building GCC 8.2.0 on CentOS 7.5 which comes with GCC 4.8.5 and GMP 6.0.0.
 I used download_prerequisites to download GMP, et al.

When I run make check from the GCC build directory, it issues the FAIL message
for mismatched library and header version information for GMP.

When GCC runs make check, it uses this command to compile the test.

$ /tmp/bennet/build/gcc-8.2.0-build/./prev-gcc/xgcc
-B/tmp/bennet/build/gcc-8.2.0-build/./prev-gcc/
-B/tmp/local/x86_64-pc-linux-gnu/bin/ -B/tmp/local/x86_64-pc-linux-gnu/bin/
-B/tmp/local/x86_64-pc-linux-gnu/lib/ -isystem
/tmp/local/x86_64-pc-linux-gnu/include -isystem
/tmp/local/x86_64-pc-linux-gnu/sys-include -DNO_ASM -g -O2 -static-libstdc++
-static-libgcc -o tversion tversion.o  -L../src/.libs ./.libs/libfrtests.a -lm
../src/.libs/libmpfr.a -lgmp

which results in this binary

$ ldd tversion
    linux-vdso.so.1 =>  (0x00007fffd9d67000)
    libm.so.6 => /lib64/libm.so.6 (0x00002afc45e2a000)
    libgmp.so.10 => /lib64/libgmp.so.10 (0x00002afc4612c000)
    libc.so.6 => /lib64/libc.so.6 (0x00002afc463a4000)
    /lib64/ld-linux-x86-64.so.2 (0x00002afc45c06000)

and that most definitely will fail the test because of the reference to
/lib64/libgmp.so.10.

If I change to the mpfr/tests directory and remove tversion, then run make from
there, mpfr's Makefile compiles it this way

$ make tversion
/bin/sh ../libtool  --tag=CC   --mode=link
/tmp/bennet/build/gcc-8.2.0-build/./prev-gcc/xgcc
-B/tmp/bennet/build/gcc-8.2.0-build/./prev-gcc/
-B/tmp/local/x86_64-pc-linux-gnu/bin/ -B/tmp/local/x86_64-pc-linux-gnu/bin/
-B/tmp/local/x86_64-pc-linux-gnu/lib/ -isystem
/tmp/local/x86_64-pc-linux-gnu/include -isystem
/tmp/local/x86_64-pc-linux-gnu/sys-include     -g -O2 -no-install
-L../src/.libs -static-libstdc++ -static-libgcc 
-L/tmp/bennet/build/gcc-8.2.0-build/gmp/.libs -o tversion tversion.o
libfrtests.la -lm ../src/libmpfr.la -lgmp 
libtool: link: /tmp/bennet/build/gcc-8.2.0-build/./prev-gcc/xgcc
-B/tmp/bennet/build/gcc-8.2.0-build/./prev-gcc/
-B/tmp/local/x86_64-pc-linux-gnu/bin/ -B/tmp/local/x86_64-pc-linux-gnu/bin/
-B/tmp/local/x86_64-pc-linux-gnu/lib/ -isystem
/tmp/local/x86_64-pc-linux-gnu/include -isystem
/tmp/local/x86_64-pc-linux-gnu/sys-include -g -O2 -static-libstdc++
-static-libgcc -o tversion tversion.o  -L../src/.libs
-L/tmp/bennet/build/gcc-8.2.0-build/gmp/.libs ./.libs/libfrtests.a -lm
../src/.libs/libmpfr.a /tmp/bennet/build/gcc-8.2.0-build/gmp/.libs/libgmp.a

which results in this binary

$ ldd tversion
    linux-vdso.so.1 =>  (0x00007ffc899c0000)
    libm.so.6 => /lib64/libm.so.6 (0x00002b39a664f000)
    libc.so.6 => /lib64/libc.so.6 (0x00002b39a6951000)
    /lib64/ld-linux-x86-64.so.2 (0x00002b39a642b000)

and the test passes,

$ ./tversion 
[tversion] MPFR 3.1.4
[tversion] Compiler: GCC 8.2.0
[tversion] GMP: header 6.1.0, library 6.1.0
[tversion] TLS = yes, decimal = no, GMP internals = no
[tversion] intmax_t = yes, printf = yes
[tversion] gmp_printf: hhd = yes, lld = yes, jd = yes, td = yes, Ld = yes
[tversion] MPFR tuning parameters from default

I think this suggests that the problem is in the way the GCC make test is
building the tests.

I am using

$ ../gcc-8.2.0/configure --enable-languages=c,c++,fortran \
    --prefix=/tmp/local --disable-multilibq

Platform is x86_64.

Reply via email to