I have many of the relevant packages installed via a repository (apt-get) and yet the many, many variations I've tried I still can't seem to get through the build stage - despite many of these attempts making it through the configuration stage.
I follow these instructions - https://www.csc.fi/web/elmer/sources-and-compilation and I get the errors at build stage
I've also looked at various sample CMake scripts (e.g. in the Zoltan repo, in the source, online, etc) and lately tried this approach: https://www.elmerfem.org/elmerwiki/inde ... sing_Cmake
I don't need anything too fancy, I just use mostly a two year old laptop, but I do have access to a workstation I might wind up needing... so I thought it would be good to get it running on this easier setup. To that end, here are my two files:
By the way, from here: https://stackoverflow.com/questions/113 ... red-memory I think I fall under "Example 2" and so want for now only OpenMP...
Code: Select all
#!/bin/bash
CMAKE=cmake
# Installation directory (set these!)
TIMESTAMP=$(date +"%m-%d-%y")
ELMER_REV="Elmer_devel_${TIMESTAMP}"
ELMERSRC="/home/sbh/SW/Elmer/elmerfem"
BUILDDIR="$ELMERSRC/build"
IDIR="/home/sbh/SW/Elmer/$ELMER_REV"
TOOLCHAIN="/home/sbh/SW/Elmer/toolchain.cmake"
echo "Building Elmer from within " ${BUILDDIR}
echo "using following toolchain file " ${TOOLCHAIN}
echo "installation into " ${IDIR}
cd ${BUILDDIR}
pwd
ls -ltr
echo $CMAKE $ELMERSRC -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN
$CMAKE $ELMERSRC -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN \
-DCMAKE_INSTALL_PREFIX=$IDIR \
-DCMAKE_C_COMPILER=/usr/bin/gcc \
-DCMAKE_Fortran_COMPILER=/usr/bin/gfortran \
-DWITH_MPI:BOOL=FALSE \
-DWITH_Mumps:BOOL=FALSE \
-DWITH_Hypre:BOOL=FALSE \
-DWITH_TRILINOS:BOOL=TRUE \
-DWITH_ELMERGUI:BOOL=TRUE \
-DWITH_OCC:BOOL=FALSE \
-DWITH_PARAVIEW:BOOL=TRUE \
-DWITH_QWT:BOOL=FALSE \
-DWITH_VTK:BOOL=FALSE \
-DWITH_PYTHONQT:BOOL=FALSE \
-DWITH_MATC:BOOL=TRUE \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-D ParMETIS_INCLUDE_DIRS:FILEPATH="/usr/include" \
-D ParMETIS_LIBRARY_DIRS:FILEPATH="/usr/lib" \
-DWITH_PARMETIS:BOOL=TRUE \
-DWITH_OpenMP:BOOL=TRUE
Code: Select all
# CMake toolchain file for building on Linux Mint 17 (LTS) 64bit
#
# CSC - IT Center for Science Ltd.
# Version: 0.1
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_PROCESSOR x86_64)
SET(CMAKE_SYSTEM_VERSION 1)
# Specify the cross compilers (serial)
SET(CMAKE_C_COMPILER gcc)
SET(CMAKE_Fortran_COMPILER gfortran)
SET(CMAKE_CXX_COMPILER g++)
# Specify the cross compilers (parallel)
SET(MPI_C_COMPILER mpicc)
SET(MPI_CXX_COMPILER mpicxx)
SET(MPI_Fortran_COMPILER mpif90)
# Compilation flags (i.e. with optimization)
#SET(CMAKE_C_FLAGS "-O3 -fPIC -m64 -ftree-vectorize -funroll-loops -std=c99" CACHE STRING "")
SET(CMAKE_C_FLAGS "-O3 -fPIC" CACHE STRING "")
#SET(CMAKE_CXX_FLAGS "-O3 -fPIC -m64 -ftree-vectorize -funroll-loops" CACHE STRING "")
SET(CMAKE_CXX_FLAGS "-O3 -fPIC" CACHE STRING "")
#SET(CMAKE_Fortran_FLAGS "-O3 -fPIC -m64 -ftree-vectorize -funroll-loops -std=f2008" CACHE STRING "")
SET(CMAKE_Fortran_FLAGS "-O3 -fPIC" CACHE STRING "")
# sbh linker flags
#SET(GCC_BLASLAPACK_LINKER_FLAG "<flags>")
#SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_BLASLAPACK_LINKER_FLAG}")
# https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling
# use, i.e. don't skip the full RPATH for the build tree
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# the RPATH to be used when installing, but only if it's not a system directory
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
IF("${isSystemDir}" STREQUAL "-1")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
ENDIF("${isSystemDir}" STREQUAL "-1")
It seems to configure fine;
Code: Select all
sbh@sbh:~/SW/Elmer/build$ ../options.cmake
Building Elmer from within /home/sbh/SW/Elmer/elmerfem/build
using following toolchain file /home/sbh/SW/Elmer/toolchain.cmake
installation into /home/sbh/SW/Elmer/Elmer_devel_06-01-19
../options.cmake: line 22: cd: /home/sbh/SW/Elmer/elmerfem/build: No such file or directory
/home/sbh/SW/Elmer/build
total 0
cmake /home/sbh/SW/Elmer/elmerfem -DCMAKE_TOOLCHAIN_FILE=/home/sbh/SW/Elmer/toolchain.cmake
-- The Fortran compiler identification is GNU 7.4.0
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working Fortran compiler: /usr/bin/gfortran
-- Check for working Fortran compiler: /usr/bin/gfortran -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/gfortran supports Fortran 90
-- Checking whether /usr/bin/gfortran supports Fortran 90 -- yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:54 (CMAKE_POLICY):
The OLD behavior for policy CMP0022 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- Checking whether GFortran version >= 4.8 -- yes
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP Fortran flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp
-- Checking whether /usr/bin/gfortran supports OpenMP 4.0
-- Checking whether /usr/bin/gfortran supports OpenMP 4.0 -- yes
-- Checking whether /usr/bin/gfortran supports OpenMP 4.5
-- Checking whether /usr/bin/gfortran supports OpenMP 4.5 -- yes
-- ------------------------------------------------
-- Mesh adaptation 2D/3D looking for [Mmg] tools
-- Mmg: TRUE
-- Mmg_INC: /usr/local/include
-- Mmg_LIB: /usr/local/lib/libmmg.a
-- Mmg_LIBDIR: /usr/local/lib
-- Compile MMG2DSolver/MMG3DSolver
-- ------------------------------------------------
-- ------------------------------------------------
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - found
-- Found BLAS: /usr/lib/x86_64-linux-gnu/libopenblas.so
-- Looking for Fortran cheev
-- Looking for Fortran cheev - found
-- A library with LAPACK API found.
-- Checking whether /usr/bin/gfortran supports PROCEDURE POINTER
-- Checking whether /usr/bin/gfortran supports PROCEDURE POINTER -- yes
-- Checking whether /usr/bin/gfortran supports CONTIGUOUS
-- Checking whether /usr/bin/gfortran supports CONTIGUOUS -- yes
-- Checking whether /usr/bin/gfortran supports EXECUTE_COMMAND_LINE
-- Checking whether /usr/bin/gfortran supports EXECUTE_COMMAND_LINE -- yes
CMake Warning (dev) at /usr/share/cmake-3.13/Modules/CheckIncludeFiles.cmake:110 (message):
Policy CMP0075 is not set: Include file check macros honor
CMAKE_REQUIRED_LIBRARIES. Run "cmake --help-policy CMP0075" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
CMAKE_REQUIRED_LIBRARIES is set to:
/usr/lib/x86_64-linux-gnu/libopenblas.so;/usr/lib/x86_64-linux-gnu/libopenblas.so;/usr/lib/x86_64-linux-gnu/libopenblas.so
For compatibility with CMake 3.11 and below this check is ignoring it.
Call Stack (most recent call first):
matc/CMakeLists.txt:4 (CHECK_INCLUDE_FILES)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for sys/types.h
CMake Warning (dev) at /usr/share/cmake-3.13/Modules/CheckIncludeFile.cmake:70 (message):
Policy CMP0075 is not set: Include file check macros honor
CMAKE_REQUIRED_LIBRARIES. Run "cmake --help-policy CMP0075" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
CMAKE_REQUIRED_LIBRARIES is set to:
/usr/lib/x86_64-linux-gnu/libopenblas.so;/usr/lib/x86_64-linux-gnu/libopenblas.so;/usr/lib/x86_64-linux-gnu/libopenblas.so
For compatibility with CMake 3.11 and below this check is ignoring it.
Call Stack (most recent call first):
/usr/share/cmake-3.13/Modules/CheckTypeSize.cmake:225 (check_include_file)
fem/CMakeLists.txt:47 (CHECK_TYPE_SIZE)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long
-- Check size of long - done
-- Found 117 modules from /home/sbh/SW/Elmer/elmerfem/fem/src/modules
-- ELMERSOLVER_RPATH_STRING_MOD $ORIGIN/../lib/elmersolver:/usr/local/lib
-- ELMERLIB_RPATH_STRING $ORIGIN/:/usr/local/lib
-- Found 587 tests
CMake Warning at elmergrid/src/CMakeLists.txt:11 (MESSAGE):
Crosscompiling ElmerGrid, no native build flags set
-- Looking for execinfo.h
CMake Warning (dev) at /usr/share/cmake-3.13/Modules/CheckIncludeFile.cmake:70 (message):
Policy CMP0075 is not set: Include file check macros honor
CMAKE_REQUIRED_LIBRARIES. Run "cmake --help-policy CMP0075" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
CMAKE_REQUIRED_LIBRARIES is set to:
/usr/lib/x86_64-linux-gnu/libopenblas.so;/usr/lib/x86_64-linux-gnu/libopenblas.so;/usr/lib/x86_64-linux-gnu/libopenblas.so
For compatibility with CMake 3.11 and below this check is ignoring it.
Call Stack (most recent call first):
elmergrid/src/metis-5.1.0/GKlib/GKlibSystem.cmake:97 (check_include_file)
elmergrid/src/metis-5.1.0/CMakeLists.txt:21 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Looking for execinfo.h - found
-- Looking for getline
-- Looking for getline - found
-- checking for thread-local storage - found
-- Building ElmerGUI
-- ------------------------------------------------
-- ------------------------------------------------
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found Qt4: /usr/bin/qmake-qt4 (found version "4.8.7")
-- [ElmerGUI] Qt4: TRUE
-- [ElmerGUI] Qt4_LIBRARIES:
-- ------------------------------------------------
-- [ElmerGUI] Compiling in matc
-- ------------------------------------------------
-- ------------------------------------------------
-- BLAS library: /usr/lib/x86_64-linux-gnu/libopenblas.so
-- LAPACK library: /usr/lib/x86_64-linux-gnu/libopenblas.so;/usr/lib/x86_64-linux-gnu/libopenblas.so
-- ------------------------------------------------
-- Fortran compiler: /usr/bin/gfortran
-- Fortran flags: -O3 -fPIC -fopenmp -O2 -g -DNDEBUG
-- ------------------------------------------------
-- C compiler: /usr/bin/gcc
-- C flags: -O3 -fPIC -fopenmp -O2 -g -DNDEBUG
-- ------------------------------------------------
-- CXX compiler: /usr/bin/g++
-- CXX flags: -O3 -fPIC -fopenmp -O2 -g -DNDEBUG
-- ------------------------------------------------
-- ------------------------------------------------
-- Package filename: elmerfem-8.4-4800e24b-20190601_Linux-x86_64
-- Patch version: 8.4-4800e24b
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
ParMETIS_INCLUDE_DIRS
ParMETIS_LIBRARY_DIRS
WITH_PARMETIS
WITH_TRILINOS
-- Build files have been written to: /home/sbh/SW/Elmer/build
Code: Select all
[ 73%] Linking Fortran shared library libelmersolver.so
cd /home/sbh/SW/Elmer/build/fem/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/elmersolver.dir/link.txt --verbose=1
/usr/bin/gfortran -fPIC -O3 -fPIC -fopenmp -O2 -g -DNDEBUG -shared -Wl,-soname,libelmersolver.so -o libelmersolver.so CMakeFiles/elmersolver.dir/AddrFunc.F90.o CMakeFiles/elmersolver.dir/NavierStokes.F90.o CMakeFiles/elmersolver.dir/NavierStokesGeneral.F90.o CMakeFiles/elmersolver.dir/NavierStokesCylindrical.F90.o CMakeFiles/elmersolver.dir/Lists.F90.o CMakeFiles/elmersolver.dir/DiffuseConvectiveAnisotropic.F90.o CMakeFiles/elmersolver.dir/LoadMod.F90.o CMakeFiles/elmersolver.dir/DiffuseConvectiveGeneralAnisotropic.F90.o CMakeFiles/elmersolver.dir/PElementMaps.F90.o CMakeFiles/elmersolver.dir/PElementBase.F90.o CMakeFiles/elmersolver.dir/ElementDescription.F90.o CMakeFiles/elmersolver.dir/Integration.F90.o CMakeFiles/elmersolver.dir/ListMatrixArray.F90.o CMakeFiles/elmersolver.dir/ModelDescription.F90.o CMakeFiles/elmersolver.dir/GeneralUtils.F90.o CMakeFiles/elmersolver.dir/Stress.F90.o CMakeFiles/elmersolver.dir/StressGeneral.F90.o CMakeFiles/elmersolver.dir/LinearAlgebra.F90.o CMakeFiles/elmersolver.dir/CoordinateSystems.F90.o CMakeFiles/elmersolver.dir/ListMatrix.F90.o CMakeFiles/elmersolver.dir/CRSMatrix.F90.o CMakeFiles/elmersolver.dir/BandMatrix.F90.o CMakeFiles/elmersolver.dir/BandwidthOptimize.F90.o CMakeFiles/elmersolver.dir/BlockSolve.F90.o CMakeFiles/elmersolver.dir/MaterialModels.F90.o CMakeFiles/elmersolver.dir/DirectSolve.F90.o CMakeFiles/elmersolver.dir/IterSolve.F90.o CMakeFiles/elmersolver.dir/IterativeMethods.F90.o CMakeFiles/elmersolver.dir/TimeIntegrate.F90.o CMakeFiles/elmersolver.dir/Types.F90.o CMakeFiles/elmersolver.dir/SolveBand.F90.o CMakeFiles/elmersolver.dir/ElementUtils.F90.o CMakeFiles/elmersolver.dir/Radiation.F90.o CMakeFiles/elmersolver.dir/fft.c.o CMakeFiles/elmersolver.dir/Load.c.o CMakeFiles/elmersolver.dir/Differentials.F90.o CMakeFiles/elmersolver.dir/FreeSurface.F90.o CMakeFiles/elmersolver.dir/Maxwell.F90.o CMakeFiles/elmersolver.dir/MaxwellAxiS.F90.o CMakeFiles/elmersolver.dir/MaxwellGeneral.F90.o CMakeFiles/elmersolver.dir/Walls.F90.o CMakeFiles/elmersolver.dir/SolverUtils.F90.o CMakeFiles/elmersolver.dir/SolveSBand.F90.o CMakeFiles/elmersolver.dir/CPUTime.c.o CMakeFiles/elmersolver.dir/Interpolation.F90.o CMakeFiles/elmersolver.dir/MainUtils.F90.o CMakeFiles/elmersolver.dir/Adaptive.F90.o CMakeFiles/elmersolver.dir/EigenSolve.F90.o CMakeFiles/elmersolver.dir/HashTable.F90.o CMakeFiles/elmersolver.dir/MeshUtils.F90.o CMakeFiles/elmersolver.dir/SParIterGlobals.F90.o CMakeFiles/elmersolver.dir/SParIterComm.F90.o CMakeFiles/elmersolver.dir/SParIterPrecond.F90.o CMakeFiles/elmersolver.dir/SParIterSolver.F90.o CMakeFiles/elmersolver.dir/Messages.F90.o CMakeFiles/elmersolver.dir/Multigrid.F90.o CMakeFiles/elmersolver.dir/Smoothers.F90.o CMakeFiles/elmersolver.dir/ClusteringMethods.F90.o CMakeFiles/elmersolver.dir/ParallelUtils.F90.o CMakeFiles/elmersolver.dir/ParallelEigenSolve.F90.o CMakeFiles/elmersolver.dir/solve_cmplx.F90.o CMakeFiles/elmersolver.dir/solve_real.F90.o CMakeFiles/elmersolver.dir/MGPrec.F90.o CMakeFiles/elmersolver.dir/DefUtils.F90.o CMakeFiles/elmersolver.dir/MeshPartition.F90.o CMakeFiles/elmersolver.dir/MeshRemeshing.F90.o CMakeFiles/elmersolver.dir/LUDecomposition.F90.o CMakeFiles/elmersolver.dir/RadiationFactors.F90.o CMakeFiles/elmersolver.dir/f_stubs.c.o CMakeFiles/elmersolver.dir/ExchangeCorrelations.F90.o CMakeFiles/elmersolver.dir/SolveHypre.c.o CMakeFiles/elmersolver.dir/SolverActivate_x.F90.o CMakeFiles/elmersolver.dir/SolveTrilinos.cxx.o CMakeFiles/elmersolver.dir/SolveSuperLU.c.o CMakeFiles/elmersolver.dir/iso_varying_string.F90.o CMakeFiles/elmersolver.dir/umf4_f77wrapper.c.o CMakeFiles/elmersolver.dir/VankaCreate.F90.o CMakeFiles/elmersolver.dir/ParticleUtils.F90.o CMakeFiles/elmersolver.dir/Feti.F90.o CMakeFiles/elmersolver.dir/cholmod.c.o CMakeFiles/elmersolver.dir/InterpolateMeshToMesh.F90.o CMakeFiles/elmersolver.dir/InterpVarToVar.F90.o CMakeFiles/elmersolver.dir/LinearForms.F90.o CMakeFiles/elmersolver.dir/H1Basis.F90.o CMakeFiles/elmersolver.dir/CircuitUtils.F90.o CMakeFiles/elmersolver.dir/BackwardError.F90.o CMakeFiles/elmersolver.dir/ElmerSolver.F90.o CMakeFiles/elmersolver.dir/MagnetoDynamicsUtils.F90.o CMakeFiles/elmersolver.dir/ComponentUtils.F90.o CMakeFiles/elmersolver.dir/ZirkaHysteresis.F90.o -Wl,-rpath,/home/sbh/SW/Elmer/build/fem/src:/home/sbh/SW/Elmer/build/matc/src:/home/sbh/SW/Elmer/build/fhutiter/src:/home/sbh/SW/Elmer/build/mathlibs/src/arpack: /usr/local/lib/libmmg.a libmpi_stubs.so ../../matc/src/libmatc.so ../../umfpack/src/umfpack/libumfpack.a ../../umfpack/src/amd/libamd.a ../../fhutiter/src/libfhuti.so binio/libbinio.a ../../mathlibs/src/arpack/libarpack.so /usr/lib/x86_64-linux-gnu/libopenblas.so /usr/lib/x86_64-linux-gnu/libopenblas.so /usr/lib/x86_64-linux-gnu/libopenblas.so -ldl -lm -lstdc++
/usr/bin/ld: /usr/local/lib/libmmg.a(inout_3d.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(libmmg3d_tools.c.o): relocation R_X86_64_PC32 against symbol `stdout@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(librnbg_3d.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(movpt_3d.c.o): relocation R_X86_64_PC32 against symbol `MMG5_caltet' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(quality_3d.c.o): relocation R_X86_64_PC32 against symbol `stdout@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(tools_3d.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(variadic_3d.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(zaldy_3d.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(API_functions.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(anisosiz.c.o): relocation R_X86_64_PC32 against symbol `MMG5_bezierCP' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(eigenv.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(hash.c.o): relocation R_X86_64_PC32 against symbol `stdout@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(inout.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(isosiz.c.o): relocation R_X86_64_PC32 against symbol `stdout@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(librnbg.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(mettools.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(mmg.c.o): relocation R_X86_64_PC32 against symbol `stdout@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(quality.c.o): relocation R_X86_64_PC32 against symbol `stdout@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(scalem.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(tools.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(API_functions_3d.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(PRoctree_3d.c.o): relocation R_X86_64_PC32 against symbol `stdout@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(anisomovpt_3d.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(anisosiz_3d.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(boulep_3d.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(chkmsh_3d.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(delaunay_3d.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(hash_3d.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(intmet_3d.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(isosiz_3d.c.o): relocation R_X86_64_PC32 against symbol `MMG5_compute_meanMetricAtMarkedPoints' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(libmmg3d.c.o): relocation R_X86_64_PC32 against symbol `stdout@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(mmg3d1.c.o): relocation R_X86_64_PC32 against symbol `MMG5_lenedg' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(mmg3d1_delone.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(mmg3d1_pattern.c.o): relocation R_X86_64_PC32 against symbol `MMG5_lenedg' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(mmg3d2.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(optlap_3d.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(opttyp_3d.c.o): relocation R_X86_64_PC32 against symbol `MMG5_lenedg' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(split_3d.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(swap_3d.c.o): relocation R_X86_64_PC32 against symbol `MMG5_caltri' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(swapgen_3d.c.o): relocation R_X86_64_PC32 against symbol `MMG5_caltet' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(anisomovpt.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(intmet.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(analys_3d.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(colver_3d.c.o): relocation R_X86_64_PC32 against symbol `MMG5_caltet' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmmg.a(optbdry_3d.c.o): relocation R_X86_64_PC32 against symbol `MMG5_lenedg' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[2]: *** [fem/src/CMakeFiles/elmersolver.dir/build.make:1433: fem/src/libelmersolver.so] Error 1
make[2]: Leaving directory '/home/sbh/SW/Elmer/build'
make[1]: *** [CMakeFiles/Makefile2:652: fem/src/CMakeFiles/elmersolver.dir/all] Error 2
make[1]: Leaving directory '/home/sbh/SW/Elmer/build'
make: *** [Makefile:166: all] Error 2
Code: Select all
Determining if the Fortran sgemm exists failed with the following output:
Change Dir: /home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_51b11/fast"
/usr/bin/make -f CMakeFiles/cmTC_51b11.dir/build.make CMakeFiles/cmTC_51b11.dir/build
make[1]: Entering directory '/home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp'
Building Fortran object CMakeFiles/cmTC_51b11.dir/testFortranCompiler.f.o
/usr/bin/gfortran -O3 -fPIC -fopenmp -fPIE -c /home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp/testFortranCompiler.f -o CMakeFiles/cmTC_51b11.dir/testFortranCompiler.f.o
Linking Fortran executable cmTC_51b11
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_51b11.dir/link.txt --verbose=1
/usr/bin/gfortran -O3 -fPIC -fopenmp CMakeFiles/cmTC_51b11.dir/testFortranCompiler.f.o -o cmTC_51b11
/usr/bin/ld: CMakeFiles/cmTC_51b11.dir/testFortranCompiler.f.o: in function `main':
testFortranCompiler.f:(.text.startup+0x1d): undefined reference to `sgemm_'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_51b11.dir/build.make:87: cmTC_51b11] Error 1
make[1]: Leaving directory '/home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_51b11/fast] Error 2
Determining if the Q_WS_WIN exist failed with the following output:
Change Dir: /home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_4006e/fast"
/usr/bin/make -f CMakeFiles/cmTC_4006e.dir/build.make CMakeFiles/cmTC_4006e.dir/build
make[1]: Entering directory '/home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_4006e.dir/CheckSymbolExists.cxx.o
/usr/bin/g++ -I/usr/include/qt4 -O3 -fPIC -fopenmp -fPIE -o CMakeFiles/cmTC_4006e.dir/CheckSymbolExists.cxx.o -c /home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx
/home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx: In function ‘int main(int, char**)’:
/home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:8:19: error: ‘Q_WS_WIN’ was not declared in this scope
return ((int*)(&Q_WS_WIN))[argc];
^~~~~~~~
/home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:8:19: note: suggested alternative: ‘Q_WS_X11’
return ((int*)(&Q_WS_WIN))[argc];
^~~~~~~~
Q_WS_X11
make[1]: *** [CMakeFiles/cmTC_4006e.dir/build.make:66: CMakeFiles/cmTC_4006e.dir/CheckSymbolExists.cxx.o] Error 1
make[1]: Leaving directory '/home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_4006e/fast] Error 2
File /home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:
/* */
#include <QtCore/qglobal.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef Q_WS_WIN
return ((int*)(&Q_WS_WIN))[argc];
#else
(void)argc;
return 0;
#endif
}
Determining if the Q_WS_QWS exist failed with the following output:
Change Dir: /home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_62d1d/fast"
/usr/bin/make -f CMakeFiles/cmTC_62d1d.dir/build.make CMakeFiles/cmTC_62d1d.dir/build
make[1]: Entering directory '/home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_62d1d.dir/CheckSymbolExists.cxx.o
/usr/bin/g++ -I/usr/include/qt4 -O3 -fPIC -fopenmp -fPIE -o CMakeFiles/cmTC_62d1d.dir/CheckSymbolExists.cxx.o -c /home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx
/home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx: In function ‘int main(int, char**)’:
/home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:8:19: error: ‘Q_WS_QWS’ was not declared in this scope
return ((int*)(&Q_WS_QWS))[argc];
^~~~~~~~
/home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:8:19: note: suggested alternative: ‘Q_WS_X11’
return ((int*)(&Q_WS_QWS))[argc];
^~~~~~~~
Q_WS_X11
make[1]: *** [CMakeFiles/cmTC_62d1d.dir/build.make:66: CMakeFiles/cmTC_62d1d.dir/CheckSymbolExists.cxx.o] Error 1
make[1]: Leaving directory '/home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_62d1d/fast] Error 2
File /home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:
/* */
#include <QtCore/qglobal.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef Q_WS_QWS
return ((int*)(&Q_WS_QWS))[argc];
#else
(void)argc;
return 0;
#endif
}
Determining if the Q_WS_MAC exist failed with the following output:
Change Dir: /home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_c2be4/fast"
/usr/bin/make -f CMakeFiles/cmTC_c2be4.dir/build.make CMakeFiles/cmTC_c2be4.dir/build
make[1]: Entering directory '/home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_c2be4.dir/CheckSymbolExists.cxx.o
/usr/bin/g++ -I/usr/include/qt4 -O3 -fPIC -fopenmp -fPIE -o CMakeFiles/cmTC_c2be4.dir/CheckSymbolExists.cxx.o -c /home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx
/home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx: In function ‘int main(int, char**)’:
/home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:8:19: error: ‘Q_WS_MAC’ was not declared in this scope
return ((int*)(&Q_WS_MAC))[argc];
^~~~~~~~
/home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:8:19: note: suggested alternative: ‘Q_WS_X11’
return ((int*)(&Q_WS_MAC))[argc];
^~~~~~~~
Q_WS_X11
make[1]: *** [CMakeFiles/cmTC_c2be4.dir/build.make:66: CMakeFiles/cmTC_c2be4.dir/CheckSymbolExists.cxx.o] Error 1
make[1]: Leaving directory '/home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_c2be4/fast] Error 2
File /home/sbh/SW/Elmer/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:
/* */
#include <QtCore/qglobal.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef Q_WS_MAC
return ((int*)(&Q_WS_MAC))[argc];
#else
(void)argc;
return 0;
#endif
}
Code: Select all
sbh@sbh:~$ nm -a /home/sbh/SW/LapackBlas/lapack-release/build/lib/libblas.a | grep -e "sgemm_"
0000000000000000 T sgemm_
sbh@sbh:~$ nm -a /usr/lib/x86_64-linux-gnu/libblas.so
nm: /usr/lib/x86_64-linux-gnu/libblas.so: no symbols
sbh@sbh:~$ nm -a /usr/lib/x86_64-linux-gnu/libblas.a | grep -e "sgemm_"
U sgemm_
0000000000000000 T sgemm_
sbh@sbh:~$ nm -a /home/sbh/SW/LapackBlas/lapack-release/build/lib/libblas.a | grep -e "sgemm_*"
sgemm.f.o:
0000000000000000 T sgemm_
0000000000000000 a sgemm.f
If I temporarily install openblas-base and openblas-dev, then I see other `sgemm_<stuff>` symbols for the level 3 routines,
Code: Select all
sbh@sbh:~/SW/Elmer/build$ nm -a /usr/lib/x86_64-linux-gnu/openblas/libblas.a | grep -e "sgemm"
sgemm.o:
0000000000000000 T sgemm_
U sgemm_nn
U sgemm_nt
U sgemm_thread_nn
U sgemm_thread_nt
U sgemm_thread_tn
U sgemm_thread_tt
U sgemm_tn
U sgemm_tt
cblas_sgemm.o:
0000000000000000 T cblas_sgemm
U sgemm_nn
U sgemm_nt
U sgemm_thread_nn
U sgemm_thread_nt
U sgemm_thread_tn
U sgemm_thread_tt
U sgemm_tn
U sgemm_tt
sgemm_nn.o:
0000000000000000 T sgemm_nn
sgemm_nt.o:
0000000000000000 T sgemm_nt
Also I wonder, because of the errors involving the linker, if I have to modify my LD_LIBRARY_PATH, or pass the flag, -Wl,-rpath,/path/to/foo -L/path/to/foo -lbaz...
Thanks to anyone with some help!
I am still learning a lot about GNU/GCC programming (and in general) but my main job is engineering, so I don't know enough about this stuff yet to get it to work. I am very willing to do as instructed though to get it to work!