[Gmsh] Build error with CGNS enabled

Christophe Geuzaine cgeuzaine at ulg.ac.be
Mon Apr 7 23:48:23 CEST 2014

On 04 Apr 2014, at 07:52, Greaves, Timothy M B <tim.greaves at imperial.ac.uk> wrote:

> Hello,
> I contacted you regarding problems with the CGNS-enabled GMSH build six weeks ago, but haven’t had any replies and was wondering if there had been any progress resolving this or indeed any interest in resolving it? Have I sent my bug report to the correct place?
> Could any of the GMSH developers comment on this, please? CGNS functionality is something that I and my team are very interested in getting working and using!

Hi Tim - CGNS support should be updated/rewritten ; to the best of my knowledge nobody is using the current implementation.


> Thanks and best regards,
> Tim
> On 21 Feb 2014, at 15:26, Greaves, Timothy M B <tim.greaves at imperial.ac.uk> wrote:
>> Hello,
>> I’m attempting to build GMSH with CGNS enabled. I’m doing this on a clean Ubuntu 12.04.04 LTS x86_64 desktop install, updated to the current packages as of today and with the following additional packages installed:
>> cmake-curses-gui
>> tcl-dev
>> tk-dev
>> libgl1-mesa-dev
>> libglu1-mesa-dev
>> libxmu-dev
>> libhdf5-openmpi-dev
>> g++
>> gfortran
>> CGNS is installed from source downloaded from the CGNS website, version 3.2.1 (latest release), and configured as per the attached CMakeCacheCGNS3.2.1.txt. The changes from defaults include building with CC=mpicc in the environment and CGNS_BUILD_CGNSTOOLS, CGNS_ENABLE_64BIT, CGNS_ENABLE_FORTRAN, and CGNS_ENABLE_HDF5 all set ON.
>> I then downloaded today’s SVN snapshot of GMSH, gmsh-2.8.4-svn-20140221-source, and built with everything set to defaults except for ENABLE_CGNS which is set ON. CC=mpicc remained set in the environment. The same error occurs with latest release as well.
>> The build fails at the final linking following a ‘make’, outputting:
>> Linking CXX executable gmsh
>> CMakeFiles/gmsh.dir/Geo/GModelIO_CGNS.cpp.o: In function `GModel::readCGNS(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
>> GModelIO_CGNS.cpp:(.text+0x1f92): undefined reference to `FlGui::instance(int, char**)'
>> GModelIO_CGNS.cpp:(.text+0x1fbf): undefined reference to `cgnsImport()'
>> CMakeFiles/gmsh.dir/Geo/GModelIO_CGNS.cpp.o: In function `FlGui::available()':
>> GModelIO_CGNS.cpp:(.text._ZN5FlGui9availableEv[FlGui::available()]+0x7): undefined reference to `FlGui::_instance'
>> collect2: ld returned 1 exit status
>> make[2]: *** [gmsh] Error 1
>> make[1]: *** [CMakeFiles/gmsh.dir/all] Error 2
>> make: *** [all] Error 2
>> tmb1 at precise64:~/buidl/gmsh-build$
>> I attach the CMakeCacheCGNS.txt, and the CMake output and error logs for information; please let me know if anything else would be useful to track down and solve this error. I’m not particularly experienced with using CMake hence not sure what the most appropriate output files are for information.
>> As a bit of additional information - I’ve attempted the same build with CGNS configured with everything left at defaults and hit the same link-time error, and have attempted to build with the Ubuntu 12.04.04 cgns devel package, which failed much earlier in the build. The above is the furthest I’ve got with any gmsh/cgns combination, and I guess the most relevant for debugging this.
>> Thanks in advance for any help you can give me with this, and best regards,
>> Tim Greaves
>> <CMakeCacheCGNS3.2.1.txt.gz><CMakeCacheGMSH.txt.gz><CMakeError.log.gz><CMakeOutput.log.gz>_______________________________________________
>> gmsh mailing list
>> gmsh at geuz.org
>> http://www.geuz.org/mailman/listinfo/gmsh
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh

Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science