gcc configure --disable-shared kann die gemeinsam genutzten Bibliotheken während des Kompilierens, des Konflikts zwischen libgmp und libmpc nicht deaktivieren

1839
zedoyle

Ich kompiliere GCC auf einem Build-Server, um Zugriff auf die neueste Version von Gfortran zu erhalten. Nachdem ich gmp, mpfr und mpc in speziell vorgefasste Verzeichnisse in usr / local erstellt hatte, habe ich gcc konfiguriert und make'd gemacht, was zu folgenden Fehlern geführt hat:

../../gcc/cp/g++spec.c: In function ‘void lang_specific_driver(cl_decoded_option**, unsigned int*, int*)’: ../../gcc/cp/g++spec.c:352: warning: NULL used in arithmetic /usr/bin/ld: warning: libgmp.so.3, needed by /usr/local/mpfr-3.1.2/lib/libmpfr.so, may conflict with libgmp.so.10 configure: error: in `/tabletop/scratch/gcc-4.9.1/build/x86_64-unknown-linux-gnu/libgcc': configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details. make[2]: *** [configure-stage1-target-libgcc] Error 1 make[1]: *** [stage1-bubble] Error 2 make: *** [all] Error 2 

In config.log befindet sich Folgendes:

configure:3373: $? = 0 configure:3362: /tabletop/scratch/gcc-4.9.1/build/./gcc/xgcc -B/tabletop/scratch/gcc-4.9.1/build/./gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -v >&5 Reading specs from /tabletop/scratch/gcc-4.9.1/build/./gcc/specs COLLECT_GCC=/tabletop/scratch/gcc-4.9.1/build/./gcc/xgcc COLLECT_LTO_WRAPPER=/tabletop/scratch/gcc-4.9.1/build/./gcc/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../configure --disable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran --with-gmp=/usr/local/gmp-6.0.0 --with-mpfr=/usr/local/mpfr-3.1.2 --with-mpc=/usr/local/mpc-1.0.2 Thread model: posix gcc version 4.9.1 (GCC) configure:3373: $? = 0 configure:3362: /tabletop/scratch/gcc-4.9.1/build/./gcc/xgcc -B/tabletop/scratch/gcc-4.9.1/build/./gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -V >&5 xgcc: error: unrecognized command line option '-V' xgcc: fatal error: no input files compilation terminated. configure:3373: $? = 1 configure:3362: /tabletop/scratch/gcc-4.9.1/build/./gcc/xgcc -B/tabletop/scratch/gcc-4.9.1/build/./gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -qversion >&5 xgcc: error: unrecognized command line option '-qversion' xgcc: fatal error: no input files compilation terminated. configure:3373: $? = 1 configure:3389: /tabletop/scratch/gcc-4.9.1/build/./gcc/xgcc -B/tabletop/scratch/gcc-4.9.1/build/./gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -o conftest -g -O2 conftest.c >&5 /tabletop/scratch/gcc-4.9.1/build/./gcc/cc1: error while loading shared libraries: libmpc.so.3: cannot open shared object file: No such file or directory configure:3392: $? = 1 configure:3580: checking for suffix of object files configure:3602: /tabletop/scratch/gcc-4.9.1/build/./gcc/xgcc -B/tabletop/scratch/gcc-4.9.1/build/./gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -c -g -O2 conftest.c >&5 /tabletop/scratch/gcc-4.9.1/build/./gcc/cc1: error while loading shared libraries: libmpc.so.3: cannot open shared object file: No such file or directory configure:3606: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "GNU C Runtime Library" | #define PACKAGE_TARNAME "libgcc" | #define PACKAGE_VERSION "1.0" | #define PACKAGE_STRING "GNU C Runtime Library 1.0" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "http://www.gnu.org/software/libgcc/" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:3620: error: in `/tabletop/scratch/gcc-4.9.1/build/x86_64-unknown-linux-gnu/libgcc': configure:3623: error: cannot compute suffix of object files: cannot compile See `config.log' for more details. 

Das erste Protokoll (die stderr-Ausgabe von make) scheint darauf hinzudeuten, dass zwischen libgmp.so und libmpc.so ein Konflikt besteht, das zweite (config.log von build / x86_64-unknown-linux-gnu / include) scheint jedoch zu zeigen "- V "wird als Datei übergeben und verursacht einen fehlenden Eingabefehler. Ich bin rekursiv durch das gesamte Build-Verzeichnis gegangen und habe nichts gefunden, das mit dieser kaputten Option übereinstimmt. Kann jemand etwas Licht auf die ursprüngliche Ursache dieser Probleme werfen?

1

1 Antwort auf die Frage

0
c00ler

Das Bauen von GCC-Quellen war ein schmerzhafter Versuch **, aber am Ende gelang es, diese einfachen Schritte zu befolgen:

Nach dem Herunterladen von gcc-5.2.0.tar.gz und entpacken / entar sollten Sie die Verzeichnisnamen gcc-5.2.0 haben.

Sie müssen einige andere Pakete wie gmp mpc mpfr herunterladen:

cd gcc-5.2.0 ./contrib/download_prerequisites 

es wird herunterladen und entpacken gmp mpc mpfr

Es wird kaum empfohlen, gcc nicht aus dem Quellverzeichnis zu erstellen. Wir beginnen also:

mkdir gcc-build cd gcc-build .././configure (with your options) make make install 

Ich schlage vor, Sie beginnen mit einem:

make distclean 

Im de gcc-Ordner wurde alles gelöscht, bevor alles gestartet wurde

Ich hoffe es hilft und viel Glück