Debian Testing - won't build

Discussion about building and installing Elmer
Post Reply
brett
Posts: 5
Joined: 02 Jun 2019, 06:01
Antispam: Yes

Debian Testing - won't build

Post by brett »

Hello,

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

and

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")

where the latter part of the tool chain was an attempt from https://gitlab.kitware.com/cmake/commun ... H-handling because I kept getting ld errors (most specifically about sgemm not being found).

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
but the build fails spitting out at the end;

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

and the CMakeError.log shows;

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
}

which seems to center on undefined reference to `sgemm_`. So I looked for these symbols in the blas/lapack libraries it found (it picked shared ones...), and this is what I found;

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

telling me that there are no symbol `sgemm_` is in the text section of the package (apt-get) library and the one I cmaked from netlib.org, and the packaged one also says it is unknown (from `man nm`).

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

I learned a little about the `relocation R_X86_64_PC32 against symbol stderr@@GLIBC_2.2.5` from here, but I thought the -fPIC flag would have prevented this... or maybe I should try the -mcmodel=large option?

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!
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Debian Testing - won't build

Post by kevinarden »

If it is debian then you should be able to install elmer with the gui

sudo apt-add-repository ppa:elmer-csc-ubuntu/elmer-csc-ppa
sudo apt-get update
sudo apt-get install elmerfem-csc-eg
brett
Posts: 5
Joined: 02 Jun 2019, 06:01
Antispam: Yes

Re: Debian Testing - won't build

Post by brett »

Thanks for the reply and suggestion - I was uncertain about them for debian.

I tried it (after installing apt-add-repository and friends), and I get this during update:

Code: Select all

E: The repository 'http://ppa.launchpad.net/elmer-csc-ubuntu/elmer-csc-ppa/ubuntu eoan Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
and this response implies that it isn't suitable for my platform, https://askubuntu.com/questions/866901/ ... lease-file.

I know that Ubuntu and Debian are very similar upstream but are not exactly the same....

Even just downloading the .deb from launchpad, I have 3 missing dependencies, of which 2 are not in Debian's Testing repository... My repositories have libopenmpi3, not libopenmpi2. The libhypre-2.13.0 I do not have, but do have libhypre-2.15.1. Not sure if I should start chasing dependencies... seems like maybe the packages in Debian Testing are too new.... If that was the case I might be able to pin an earlier repository version, like Stable, and install -t stable <pkg> carefully....

I also do not see a Signing Key on the homepage: https://launchpad.net/~elmer-csc-ubuntu ... /+packages

Rather than mix pininng I'd rather just compile it from source... I had a FrankenDebian once haha
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Debian Testing - won't build

Post by kevinarden »

I have built ElmerSolver before, but never successfully built ElmerGUI. It has many dependencies. You might try to build them separately. The build instructions for ElmerGUI are on github, i did not find the optional components optional.

Also many of the dependencies had to be the developer version not just the user version.

Brief build instructions for ElmerGUI:
--------------------------------------

Prequisites:

- Qt 4 (4.8 or higher)

Optional components:

- Qwt 6 (for qt 4.8)
- Vtk 5 (compiled with qt 4.8)
- Open Cascade (programmed with 6.3, but versions 6.2-6.5 seems to work as well.)
- PythonQt (see ./PythonQt/README for more details)
- Tetgen (1.4.2 or newer)

Please read the file LICENSES before using any of these software components.

Tetgen should be installed as described in ../misc/tetgen_plugin/RAEDME

In order to compile ElmerGUI, edit the file ElmerGUI.pri and select the
optional components to build. You should also define the directories where
the external libraries and their headers reside.

If this is the first time you compile ElmerGUI, the following lines may be
commented out in order to minimize possible compilation problems (add the
lines gradually back later):

#------------------------------------------------------------------------------
# Optional components:
#------------------------------------------------------------------------------
# DEFINES += EG_QWT # Use QWT for convergence monitor?
# DEFINES += EG_VTKP # Use VTK for postprocessing?
# DEFINES += EG_MATC # Use MATC for internal operations in postprocessing?
# DEFINES += EG_OCC # Use OpenCASCADE for importing CAD files?
# DEFINES += EG_PYTHONQT # Use PythonQt for scripting in post processor?

Compile as:

$ qmake
$ make

This should produce the executable "./ElmerGUI" or "./release/ElmerGUI.exe"

If the plugin for tetgen is found in the path (LD_LIBRARY_PATH for Unix,
and PATH for Windows), its functionality will be available when the program
starts. If the library is not found, the main program will run, but with'
some functionality disabled.

