Hello tout le monde !
Alors le contexte : Ubuntu Server 14.04 LTS.
GCC 4.8.4 :
[ spark@genesys: ~ ] $ g++ -E -x c++ - -v < /dev/null
Using built-in specs.
COLLECT_GCC=g++
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu1~14.04.1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.1)
COLLECT_GCC_OPTIONS='-E' '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
/usr/lib/gcc/x86_64-linux-gnu/4.8/cc1plus -E -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE - -mtune=generic -march=x86-64 -fstack-protector -Wformat -Wformat-security
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/4.8"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/4.8
/usr/include/x86_64-linux-gnu/c++/4.8
/usr/include/c++/4.8/backward
/usr/lib/gcc/x86_64-linux-gnu/4.8/include
/usr/local/include
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "<stdin>"
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-E' '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
[ spark@genesys: ~ ] $
|
mes includes paths sont à peu près bons.
Je compile mon petit gcc avec tout ce qu'il faut :
[ spark@genesys: ~/work/c++/tests/gcc-5.3.0/build ] $ cat configure.run
../configure -v --with-pkgversion='Spark 5.3.0-20160330-r02-Ubuntu-14.04.4' --enable-languages='c,c++' --prefix='/home/spark/gcc' --program-suffix='-5.3' --enable-shared --enable-linker-build-id --without-included-gettext --enable-threads='posix' --with-gxx-include-dir='/home/spark/gcc/include' --enable-nls --with-sysroot='/' --enable-clocale='gnu' --enable-libstdcxx-debug --enable-libstdcxx-time='yes' --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-multilib --disable-werror --with-abi=m64 --with-tune=native --enable-checking=release --with-mpc='/home/spark/gcc' --with-mpfr='/home/spark/gcc' --with-gmp='/home/spark/gcc' --with-isl='/home/spark/gcc' --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --enable-__cxa_atexit --with-fpmath='avx' |
Ca compile, c'est magique, c'est beau. Un petit make install et hop, j'ai bien mes executables dans /home/spark/gcc/bin :
[ spark@genesys: ~/gcc/bin ] $ ll
total 33776
drwxrwxr-x 2 spark spark 4096 mars 30 11:46 .
drwxrwxr-x 8 spark spark 4096 mars 30 11:46 ..
-rwxr-xr-x 4 spark spark 3499100 mars 30 11:46 c++-5.3
-rwxr-xr-x 1 spark spark 3493702 mars 30 11:46 cpp-5.3
-rwxr-xr-x 4 spark spark 3499100 mars 30 11:46 g++-5.3
-rwxr-xr-x 3 spark spark 3490322 mars 30 11:46 gcc-5.3
-rwxr-xr-x 2 spark spark 139320 mars 30 11:46 gcc-ar-5.3
-rwxr-xr-x 2 spark spark 139224 mars 30 11:46 gcc-nm-5.3
-rwxr-xr-x 2 spark spark 139268 mars 30 11:46 gcc-ranlib-5.3
-rwxr-xr-x 1 spark spark 2402151 mars 30 11:46 gcov-5.3
-rwxr-xr-x 1 spark spark 2282716 mars 30 11:46 gcov-tool-5.3
-rwxr-xr-x 4 spark spark 3499100 mars 30 11:46 x86_64-linux-gnu-c++-5.3
-rwxr-xr-x 4 spark spark 3499100 mars 30 11:46 x86_64-linux-gnu-g++-5.3
-rwxr-xr-x 3 spark spark 3490322 mars 30 11:46 x86_64-linux-gnu-gcc-5.3
-rwxr-xr-x 3 spark spark 3490322 mars 30 11:46 x86_64-linux-gnu-gcc-5.3.0
-rwxr-xr-x 2 spark spark 139320 mars 30 11:46 x86_64-linux-gnu-gcc-ar-5.3
-rwxr-xr-x 2 spark spark 139224 mars 30 11:46 x86_64-linux-gnu-gcc-nm-5.3
-rwxr-xr-x 2 spark spark 139268 mars 30 11:46 x86_64-linux-gnu-gcc-ranlib-5.3
[ spark@genesys: ~/gcc/bin ] $ |
et là, c'est le drame :
[ spark@genesys: ~/gcc/bin ] $ g++-5.3 -E -x c++ - -v < /dev/null
Utilisation des specs internes.
COLLECT_GCC=g++-5.3
Cible : x86_64-linux-gnu
Configuré avec: ../configure -v --with-pkgversion='Spark 5.3.0-20160330-r02-Ubuntu-14.04.4' --enable-languages=c,c++ --prefix=/home/spark/gcc --program-suffix=-5.3 --enable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/home/spark/gcc/include --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-multilib --disable-werror --with-abi=m64 --with-tune=native --enable-checking=release --with-mpc=/home/spark/gcc --with-mpfr=/home/spark/gcc --with-gmp=/home/spark/gcc --with-isl=/home/spark/gcc --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --enable-__cxa_atexit --with-fpmath=avx : (reconfigured) ../configure -v --with-pkgversion='Spark 5.3.0-20160330-r02-Ubuntu-14.04.4' --enable-languages=c,c++ --prefix=/home/spark/gcc --program-suffix=-5.3 --enable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/home/spark/gcc/include --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-multilib --disable-werror --with-abi=m64 --with-tune=native --enable-checking=release --with-mpc=/home/spark/gcc --with-mpfr=/home/spark/gcc --with-gmp=/home/spark/gcc --with-isl=/home/spark/gcc --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --enable-__cxa_atexit --with-fpmath=avx
Modèle de thread: posix
gcc version 5.3.0 (Spark 5.3.0-20160330-r02-Ubuntu-14.04.4)
COLLECT_GCC_OPTIONS='-E' '-v' '-shared-libgcc' '-mtune=native' '-march=x86-64'
/home/spark/gcc/libexec/gcc/x86_64-linux-gnu/5.3.0/cc1plus -E -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE - --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=ivybridge -march=x86-64
le répertoire « home/spark/gcc/include » est ignoré car inexistant
le répertoire « home/spark/gcc/include/x86_64-linux-gnu » est ignoré car inexistant
le répertoire « home/spark/gcc/include/backward » est ignoré car inexistant
le répertoire « /usr/local/include/x86_64-linux-gnu » est ignoré car inexistant
le répertoire « /home/spark/gcc/lib/gcc/x86_64-linux-gnu/5.3.0/../../../../x86_64-linux-gnu/include » est ignoré car inexistant
la recherche pour #include "..." débute ici :
la recherche pour #include <...> débute ici:
/home/spark/gcc/lib/gcc/x86_64-linux-gnu/5.3.0/include
/usr/local/include
/home/spark/gcc/lib/gcc/x86_64-linux-gnu/5.3.0/include-fixed
/usr/include/x86_64-linux-gnu
/usr/include
Fin de la liste de recherche.
# 1 "<stdin>"
# 1 "<interne>"
# 1 "<ligne-de-commande>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<ligne-de-commande>" 2
# 1 "<stdin>"
COMPILER_PATH=/home/spark/gcc/libexec/gcc/x86_64-linux-gnu/5.3.0/:/home/spark/gcc/libexec/gcc/x86_64-linux-gnu/5.3.0/:/home/spark/gcc/libexec/gcc/x86_64-linux-gnu/:/home/spark/gcc/lib/gcc/x86_64-linux-gnu/5.3.0/:/home/spark/gcc/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/home/spark/gcc/lib/gcc/x86_64-linux-gnu/5.3.0/:/home/spark/gcc/lib/gcc/x86_64-linux-gnu/5.3.0/../../../../lib64/:/lib/x86_64-linux-gnu/:/lib/../lib64/:/usr/lib/x86_64-linux-gnu/:/home/spark/gcc/lib/gcc/x86_64-linux-gnu/5.3.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-E' '-v' '-shared-libgcc' '-mtune=native' '-march=x86-64'
[ spark@genesys: ~/gcc/bin ] $ |
Il n'y a pas de "/" devant home/spark/.... :
le répertoire « home/spark/gcc/include » est ignoré car inexistant
le répertoire « home/spark/gcc/include/x86_64-linux-gnu » est ignoré car inexistant
le répertoire « home/spark/gcc/include/backward » est ignoré car inexistant |
Donc forcément, les includes marchent moins bien
Quelqu'un aurait une idée ?
Merci
Message édité par spark le 30-03-2016 à 13:22:14
---------------
Un cycle complet sera une série de 100.