Gmsh 安装问题:无法启动 GUI(找不到 FLTK 库),二进制安装会弄乱几何图形



出于某种原因,Ubuntu 软件列出了非常旧版本的 gmsh (2.10.0(,它没有布尔功能。我需要使用布尔运算,所以我想升级到最新的 3.0.6 版本。apt-get 升级不起作用。

  1. 我尝试使用 gmsh.info 的二进制安装。输入 ./gmsh 从 bin 目录打开 gmsh GUI 但是,它会完全弄乱几何图形(对于任何给定的 .geo 文件(。相同的几何形状在之前的 2.10.0 版本中看起来很完美。所以我决定从源代码进行全新安装。

  2. 我设法安装了它,当我尝试时 GMSH --版本 它给了我这个:

    3.0.6

所以我知道它已正确安装。

但是,如果我在终端中输入 gmsh,它不会打开 GUI。相反,它给了我一个输出:

gmsh -help

我从cmake日志中发现gmsh找不到FLTK库。以下是来自cmake的最新日志:

-- 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 void*
-- Check size of void* - done
-- Found 64Bit
-- Performing Test STDCXX11
-- Performing Test STDCXX11 - Success
-- Found C++11
-- Looking for pthread.h
-- Looking for 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 not found. Please specify library location.
-- Warning: Could not find Blas or Lapack: most meshing algorithms will not be functional
-- Found Mesh
-- Found Solver
-- Found Post
-- Found Plugins
-- Found Parser
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so  
-- 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
-- Could NOT find FLTK (missing:  FLTK_LIBRARIES) 
-- Found NativeFileChooser
-- Found ONELAB
-- Found ONELABMetamodel
-- System ANN not found: using contrib/ANN instead
-- Found Ann
-- Found Bfgs
-- Found DIntegration
-- Found OptHom
-- Found Kbipack
-- Found GMP
-- Found MathEx
-- Found Metis
-- Note: By including Metis you have to comply with Metis' special licensing requirements stated in contrib/Metis/README.txt.
-- Found Chaco
-- Found TetGen/BR
-- Found Voro3D
-- Found Blossom
-- Found Netgen
-- Found Bamg
-- System MMG3D not found: using contrib/mmg3d instead
-- Found Mmg3d
-- Found Tetgen1.5
--  Note: By including Tetgen you have to comply with Tetgen's special  licensing requirements stated in contrib/Tetgen1.5/LICENSE.
-- Could NOT find HDF5 (missing:  HDF5_LIBRARIES HDF5_INCLUDE_DIRS) 
-- HDF5 not found
-- System GMM not found: using contrib/gmm instead
-- Found Gmm
-- Found OpenCASCADE version 6.8.0 in /usr/include/oce
CMake Warning at CMakeLists.txt:1139 (message):
Gmsh requires OpenCASCADE >= 6.9.1

CMake Warning at CMakeLists.txt:1140 (message):
Use CMAKE_PREFIX_PATH or the CASROOT environment variable to explicitely
specify the installation path of OpenCASCADE

-- Looking for vsnprintf
-- Looking for vsnprintf - found
-- Looking for sys/socket.h
-- Looking for sys/socket.h - found
-- Check size of socklen_t
-- Check size of socklen_t - done
-- Check size of intptr_t
-- Check size of intptr_t - done
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Found Dlopen
-- Looking for linux/joystick.h
-- Looking for linux/joystick.h - found
-- Found LinuxJoystick
-- Performing Test WALL
-- Performing Test WALL - Success
-- Performing Test WCAST
-- Performing Test WCAST - Failed
-- Performing Test WDEPREC
-- Performing Test WDEPREC - Success
-- Performing Test WIND
-- Performing Test WIND - Failed
-- Performing Test NOWARN
-- Performing Test NOWARN - Success
-- Performing Test NOOPT
-- Performing Test NOOPT - Success
-- 
-- Gmsh 3.0.6 has been configured for Linux64
-- 
--   * Build options: 64Bit Ann Bamg Bfgs Blossom C++11 Chaco DIntegration  Dlopen GMP Gmm Kbipack LinuxJoystick MathEx Mesh Metis Mmg3d  NativeFileChooser Netgen ONELAB ONELABMetamodel OptHom Parser Plugins  Post Solver TetGen/BR Tetgen1.5 Voro3D
--  * 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: /opt/gmsh3.0.6

所以从这个日志中我知道它在定位 FLTK 库时遇到了问题(尽管我在构建 gmsh 之前确实安装了它(以及其他有关网格算法等的重要警告。

系统具有 Ubuntu 16.04 LTS,gmsh 安装在/opt/gmsh 中。

有人知道问题可能是什么吗?如何在没有任何几何混乱的情况下启动 gmsh GUI?

尝试:

sudo apt-get install libfltk1.3-dev

最新更新