Issue linking GMSH when installing & building dealii 9.4

153 views
Skip to first unread message

Matthew Rich

unread,
Sep 8, 2022, 9:48:00 AM9/8/22
to deal.II User Group
Hi all, 

I was upgrading the 9.4 and I needed to include GMSH for a project I am working on so I can use the API in my dealii code. I am getting the following error despite getting the all clear from CMAKE. How can I fix this , are there version limits on GMSH? I did notice this line "netgen, tetgen and blas support has to be enabled in Gmsh"  How does one ensure that? I do not see much in their github readme. 

Some details- 
On a windows system running dealii in WSL2 under debian. I have built gmsh from source and it is functional by itself, so I feel I did that part right.  I have -DGMSH_DIR set to the root directory of my gmsh installation so ~/gmsh-gmsh-4.10.5 cmake settings when I install dealii  

make Error 
[ 75%] Linking CXX executable ../bin/step_3_mixed.debug
../lib/libdeal_II.g.so.9.4.0: error: undefined reference to 'gmsh::model::addPhysicalGroup(int, std::vector<int, std::allocator<int> > const&, int)'
../lib/libdeal_II.g.so.9.4.0: error: undefined reference to 'gmsh::model::mesh::removeDuplicateNodes()'
../lib/libdeal_II.g.so.9.4.0: error: undefined reference to 'gmsh::initialize(int, char**, bool)'
collect2: error: ld returned 1 exit status
make[2]: *** [examples/CMakeFiles/step_3_mixed.debug.dir/build.make:292: bin/step_3_mixed.debug] Error 1
make[1]: *** [CMakeFiles/Makefile2:3926: examples/CMakeFiles/step_3_mixed.debug.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

CMAKE output 

#  Configured Features (DEAL_II_ALLOW_BUNDLED = ON, DEAL_II_ALLOW_AUTODETECTION = ON):
#      ( DEAL_II_WITH_64BIT_INDICES = OFF )
#      ( DEAL_II_WITH_ADOLC = OFF )
#      ( DEAL_II_WITH_ARBORX = OFF )
#        DEAL_II_WITH_ARPACK set up with external dependencies
#        DEAL_II_WITH_ASSIMP set up with external dependencies
#        DEAL_II_WITH_BOOST set up with external dependencies
#      ( DEAL_II_WITH_CGAL = OFF )
#        DEAL_II_WITH_COMPLEX_VALUES = ON
#      ( DEAL_II_WITH_CUDA = OFF )
#      ( DEAL_II_WITH_GINKGO = OFF )
#        DEAL_II_WITH_GMSH set up with external dependencies
#        DEAL_II_WITH_GSL set up with external dependencies
#        DEAL_II_WITH_HDF5 set up with external dependencies
#        DEAL_II_WITH_KOKKOS set up with external dependencies
#        DEAL_II_WITH_LAPACK set up with external dependencies
#        DEAL_II_WITH_METIS set up with external dependencies
#        DEAL_II_WITH_MPI set up with external dependencies
#        DEAL_II_WITH_MUPARSER set up with external dependencies
#        DEAL_II_WITH_OPENCASCADE set up with external dependencies
#        DEAL_II_WITH_P4EST set up with external dependencies
#        DEAL_II_WITH_PETSC set up with external dependencies
#        DEAL_II_WITH_SCALAPACK set up with external dependencies
#        DEAL_II_WITH_SLEPC set up with external dependencies
#      ( DEAL_II_WITH_SUNDIALS = OFF )
#      ( DEAL_II_WITH_SYMENGINE = OFF )
#        DEAL_II_WITH_TBB set up with external dependencies
#        DEAL_II_WITH_TRILINOS set up with external dependencies
#        DEAL_II_WITH_UMFPACK set up with external dependencies
#        DEAL_II_WITH_ZLIB set up with external dependencies
#
#  Component configuration:
#      ( DEAL_II_COMPONENT_DOCUMENTATION = OFF )
#        DEAL_II_COMPONENT_EXAMPLES
#      ( DEAL_II_COMPONENT_PACKAGE = OFF )
#      ( DEAL_II_COMPONENT_PYTHON_BINDINGS = OFF )
#
#  Detailed information (compiler flags, feature configuration) can be found in detailed.log
#
#  Run  $ make info  to print a help message with a list of top level targets
#
###
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mjrich/dealii-9.4.0/build


Daniel Arndt

unread,
Sep 8, 2022, 1:51:19 PM9/8/22
to dea...@googlegroups.com
Matthew,

I don't know if the missing references are due to missing components in your gmsh installation (but I wouldn't be surprised).
In any way, "netgen, tetgen and blas support has to be enabled in Gmsh" relates to CMake options when building gmsh from source, e.g., https://gmsh.info/src/gmsh-4.10.5-source.tgz.
I would try if building gmsh yourself with those dependencies/options resolves the issue.