Finally install the program by typing

$ make install

Finally set the environment variable ELMERGUI_HOME = $ELMER_HOME/bin
and make sure it is in PATH (ELMER_HOME is defined in ElmerGUI.pri).
brett
Posts: 5
Joined: 02 Jun 2019, 06:01
Antispam: Yes

Re: Debian Testing - won't build

Post by brett »

Appreciate the detailed instructions! I will try this throughout the rest of the week and reply on the weekend.
chouonrow
Posts: 3
Joined: 27 May 2019, 20:18
Antispam: Yes

Re: Debian Testing - won't build

Post by chouonrow »

hi Brett! Hav you managed to install elmer in Debian?. It is true, the official "instructions" don't work.
brett
Posts: 5
Joined: 02 Jun 2019, 06:01
Antispam: Yes

Re: Debian Testing - won't build

Post by brett »

Hi Chouonrow,

I am trying again this weekend and will post soonish. Just didn't want to seem to ignore...
brett
Posts: 5
Joined: 02 Jun 2019, 06:01
Antispam: Yes

Re: Debian Testing - won't build

Post by brett »

Hi again,

I did not have much luck with building elmer, again, though I only tried for half a day haha.

Soooooooo, I used to like virtualbox, then docker, then these snapd/flatpak things were intriguing... So I instead just used multistrap and schroot to build a little local bionic beaver.

From there, there was the add PPA from kevinarden , and prereqs that were apparently missed, eg. ssh, some openmpi, and then of course paraview (and its dependencies)...

I still have to declare a DISPLAY variable (b/c of chroot), but its my first time using these "jails" and so I'm not sure how okay this was. The first "pump/heat equation" example worked fine btw.

By the way, I put this in my /var/chroot and it only blew up to 2.9G, which I think is about half the vbox size...

Does anyone have any suggestion on whether this is a good option or not?

Thanks much!

PS. On second thought, I'm going to probably push ahead with compiling it "bare metal"... ~3G is too much and I'm unsure of the interaction between the 'jail cell' and the host.
flowwolf
Posts: 7
Joined: 14 Dec 2016, 01:39
Antispam: Yes

Re: Debian Testing - won't build

Post by flowwolf »

Hi,

I've managed to build Elmer on Debian without ElmerPost, I saw that there were problems when ElmerPost was included.
It's possible to leave out ElmerPost and use the prebuilt one (Windows executable) with WINE.
The building process was more or less fine without ElmerPost but there were problems with MPI in all cases. No response from the team so far and I found that problem more serious.

This is how I called cmake:

Code: Select all

cmake  -DWITH_OpenMP:BOOL=FALSE  -DWITH_MPI:BOOL=TRUE  -DWITH_Mumps:BOOL=TRUE  -DWITH_Hypre:BOOL=FALSE  \
       -DWITH_ELMERGUI:BOOL=TRUE  -DWITH_ELMERGUILOGGER:BOOL=TRUE \
       -DCMAKE_INSTALL_PREFIX=../install ../elmerfem
[edit: WITH_OpenMP can be set to TRUE, worked as well]

Some modifications need to be made to CMakeLists.txt:

Code: Select all

# NOTE: uncomment  #FIND_PACKAGE(BLAS REQUIRED) #FIND_PACKAGE(LAPACK REQUIRED)
SET(BLAS_LIBRARIES /media/h2/_src2/1/libopenblas.a )
SET(LAPACK_LIBRARIES /media/h2/_src2/1/libopenblas.a )

SET(Mumps_INCLUDE_DIR /media/h2/_src2/MUMPS_5.2.0/include )
SET(Mumps_LIBRARIES /media/h2/_src2/2/libmumps_common.a; /media/h2/_src2/2/libpord.a; /media/h2/_src2/2/libsmumps.a; /media/h2/_src2/2/libdmumps.a; /media/h2/_src2/2/libcmumps.a; /media/h2/_src2/2/libzmumps.a )

# NOTE: uncomment  #FIND_PACKAGE(MMG)
SET(MMG_INCLUDE_DIR /media/h2/_src2/3/include )
SET(MMG_LIBRARY /media/h2/_src2/3/lib/libmmg.a )
SET(MMG_LIB_DIR /media/h2/_src2/3/lib )
Where "/media/h2/_src2" is my working directory and I built the packages from source.
The building process still stops and asks for the libraries (.a or .so) but it's possible to fix that by editing link.txt (not the best way)

It's from this thread: viewtopic.php?f=16&t=6664

It is not straightforward to set up the makefiles (of the packages) when building all of them from source.
Post Reply