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

Posted

技术标签:

【中文标题】Gmsh 安装问题:无法启动 GUI(未找到 FLTK 库)和二进制安装弄乱了几何图形【英文标题】:Gmsh installation problems: cannot launch GUI (FLTK libraries not found) and binary installation messes up geometry 【发布时间】:2018-06-08 15:45:37 【问题描述】:

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

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

    我设法安装了它,当我尝试时 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 而不会弄乱任何几何图形?

【问题讨论】:

“构建依赖列表”packages.ubuntu.com/source/bionic/gmsh ... 说libfltk1.3-dev 感谢您的评论。但是你建议我做什么?另外,我的错误是我没有明确地说出这一点,但我确实在继续之前安装了 FLTK,看来无论如何都很难找到它.. 【参考方案1】:

试试:

sudo apt-get install libfltk1.3-dev

【讨论】:

以上是关于Gmsh 安装问题:无法启动 GUI(未找到 FLTK 库)和二进制安装弄乱了几何图形的主要内容,如果未能解决你的问题,请参考以下文章

应用程序无法启动,因为未找到 MSVCP100D.dll,重新安装应用程序可能有效

如何解决 gmsh Mesh 生成错误

Qt Designer 启动时出错:代码执行无法继续,因为未找到 MSVCP140_1.dll

Apache 没有启动。未找到服务器 OS X Yosemite

在 macOS 上使用 Ninja 进行 CMake GUI

无法识别启动活动,未找到默认活动启动活动时出错