Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 195980 - [science overlay]: gmsh - a three-dimensional finite element mesh generator (new ebuild)
Summary: [science overlay]: gmsh - a three-dimensional finite element mesh generator (...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High enhancement (vote)
Assignee: Default Assignee for New Packages
URL: http://www.geuz.org/gmsh/
Whiteboard: Science overlay
Keywords: InOverlay
: 133953 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-15 20:23 UTC by Oliver Borm
Modified: 2019-09-03 22:11 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
New ebuild (gmsh-2.0.8.ebuild,1012 bytes, text/plain)
2007-10-15 20:25 UTC, Oliver Borm
Details
vesion bump + cgns fix for hdf5 backend + examples USE flag (gmsh-2.1.1.ebuild,1.37 KB, text/plain)
2008-03-22 08:05 UTC, Maxim Loginov
Details
patch to get the metis USE flag working (gmsh-2.1.1-metis.patch,396 bytes, patch)
2008-04-01 23:15 UTC, Oliver Borm
Details | Diff
Version bump to 2.2.3 (gmsh-2.2.3.ebuild,1.27 KB, text/plain)
2008-07-14 21:52 UTC, Oliver Borm
Details
needed metis patch (gmsh-2.2.3-metis.patch,396 bytes, patch)
2008-07-14 21:53 UTC, Oliver Borm
Details | Diff
Diff for additional opencascade support (with sci-libs/opencascade from science overlay) (opencascade.diff,821 bytes, patch)
2008-08-19 17:30 UTC, Thomas Sachau
Details | Diff
gmsh 2.3.1 patch (copy from science overlay 2.3.0 patch) (gmsh-2.3.1.patch,838 bytes, patch)
2009-07-17 19:10 UTC, Etienne Lorriaux
Details | Diff
hdf5 patch for gmsh 2.3.1 (same as science overlay 2.3.0 patch) (gmsh-2.3.1_hdf5.patch,710 bytes, patch)
2009-07-17 19:11 UTC, Etienne Lorriaux
Details | Diff
New gmsh 2.3.1 ebuild working with fltk slots (gmsh-2.3.1.ebuild,1.66 KB, text/plain)
2009-07-17 19:13 UTC, Etienne Lorriaux
Details
Solved linking problems with OpenCASCADE (gmsh-2.3.1.ebuild,1.72 KB, text/plain)
2009-07-19 18:31 UTC, Etienne Lorriaux
Details
Improved ebuild (gmsh-2.3.1-r1.ebuild,2.16 KB, text/plain)
2009-09-02 13:27 UTC, Etienne Lorriaux
Details
small modifs (gmsh-2.3.1-r1.ebuild,2.08 KB, text/plain)
2009-10-15 16:50 UTC, Etienne Lorriaux
Details
Version bump, new ebuild with cmake config (gmsh-2.4.2.ebuild,2.26 KB, text/plain)
2009-10-15 16:51 UTC, Etienne Lorriaux
Details
Ebuild to merge nightly sources (gmsh-9999.ebuild,2.27 KB, text/plain)
2009-10-15 16:51 UTC, Etienne Lorriaux
Details
Moved sources to svn (gmsh-9999.ebuild,2.26 KB, text/plain)
2009-10-21 14:14 UTC, Etienne Lorriaux
Details
Fix the metis and taucs support (gmsh-9999.ebuild,2.43 KB, text/plain)
2010-04-08 22:13 UTC, Etienne Lorriaux
Details
new sci-libs/gmsh-2.5.0-r1.ebuild corrected for compat. with libpng 1.5 (gmsh-2.5.0-r1.ebuild,2.67 KB, text/plain)
2011-11-30 10:41 UTC, Hack_leberry Finn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Borm 2007-10-15 20:23:50 UTC
This is a new ebuild for gmsh with two extra USE-Flags:
cgns - for cgns output support
metis - for metis support

Please assign it to maintainers-wanted, so that I can commit it to an overlay.

Reproducible: Always
Comment 1 Oliver Borm 2007-10-15 20:25:11 UTC
Created attachment 133560 [details]
New ebuild
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-10-15 20:25:57 UTC
*** Bug 133953 has been marked as a duplicate of this bug. ***
Comment 3 Oliver Borm 2007-10-16 15:04:46 UTC
You can now fin this ebuild in the sunrise overlay:
http://overlays.gentoo.org/proj/sunrise/browser/reviewed/sci-libs/gmsh/
Comment 4 Maxim Loginov 2008-03-22 08:05:33 UTC
Created attachment 146848 [details]
vesion bump + cgns fix for hdf5 backend + examples USE flag

1. introduced examples USE flag to install demos and tutorial files

2. if cgns is built with hdf5 backend for data storage, it needs -lhdf5 link flag to work correctly, I made a crude fix in configure. probably configure should check the cgns dependency on hdf5, this issue should be reported upstream (I will do it).

this ebuild has no problem to build with cgns, but cgns write failed:

~$ cp -a /usr/share/doc/gmsh-2.1.1/tutorial . && cd tutorial/
~/tutorial$ gmsh -2 -o t6.cgns -format cgns t6.geo
Info    : Increasing process stack size (8192 kB < 16 MB)
Info    : 'gmsh -2 -o t6.cgns -format cgns t6.geo ' started on Sat Mar 22 13:58:13 2008
Info    : Reading 't6.geo'
Info    : Reading 't1.geo'
Info    : Read 't1.geo'
Info    : Read 't6.geo'
Info    : Meshing 1D...
Info    : Meshing curve 1 (Line)
Info    : Meshing curve 2 (Line)
Info    : Meshing curve 3 (Line)
Info    : Meshing curve 4 (Line)
Info    : Mesh 1D complete (0.006999 s)
Info    : Mesh
Info    : Meshing 2D...
Info    : Meshing surface 6 (transfinite)
Info    : Mesh 2D complete (0.005 s)
Info    : Mesh
Info    : 600 vertices 647 elements
Info    : Writing 't6.cgns'
Working on zone 1  100
*** glibc detected *** gmsh: free(): invalid next size (fast): 0x083b31a0 ***
======= Backtrace: =========
/lib/libc.so.6[0xb7682a00]
/lib/libc.so.6(cfree+0x89)[0xb76846f9]
/usr/lib/libhdf5.so.0(H5MM_xfree+0x1f)[0xb78dec1f]
======= Memory map: ========
08048000-08262000 r-xp 00000000 08:05 5964802    /usr/bin/gmsh
08262000-08263000 r--p 00219000 08:05 5964802    /usr/bin/gmsh
08263000-08270000 rw-p 0021a000 08:05 5964802    /usr/bin/gmsh
08270000-083b8000 rw-p 08270000 00:00 0          [heap]
...

I have no clue if it is related to cgnslibs, hdf5, gmsh or ebuild itself. please test it.
Comment 5 Oliver Borm 2008-04-01 23:14:19 UTC
Hello Maxim,

thanks for the version bump. If I Have activated the cgns USE-flag I get the error message that the cgns lib's can't be found (on amd64):

...
checking for main in -lcgns... no
...

But sci-libs/cgnslib is installed. So I cannot reproduce your error at the moment. Also I think sci-libs/cgnslib should be added to the dependecy list.

Additional I need a patch to get the compilation working with the metis USE-flag.

Thanks for the version bump!
Comment 6 Oliver Borm 2008-04-01 23:15:26 UTC
Created attachment 148025 [details, diff]
patch to get the metis USE flag working
Comment 7 Oliver Borm 2008-07-14 21:52:31 UTC
Created attachment 160391 [details]
Version bump to 2.2.3

This is a new ebuild for gmsh.
~/tutorial $ gmsh -2 -o t6.cgns -format cgns t6.geo
Info    : 'gmsh -2 -o t6.cgns -format cgns t6.geo' started on Mon Jul 14 23:43:17 2008
Info    : Reading 't6.geo'
Info    : Reading 't1.geo'
Info    : Read 't1.geo'
Info    : Read 't6.geo'
Info    : Meshing 1D...
Info    : Meshing curve 1 (Line)
Info    : Meshing curve 2 (Line)
Info    : Meshing curve 3 (Line)
Info    : Meshing curve 4 (Line)
Info    : Mesh 1D complete (0 s)
Info    : Mesh
Info    : Meshing 2D...
Info    : Meshing surface 6 (transfinite)
Info    : Mesh 2D complete (0.004 s)
Info    : Mesh
Info    : 600 vertices 647 elements
Info    : Writing 't6.cgns'
Working on zone 1  100
*** glibc detected *** gmsh: free(): invalid next size (fast): 0x0000000000b786d0 ***
======= Backtrace: =========
/lib/libc.so.6[0x2ada14e8ae85]
/lib/libc.so.6(cfree+0x75)[0x2ada14e8cacb]
/usr/lib/libhdf5.so.0(H5MM_xfree+0xe)[0x2ada144fc68e]
/usr/lib/libhdf5.so.0(H5A_free+0x1c)[0x2ada144b22f9]
/usr/lib/libhdf5.so.0(H5A_close+0x2e)[0x2ada144b2450]
/usr/lib/libhdf5.so.0(H5I_dec_ref+0xda)[0x2ada144fbb8b]
/usr/lib/libhdf5.so.0(H5Aclose+0x3f)[0x2ada144b2fb9]
/usr/lib/libcgns.so[0x2ada142724d6]
/usr/lib/libcgns.so[0x2ada1427258d]
/usr/lib/libcgns.so(ADFH_Write_All_Data+0x25)[0x2ada142725ed]
/usr/lib/libcgns.so(cgi_new_node+0x29a)[0x2ada1423cadf]
/usr/lib/libcgns.so(cg_coord_write+0x305)[0x2ada1426aca9]
gmsh[0x48be4d]
gmsh[0x45a281]
gmsh[0x457504]
gmsh(cos+0x727)[0x40f807]
/lib/libc.so.6(__libc_start_main+0xe3)[0x2ada14e3db23]
gmsh(_ZN9Fl_Window6resizeEiiii+0x69)[0x40f3c9]
======= Memory map: ========
00400000-00791000 r-xp 00000000 08:01 1259461                            /usr/bin/gmsh
00991000-00992000 r--p 00391000 08:01 1259461                            /usr/bin/gmsh
00992000-009dc000 rw-p 00392000 08:01 1259461                            /usr/bin/gmsh
009dc000-00b79000 rw-p 009dc000 00:00 0                                  [heap]
Comment 8 Oliver Borm 2008-07-14 21:53:17 UTC
Created attachment 160392 [details, diff]
needed metis patch
Comment 9 Thomas Sachau gentoo-dev 2008-08-19 17:30:20 UTC
Created attachment 163310 [details, diff]
Diff for additional opencascade support (with sci-libs/opencascade from science overlay)
Comment 10 Oliver Borm 2008-08-26 20:18:24 UTC
This package is from now on in the science overlay WITH opencascade support:

http://overlays.gentoo.org/proj/science/browser/overlay/sci-libs/gmsh
Comment 11 Oliver Borm 2008-11-18 15:32:54 UTC
I've uploaded the new ebuild for version 2.2.5 to the science overlay. The cgns test worked now fine for me, with and without hdf5 USE-flag. But the med support in the GmshPost Utility doesn't compile properly. If anybody has s hint for me, I will be glad.
Comment 12 Peter Gustafson 2008-11-26 14:45:17 UTC
Hi,
I'm experiencing build failures with USE=-metis.  It works fine when metis is included.  The error message is below.


/usr/bin/ar: creating ../../lib/libGmshMathEval.a                               
a - matheval.o                                                                  
a - node.o                                                                      
a - scanner.yy.o                                                                
a - parser.tab.o                                                                
a - symbol_table.o                                                              
a - xmath.o                                                                     
i686-pc-linux-gnu-ranlib ../../lib/libGmshMathEval.a                            
make[1]: Leaving directory `/var/tmp/portage/sci-libs/gmsh-2.2.5/work/gmsh-2.2.5/contrib/MathEval'                                                              
i686-pc-linux-gnu-g++ -march=prescott -Os -fomit-frame-pointer -pipe  -o bin/gmsh -Llib -lGmshFltk -lGmshCommon -lGmshGeo -lGmshMesh -lGmshPost -lGmshPlugin -lGmshCommon -lGmshGraphics -lGmshParser -lGmshNumeric -Wl,-O1 -L/usr/lib/fltk-1.1 -Wl,-rpath,/usr/lib/fltk-1.1 -lfltk_images -lpng -lz -ljpeg -lfltk_gl -lGLU -lGL -lfltk -lXft -lpthread -lm -lXext -lX11 -ljpeg -lpng -lGmshANN -lGmshChaco -lGmshNetgen -lGmshMathEval -lgsl -lgslcblas -lz -lm                                
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lGmshMesh                                                               
collect2: ld returned 1 exit status                                             
make: *** [link] Error 1                                                        
 *                                                                              
 * ERROR: sci-libs/gmsh-2.2.5 failed.                                           
 * Call stack:                                                                  
 *               ebuild.sh, line   49:  Called src_compile                      
 *             environment, line 2056:  Called die                              
 * The specific snippet of code:                                                
 *       emake -j1 || die "emake failed";                                       
 *  The die message:                                                            
 *   emake failed                                                               
 *                                                                              
 * If you need support, post the topmost build error, and the call stack if relevant.                                                                           
 * A complete build log is located at '/var/tmp/portage/sci-libs/gmsh-2.2.5/temp/build.log'.                                                                    
 * The ebuild environment file is located at '/var/tmp/portage/sci-libs/gmsh-2.2.5/temp/environment'.                                                           
 *                                                                              
Comment 13 Oliver Borm 2008-11-26 18:22:12 UTC
(In reply to comment #12)
> Hi,
> I'm experiencing build failures with USE=-metis.  It works fine when metis is
> included.  The error message is below.

Ok, I've uploaded a new ebuild with a new patch to the science overlay, now it should be working without the metis USE-flag.
Comment 14 Peter Gustafson 2008-11-26 20:30:31 UTC
(In reply to comment #13)
> Ok, I've uploaded a new ebuild with a new patch to the science overlay, now it
> should be working without the metis USE-flag.
> 

The build completed.  Thanks.
Comment 15 Etienne Lorriaux 2009-07-17 19:10:35 UTC
Created attachment 198350 [details, diff]
gmsh 2.3.1 patch (copy from science overlay 2.3.0 patch)
Comment 16 Etienne Lorriaux 2009-07-17 19:11:46 UTC
Created attachment 198352 [details, diff]
hdf5 patch for gmsh 2.3.1 (same as science overlay 2.3.0 patch)
Comment 17 Etienne Lorriaux 2009-07-17 19:13:39 UTC
Created attachment 198353 [details]
New gmsh 2.3.1 ebuild working with fltk slots

I've just noticed a problem a new bug in gmsh 2.3.0 from science overlay with the new slot of fltk: the configure script is searching after fltk-config whereas fltk-2* ebuild provide fltk2-config :

configure: error: Could not find fltk-config. Try --with-fltk-prefix?

so i've modified the ebuild to precise the fltk dependency with the older slot 1.1. In the mean time, I've updated the gmsh ebuild to the new version 2.3.1. It works for me on x86 and amd64, hope this will help.

Etienne.
Comment 18 Etienne Lorriaux 2009-07-19 18:31:12 UTC
Created attachment 198495 [details]
Solved linking problems with OpenCASCADE

Hello,

i've noticed a non reproductible problem when linking with OpenCASCADE libraries. I've solved the problem adding -ldl to LDFLAGS. It works fine here on ~amd64 and ~x86.

Regards, Etienne.
Comment 19 Oliver Borm 2009-07-21 21:06:05 UTC
gmsh-2.3.1 is now in the science overlay.

Thanks, for the patches.

Comment 20 Etienne Lorriaux 2009-09-02 13:27:30 UTC
Created attachment 202956 [details]
Improved ebuild

Hello,

A new version of gmsh is available, but it now uses cmake to configure the build. So I decided to finish the 2.3.1 ebuild in order to have a fully working ebuild before switching to a new one.

1. Ebuild correction: since 2.3.1, gmsh does not use gsl anymore, so i removed the dependency

2. Instead of gsl, it is now using blas and lapack, i've added these dependencies through the blas USE flag

3. I've added a support for fftw through the fftw USE flag. The fftw feature relies on lapack, and I'm not sure that lapack is usefull without fftw, so maybe we should remove the fftw USE flag and add the dependency automatically when blas and lapack are used.

4. Med support is now compiling!!! In fact it was just a version problem. Since gmsh 2.*, you need at least med-2.3.4 (It can be found here: http://bugs.gentoo.org/show_bug.cgi?id=130502). This feature is known to be experimental.

5. I've noticed a --with-occ-mesh-constraints-prefix in the configure script. I've added this option through the opencascade USE flag.

6. I've added a mpi support with openmpi.

I think that this gmsh build has almost all available features. The last things to do are :
* remove the 'append-ldflags -ldl -lmpi' since portage is showing warning when you link libraries through LDFLAGS. I think the best way is to patch the configure.in, but i don't know exactly how to correct this file.
* see if we remove the fftw USE flag

It seems to work on my x86 and amd64 desktops.

I'm stopping here for this ebuild and i'll try to write the new one with cmake ASAP.

Regards, Etienne.
Comment 21 Etienne Lorriaux 2009-10-15 16:50:35 UTC
Created attachment 207218 [details]
small modifs
Comment 22 Etienne Lorriaux 2009-10-15 16:51:18 UTC
Created attachment 207220 [details]
Version bump, new ebuild with cmake config
Comment 23 Etienne Lorriaux 2009-10-15 16:51:57 UTC
Created attachment 207222 [details]
Ebuild to merge nightly sources
Comment 24 Etienne Lorriaux 2009-10-21 14:14:08 UTC
Created attachment 207823 [details]
Moved sources to svn
Comment 25 BlGene 2010-03-21 00:14:37 UTC
I was trying to build gmsh-9999 from source and I got the following error:

loading initial cache file /var/tmp/portage/sci-libs/gmsh-9999/temp/gentoo_common_config.cmake
-- Found fltk-config script for FLTK 1.1

-- Found GMP library
WARNING: By including Tetgen you have to comply with Tetgen's special licensing requirements stated in contrib/Tetgen/LICENSE.
CMake Error at CMakeLists.txt:568 (message):
  You have to enable METIS in order to use TAUCS



Gmsh has been configured for Linux with the following options: Ann Blas DIntegration Dlopen FlTree Fltk Gmm Jpeg Kbipack Lapack Lua MathEx Mesh NativeFileChooser Netgen OpenGL Parser Png Post Readline Solver Tetgen Zlib

C compiler: /usr/bin/i686-pc-linux-gnu-gcc
C++ compiler: /usr/bin/i686-pc-linux-gnu-g++
Build type: Gentoo
Install prefix: /usr

Run 'ccmake /var/tmp/portage/sci-libs/gmsh-9999/work/gmsh-9999' to fine-tune the configuration.

!!! ERROR: sci-libs/gmsh-9999 failed.
!!! Call stack:
!!!              ebuild-daemon.sh, line  192:  Called execute_phases 'configure'
!!!                     ebuild.sh, line  403:  Called dyn_configure
!!!   ebuild-default-functions.sh, line  295:  Called src_configure
!!!                 .scrubbed-env, line 3042:  Called cmake-utils_src_configure '-DCMAKE_Fortran_COMPILER=gfortran' '-DENABLE_BLAS_LAPACK=ON' '-DENABLE_CGNS=OFF' '-DENABLE_CHACO=OFF' '-DENABLE_FLTK=ON' '-DENABLE_FL_TREE=ON' '-DENABLE_GRAPHICS=ON' '-DENABLE_MED=OFF' '-DENABLE_METIS=OFF' '-DENABLE_OCC=OFF'
!!!                 .scrubbed-env, line  583:  Called _execute_optionaly 'src_configure' '-DCMAKE_Fortran_COMPILER=gfortran' '-DENABLE_BLAS_LAPACK=ON' '-DENABLE_CGNS=OFF' '-DENABLE_CHACO=OFF' '-DENABLE_FLTK=ON' '-DENABLE_FL_TREE=ON' '-DENABLE_GRAPHICS=ON' '-DENABLE_MED=OFF' '-DENABLE_METIS=OFF' '-DENABLE_OCC=OFF'
!!!                 .scrubbed-env, line   80:  Called enable_cmake-utils_src_configure '-DCMAKE_Fortran_COMPILER=gfortran' '-DENABLE_BLAS_LAPACK=ON' '-DENABLE_CGNS=OFF' '-DENABLE_CHACO=OFF' '-DENABLE_FLTK=ON' '-DENABLE_FL_TREE=ON' '-DENABLE_GRAPHICS=ON' '-DENABLE_MED=OFF' '-DENABLE_METIS=OFF' '-DENABLE_OCC=OFF'
!!!                 .scrubbed-env, line 1125:  Called die
!!! The die message:
!!!  cmake failed
!!!
!!! If you need support, post the topmost build error, and the call stack if relevant.


Following the instructions and running the ccmake command with the given parameters did not work.
Comment 26 BlGene 2010-03-21 16:58:55 UTC
Somehow my problem was solved by adding  "metis" as a use flag.
Comment 27 Etienne Lorriaux 2010-04-08 22:12:45 UTC
(In reply to comment #26)
> Somehow my problem was solved by adding  "metis" as a use flag.
> 

Hello,

thanks for reporting this bug. In fact the taucs support (requiring the metis support) seems to have been introduced recently in the dev version.

I've just pushed a new ebuild that should handle this problem.

Regards,

Etienne.
Comment 28 Etienne Lorriaux 2010-04-08 22:13:59 UTC
Created attachment 227061 [details]
Fix the metis and taucs support
Comment 29 J.Borme 2011-11-01 13:10:10 UTC
I rebuilt gmsh-2.5.0 after libpng upgrade (bug #319101 ) and it fails during build :

[ 63%] [ 63%] /mnt/stockage/var-tmp/portage/sci-libs/gmsh-2.5.0/work/gmsh-2.5.0-source/Graphics/gl2png.cpp: In function ‘void create_png(FILE*, PixelBuffer*, int)’:
/mnt/stockage/var-tmp/portage/sci-libs/gmsh-2.5.0/work/gmsh-2.5.0-source/Graphics/gl2png.cpp:60:38: erreur: ‘Z_DEFAULT_COMPRESSION’ was not declared in this scope
Building CXX object CMakeFiles/gmsh.dir/contrib/ANN/src/ANN.cpp.o
make[2]: *** [CMakeFiles/gmsh.dir/Graphics/gl2png.cpp.o] Erreur 1

Does not build with USE="-png" while keeping USE="X blas jpeg netgen zlib"

Builds only with USE="-X", whether other USE flags are set or unset.
Comment 30 Hack_leberry Finn 2011-11-30 10:41:37 UTC
Created attachment 294299 [details]
new sci-libs/gmsh-2.5.0-r1.ebuild corrected for compat. with libpng 1.5

Fix for known problem (Jérôme Borme comment) - libpng 1.4 header files includes zlib headers, libpng 1.5 doesn't. So I added "sed work" line to 2.5.0 ebuild, it directly includes zlib.h in appropriate place. Now works on x86, please check on other architectures.