CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Gmsh] Insatlling gmsh from the source code-issue?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 29, 2017, 16:25
Default Insatlling gmsh from the source code-issue?
  #1
Member
 
OpenFoam
Join Date: Jun 2016
Posts: 82
Rep Power: 9
CFD-Lover is on a distinguished road
Hi,

I just would like to install Gmsh tool from the source code on Ubuntu and having some issue with it. I have downloaded Gmsh 3.0.4 from the following link http://gmsh.info/src/ and when I followed the instructions as below, I was not able to install it. I have Cmake installed in my system.

Code:

  (Note that "make install/fast" allows you to install only the target that you
  just built, i.e. "lib", and will not trigger the recompilation of the default
  target "gmsh".)

* To see a detailed compilation log use

    make VERBOSE=1


Build Gmsh using CMake's graphical user interface
-------------------------------------------------

* Launch CMake and fill-in the two top input fields (telling where the Gmsh
  source directory is located and where you want the Gmsh binary to be created).

* Click on "Add entry" and define the variable CMAKE_PREFIX_PATH, of type
  "PATH", pointing to the location(s) of any external package(s) (FLTK,
  BLAS/LAPACK, etc.) installed in non-standard directories.

* Click on "Configure" and choose your compiler.

* Optionally change some configuration options (re-run "Configure" every time
  you change some options).

* Once you are happy with all the configuration options, click on "Generate".

* Go to the build directory and build Gmsh using your chosen compiler.
Did anyone install Gmsh from the source could provide some help. I am using Ubuntu 14.04.

Thanks for the help.
CFD-Lover is offline   Reply With Quote

Old   August 1, 2017, 14:23
Thumbs up Gmsh installations
  #2
Senior Member
 
tareqkh's Avatar
 
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16
tareqkh is on a distinguished road
Hi,

The installation on Ubuntu requires the following steps;

1- Extract the file.
2- Open the terminal and locate where you extracted Gmsh.
3- type in the terminal cmake CMakeLists and wait till the installation finishes.
4- After finishing step 3, type in the terminal make.
5- Once step 4 is done, type sudo make install.

Note
that you must have cmake already installed in your system and you should be good to go!

Cheers,
tareqkh is offline   Reply With Quote

Old   June 7, 2018, 12:07
Default
  #3
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Sorry this is an old thread, but I am facing an issue with launching gmsh GUI after successful installation.

For some reason, the Ubuntu Software lists very old version of gmsh (2.10.0) which does not have Boolean features. I need to use boolean operations so I wanted to upgrade to latest 3.0.6 version. apt-get upgrade didn't work. So I decided to do a clean install from source code.

gmsh --version gives me this:
Code:
3.0.6
...so I know that it has installed correctly.


However if I type in gmsh in the terminal, it doesn't open the GUI. Instead it gives me an output of
Code:
gmsh -help
Why? How do I launch gmsh?

The system has Ubuntu 16.04 LTS and gmsh is being installed in /opt/gmsh

Anyone knows what the issue could be?
deepbandivadekar is offline   Reply With Quote

Old   June 7, 2018, 17:03
Default
  #4
Member
 
Join Date: Aug 2011
Posts: 30
Rep Power: 14
orxan.shibli is on a distinguished road
To build gmsh from source with GUI support, FLTK should be installed.
orxan.shibli is offline   Reply With Quote

Old   June 8, 2018, 08:36
Default
  #5
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Thanks for your quick reply.



Quote:
Originally Posted by orxan.shibli View Post
To build gmsh from source with GUI support, FLTK should be installed.
I just installed.

Code:
locate libfltk
gives me a list of locations-files.
Code:
/usr/lib/x86_64-linux-gnu/libfltk.so.1.3
/usr/lib/x86_64-linux-gnu/libfltk_gl.so.1.3
/usr/lib/x86_64-linux-gnu/libfltk_images.so.1.3
/usr/share/doc/libfltk-gl1.3
/usr/share/doc/libfltk-images1.3
/usr/share/doc/libfltk1.3
/usr/share/doc/libfltk-gl1.3/CREDITS
/usr/share/doc/libfltk-gl1.3/README.gz
/usr/share/doc/libfltk-gl1.3/changelog.Debian.gz
/usr/share/doc/libfltk-gl1.3/copyright
/usr/share/doc/libfltk-images1.3/CREDITS
/usr/share/doc/libfltk-images1.3/README.gz
/usr/share/doc/libfltk-images1.3/changelog.Debian.gz
/usr/share/doc/libfltk-images1.3/copyright
/usr/share/doc/libfltk1.3/CREDITS
/usr/share/doc/libfltk1.3/README.gz
/usr/share/doc/libfltk1.3/changelog.Debian.gz
/usr/share/doc/libfltk1.3/copyright
/var/lib/dpkg/info/libfltk-gl1.3:amd64.list
/var/lib/dpkg/info/libfltk-gl1.3:amd64.md5sums
/var/lib/dpkg/info/libfltk-gl1.3:amd64.shlibs
/var/lib/dpkg/info/libfltk-gl1.3:amd64.symbols
/var/lib/dpkg/info/libfltk-gl1.3:amd64.triggers
/var/lib/dpkg/info/libfltk-images1.3:amd64.list
/var/lib/dpkg/info/libfltk-images1.3:amd64.md5sums
/var/lib/dpkg/info/libfltk-images1.3:amd64.shlibs
/var/lib/dpkg/info/libfltk-images1.3:amd64.symbols
/var/lib/dpkg/info/libfltk-images1.3:amd64.triggers
/var/lib/dpkg/info/libfltk1.3:amd64.list
/var/lib/dpkg/info/libfltk1.3:amd64.md5sums
/var/lib/dpkg/info/libfltk1.3:amd64.shlibs
/var/lib/dpkg/info/libfltk1.3:amd64.symbols
/var/lib/dpkg/info/libfltk1.3:amd64.triggers
Will I need to remove and recompile gmsh now?
Update: Okay. I did anyway. Still no GUI. Just the same help options printed in terminal window.

Last edited by deepbandivadekar; June 8, 2018 at 09:02. Reason: Update
deepbandivadekar is offline   Reply With Quote

Old   June 8, 2018, 09:32
Default
  #6
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Quote:
Originally Posted by deepbandivadekar View Post
Sorry this is an old thread, but I am facing an issue with launching gmsh GUI after successful installation.

For some reason, the Ubuntu Software lists very old version of gmsh (2.10.0) which does not have Boolean features. I need to use boolean operations so I wanted to upgrade to latest 3.0.6 version. apt-get upgrade didn't work. So I decided to do a clean install from source code.

I find this extremely weird:
Code:
dpkg --list
shows me older version of gmsh (2.10) which I had removed from Ubuntu Software itself. But it doesn't show me the latest installed version 3.0.6.


Code:
rc  gmsh           2.10.1+dfsg1 amd64        Three-dimensional finite element 
ii  gmsh-doc       2.10.1+dfsg1 all          Three-dimensional finite element
I have no idea what's going on here.
deepbandivadekar is offline   Reply With Quote

Old   June 8, 2018, 09:41
Default
  #7
Member
 
Join Date: Aug 2011
Posts: 30
Rep Power: 14
orxan.shibli is on a distinguished road
Please post output of
Code:
cmake ..
in path-to-gmsh-source/build.
orxan.shibli is offline   Reply With Quote

Old   June 8, 2018, 09:45
Default
  #8
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Quote:
Originally Posted by orxan.shibli View Post
Please post output of
Code:
cmake ..
in path-to-gmsh-source/build.

I am installing gmsh in /opt/gmsh and source directory is in Downloads so it's not exactly source-directory/build location. But here's the output:


Code:
-- Found 64Bit
-- Found C++11
-- 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
-- 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


-- Found Dlopen
-- Found LinuxJoystick
-- 
-- 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
Interesting.. it says it could not find fltk libraries. What now?
deepbandivadekar is offline   Reply With Quote

Old   June 8, 2018, 09:56
Default
  #9
Member
 
Join Date: Aug 2011
Posts: 30
Rep Power: 14
orxan.shibli is on a distinguished road
cmake says

Quote:
Could NOT find FLTK (missing: FLTK_LIBRARIES)
I suppose you followed standard "configure, make and make install" for FLTK. Can you run "sudo ldconfig" and try "cmake .." to see if FLTK libraries are found.
orxan.shibli is offline   Reply With Quote

Old   June 8, 2018, 10:00
Default
  #10
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Quote:
Originally Posted by orxan.shibli View Post
cmake says



I suppose you followed standard "configure, make and make install" for FLTK. Can you run "sudo ldconfig" and try "cmake .." to see if FLTK libraries are found.

Nope. cmake output is still same..
deepbandivadekar is offline   Reply With Quote

Old   June 8, 2018, 10:13
Default
  #11
Member
 
Join Date: Aug 2011
Posts: 30
Rep Power: 14
orxan.shibli is on a distinguished road
Please delete CMakeCache.txt and try again. If it fails again please show output of "whereis fltk-config" and CMakeCache.txt.
orxan.shibli is offline   Reply With Quote

Old   June 8, 2018, 10:18
Default
  #12
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Quote:
Originally Posted by orxan.shibli View Post
Please delete CMakeCache.txt and try again. If it fails again please show output of "whereis fltk-config" and CMakeCache.txt.
Alright! That seems to have worked.
Code:
-- 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
Nonetheless I ran this
Code:
whereis fltk-config
and I get the following
Code:
fltk-config:
So still weird things exist. Also the warnings about BLAS etc still remain to be resolved.
deepbandivadekar is offline   Reply With Quote

Old   June 8, 2018, 10:22
Default
  #13
Member
 
Join Date: Aug 2011
Posts: 30
Rep Power: 14
orxan.shibli is on a distinguished road
What do you mean with "it worked"? Output says

Quote:
Could NOT find FLTK (missing: FLTK_LIBRARIES)
orxan.shibli is offline   Reply With Quote

Old   June 8, 2018, 10:27
Default
  #14
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Oh my mistake. I did not notice that line for some reason. I was wondering why this cmake output is longer than the previous..
deepbandivadekar is offline   Reply With Quote

Old   June 8, 2018, 10:32
Default
  #15
Member
 
Join Date: Aug 2011
Posts: 30
Rep Power: 14
orxan.shibli is on a distinguished road
At least it is known that problem is due to cmake not finding fltk libraries. Once its found GUI should work. I am curious why you want to build from source but not use binary distribution.
orxan.shibli is offline   Reply With Quote

Old   June 8, 2018, 10:37
Default
  #16
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Quote:
Originally Posted by orxan.shibli View Post
At least it is known that problem is due to cmake not finding fltk libraries. Once its found GUI should work. I am curious why you want to build from source but not use binary distribution.

Well simply because am a Windows-to-Linux guy and not very familiar with how things work. The binary zip file from gmsh.info did not have any makefiles in it. Just an application in bin which when clicked didn't do anything. So looked for alternatives..
deepbandivadekar is offline   Reply With Quote

Old   June 8, 2018, 10:39
Default
  #17
Member
 
Join Date: Aug 2011
Posts: 30
Rep Power: 14
orxan.shibli is on a distinguished road
I see. You can open terminal and do "./gmsh" in the bin directory.
orxan.shibli is offline   Reply With Quote

Old   June 8, 2018, 10:44
Default
  #18
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Quote:
Originally Posted by orxan.shibli View Post
I see. You can open terminal and do "./gmsh" in the bin directory.

Okay. This opens gmsh but any given geometry looks all messed up. The same files opened perfectly well in previous version 2.10.
I believe that's something to do with the warnings we saw earlier in the cmake log?


Edit: Even the gmsh icon looks distorted..
deepbandivadekar is offline   Reply With Quote

Old   June 8, 2018, 10:48
Default
  #19
Member
 
Join Date: Aug 2011
Posts: 30
Rep Power: 14
orxan.shibli is on a distinguished road
I my case both source and binary versions work good. You probably need to separate questions and ask them one by one on stackoverflow. They would give much better answers to you.
orxan.shibli is offline   Reply With Quote

Old   June 8, 2018, 10:50
Thumbs up
  #20
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Okay I'll do that and I'll update once its resolved.

Thank you for sticking around patiently.
deepbandivadekar is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other] Tabulated thermophysicalProperties library chriss85 OpenFOAM Community Contributions 62 October 2, 2022 03:50
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 06:42
[swak4Foam] swak4Foam-groovyBC build problem zxj160 OpenFOAM Community Contributions 18 July 30, 2013 13:14
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 13:59
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 11:44


All times are GMT -4. The time now is 07:08.