<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""> </div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On 12 May 2015, at 21:49, Vijay S. Mahadevan <<a href="mailto:vijay.m@gmail.com" class="">vijay.m@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">Lorenzo,<br class=""><br class="">In our autoconf configuration, we do find and add -lstdc++ when<br class="">compiling with fortran enabled. But we have not tested with GNU 4.9.2<br class="">AFAIK and so possibly the behavior is slightly different because in<br class="">older versions, libstdc++ is typically available in a system or<br class="">compiler dependent path. I've never had to specify a libtool path to<br class="">libstdc++ before. Can you send us the config.log so that we can<br class="">decipher where this failed ?<br class=""><br class="">You can also take a look at config/compilers.m4 (search for stdc++) to<br class="">see where we add the flag currently and why it might possibly fail the<br class="">checks. If you are comfortable with autoconf, we would also be very<br class="">happy to accept a patch.<br class=""><br class="">Vijay<br class=""><br class="">On Tue, May 12, 2015 at 12:34 PM, Lorenzo Alessio Botti<br class=""><<a href="mailto:bottilorenzo@gmail.com" class="">bottilorenzo@gmail.com</a>> wrote:<br class=""><blockquote type="cite" class="">Hi all,<br class="">I’d like know your opinion on a problem I recently encountered compiling<br class="">moab with intel compilers on a cluster at cineca (an Italian HPC facility)<br class=""><br class="">When compiling my application linked to moab I got the following errors<br class="">/galileo/home/userexternal/lbotti00/moab/lib/libMOAB.a(ReaderWriterSet.o):<br class="">In function `moab::ReaderWriterSet::get_file_extension_reader(std::string<br class="">const&) const':<br class="">ReaderWriterSet.cpp:(.text+0xa22): undefined reference to<br class="">`std::__throw_out_of_range_fmt(char const*, ...)'<br class="">/galileo/home/userexternal/lbotti00/moab/lib/libMOAB.a(ReaderWriterSet.o):<br class="">In function `moab::ReaderWriterSet::get_file_extension_writer(std::string<br class="">const&) const':<br class="">ReaderWriterSet.cpp:(.text+0xb72): undefined reference to<br class="">`std::__throw_out_of_range_fmt(char const*, ...)'<br class="">/galileo/home/userexternal/lbotti00/moab/lib/libMOAB.a(ReaderWriterSet.o):<br class="">In function `moab::ReaderWriterSet::extension_from_filename(std::string<br class="">const&)':<br class="">ReaderWriterSet.cpp:(.text+0xcc7): undefined reference to<br class="">`std::__throw_out_of_range_fmt(char const*, ...)'<br class="">/galileo/home/userexternal/lbotti00/moab/lib/libMOAB.a(ReadABAQUS.o): In<br class="">function `moab::ReadABAQUS::get_keyword()':<br class="">ReadABAQUS.cpp:(.text+0x19c0): undefined reference to<br class="">`std::__throw_out_of_range_fmt(char const*, ...)'<br class="">ReadABAQUS.cpp:(.text+0x19fb): undefined reference to<br class="">`std::__throw_out_of_range_fmt(char const*, ...)'<br class="">/galileo/home/userexternal/lbotti00/moab/lib/libMOAB.a(ReadABAQUS.o):ReadABAQUS.cpp:(.text+0x285d):<br class="">more undefined references to `std::__throw_out_of_range_fmt(char const*,<br class="">...)' follow<br class=""><br class="">The problem seems to be related with<br class="">/cineca/prod/compilers/gnu/4.9.2/none/lib64/libstdc++.la<br class="">which is present in libMOAB.la but is missing in moab.make (see below)<br class=""><br class="">(libMOAB.la)<br class=""><br class=""># libMOAB.la - a libtool library file<br class=""># Generated by libtool (GNU libtool) 2.4.2<br class="">#<br class=""># Please DO NOT delete this file!<br class=""># It is necessary for linking the library.<br class=""><br class=""># The name that we can dlopen(3).<br class="">dlname=''<br class=""><br class=""># Names of this library.<br class="">library_names=''<br class=""><br class=""># The name of the static archive.<br class="">old_library='libMOAB.a'<br class=""><br class=""># Linker flags that can not go in dependency_libs.<br class="">inherited_linker_flags=''<br class=""><br class=""># Libraries that this one depends upon.<br class="">dependency_libs=' -L/galileo/home/userexternal/lbotti00/hdf5-1.8.10/hdf5/lib<br class="">/galileo/home/userexternal/lbotti00/hdf5-1.8.10/hdf5/lib/libhdf5.la -lgpfs<br class="">-lz /cineca/prod/compilers/gnu/4.9.2/none/lib64/libstdc++.la'<br class=""><br class=""># Names of additional weak libraries provided by this library<br class="">weak_library_names=''<br class=""><br class=""># Version information for libMOAB.<br class="">current=0<br class="">age=0<br class="">revision=0<br class=""><br class=""># Is this an already installed library?<br class="">installed=no<br class=""><br class=""># Should we warn about portability when linking against -modules?<br class="">shouldnotlink=no<br class=""><br class=""># Files to dlopen/dlpreopen<br class="">dlopen=''<br class="">dlpreopen=''<br class=""><br class=""># Directory that this library needs to be installed in:<br class="">libdir='/galileo/home/userexternal/lbotti00/moab/lib'<br class="">~<br class=""><br class=""><br class=""><br class="">(maob.make)<br class=""># The values below are for an un-installed copy of MOAB used directly<br class=""># from its build build directory.  These values will be overridden below<br class=""># for installed copies of MOAB.<br class="">MOAB_LIBDIR = /galileo/home/userexternal/lbotti00/moab-4.6.3/src/.libs<br class="">MOAB_INCLUDES = -I/galileo/home/userexternal/lbotti00/moab-4.6.3/src \<br class="">                -I/galileo/home/userexternal/lbotti00/moab-4.6.3/src \<br class="">                -I/galileo/home/userexternal/lbotti00/moab-4.6.3/src/oldinc<br class="">\<br class=""><br class="">-I/galileo/home/userexternal/lbotti00/moab-4.6.3/src/parallel \<br class=""><br class="">-I/galileo/home/userexternal/lbotti00/moab-4.6.3/src/parallel<br class=""><br class="">MOAB_INCLUDES +=<br class=""><br class="">MOAB_CPPFLAGS =  -DUNORDERED_MAP_NS=std::tr1<br class="">-DHAVE_UNORDERED_MAP=tr1/unordered_map<br class="">-DHAVE_UNORDERED_SET=tr1/unordered_set<br class="">-I/galileo/home/userexternal/lbotti00/hdf5-1.8.10/hdf5/include -isystem<br class="">/galileo/home/userexternal/lbotti00/hdf5-1.8.10/hdf5/include<br class="">-DTEMPLATE_SPECIALIZATION -DTEMPLATE_FUNC_SPECIALIZATION -DHAVE_VSNPRINTF<br class="">-D_FILE_OFFSET_BITS=64   -DUSE_MPI -DHDF5_FILE -DHDF5_PARALLEL<br class="">MOAB_CXXFLAGS =  -Wall -wd981 -wd279 -wd1418 -wd383 -wd1572 -wd2259 -O2<br class="">-DNDEBUG<br class="">MOAB_CFLAGS =  -Wall -wd981 -wd279 -wd1418 -wd383 -wd1572 -O2 -DNDEBUG<br class="">MOAB_FFLAGS =   -O2<br class="">MOAB_FCFLAGS =   -O2<br class="">MOAB_LDFLAGS =<br class="">-L/galileo/home/userexternal/lbotti00/hdf5-1.8.10/hdf5/lib<br class=""><br class="">MOAB_LIBS_LINK = ${MOAB_LDFLAGS} -L${MOAB_LIBDIR} -lMOAB  -lm    -lhdf5<br class="">-lgpfs  -lz -ldl<br class=""><br class="">MOAB_CXX =<br class="">/cineca/prod/compilers/intel/cs-xe-2015/binary/impi_5.0.2/intel64/bin/mpicxx<br class="">MOAB_CC  =<br class="">/cineca/prod/compilers/intel/cs-xe-2015/binary/impi_5.0.2/intel64/bin/mpicc<br class="">MOAB_FC  = ifort<br class="">MOAB_F77  = ifort<br class=""><br class=""># Override MOAB_LIBDIR and MOAB_INCLUDES from above with the correct<br class=""># values for the installed MOAB.<br class=""><br class="">Adding the missing .la fixes the linking issue.<br class=""><br class="">What do you guys think? I’m not an expert of this kind of problems...<br class=""><br class="">Bests<br class="">Lorenzo<br class=""><br class=""><br class=""><br class=""></blockquote></div></blockquote></div><br class=""></body></html>