Bonjour,
En compilant le même projet sur 2 OS 64 bits différents (centOS 4, gcc3 & ubuntu11.10, gcc4), j'obtiens de grosse différences en faisant un ldd, que je ne m'explique pas vraiment. Pourquoi par exemple selon vous il n'y a pas de ssl et g2c dans la sortie du ldd sous ubuntu ? Merci !

centOS4 :
Code :
1
2
3
4
5
6
gcc   -m64  -fPIC -shared -Wl,-soname,libmalib.so --verbose -o ../../release/lib/linux64/libmalib.so fct1c.o fct2.o -L../../lib/linux64 -lcalelm -llapack -lblas -lssl -lgfortran -lg2c
Lecture des spécification à partir de /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs
Configuré avec: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=x86_64-redhat-linux
Modèle de thread: posix
version gcc 3.4.6 20060404 (Red Hat 3.4.6-11)
 /usr/libexec/gcc/x86_64-redhat-linux/3.4.6/collect2 --eh-frame-hdr -m elf_x86_64 -shared -o ../../release/lib/linux64/libmalib.so /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/3.4.6/crtbeginS.o -L../../lib/linux64 -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6 -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6 -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../.. -L/lib/../lib64 -L/usr/lib/../lib64 -soname libmalib.so fct1c.o fct2.o -lcalelm -llapack -lblas -lssl -lgfortran -lg2c -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-redhat-linux/3.4.6/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crtn.o
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 
ldd libmalib.so 
	libssl.so.4 => /lib64/libssl.so.4 (0x0000002a95754000)
	libgfortran.so.1 => /usr/lib64/libgfortran.so.1 (0x0000002a95890000)
	libg2c.so.0 => /usr/lib64/libg2c.so.0 (0x0000002a95a27000)
	libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a95b49000)
	libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x0000002a95d82000)
	libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x0000002a95e98000)
	libcom_err.so.2 => /lib64/libcom_err.so.2 (0x0000002a9600a000)
	libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x0000002a9610c000)
	libcrypto.so.4 => /lib64/libcrypto.so.4 (0x0000002a9622f000)
	libdl.so.2 => /lib64/libdl.so.2 (0x0000002a96461000)
	libz.so.1 => /usr/lib64/libz.so.1 (0x0000002a96564000)
	libm.so.6 => /lib64/tls/libm.so.6 (0x0000002a96677000)
	/lib64/ld-linux-x86-64.so.2 (0x000000552aaaa000)
	libresolv.so.2 => /lib64/libresolv.so.2 (0x0000002a967fe000)
ubuntu 11.10 :
Code :
1
2
3
4
5
6
7
8
9
10
11
12
gcc   -m64  -fPIC -shared -Wl,-soname,libmalib.so --verbose -o ../../release/lib/linux64/libmalib.so fct1c.o fct2.o -lcalelm -llapack -lblas -lssl -lgfortran -lg2c
Utilisation des specs internes.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper
Target: x86_64-linux-gnu
Configuré avec: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.1-9ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Modèle de thread: posix
gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) 
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../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.6.1/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-m64' '-fPIC' '-shared' '-v' '-o' '../../release/lib/linux64/libmalib.so' '-L../../lib/linux64' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/4.6.1/collect2 --build-id --no-add-needed --as-needed --eh-frame-hdr -m elf_x86_64 --hash-style=gnu -shared -z relro -o ../../release/lib/linux64/libmalib.so /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtbeginS.o -L../../lib/linux64 -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1 -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../.. -soname libmalib.so fct1c.o fct2.o -lcalelm -llapack -lblas -lssl -lgfortran -lg2c -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crtn.o
Code :
1
2
3
4
5
6
7
8
9
 
 
ldd libmalib.so 
	linux-vdso.so.1 =>  (0x00007fff685ff000)
	libgfortran.so.1 => /usr/lib/libgfortran.so.1 (0x00007f3fa2b42000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3fa27a3000)
	libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f3fa256c000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3fa22e8000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f3fa3133000)