[Trilinos-Users] [EXTERNAL] error compiling Trilinos Sundance

Andrea Penza pepe.aero at alice.it
Mon Feb 27 11:33:28 MST 2012


Dear Brent,

problem solved. I've build Trilinos with different blas and lapack I
found on the cluster where I was working. Problems occurred because I
was trying to configure and build Trilinos on a cluster using a
configure script similar to the one used to configure on my notebook.
But systems and libraries installed are very different. Anyway, thanks
for your useful help.
Kind regards,

Andrea


On lun, 2012-02-27 at 15:37 +0000, Perschbacher, Brent M wrote:
> Andrea,
>   The issue is that your lapack library is not built with position
> independent code (the –fPIC option for gnu) and you are trying to
> build Trilinos as shared libraries. Unfortunately there really only
> two possible solutions to this, use a different blas and lapack that
> are built with –fPIC, or remove the BUILD_SHARED_LIBS option from your
> configure script.
> 
> Brent
> 
> 
> On 2/25/12 6:13 AM, "Andrea Penza" <pepe.aero at alice.it> wrote:
> 
>         Hi Brent,
>         
>         First of all thanks for your precious reply. One problem is
>         fixed, but the issue is not completely solved.
>         I've modified my configure script as follows:
>         
>         EXTRA_ARGS=$@
>                 
>         cmake \
>         -D CMAKE_BUILD_TYPE:STRING=DEBUG \
>         -D BUILD_SHARED_LIBS:BOOL=TRUE \
>         -D Trilinos_ENABLE_Sundance:BOOL=ON \
>         -D Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON \
>         -D Trilinos_ENABLE_TESTS:BOOL=ON \
>         -D Trilinos_ENABLE_SEACAS:BOOL=ON \
>         -D Trilinos_ENABLE_Pamgen:BOOL=TRUE \
>         -D TPL_BLAS_LIBRARIES:PATH=/data/libs/blas/gnu/lib/libblas.a \
>                 -D
>         TPL_LAPACK_LIBRARIES:PATH=/data/libs/lapack/3.3.1/gnu/lib/liblapack.a \
>         -D TPL_ENABLE_MPI:BOOL=ON \
>         -D MPI_BASE_DIR:PATH=/data/libs/openmpi/1.4.3/gnu44 \
>         -D MPI_BIN_DIR:PATH=/data/libs/openmpi/1.4.3/gnu44/bin \
>         -D TPL_ENABLE_Netcdf:BOOL=ON \
>         -D
>         Netcdf_INCLUDE_DIRS:PATH=/scratch/penza/netcdf-4.1.3/include \
>         -D Netcdf_LIBRARY_NAMES:STRING="netcdf;netcdf_c++;netcdff" \
>         -D
>         Netcdf_LIBRARY_DIRS:PATH=/scratch/penza/netcdf-4.1.3/BUILD/lib
>         \
>         $EXTRA_ARGS \
>         ${TRILINOS_HOME}
>         
>         
>         I've also add the ${MPI_BASE_DIR}/lib to the value of
>         LD_LIBRARY_PATH, referring to Trilinos CMake Quickstart Guide.
>         And this seems to fix the problem I told you.
>         But the compilation still not ends fine. The system report now
>         this error:
>         
>         
>         [  3%] Building CXX object
>         packages/teuchos/src/CMakeFiles/teuchos.dir/Teuchos_MpiReductionOpSetter.cpp.o
>         Linking CXX shared library libteuchos.so
>         /usr/bin/ld: /data/libs/lapack/3.3.1/gnu/lib/liblapack.a(sgebak.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
>         /data/libs/lapack/3.3.1/gnu/lib/liblapack.a: could not read
>         symbols: Bad value
>         collect2: ld returned 1 exit status
>         make[2]: *** [packages/teuchos/src/libteuchos.so] Error 1
>         make[1]: *** [packages/teuchos/src/CMakeFiles/teuchos.dir/all]
>         Error 2
>         make: *** [all] Error 2
>         
>         
>         
>         As you've asked me here is the output of command "make
>         VERBOSE=1". 
>         
>         
>         [auteri at cn205 BUILD]$ make VERBOSE=1
>         /home/astru/auteri/local/bin/cmake
>         -H/scratch/penza/trilinos-10.8.3-Source
>         -B/scratch/penza/trilinos-10.8.3-Source/BUILD
>         --check-build-system CMakeFiles/Makefile.cmake 0
>         /home/astru/auteri/local/bin/cmake -E
>         cmake_progress_start /scratch/penza/trilinos-10.8.3-Source/BUILD/CMakeFiles /scratch/penza/trilinos-10.8.3-Source/BUILD/CMakeFiles/progress.marks
>         make -f CMakeFiles/Makefile2 all
>         make[1]: Entering directory
>         `/scratch/penza/trilinos-10.8.3-Source/BUILD'
>         make -f packages/teuchos/src/CMakeFiles/teuchos.dir/build.make
>         packages/teuchos/src/CMakeFiles/teuchos.dir/depend
>         make[2]: Entering directory
>         `/scratch/penza/trilinos-10.8.3-Source/BUILD'
>         cd /scratch/penza/trilinos-10.8.3-Source/BUILD
>         && /home/astru/auteri/local/bin/cmake -E cmake_depends "Unix
>         Makefiles" /scratch/penza/trilinos-10.8.3-Source /scratch/penza/trilinos-10.8.3-Source/packages/teuchos/src /scratch/penza/trilinos-10.8.3-Source/BUILD /scratch/penza/trilinos-10.8.3-Source/BUILD/packages/teuchos/src /scratch/penza/trilinos-10.8.3-Source/BUILD/packages/teuchos/src/CMakeFiles/teuchos.dir/DependInfo.cmake --color=
>         make[2]: Leaving directory
>         `/scratch/penza/trilinos-10.8.3-Source/BUILD'
>         make -f packages/teuchos/src/CMakeFiles/teuchos.dir/build.make
>         packages/teuchos/src/CMakeFiles/teuchos.dir/build
>         make[2]: Entering directory
>         `/scratch/penza/trilinos-10.8.3-Source/BUILD'
>         Linking CXX shared library libteuchos.so
>         cd /scratch/penza/trilinos-10.8.3-Source/BUILD/packages/teuchos/src && /home/astru/auteri/local/bin/cmake -E cmake_link_script CMakeFiles/teuchos.dir/link.txt --verbose=1
>         /data/libs/openmpi/1.4.3/gnu44/bin/mpicxx  -fPIC -g -O0
>           -shared -Wl,-soname,libteuchos.so -o libteuchos.so
>         CMakeFiles/teuchos.dir/Teuchos_BLAS.cpp.o
>         CMakeFiles/teuchos.dir/Teuchos_CTimeMonitor.cpp.o
>         CMakeFiles/teuchos.dir/Teuchos_CommandLineProcessor.cpp.o
>         CMakeFiles/teuchos.dir/Teuchos_CompObject.cpp.o
>         CMakeFiles/teuchos.dir/Teuchos_Describable.cpp.o
>         CMakeFiles/teuchos.dir/Teuchos_Dependency.cpp.o
>         CMakeFiles/teuchos.dir/Teuchos_DependencySheet.cpp.o
>         CMakeFiles/teuchos.dir/Teuchos_ErrorPolling.cpp.o
>         CMakeFiles/teuchos.dir/Teuchos_Flops.cpp.o
>         CMakeFiles/teuchos.dir/Teuchos_GlobalMPISession.cpp.o
>         CMakeFiles/teuchos.dir/Teuchos_LAPACK.cpp.o
>         CMakeFiles/teuchos.dir/Teuchos_LabeledObject.cpp.o
>         CMakeFiles/teuchos.dir/Teuchos_MPIComm.cpp.o
>         CMakeFiles/teuchos.dir/Teuchos_MPISession.cpp.o
>         CMakeFiles/teuchos.dir/Teuchos_Object.cpp.o
>         CMakeFiles/teuchos.dir/Teuchos_ParameterEntry.cpp.o
>         CMakeFiles/teuchos.dir/Teuchos_ParameterList.cpp.o
>         CMakeFiles/teuchos.dir/Teuchos_ParameterListAcceptorHelpers.cpp.o CMakeFiles/teuchos.dir/Teuchos_ParameterListAcceptor.cpp.o CMakeFiles/teuchos.dir/Teuchos_ParameterListAcceptorDefaultBase.cpp.o CMakeFiles/teuchos.dir/Teuchos_ParameterListNonAcceptor.cpp.o CMakeFiles/teuchos.dir/Teuchos_PerformanceMonitorBase.cpp.o CMakeFiles/teuchos.dir/Teuchos_Ptr.cpp.o CMakeFiles/teuchos.dir/Teuchos_RCPNode.cpp.o CMakeFiles/teuchos.dir/Teuchos_Range1D.cpp.o CMakeFiles/teuchos.dir/Teuchos_ScalarTraits.cpp.o CMakeFiles/teuchos.dir/Teuchos_StandardConditions.cpp.o CMakeFiles/teuchos.dir/Teuchos_StandardDependencies.cpp.o CMakeFiles/teuchos.dir/Teuchos_StandardParameterEntryValidators.cpp.o CMakeFiles/teuchos.dir/Teuchos_StringToIntMap.cpp.o CMakeFiles/teuchos.dir/Teuchos_TableColumn.cpp.o CMakeFiles/teuchos.dir/Teuchos_TableEntry.cpp.o CMakeFiles/teuchos.dir/Teuchos_TableFormat.cpp.o CMakeFiles/teuchos.dir/Teuchos_TabularOutputter.cpp.o CMakeFiles/teuchos.dir/Teuchos_TestForException.cpp.o CMakeFiles/teuchos.dir/Teuchos_TestingHelpers.cpp.o CMakeFiles/teuchos.dir/Teuchos_Time.cpp.o CMakeFiles/teuchos.dir/Teuchos_TimeMonitor.cpp.o CMakeFiles/teuchos.dir/Teuchos_TypeNameTraits.cpp.o CMakeFiles/teuchos.dir/Teuchos_UnitTestBase.cpp.o CMakeFiles/teuchos.dir/Teuchos_UnitTestRepository.cpp.o CMakeFiles/teuchos.dir/Teuchos_Utils.cpp.o CMakeFiles/teuchos.dir/Teuchos_ValidatorFactory.cpp.o CMakeFiles/teuchos.dir/Teuchos_VerboseObject.cpp.o CMakeFiles/teuchos.dir/Teuchos_VerboseObjectParameterListHelpers.cpp.o CMakeFiles/teuchos.dir/Teuchos_VerbosityLevel.cpp.o CMakeFiles/teuchos.dir/Teuchos_VerbosityLevelCommandLineProcessorHelpers.cpp.o CMakeFiles/teuchos.dir/Teuchos_Workspace.cpp.o CMakeFiles/teuchos.dir/Teuchos_dyn_cast.cpp.o CMakeFiles/teuchos.dir/Teuchos_stacktrace.cpp.o CMakeFiles/teuchos.dir/Teuchos_ConditionXMLConverter.cpp.o CMakeFiles/teuchos.dir/Teuchos_ConditionXMLConverterDB.cpp.o CMakeFiles/teuchos.dir/Teuchos_DependencyXMLConverter.cpp.o CMakeFiles/teuchos.dir/Teuchos_DependencyXMLConverterDB.cpp.o CMakeFiles/teuchos.dir/Teuchos_ExpatHandlerAdapter.cpp.o CMakeFiles/teuchos.dir/Teuchos_FileInputSource.cpp.o CMakeFiles/teuchos.dir/Teuchos_FileInputStream.cpp.o CMakeFiles/teuchos.dir/Teuchos_FunctionObjectXMLConverter.cpp.o CMakeFiles/teuchos.dir/Teuchos_FunctionObjectXMLConverterDB.cpp.o CMakeFiles/teuchos.dir/Teuchos_HashUtils.cpp.o CMakeFiles/teuchos.dir/Teuchos_Libxml2HandlerAdapter.cpp.o CMakeFiles/teuchos.dir/Teuchos_ParameterXMLFileReader.cpp.o CMakeFiles/teuchos.dir/Teuchos_ParameterEntryXMLConverter.cpp.o CMakeFiles/teuchos.dir/Teuchos_ParameterEntryXMLConverterDB.cpp.o CMakeFiles/teuchos.dir/Teuchos_StandardDependencyXMLConverters.cpp.o CMakeFiles/teuchos.dir/Teuchos_StandardParameterEntryXMLConverters.cpp.o CMakeFiles/teuchos.dir/Teuchos_StandardValidatorXMLConverters.cpp.o CMakeFiles/teuchos.dir/Teuchos_StandardConditionXMLConverters.cpp.o CMakeFiles/teuchos.dir/Teuchos_StrUtils.cpp.o CMakeFiles/teuchos.dir/Teuchos_StringInputSource.cpp.o CMakeFiles/teuchos.dir/Teuchos_StringInputStream.cpp.o CMakeFiles/teuchos.dir/Teuchos_TreeBuildingXMLHandler.cpp.o CMakeFiles/teuchos.dir/Teuchos_ValidatorMaps.cpp.o CMakeFiles/teuchos.dir/Teuchos_ValidatorXMLConverter.cpp.o CMakeFiles/teuchos.dir/Teuchos_ValidatorXMLConverterDB.cpp.o CMakeFiles/teuchos.dir/Teuchos_XMLInputSource.cpp.o CMakeFiles/teuchos.dir/Teuchos_XMLInputStream.cpp.o CMakeFiles/teuchos.dir/Teuchos_XMLObject.cpp.o CMakeFiles/teuchos.dir/Teuchos_XMLObjectImplem.cpp.o CMakeFiles/teuchos.dir/Teuchos_XMLParameterListHelpers.cpp.o CMakeFiles/teuchos.dir/Teuchos_XMLParameterListReader.cpp.o CMakeFiles/teuchos.dir/Teuchos_XMLParameterListWriter.cpp.o CMakeFiles/teuchos.dir/Teuchos_XMLParser.cpp.o CMakeFiles/teuchos.dir/Teuchos_MpiReductionOpSetter.cpp.o /data/libs/lapack/3.3.1/gnu/lib/liblapack.a /data/libs/blas/gnu/lib/libblas.a -Wl,-Bstatic -lbfd -liberty -Wl,-Bdynamic 
>         /usr/bin/ld: /data/libs/lapack/3.3.1/gnu/lib/liblapack.a(sgebak.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
>         /data/libs/lapack/3.3.1/gnu/lib/liblapack.a: could not read
>         symbols: Bad value
>         collect2: ld returned 1 exit status
>         make[2]: *** [packages/teuchos/src/libteuchos.so] Error 1
>         make[2]: Leaving directory
>         `/scratch/penza/trilinos-10.8.3-Source/BUILD'
>         make[1]: *** [packages/teuchos/src/CMakeFiles/teuchos.dir/all]
>         Error 2
>         make[1]: Leaving directory
>         `/scratch/penza/trilinos-10.8.3-Source/BUILD'
>         make: *** [all] Error 2
>         
>         
>         Hope this could help you to understand the problem. Thanks in
>         advance, kind regards.
>         
>         Andrea
>         
>         
>         
>         Il giorno 24/feb/2012, alle ore 21.33, Perschbacher, Brent M
>         ha scritto:
>         
>                 Re: [EXTERNAL] [Trilinos-Users] error compiling
>                 Trilinos Sundance 
>                 Andrea,
>                   I think the issue is that you are setting up mpi in
>                 a way that we very likely don’t support, but it
>                 probably appears we do based on other tpls. Mpi is a
>                 special tpl in that we pretty much rely entirely on
>                 the wrapper scripts provided by each implementation
>                 and don’t try to find the paths to needed headers and
>                 libraries ourselves. I think the best way to fix this
>                 is to remove the references to MPI_INCLUDE_DIRS,
>                 MPI_LIBRARY_NAMES, and MPI_LIBRARY_DIRS and then
>                 replace then with:
>                 “-D MPI_BASE_DIR:PATH=<path to mpi>” where <path to
>                 mpi> looks to be “/data/libs/openmpi/1.4.3/gnu44” from
>                 the information you provided. Basically that option
>                 tells the build where the root path of your mpi is and
>                 we look there to find the wrapper scripts. For this
>                 change to work properly I would recommend deleting
>                 your existing CMakeCache.txt file and CMakeFiles
>                 directory in your build tree to make sure any
>                 references to the old compilers are removed and then
>                 reconfigure.
>                 
>                 If that doesn’t work please send me the error you get
>                 when you run “make VERBOSE=1” as the default cmake
>                 output doesn’t have the full compile line.
>                 
>                 Thanks,
>                 
>                 Brent
>                 
>                 
>                 On 2/24/12 12:42 PM, "Andrea Penza"
>                 <pepe.aero at alice.it <x-msg://10/pepe.aero@alice.it> >
>                 wrote:
>                 
>                         Hi all,
>                         
>                         I'm trying compiling Sundance package for
>                         Trilinos 10.8.3 release on a system. The
>                         configuration ends with success using this
>                         "do-configure.sh" script:
>                         
>                         EXTRA_ARGS=$@
>                         
>                         cmake \
>                                 -D CMAKE_BUILD_TYPE:STRING=DEBUG \
>                                 -D BUILD_SHARED_LIBS:BOOL=TRUE \
>                                 -D Trilinos_ENABLE_Sundance:BOOL=ON \
>                                 -D
>                         Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON
>                         \
>                                 -D Trilinos_ENABLE_TESTS:BOOL=ON \
>                                 -D Trilinos_ENABLE_SEACAS:BOOL=ON \
>                                 -D Trilinos_ENABLE_Pamgen:BOOL=TRUE \
>                                 -D
>                         TPL_BLAS_LIBRARIES:PATH=/data/libs/blas/gnu/lib/libblas.a \
>                                 -D
>                         TPL_LAPACK_LIBRARIES:PATH=/data/libs/lapack/3.3.1/gnu/lib/liblapack.a \
>                                 -D TPL_ENABLE_MPI:BOOL=ON \
>                                 -D
>                         MPI_INCLUDE_DIRS:PATH=/data/libs/openmpi/1.4.3/gnu44/include:/data/libs/openmpi/1.4.3/gnu44/include/openmpi/ompi/mpi/cxx \
>                                 -D
>                         MPI_LIBRARY_NAMES:STRING="otf;vt;vt.fmpi;vt.mpi;vt.omp;vt.ompi" \
>                                 -D
>                         MPI_LIBRARY_DIRS:PATH=/data/libs/openmpi/1.4.3/gnu44/lib \
>                                 -D TPL_ENABLE_Netcdf:BOOL=ON \
>                                 -D
>                         Netcdf_INCLUDE_DIRS:PATH=/scratch/penza/netcdf-4.1.3/include \
>                                 -D
>                         Netcdf_LIBRARY_NAMES:STRING="netcdf;netcdf_c
>                         ++;netcdff" \
>                                 -D
>                         Netcdf_LIBRARY_DIRS:PATH=/scratch/penza/netcdf-4.1.3/BUILD/lib \
>                                 $EXTRA_ARGS \
>                                 ${TRILINOS_HOME}
>                         
>                         Running the command "make" in the build
>                         directory this error occurs:
>                         
>                         [  0%] Built target last_lib
>                         [  0%] Building CXX object
>                         packages/teuchos/src/CMakeFiles/teuchos.dir/Teuchos_CTimeMonitor.cpp.o
>                         In file included
>                         from /scratch/penza/trilinos-10.8.3-Source/packages/teuchos/src/Teuchos_GlobalMPISession.hpp:52,
>                                          from /scratch/penza/trilinos-10.8.3-Source/packages/teuchos/src/Teuchos_FancyOStream.hpp:46,
>                                          from /scratch/penza/trilinos-10.8.3-Source/packages/teuchos/src/Teuchos_Describable.hpp:46,
>                                          from /scratch/penza/trilinos-10.8.3-Source/packages/teuchos/src/Teuchos_ReductionOp.hpp:45,
>                                          from /scratch/penza/trilinos-10.8.3-Source/packages/teuchos/src/Teuchos_Comm.hpp:45,
>                                          from /scratch/penza/trilinos-10.8.3-Source/packages/teuchos/src/Teuchos_TimeMonitor.hpp:64,
>                                          from /scratch/penza/trilinos-10.8.3-Source/packages/teuchos/src/Teuchos_CTimeMonitor.cpp:43:
>                         /scratch/penza/trilinos-10.8.3-Source/packages/teuchos/src/mpi.h:1886:41: error: openmpi/ompi/mpi/cxx/mpicxx.h: No such file or directory
>                         make[2]: ***
>                         [packages/teuchos/src/CMakeFiles/teuchos.dir/Teuchos_CTimeMonitor.cpp.o] Error 1
>                         make[1]: ***
>                         [packages/teuchos/src/CMakeFiles/teuchos.dir/all] Error 2
>                         make: *** [all] Error 2
>                         
>                         
>                         Notice that the mpicxx.h file the system try
>                         to find is correctly located in
>                         the /data/libs/openmpi/1.4.3/gnu44/include/openmpi/ompi/mpi/cxx
>                         
>                         Has anyone idea of how this issue could be
>                         solved?
>                         Thanks in advance for your support.
>                         Best regards,
>                         
>                         Andrea
>                         
>                          
>                         
>                         
>                         ______________________________________________
>                         _______________________________________________
>                         Trilinos-Users mailing list
>                         Trilinos-Users at software.sandia.gov
>                         <x-msg://10/Trilinos-Users@software.sandia.gov> 
>                         http://software.sandia.gov/mailman/listinfo/trilinos-users
>         
>         






More information about the Trilinos-Users mailing list