[Gmsh] Compiling Gmsh with opencascade

Vun, Simon (Contractor) Simon.Vun at dsto.defence.gov.au
Wed Mar 5 23:09:20 CET 2008


Thanks Dave,

You were absolutely correct and I ended up adding the the "-pthread" to the CXXFLAGS="-g -O2 <-pthread>" and it seemed to work.  I will also try your way.
I'm in the process of documenting my installation since there seemed to be steps missing in the readme.occ or new problems with the compiling with OCC.

Thanks again

Simon.

-----Original Message-----
From: David Colignon [mailto:David.Colignon at ulg.ac.be] 
Sent: Wednesday, 5 March 2008 8:34 PM
To: Vun, Simon (Contractor)
Cc: gmsh at geuz.org
Subject: Re: [Gmsh] Compiling Gmsh with opencascade

Hi Simon,

seems like with the dynamic occ libs on linux you might need link with the pthread library. Can you try adding -lpthread to the GMSH_LIBS variable in the "gmsh/variables" file ?

Cheers,

Dave


--
David Colignon, Ph.D.
Collaborateur Logistique F.R.S.-FNRS (Equipements de Calcul Intensif) ACE - Applied & Computational Electromagnetics Institut Montefiore B28 Université de Liège 4000 Liège - BELGIQUE
Tél: +32 (0)4 366 37 32
Fax: +32 (0)4 366 29 10
WWW:    http://www.montefiore.ulg.ac.be/personnel.php?op=detail&id=898
Agenda: http://www.google.com/calendar/embed?src=david.colignon%40gmail.com



Vun, Simon (Contractor) wrote:
> Hi there,
> 
> I've just started to use gmsh as my meshing tool for openfoam CFD.  
> Currently I'm trying to install gmsh on my 32bit intel Suse10.1 machine.
> 
> I followed the readme for occ and was successful with the installation 
> of opencascade.  However I'm currently trying to compile gmsh with 
> opencascade and I've hit a wall.
> 
> I configure opencascade using the following
> 
> ./configure --enable-occ --with-occ-prefix=/usr/local/OpenCASCADE6.2.0/ 
> (since OCC is located in this dir).
> 
> When I try to "make" gmsh I get the following error;
> 
>  make[1]: Leaving directory `/usr/local/gmsh-2.1.1/contrib/ANN'
> make[1]: Entering directory `/usr/local/gmsh-2.1.1/contrib/Netgen'
> make[1]: `../../lib/libGmshNetgen.a' is up to date.
> make[1]: Leaving directory `/usr/local/gmsh-2.1.1/contrib/Netgen'
> make[1]: Entering directory `/usr/local/gmsh-2.1.1/contrib/MathEval'
> make[1]: `../../lib/libGmshMathEval.a' is up to date.
> make[1]: Leaving directory `/usr/local/gmsh-2.1.1/contrib/MathEval'
> g++ -g -O2 -o bin/gmsh -Llib -lGmshFltk -lGmshParser -lGmshGraphics 
> -lGmshPlugin -lGmshMesh -lGmshGeo -lGmshPost
> -lGmshCommon -lGmshDataStr -lGmshNumeric -lGmshParallel 
> -lGmshNativeFileChooser -L/usr/local/lib -L/usr/X11R6/lib
> -lfltk_images -lpng -lz -lfltk_jpeg -lfltk_gl -lGLU -lGL -lfltk -lm 
> -lXext -lX11 -lpng -lGmshANN -lGmshNetgen -lGmshMathEval
> 
> -lgsl -lgslcblas -L/usr/local/OpenCASCADE6.2.0//lib -lTKSTEP -lTKSTEP209 
> -lTKSTEPAttr -lTKSTEPBase -lTKIGES -lTKXSBase -lTKOffset
> 
>  -lTKFeat -lTKFillet -lTKBool -lTKShHealing -lTKMesh -lTKHLR -lTKBO 
> -lTKPrim -lTKTopAlgo -lTKGeomAlgo -lTKBRep -lTKGeomBase -lTKG3d
> 
> -lTKG2d -lTKAdvTools -lTKMath -lTKernel -lhdf5 -lz -lm
> /usr/local/lib/libTKernel.so: undefined reference to `pthread_create'
> /usr/local/lib/libTKernel.so: undefined reference to `pthread_detach'
> /usr/local/lib/libTKernel.so: undefined reference to 
> `pthread_mutex_trylock'
> /usr/local/lib/libTKernel.so: undefined reference to `pthread_join'
> collect2: ld returned 1 exit status
> make: *** [link] Error 1
> 
> I've made sure the OCC libs and inc dirs are accessible using symbolic 
> links in OpenCASCADE6.2.0 dir following the thread 
> ___http://www.geuz.org/pipermail/gmsh/2007/002498.html_
> 
> I'm not sure what to make of this error so if anyone could help I would 
> really appreciate it.
> 
> I'm trying to compile gmsh-2.1.1 with OpenCascade 6.2.0 using gcc4.1.2.
> 
> Thanks in advance and I can't wait try the mesher.
> 
> Simon.
> 
> P.S In the spirit of opensource, when I successfully install gmsh I'll 
> happily share my installation process. 
> 
> *IMPORTANT:* This email remains the property of the Australian Defence 
> Organisation and is subject to the jurisdiction of section 70 of the 
> CRIMES ACT 1914. If you have received this email in error, you are 
> requested to contact the sender and delete the email.
> 
>  
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh

IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914.  If you have received this email in error, you are requested to contact the sender and delete the email.