Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] Building otfcompress with binutils-gold fails
From: Dmitri Gribenko (gribozavr_at_[hidden])
Date: 2012-02-15 12:03:50


Hi,

I've found that otfcompress doesn't build with gold:

make[3]: Entering directory
`/home/storage_3/grib/ompi-build/ompi/contrib/vt/vt/extlib/otf/tools/otfcompress'
/bin/sh ../../libtool --tag=CC --mode=link clang -O3 -DNDEBUG
-finline-functions -fno-strict-aliasing -pthread
-I/home/storage_3/grib/ompi-trunk/opal/mca/hwloc/hwloc132/hwloc/include
 -L/home/storage_3/grib/ompi-build/ompi/contrib/vt/vt/../../../.libs
-o otfcompress otfcompress.o ../../otflib/libotf.la
libtool: link: clang -O3 -DNDEBUG -finline-functions
-fno-strict-aliasing -pthread
-I/home/storage_3/grib/ompi-trunk/opal/mca/hwloc/hwloc132/hwloc/include
-o .libs/otfcompress otfcompress.o
-L/home/storage_3/grib/ompi-build/ompi/contrib/vt/vt/../../../.libs
../../otflib/.libs/libotf.so -pthread -Wl,-rpath
-Wl,/home/storage_3/grib/ompi-install/lib
otfcompress.o:../../../../../../../../../ompi-trunk/ompi/contrib/vt/vt/extlib/otf/tools/otfcompress/otfcompress.c:function
decompressFile: error: undefined reference to 'inflateInit_'
otfcompress.o:../../../../../../../../../ompi-trunk/ompi/contrib/vt/vt/extlib/otf/tools/otfcompress/otfcompress.c:function
decompressFile: error: undefined reference to 'inflate'
otfcompress.o:../../../../../../../../../ompi-trunk/ompi/contrib/vt/vt/extlib/otf/tools/otfcompress/otfcompress.c:function
decompressFile: error: undefined reference to 'inflateEnd'
otfcompress.o:../../../../../../../../../ompi-trunk/ompi/contrib/vt/vt/extlib/otf/tools/otfcompress/otfcompress.c:function
compressFile: error: undefined reference to 'deflateInit_'
otfcompress.o:../../../../../../../../../ompi-trunk/ompi/contrib/vt/vt/extlib/otf/tools/otfcompress/otfcompress.c:function
compressFile: error: undefined reference to 'deflate'
otfcompress.o:../../../../../../../../../ompi-trunk/ompi/contrib/vt/vt/extlib/otf/tools/otfcompress/otfcompress.c:function
compressFile: error: undefined reference to 'deflateEnd'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The problem is that --no-add-needed is default gold behavior. All
libraries have to be specified explicitly to the linker. In this case
-lz is missing.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr_at_[hidden]>*/