[MOAB-dev] Fwd: linking issues
Lorenzo Alessio Botti
bottilorenzo at gmail.com
Tue May 12 12:34:03 CDT 2015
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20150512/5d17501a/attachment-0001.html>
More information about the moab-dev
mailing list