Best,
Daniel

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/82a12172-3189-410c-9fbc-4e050b81dd2cn%40googlegroups.com.

Matthew Rich

unread,
Sep 8, 2022, 11:49:32 PM9/8/22
to dea...@googlegroups.com
Thanks for the reply.  I tried building from source a couple times and no luck. I see tetgen and netgen in the cmake output but not  blas

Anyone do this recently? I have LAPACK debian package but that does not seem to do the job. I think this is my issue is BLAS is missing but not sure how to rectify. 


cmake output  for GMSH
cmake -DENABLE_BUILD_DYNAMIC=1 -DENABLE_BUILD_SHARED=1 -DENABLE_MUMPS=1 -ENABLE_NUMPY=1 -DENABLE_PETSC4PY=1 -DENABLE_OCC_TBB=1 -DENABLE_OPENACC=1 -DENABLE_PETSC=1 -DENABLE_REVOROPT=1 -VERBOSE=1 ../
-- Found 64Bit
-- Found OpenMP
-- Found OpenACC_C: -fopenacc
-- Found OpenACC_CXX: -fopenacc
-- Found OpenACC
-- Found Eigen[contrib]
-- Found Mesh
-- Found Solver
-- Found Post
-- Found Plugins
-- Found Parser
CMake Warning (dev) at /usr/share/cmake-3.18/Modules/FindOpenGL.cmake:305 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  /usr/share/cmake-3.18/Modules/FindFLTK.cmake:83 (find_package)
  CMakeLists.txt:633 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find FLTK (missing: FLTK_LIBRARIES)
-- Found ONELAB
-- Found ONELABMetamodel
-- Found ANN[contrib]
-- Found ALGLIB[contrib]
-- Found DIntegration
-- Found Kbipack
-- GMP not found: Kbipack uses long int
-- Found MathEx[contrib]
-- Found Metis[contrib]
-- Found TetGen/BR
-- Found Voro++[contrib]
-- Found OptHom
-- Found DomHex
-- Found QuadTri
-- Found Blossom
-- Found Netgen
-- Found Bamg
-- Found Hxt
-- Found QuadMeshingTools
-- Found WinslowUntangler
-- Found Gmm[contrib]
-- Found PETSc
-- Found OpenCASCADE version 7.5.1 in /usr/include/opencascade
-- Found OpenCASCADE-CAF
-- Found OpenCASCADE
-- Found Dlopen
-- Found LinuxJoystick
-- Found Revoropt
--
-- Gmsh 4.10.5 has been configured for Linux64-sdk
--
--  * Build options: 64Bit ALGLIB[contrib] ANN[contrib] Bamg Blossom DIntegration Dlopen DomHex Eigen[contrib] Gmm[contrib] Hxt Kbipack LinuxJoystick MathEx[contrib] Mesh Metis[contrib] Netgen ONELAB ONELABMetamodel OpenACC OpenCASCADE OpenCASCADE-CAF OpenMP OptHom PETSc Parser Plugins Post QuadMeshingTools QuadTri Revoropt Solver TetGen/BR Voro++[contrib] WinslowUntangler
--  * Build type: RelWithDebInfo
--  * C compiler: /usr/bin/cc
--  * C++ compiler: /usr/bin/c++
--  * Install prefix: /usr/local
--

-- Configuring done
-- Generating done
-- Build files have been written to: /home/mjrich/gmsh-4.10.5

You received this message because you are subscribed to a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/Vz8xrC8q_Q4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/CAOYDWb%2Bp96sysSNZrg%3DzvNf-HJDXjDp%3DuT5K-EEfngpa9a1ZDQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages