Good afternoon,
I am trying to build elmer from source on Debian Linux, 64 bit and it gives me some headache.
I installed mmg tools via
git clone https://github.com/MmgTools/mmg.git
cd mmg
mkdir build
cd build/
cmake ..
make
sudo make install
... and all seems fine.
When I then try to build elmer with the commands described in https://www.csc.fi/web/elmer/sources-and-compilation, I throws the following error and quits:
[ 67%] Building Fortran object fem/src/CMakeFiles/elmersolver.dir/SolverActivate_x.F90.o
[ 67%] Building Fortran object fem/src/CMakeFiles/elmersolver.dir/ElmerSolver.F90.o
[ 67%] Linking Fortran shared library libelmersolver.so
/usr/bin/ld: /usr/local/lib/libmmg.a(inout_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: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [fem/src/CMakeFiles/elmersolver.dir/build.make fem/src/libelmersolver.so] Error 1
make[1]: *** [CMakeFiles/Makefile2 fem/src/CMakeFiles/elmersolver.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
That started when I sed mmg, before all compiled fine.
I sthere anyone out there knowing a solution? To be honest, I do not know where to put the -fPIC option when compiling like recommended by the error message.
Thanks for helping!
Harald
compilation error with mmg
Re: compilation error with mmg
Hi,
is there a particular reason why you want to build Elmer from source? There are binaries in a ppa repository here: https://launchpad.net/~elmer-csc-ubuntu ... er-csc-ppa.
HTH,
Matthias
is there a particular reason why you want to build Elmer from source? There are binaries in a ppa repository here: https://launchpad.net/~elmer-csc-ubuntu ... er-csc-ppa.
HTH,
Matthias
-
- Posts: 2237
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: compilation error with mmg
My experience is that the PPA does not work on Debian. However the VM does work.
-
- Posts: 2237
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: compilation error with mmg
For debian
I was able to compile ElmerSolver using these instructions to install BLAS and LAPACK
https://wiki.debian.org/DebianScience/L ... aLibraries
I also had to install OPENMPI , gfortran, and cmake
Then I followed these instructions
https://www.csc.fi/web/elmer/sources-and-compilation
I was able to compile ElmerSolver using these instructions to install BLAS and LAPACK
https://wiki.debian.org/DebianScience/L ... aLibraries
I also had to install OPENMPI , gfortran, and cmake
Then I followed these instructions
https://www.csc.fi/web/elmer/sources-and-compilation
-
- Posts: 2237
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: compilation error with mmg
I put a compiled Debian version of the ElmerSolver here.
https://github.com/mrkearden/ElmerSolverDebian
the executables are in bin you can add them to your path/home or usr/bin
https://github.com/mrkearden/ElmerSolverDebian
the executables are in bin you can add them to your path/home or usr/bin
-
- Posts: 2237
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: compilation error with mmg
i was able to compile ElmerGUI with Debian by commenting out all of the options and making sure qt4 was installed
\
\
Re: compilation error with mmg
Stupid me, it was in the mmg forum:
cmake -D LIBMMG_SHARED=ON -D USE_SCOTCH=ON -DTEST_LIBMMG=ON -D LIBMMG_STATIC=OFF ..
does the job.
Harald
cmake -D LIBMMG_SHARED=ON -D USE_SCOTCH=ON -DTEST_LIBMMG=ON -D LIBMMG_STATIC=OFF ..
does the job.
Harald
Re: compilation error with mmg
Generally, it can build it with these options:
cmake -DWITH_ELMERGUI:BOOL=FALSE -DWITH_MPI:BOOL=TRUE -DWITH_QWT:BOOL=TRUE -DWITH_VTK:BOOL=TRUE -DWITH_PARAVIEW:BOOL=TRUE -DWITH_OCC:BOOL=TRUE -DWITH_Hypre:BOOL=TRUE -DWITH_Mumps:BOOL=TRUE -DHypre_INCLUDE_DIR=/usr/include/hypre/ -DWITH_Zoltan:BOOL=FALSE -DCMAKE_INSTALL_PREFIX=../install ../elmerfem
Except for mmg everything can be found in repositories and it is much more straight forward than fiddling around with the Ubuntu version.
Problem is rather QT4. I cannot install it on a recent Debian machine due to conflicts with QT5. So, ElmerGUI cannot be compiled.
Thanks for your help!
Harald
cmake -DWITH_ELMERGUI:BOOL=FALSE -DWITH_MPI:BOOL=TRUE -DWITH_QWT:BOOL=TRUE -DWITH_VTK:BOOL=TRUE -DWITH_PARAVIEW:BOOL=TRUE -DWITH_OCC:BOOL=TRUE -DWITH_Hypre:BOOL=TRUE -DWITH_Mumps:BOOL=TRUE -DHypre_INCLUDE_DIR=/usr/include/hypre/ -DWITH_Zoltan:BOOL=FALSE -DCMAKE_INSTALL_PREFIX=../install ../elmerfem
Except for mmg everything can be found in repositories and it is much more straight forward than fiddling around with the Ubuntu version.
Problem is rather QT4. I cannot install it on a recent Debian machine due to conflicts with QT5. So, ElmerGUI cannot be compiled.
Thanks for your help!
Harald
-
- Posts: 2237
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: compilation error with mmg
-DWITH_QT5:BOOL=TRUE
Re: compilation error with mmg
Ups! Cool. Thank you!