http://elmerfem.org/forum/viewtopic.php?f=2&t=4918
It is continued here because this subject is not directly related to Launchpad, but rather to the direct compilation of the source code.
The objective is to demystify the building/compilation method of the latest Elmer version on Linux 17.
The best result achieved so far is based on this method using Cmake:
http://www.elmerfem.org/elmerwiki/index ... sing_Cmake
It builds a package, but not perfect. Here is the log:
Code: Select all
zoltan@zoltan-Inspiron-1501 ~/elmerfem/builddir $ $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=TRUE \
> -DWITH_Mumps:BOOL=TRUE \
> -DWITH_Hypre:BOOL=TRUE \
> -DWITH_Trilinos:BOOL=FALSE \
> -DWITH_ELMERGUI:BOOL=TRUE \
> -DWITH_OCC:BOOL=TRUE \
> -DWITH_PARAVIEW:BOOL=TRUE \
> -DWITH_QWT:BOOL=TRUE \
> -DWITH_VTK:BOOL=TRUE \
> -DWITH_PYTHONQT:BOOL=FALSE \
> -DWITH_MATC:BOOL=TRUE
-- The Fortran compiler identification is GNU
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- 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
-- 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
-- Checking whether GFortran version >= 4.8 -- yes
-- Found MPI_C: /usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so
-- Found MPI_CXX: /usr/lib/libmpi_cxx.so;/usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so
-- Found MPI_Fortran: /usr/lib/libmpi_f90.so;/usr/lib/libmpi_f77.so;/usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - found
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- A library with BLAS API found.
-- A library with BLAS API found.
-- Looking for Fortran cheev
-- Looking for Fortran cheev - found
-- A library with LAPACK API found.
-- Finding Mumps
-- Finding SCALAPACK
-- Checking if BLACS library is needed by SCALAPACK
-- Looking for Fortran blacs_gridinit
-- Looking for Fortran blacs_gridinit - not found
-- Checking if BLACS library is needed by SCALAPACK -- yes
-- Finding BLACS
-- A library with BLACS API found.
-- BLACS libraries: /usr/lib/libblacs-openmpi.so
-- Checking if Metis library is needed by Mumps
-- Checking if Metis library is needed by Mumps -- yes
-- Finding Metis
-- Checking if ParMetis library is needed by Mumps
-- Checking if ParMetis library is needed by Mumps -- yes
-- Finding ParMetis
-- A library with Mumps API found.
-- Mumps include dir: /usr/include
-- Mumps libraries: /usr/lib/libdmumps.so;/usr/lib/libmumps_common.so;/usr/lib/libpord.so;/usr/lib/libscalapack-openmpi.so;/usr/lib/libblacs-openmpi.so;/usr/lib/libmetis.so;/usr/lib/libparmetis.so
-- 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
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for sys/types.h
-- 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
You have called ADD_LIBRARY for library CMakeFiles without any source files. This typically indicates a problem with your CMakeLists.txt file
-- Found 108 modules from /home/zoltan/elmerfem/fem/src/modules
-- Skipping test WinkelPoissonMetisKwayNodal with 16 procs
-- Skipping test WinkelPoissonMetisKwayDual with 16 procs
-- Found 501 tests
CMake Warning at elmergrid/src/CMakeLists.txt:11 (MESSAGE):
Crosscompiling ElmerGrid, no native build flags set
-- Looking for execinfo.h
-- 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 (found version "4.8.6")
-- [ElmerGUI] Qt4: TRUE
-- [ElmerGUI] Qt4_LIBRARIES:
-- ------------------------------------------------
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
-- Found Qt4: /usr/bin/qmake (found version "4.8.6")
-- [ElmerGUI] Qwt: TRUE
-- [ElmerGUI] QWT_LIBRARY: /usr/lib/libqwt.so
-- [ElmerGUI] QWT_INCLUDE_DIR: /usr/include/qwt
-- ------------------------------------------------
-- [ElmerGUI] OCE: 1
-- [ElmerGUI] OCE_VERSION: 0.15
-- [ElmerGUI] OCE_INCLUDE_DIRS: /usr/lib/x86_64-linux-gnu/oce-0.15/../../../include/oce
-- [ElmerGUI] ELMER_OCC_LIBS: TKernel;TKMath;TKG3d;TKG2d;TKBRep;TKSTEP;TKMesh;TKIGES;TKG2d;TKGeomBase;TKBool;TKBO;TKGeomAlgo;TKPrim;TKShHealing;TKSTEP209;TKSTEPAttr;TKSTEPBase;TKTopAlgo;TKXSBase
-- ------------------------------------------------
-- [ElmerGUI] VTK version: 6.0.0
-- [ElmerGUI] VTK_LIBS: vtkInteractionImage;vtkImagingColor;vtkImagingCore;vtkCommonExecutionModel;vtkCommonDataModel;vtkCommonMath;vtkCommonCore;vtksys;vtkCommonMisc;vtkCommonSystem;vtkCommonTransforms;vtkInteractionStyle;vtkRenderingCore;vtkFiltersExtraction;vtkFiltersCore;vtkFiltersGeneral;vtkCommonComputationalGeometry;vtkFiltersStatistics;vtkImagingFourier;vtkalglib;vtkFiltersGeometry;vtkFiltersSources;vtkIOImage;vtkDICOMParser;vtkIOCore;/usr/lib/x86_64-linux-gnu/libz.so;vtkmetaio;/usr/lib/x86_64-linux-gnu/libjpeg.so;/usr/lib/x86_64-linux-gnu/libpng.so;/usr/lib/x86_64-linux-gnu/libtiff.so;vtkIOXMLParser;/usr/lib/x86_64-linux-gnu/libexpat.so;vtkInteractionWidgets;vtkFiltersHybrid;vtkImagingSources;vtkFiltersModeling;vtkImagingGeneral;vtkImagingHybrid;vtkRenderingAnnotation;vtkRenderingFreeType;/usr/lib/x86_64-linux-gnu/libfreetype.so;vtkftgl;vtkRenderingVolume;vtkViewsGeovis;vtkGeovisCore;vtkIOXML;vtkIOGeometry;vtkInfovisLayout;vtkInfovisCore;vtkRenderingOpenGL;vtkViewsCore;vtkproj4;vtkViewsInfovis;vtkFiltersImaging;vtkRenderingContext2D;vtkRenderingLabel;vtkFiltersVerdict;verdict;vtkFiltersParallelFlowPaths;vtkFiltersAMR;vtkParallelCore;vtkIOLegacy;vtkFiltersFlowPaths;vtkParallelMPI;vtkWrappingJava;vtkWrappingTools;vtkIOAMR;/usr/lib/x86_64-linux-gnu/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/libhdf5_hl.so;vtkIOPLY;vtkGUISupportQtOpenGL;vtkGUISupportQt;vtkRenderingVolumeAMR;vtkRenderingParallel;vtkFiltersParallel;vtkTestingRendering;vtkIOFFMPEG;vtkIOMovie;/usr/lib/x86_64-linux-gnu/libogg.so;/usr/lib/x86_64-linux-gnu/libtheoraenc.so;/usr/lib/x86_64-linux-gnu/libtheoradec.so;vtkIOPostgreSQL;vtkIOSQL;vtksqlite;vtkRenderingQt;vtkFiltersTexture;vtkIOParallelLSDyna;vtkIOLSDyna;vtkRenderingGL2PS;/usr/lib/libgl2ps.so;vtkexoIIc;vtkNetCDF;vtkNetCDF_cxx;vtkImagingStatistics;vtkIOParallel;vtkIONetCDF;vtkRenderingImage;vtkGUISupportQtWebkit;vtkViewsQt;vtkIOGDAL;vtkImagingStencil;vtkIOParallelNetCDF;vtkRenderingFreeTypeOpenGL;vtkInfovisBoostGraphAlgorithms;vtkIOXdmf2;vtkxdmf2;/usr/lib/x86_64-linux-gnu/libxml2.so;vtkIOExodus;vtkIOEnSight;vtkIOMySQL;vtkImagingMorphological;vtkChartsCore;vtkCommonColor;vtkFiltersProgrammable;vtkFiltersGeneric;vtkIOVPIC;VPIC;vtkIOMPIImage;vtkRenderingLOD;vtkViewsContext2D;vtkRenderingVolumeOpenGL;vtkIOExport;vtkIOInfovis;vtkIOMPIParallel;vtkIOVideo;vtkIOMINC;vtkIOImport;vtkRenderingFreeTypeFontConfig;vtkFiltersSelection;/usr/lib/x86_64-linux-gnu/libpython2.7.so;vtkFiltersCosmo;Cosmo;vtkFiltersParallelStatistics;vtkWrappingPythonCore;vtkDomainsChemistry;vtkFiltersParallelMPI;vtkImagingMath;vtkTestingGenericBridge;vtkTestingIOSQL;vtkFiltersParallelImaging;vtkFiltersParallelGeometry;vtkLocalExample;vtkRenderingMatplotlib;vtkPythonInterpreter;vtkIOParallelExodus;vtkGUISupportQtSQL;vtkFiltersReebGraph;vtkIOODBC;vtkjsoncpp;vtkRenderingHybridOpenGL;vtkFiltersHyperTree
-- [ElmerGUI] VTK_INCLUDE_DIRS: /usr/include/vtk-6.0;/usr/include;/usr/include/x86_64-linux-gnu;/usr/include/freetype2;/usr/lib/openmpi/include;/usr/lib/openmpi/include/openmpi;/usr/include/tcl8.6;/usr/include/libxml2;/usr/include/python2.7
-- ------------------------------------------------
-- [ElmerGUI] Compiling in matc
-- ------------------------------------------------
-- ------------------------------------------------
-- BLAS library: /usr/lib/libblas.so
-- LAPACK library: /usr/lib/liblapack.so;/usr/lib/libblas.so
-- ------------------------------------------------
-- Fortran compiler: /usr/bin/gfortran
-- Fortran flags: -O3 -O2 -g -DNDEBUG
-- ------------------------------------------------
-- C compiler: /usr/bin/gcc
-- C flags: -O3 -O2 -g -DNDEBUG
-- ------------------------------------------------
-- CXX compiler: /usr/bin/g++
-- CXX flags: -O3 -O2 -g -DNDEBUG
-- ------------------------------------------------
-- MPI Fortran: TRUE
-- MPI Fortran compiler: /usr/bin/mpif90
-- MPI Fortran flags:
-- MPI Fortran include dir: /usr/lib/openmpi/include;/usr/lib/openmpi/lib
-- MPI Fortran libraries: /usr/lib/libmpi_f90.so;/usr/lib/libmpi_f77.so;/usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so
-- MPI Fortran link flags:
-- ------------------------------------------------
-- MPI C: TRUE
-- MPI C compiler: /usr/bin/mpicc
-- MPI C flags:
-- MPI C include dir: /usr/lib/openmpi/include;/usr/lib/openmpi/include/openmpi
-- MPI C libraries: /usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so
-- MPI C flags:
-- ------------------------------------------------
-- Mumps: TRUE
-- Mumps include: /usr/include
-- Mumps libraries: /usr/lib/libdmumps.so;/usr/lib/libmumps_common.so;/usr/lib/libpord.so;/usr/lib/libscalapack-openmpi.so;/usr/lib/libblacs-openmpi.so;/usr/lib/libmetis.so;/usr/lib/libparmetis.so
-- ------------------------------------------------
-- Hypre: TRUE
-- Hypre include: /usr/include
-- Hypre libraries: /usr/lib/libHYPRE.so;/usr/lib/libHYPRE_Euclid.so;/usr/lib/libHYPRE_parcsr_ls.so;/usr/lib/libHYPRE_ParaSails.so;/usr/lib/libHYPRE_IJ_mv.so
-- ------------------------------------------------
-- ------------------------------------------------
-- Package filename: elmerfem-8.3-0cc4224-20171228_Linux-x86_64
-- Patch version: 8.3-0cc4224
-- Configuring done
-- Generating done
-- Build files have been written to: /home/zoltan/elmerfem/builddir
make -j4 && sudo make install
It has progressed to 81% and stopped with these error messages (snippets only):
Code: Select all
[ 74%] Building Fortran object fem/src/CMakeFiles/elmersolver.dir/BandMatrix.F90.o
/home/zoltan/elmerfem/ElmerGUI/netgen/libsrc/general/profiler.cpp: In static member function ‘static void netgen::NgProfiler::Print(FILE*)’:
/home/zoltan/elmerfem/ElmerGUI/netgen/libsrc/general/profiler.cpp:85:91: warning: format ‘%i’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
fprintf(prof,"calls %8i, time %6.2f sec",counts[i],double(tottimes[i]) / CLOCKS_PER_SEC);
^
...
Scanning dependencies of target ElmerGUI
[ 76%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/src/bodypropertyeditor.cpp.o
In file included from /home/zoltan/elmerfem/ElmerGUI/Application/src/mainwindow.h:78:0,
from /home/zoltan/elmerfem/ElmerGUI/Application/src/bodypropertyeditor.cpp:43:
/home/zoltan/elmerfem/ElmerGUI/Application/cad/cadview.h:53:28: fatal error: TopoDS_Shape.hxx: No such file or directory
#include <TopoDS_Shape.hxx>
^
compilation terminated.
[ 76%] Building Fortran object fem/src/CMakeFiles/elmersolver.dir/HashTable.F90.o
make[2]: *** [ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/src/bodypropertyeditor.cpp.o] Error 1
make[1]: *** [ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
...
Linking Fortran shared library libelmersolver.so
[ 81%] Built target elmersolver
make: *** [all] Error 2
zoltan@zoltan-Inspiron-1501 ~/elmerfem/builddir $
Based on the error messages it looks like there are bugs in the source code and/or CMakeLists.txt file, which can be fixed only by the developers. But of course, there is always the possibility that I have to install some more prerequisite software to get it right...
Thanks for help in advance.
Zoltan