You are not logged in.

#1 2018-06-05 06:18:50

AgentMat
Member
Registered: 2018-03-17
Posts: 6

[solved] Broken GCC

Hi all,

My gcc is broken since a few days and I can't figure it out.

Trying to compile something as trivial as

int main ()
{  
   return 0;
}

gives me

$ gcc tst.c 
/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.0/cc1: symbol lookup error: /usr/lib/libmpc.so.3: undefined symbol: mpfr_fmms

I tried reinstalling gcc and libmpc to no avail. I don't find any similar issue on the forum or google.

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 8.1.0 (GCC) 

I have cuda installed, so gcc7 is installed as well. gcc-7 is broken all the same :

$ gcc-7 tst.c 
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/cc1: symbol lookup error: /usr/lib/libmpc.so.3: undefined symbol: mpfr_fmms

Any ideas ?

Thanks.

Last edited by AgentMat (2018-06-05 07:33:19)

Offline

#2 2018-06-05 06:21:07

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [solved] Broken GCC

And what version of mpfr?

Offline

#3 2018-06-05 06:46:47

AgentMat
Member
Registered: 2018-03-17
Posts: 6

Re: [solved] Broken GCC

The last one from core repo:

$ pacman -Qs mpfr
local/mpfr 4.0.1-1
    Multiple-precision floating-point library

Offline

#4 2018-06-05 07:06:22

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [solved] Broken GCC

What does `ldd /usr/lib/libmpc.so.3` tell you?

Offline

#5 2018-06-05 07:19:04

AgentMat
Member
Registered: 2018-03-17
Posts: 6

Re: [solved] Broken GCC

$ ldd /usr/lib/libmpc.so.3
        linux-vdso.so.1 (0x00007ffc34fb2000)
        libmpfr.so.6 => /usr/local/lib/libmpfr.so.6 (0x00007f7b31bea000)
        libgmp.so.10 => /usr/local/lib/libgmp.so.10 (0x00007f7b31973000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f7b315de000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f7b31222000)
        /usr/lib64/ld-linux-x86-64.so.2 (0x00007f7b32072000)

Offline

#6 2018-06-05 07:28:41

AgentMat
Member
Registered: 2018-03-17
Posts: 6

Re: [solved] Broken GCC

Hum seems like duplicated libs were placed in my /usr/local/lib overriding the proper ones in /usr/lib. I compiled from source some non packaged stuff, must come from that.

Offline

#7 2018-06-05 07:32:49

AgentMat
Member
Registered: 2018-03-17
Posts: 6

Re: [solved] Broken GCC

That's it ! Removing the libs in /usr/local/bin solved it, gcc is using the proper libs in /usr/lib now. Should have thought of that. Thanks a lot !

Offline

Board footer

Powered by FluxBB