[MOAB-dev] Fwd: linking issues

Vijay S. Mahadevan vijay.m at gmail.com
Tue May 12 14:49:30 CDT 2015


Lorenzo,

In our autoconf configuration, we do find and add -lstdc++ when
compiling with fortran enabled. But we have not tested with GNU 4.9.2
AFAIK and so possibly the behavior is slightly different because in
older versions, libstdc++ is typically available in a system or
compiler dependent path. I've never had to specify a libtool path to
libstdc++ before. Can you send us the config.log so that we can
decipher where this failed ?

You can also take a look at config/compilers.m4 (search for stdc++) to
see where we add the flag currently and why it might possibly fail the
checks. If you are comfortable with autoconf, we would also be very
happy to accept a patch.

Vijay

On Tue, May 12, 2015 at 12:34 PM, Lorenzo Alessio Botti
<bottilorenzo at gmail.com> wrote:
> Hi all,
> I’d like know your opinion on a problem I recently encountered compiling
> moab with intel compilers on a cluster at cineca (an Italian HPC facility)
>
> When compiling my application linked to moab I got the following errors
> /galileo/home/userexternal/lbotti00/moab/lib/libMOAB.a(ReaderWriterSet.o):
> In function `moab::ReaderWriterSet::get_file_extension_reader(std::string
> const&) const':
> ReaderWriterSet.cpp:(.text+0xa22): undefined reference to
> `std::__throw_out_of_range_fmt(char const*, ...)'
> /galileo/home/userexternal/lbotti00/moab/lib/libMOAB.a(ReaderWriterSet.o):
> In function `moab::ReaderWriterSet::get_file_extension_writer(std::string
> const&) const':
> ReaderWriterSet.cpp:(.text+0xb72): undefined reference to
> `std::__throw_out_of_range_fmt(char const*, ...)'
> /galileo/home/userexternal/lbotti00/moab/lib/libMOAB.a(ReaderWriterSet.o):
> In function `moab::ReaderWriterSet::extension_from_filename(std::string
> const&)':
> ReaderWriterSet.cpp:(.text+0xcc7): undefined reference to
> `std::__throw_out_of_range_fmt(char const*, ...)'
> /galileo/home/userexternal/lbotti00/moab/lib/libMOAB.a(ReadABAQUS.o): In
> function `moab::ReadABAQUS::get_keyword()':
> ReadABAQUS.cpp:(.text+0x19c0): undefined reference to
> `std::__throw_out_of_range_fmt(char const*, ...)'
> ReadABAQUS.cpp:(.text+0x19fb): undefined reference to
> `std::__throw_out_of_range_fmt(char const*, ...)'
> /galileo/home/userexternal/lbotti00/moab/lib/libMOAB.a(ReadABAQUS.o):ReadABAQUS.cpp:(.text+0x285d):
> more undefined references to `std::__throw_out_of_range_fmt(char const*,
> ...)' follow
>
> The problem seems to be related with
> /cineca/prod/compilers/gnu/4.9.2/none/lib64/libstdc++.la
> which is present in libMOAB.la but is missing in moab.make (see below)
>
> (libMOAB.la)
>
> # libMOAB.la - a libtool library file
> # Generated by libtool (GNU libtool) 2.4.2
> #
> # Please DO NOT delete this file!
> # It is necessary for linking the library.
>
> # The name that we can dlopen(3).
> dlname=''
>
> # Names of this library.
> library_names=''
>
> # The name of the static archive.
> old_library='libMOAB.a'
>
> # Linker flags that can not go in dependency_libs.
> inherited_linker_flags=''
>
> # Libraries that this one depends upon.
> dependency_libs=' -L/galileo/home/userexternal/lbotti00/hdf5-1.8.10/hdf5/lib
> /galileo/home/userexternal/lbotti00/hdf5-1.8.10/hdf5/lib/libhdf5.la -lgpfs
> -lz /cineca/prod/compilers/gnu/4.9.2/none/lib64/libstdc++.la'
>
> # Names of additional weak libraries provided by this library
> weak_library_names=''
>
> # Version information for libMOAB.
> current=0
> age=0
> revision=0
>
> # Is this an already installed library?
> installed=no
>
> # Should we warn about portability when linking against -modules?
> shouldnotlink=no
>
> # Files to dlopen/dlpreopen
> dlopen=''
> dlpreopen=''
>
> # Directory that this library needs to be installed in:
> libdir='/galileo/home/userexternal/lbotti00/moab/lib'
> ~
>
>
>
> (maob.make)
> # The values below are for an un-installed copy of MOAB used directly
> # from its build build directory.  These values will be overridden below
> # for installed copies of MOAB.
> MOAB_LIBDIR = /galileo/home/userexternal/lbotti00/moab-4.6.3/src/.libs
> MOAB_INCLUDES = -I/galileo/home/userexternal/lbotti00/moab-4.6.3/src \
>                 -I/galileo/home/userexternal/lbotti00/moab-4.6.3/src \
>                 -I/galileo/home/userexternal/lbotti00/moab-4.6.3/src/oldinc
> \
>
> -I/galileo/home/userexternal/lbotti00/moab-4.6.3/src/parallel \
>
> -I/galileo/home/userexternal/lbotti00/moab-4.6.3/src/parallel
>
> MOAB_INCLUDES +=
>
> MOAB_CPPFLAGS =  -DUNORDERED_MAP_NS=std::tr1
> -DHAVE_UNORDERED_MAP=tr1/unordered_map
> -DHAVE_UNORDERED_SET=tr1/unordered_set
> -I/galileo/home/userexternal/lbotti00/hdf5-1.8.10/hdf5/include -isystem
> /galileo/home/userexternal/lbotti00/hdf5-1.8.10/hdf5/include
> -DTEMPLATE_SPECIALIZATION -DTEMPLATE_FUNC_SPECIALIZATION -DHAVE_VSNPRINTF
> -D_FILE_OFFSET_BITS=64   -DUSE_MPI -DHDF5_FILE -DHDF5_PARALLEL
> MOAB_CXXFLAGS =  -Wall -wd981 -wd279 -wd1418 -wd383 -wd1572 -wd2259 -O2
> -DNDEBUG
> MOAB_CFLAGS =  -Wall -wd981 -wd279 -wd1418 -wd383 -wd1572 -O2 -DNDEBUG
> MOAB_FFLAGS =   -O2
> MOAB_FCFLAGS =   -O2
> MOAB_LDFLAGS =
> -L/galileo/home/userexternal/lbotti00/hdf5-1.8.10/hdf5/lib
>
> MOAB_LIBS_LINK = ${MOAB_LDFLAGS} -L${MOAB_LIBDIR} -lMOAB  -lm    -lhdf5
> -lgpfs  -lz -ldl
>
> MOAB_CXX =
> /cineca/prod/compilers/intel/cs-xe-2015/binary/impi_5.0.2/intel64/bin/mpicxx
> MOAB_CC  =
> /cineca/prod/compilers/intel/cs-xe-2015/binary/impi_5.0.2/intel64/bin/mpicc
> MOAB_FC  = ifort
> MOAB_F77  = ifort
>
> # Override MOAB_LIBDIR and MOAB_INCLUDES from above with the correct
> # values for the installed MOAB.
>
> Adding the missing .la fixes the linking issue.
>
> What do you guys think? I’m not an expert of this kind of problems...
>
> Bests
> Lorenzo
>
>
>


More information about the moab-dev mailing list