Menu

Error when trying to link with OCC 6.3.0

Help
2009-02-17
2013-05-27
  • Nobody/Anonymous

    Hello I'm Pablo. I have tried to get netgen+OCC working, without any success. A weeks ago I downloaded the CVS version of netgen, I compiled netgen without problems, but  I couldn't linked with OCC. Now I'm trying again with NG-4.9.6! I compiled netgen without problems, again. When I tried to link with OCC I get this

    messagelibtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -I../../libsrc/include -DOCCGEOMETRY -I/opt/OpenCASCADE6.3.0/inc -DHAVE_IOSTREAM -DHAVE_LIMITS -DHAVE_LIMITS_H -g -O2 -MT Partition_Inter2d.lo -MD -MP -MF .deps/Partition_Inter2d.Tpo -c Partition_Inter2d.cxx  -fPIC -DPIC -o .libs/Partition_Inter2d.o
    Partition_Inter2d.cxx:35:23: error: utilities.h: No existe el fichero ó directorio
    make[2]: *** [Partition_Inter2d.lo] Error 1
    make[2]: se sale del directorio `/home/pablo/netgen-4.9.6/libsrc/occ'
    make[1]: *** [install-recursive] Error 1
    make[1]: se sale del directorio `/home/pablo/netgen-4.9.6/libsrc'
    make: *** [install-recursive] Error 1

    I understand that the compiler couldtn't find utilities.h, Is this an OCC file? Has somebody get a working Netgen+OCC6.3.0?

    Any ideas about what to do? I will appreciate your help.

    Regards. Pablo

     
    • Philippose Rajan

      Hello Pablo,

      A Good Evening to you!

      I am sorry.... but the ZIP Archive containing Netgen 4.9.6 which can be downloaded from the Sourceforge Downloads section does not contain the "utilities.h" file.... I think it was an oversight on our part.....!

      Would it be possible for you to download the latest version of Netgen (4.9.7-dev) via the SVN Repository, and try compiling this? It should work without any problems....

      It its not possible for you to download the SVN version, please let me know, and I shall see if I can provide a snapshot of the SVN as a downloadable ZIP file....

      Have a great evening!

      Philippose

       
    • Nobody/Anonymous

      Hello Philippose,

      A good afternoon to you! I live in Argentina  :D

      I'm not an expert using SVN, please, give me the instructions an I'll download the latest version.

      Thanks!

      Have a great evening!

      Pablo

       
    • Philippose Rajan

      Hello again Pablo,

      So to get it right this time.... a Very Good Afternoon to you :-)!

      I guess the best way for you to access the latest version would be to follow these steps:

      1. Go to the SVN Repository Browser (http://netgen-mesher.svn.sourceforge.net/viewvc/netgen-mesher/)

      2. Click on the link to "netgen" in the SVN repository

      3. Once the directory listing of Netgen files is complete, right at the bottom you will see a link called "Download GNU tarball"

      4. On clicking this link, you will get the option to save a file called "netgen.tar.gz", containing the latest snapshot of the SVN repository.

      5. After you download this file, you can unzip it, and compile Netgen like before.

      One note however.... since the SVN repository is a development stream, it may not be thoroughly tested.... if you land up with any problems, let me know...!

      Have a nice day :-)!

      Philippose

       
    • Nobody/Anonymous

      Hello Philippose,

      Good morning/noon for you!

      I downloaded the latest version from the SVN, no problem with that. Following the instructions in the wiki first I need to run "autoreconf --install", this is what I get:

      pablo@inv03:~/netgen$ autoreconf --install
      You should update your `aclocal.m4' by running aclocal.
      libtoolize: `config.guess' exists: use `--force' to overwrite
      libtoolize: `config.sub' exists: use `--force' to overwrite
      libtoolize: `ltmain.sh' exists: use `--force' to overwrite
      nglib/Makefile.am:30: bin_PROGRAMS multiply defined in condition TRUE ...
      nglib/Makefile.am:24: ... `bin_PROGRAMS' previously defined here
      nglib/Makefile.am:31: ng_vol_SOURCES multiply defined in condition TRUE ...
      nglib/Makefile.am:25: ... `ng_vol_SOURCES' previously defined here
      nglib/Makefile.am:32: ng_vol_LDADD multiply defined in condition TRUE ...
      nglib/Makefile.am:26: ... `ng_vol_LDADD' previously defined here
      nglib/Makefile.am:31: variable `ng_vol_SOURCES' is defined but no program or
      nglib/Makefile.am:31: library has `ng_vol' as canonic name (possible typo)
      nglib/Makefile.am:32: variable `ng_vol_LDADD' is defined but no program or
      nglib/Makefile.am:32: library has `ng_vol' as canonic name (possible typo)
      autoreconf: automake failed with exit status: 1

      I did a "aclocal" following the first line, but the problems is still here. What I'doing wrong? I'm runing automake version 1.10.

      Thank you for your help.

      Pablo

       
    • Philippose Rajan

      Hello Pablo,

      A Good day to you :-)!

      I apologise for that.... that was a mistake on my part :-)!

      Have just corrected it.....

      Could you please download the SVN repository again, and try to compile once again??

      Let me know if things work out fine (and ofcourse... also if things dont work out fine :-)!)

      Philippose

       
    • Nobody/Anonymous

      Hello Philippose

      A good evening to you!

      I could compile netgen without problems. It's working now. Thank you!

      But, I can't link Netgen with OCC. I get this error:

      /opt/OpenCASCADE6.3.0/inc/Standard_Stream.hxx:84: error: ‘std::setw’ no se puede declarar
      /opt/OpenCASCADE6.3.0/inc/Standard_Stream.hxx:85: error: ‘std::setprecision’ no se puede declarar
      make[3]: *** [Partition_Inter3d.lo] Error 1
      make[3]: se sale del directorio `/home/pablo/netgen/libsrc/occ'
      make[2]: *** [all-recursive] Error 1
      make[2]: se sale del directorio `/home/pablo/netgen/libsrc'
      make[1]: *** [all-recursive] Error 1
      make[1]: se sale del directorio `/home/pablo/netgen'
      make: *** [all] Error 2

      I think this errors are related with my installation of OCC, probably I made a mistake during the installation. I'm not sure. Any ideas? Can I use the precompiled version (OpenCascadeModule.tar.gz) with NG 4.9.7?

      Thank you again!

      Pablo

       
    • Nobody/Anonymous

      Hello Philippose

      A good afternoon to you!

      I haven'n told you, I'm an Ubuntu user. Googling I found this repository for Debian/Ubuntu: http://www.opennovation.org/ubuntu/ There you have a lot of interesting software, including OCC6.3.0. So I added the repository to apt/synaptic and installed this (precompiled) version of OCC.

      Because this version install the headers in /usr/include/opencascade and the libraries in /usr/lib and /usr/lib/opencas. I had to do a little hacking after de ./configure step to link to these libraries and headers. I didn't find out how to tell the configure script where are the headers/libraries of opencascade. So I modified every Makefile to point to the correct headers/libraries.

      After that It was very very simple. Just make, make install.

      Now I have a working netgen+OCC and I can read steps and iges files!!!!!!!

      Philippose, thank you for your help!!!

      Regards

      Pablo

       
    • Philippose Rajan

      Hello Pablo :-)!

      And another lovely Afternoon to you :-)!

      Its wonderful to hear that you finally got Netgen working with OpenCascade....! While at work today I had reminded myself to send you a reply asking for more details of the Linux version you were using, and more importantly, the version of GCC you had compiled OpenCascade 6.3 with.

      The other option was to download the pre-compiled version of OpenCascade 6.2, because starting from version 6.3, OpenCascade has no official pre-compiled release for Linux.

      I guess the way you have currently solved the problem is not the most ideal... because if you need to download the latest version from SVN again, you would have to make all those modifications you made to the new version too.....

      Anyway, shall get back to you on this :-)!

      In the mean-time, I hope you find Netgen to be useful and if you find any bugs, or if you think there are some features which are not yet in Netgen but would be very useful, please let me know...!

      Have a great day ahead :-)!

      Philippose

       
    • Nobody/Anonymous

      Hello all,

      I try building netgen+occ for several days, with all problems described bay Pablo.
      The last problem I managed by commenting the lines

      // using std::setw;
      // using std::setprecision;

      in /opt/OpenCASCADE6.3.0/inc/Standard_Stream.hxx. Now I succeeded in building netgen+occ, but loading frame.step crashs netgen with

      thomas@tim:~/OpenFOAM/ThirdParty/netgen-4.9.6$ netgen
      NETGEN-4.9.6
      Developed at RWTH Aachen University, Germany
      and Johannes Kepler University Linz, Austria
      Including OpenCascade geometry kernel
      found ng.tcl
      optfile ng.opt does not exist - using default values
      Load stl geometry file /home/thomas/tmp/netgen-mesher/netgen/tutorials/hinge.stl
      Load STEP geometry file /home/thomas/tmp/netgen-mesher/netgen/tutorials/frame.step
      could not find the resource:a148e300-5740-11d1-a904-080036aaa103.Location
      Segmentation fault

      The informationgiven in

      http://www.opencascade.org/org/forum/thread_15610/

      didn't help me. Are there any ideas concerning this problem?

      Nessi

       
    • Philippose Rajan

      Hello Nessi,

      A Good day to you :-)!

      I am sorry that you have been having trouble compiling Netgen with OpenCascade support....

      Regarding the problems you are facing....

      The line "could not find resource....." is not an issue. Netgen will function fine even in the presence of this message. It is only an information from the OpenCascade subsystem when the XDE interface is used, and is usually linked with the OpenCascade environment variables... as of now, I can say... that this line can be safely ignored.

      As for the segmentation fault... now this is a problem....! As my first thought.... I would say, that the OpenCascade compilation on your system did not go through as expected.

      Could you give me more details regarding your system configuration? Namely...

      1. Version of Linux being used
      2. Whether it is a 32-bit or a 64-bit system
      3. Which version of GCC is being used for the compiles
      4. Which Netgen version you are using (v 4.9.6 or the one from SVN)

      I am not 100% sure, whether commenting out those two lines would have created a run-time problem elsewhere in the system.... there have been some comments on the net regarding compiling OpenCascade 6.3.0 using GCC 4.3....

      Can you not use a pre-compiled version of OpenCascade for your distribution of linux (like what Pablo did)?

      Have a nice day, and I am sure we will get to the bottom of this :-)!

      Philippose

       
    • Nobody/Anonymous

      Hello Philippose,

      I was following your hint using precompiled Opencascade from

      deb http://www.opennovation.org/ubuntu hardy main contrib non-free

      I adopted the idea from Pablo by creating a directory hierarchy like created from make install of OpenCascade

      drwxr-xr-x   6 root root    4096 2009-02-23 08:07 .
      drwxr-xr-x   7 root root    4096 2009-02-23 08:18 ..
      drwxr-xr-x   3 root root 1171456 2009-02-23 07:59 inc
      drwxr-xr-x 195 root root   98304 2009-02-23 08:05 lib
      drwxr-xr-x   2 root root    4096 2009-02-23 08:08 lin
      drwxr-xr-x   2 root root    4096 2009-02-23 08:08 Linux

      Now copying the content of

      /usr/include/opencascade  ->  /opt/occ/inc
      /usr/lib and /usr/lib/opencas -> /opt/occ/lib

      and creating symbolic links in /opt/occ/in and  /opt/occ/Linux like done in the original.

      With this preparation in succeeded in building netgen with step-support. I was using neteg-4.9.6 ( with utilities.h from svn-repository).

      Philippose and Pablo, thanks for your help.

      Nessi

       
    • Nobody/Anonymous

      Hello Nessi

      I'm very happy to hear you found useful the information. All my problems where with the installation of OCC, the opennovation people save me with the precompiled version.

      With the ./configure make make install, steps everything works fine. Thanks to Philippose and the developers of Netgen!

      Cheers

      Pablo

       
    • Nobody/Anonymous

      Hello all,

      I probably have what we could call an hybrid installation of Netgen as I downloaded the 4.9.6 source package and then upgraded the full Netgen/netgen folder via (Tortoise-)SVN.

      I could compile Netgen without OpenCASCADE (with some remaining display problems however). When starting Netgen, the Windows console diplays the 4.9.6 version an not the 4.9.7.

      Now, I'm trying to recompile Netgen with OpenCASCADE 6.3.0.
      During the code generation phase, the compiler tells that the database from program vc90.pdb cannot be opened.
      I can see that this file exists.

      ---------------------
      Génération de code en cours...
      Compilation en cours...
      nginterface.cpp
      ..\ng\nginterface.cpp : fatal error C1033: impossible d'ouvrir la base de données du programme 'd:\programs\netgen\netgen\windows\release(occ)\vc90.pdb'
      ngexception.cpp
      ..\libsrc\general\ngexception.cpp : fatal error C1033: impossible d'ouvrir la base de données du programme 'd:\programs\netgen\netgen\windows\release(occ)\vc90.pdb'
      ngappinit.cpp
      ----------------------

      Thanks for any help.

      Julien

       
    • Philippose Rajan

      Hello julien,

      A Good Evening to you!

      Ok... now.. before I start trying to solve all the issues you seem have have with the Netgen compilation and installation.... one thing you need to clear up is...

      Do not try to work with a "hybrid" version of Netgen :-O! You need to completely replace the Netgen-4.9.6 source code with the code from the Subversion (SVN) repository...

      The best solution is to either completely delete the Netgen-4.9.6 sources, or download the SVN source into a new folder, and start from scratch.

      In another post you have mentioned that the installation folder does not end with "-bin" as mentioned in the Wiki but with "-inst".... this is only true for version 4.9.6, and has been changed in the SVN quite a while ago.

      As for the ".pdb" file in your current post... thats again an issue due to the "hybrid" source code that you have....

      Have a nice day!

      Philippose

       
    • Nobody/Anonymous

      Hello Philippose,

      Thanks again for your help.

      I tried this time a new start from scratch, but unfortunately it was worse as Netgen (without OCC) could not compile at all.

      What I did was :
      1) renamed old Netgen/netgen folder to "Netgen/_netgen"
      2) created a new Netgen/netgen folder
      3) Updated this initially empty folder via the "SVN Checkout..." from TortoiseSVN to fill it with the files. If I remember the logs told about release #118 or something like that.
      4) Opened the netgen.sln solution into MS Visual C++ 2008 Express edition.
      5) Tried to compile. The threads library header pthread.h was lacking.
      6) Copied the threads.h, sched.h and semaphore.h files (that I had from some distribution of the pthreads library) into Netgen/netgen/libsrc/include folder.
      7) Tried to compile again. Here, the error printed in the BuildLog_netgen.htm file :

      (...)
      prism2rls.cpp
      Génération de code en cours...
      Compilation en cours...
      polynomial.cpp
      ..\libsrc\linalg\polynomial.cpp : fatal error C1033: impossible d'ouvrir la base de données du programme 'd:\programs\netgen\netgen\windows\release\vc90.idb'
      polyhedra.cpp
      (...)

      It tells that the database vc90.idb could not be opened during the compilation. I checked that this dabase exists.
      Could this be a problem of backwards vs forwards slashes in the path ?

      Have a nice day!

      Julien

       
    • Philippose Rajan

      Hello Julien,

      A Good day to you...!

      Ok... so you tried to start from scratch.... thats cool..... now to get to the bottom of the problems you are facing....

      1. Did you read the installation documentation in the Netgen Wiki on Sourceforge?

      2. Did you download the external libraries zip files for Tcl/Tk, Tix, Togl and pthreads-w32 from the Download section on the Netgen Sourceforge site.....

      https://sourceforge.net/project/platformdownload.php?group_id=249952

      (Files: TclTkTixTogl-w32.zip and pthread-32.zip)

      3. If you did read the wiki... did you create the directory structure as requested in the documentation? You need to following structure:

      <Netgen root folder> (in your case -> Netgen)
      |------> netgen
      |           |--------> netgen SVN sources (as obtained via TortoiseSVN)
      |
      |------> ext_libs (note... the name of this folder has to be "ext_libs")
                   |--------> tcl
                   |                |-----> bin
                   |                |-----> doc
                   |                |-----> include
                   |                |-----> lib
                   |--------> pthread-w32
                                    |-----> include
                                    |-----> lib

      4. If you want OpenCascade support, you need to install the precompiled OCC (6.2 or 6.3.0) libraries which can be downloaded from the OpenCascade webpage.... if you install it using the official installer, you will automatically have an environment variable called "CASROOT" in your windows environment which points to the OCC installation..... the Netgen Microsoft Visual C++ solution file automatically uses this environment variable to find Opencascade.

      5. You need to add the following two entries in the PATH variable of your windows installation:

      <Netgen root folder>\ext_libs\tcl\bin
      <Netgen root folder>\ext_libs\pthread-w32\lib

      6. Once the above 5 points are all completely fulfilled, simply opening the Microsoft Visual C++ 2008 solution file (netgen.sln) in MSVC++ 2008 Express Edition will successfully compile and install Netgen into the following folder:

      <active configuration>-bin

      7. Double clicking on the netgen.exe file in the folder mentioned in point (6) will open up the Netgen GUI.

      To be sure  of the above process, I just deleted my entire Netgen installation/source folders and did the whole procedure from scratch.... and as expected, everything worked out perfectly fine....

      The vc90.idb file is automatically generated during the compile process.... so the error that you are seeing cannot really be due to an error in the Netgen files.... could it be something to do with the fact that you are using a French Operating system?

      I doubt that it has anything to do with the backward / forward slash, because the other .cpp files seems to have compiled without any issue....

      Not sure how else I could help you out..... if you have any doubts, feel free to get back to me...

      Have a nice evening!

      Philippose

       
    • Philippose Rajan

      Oops... the post removed all the leading white spaces from the explanation of the directory structure.... here it is again :-)!

      <Netgen root folder> (in your case -> Netgen)
      |------> netgen
      |..........|--------> netgen SVN sources (as obtained via TortoiseSVN)
      |
      |------> ext_libs (note... the name of this folder has to be "ext_libs")
      ............|--------> tcl
      ............|.............|-----> bin
      ............|.............|-----> doc
      ............|.............|-----> include
      ............|.............|-----> lib
      ............|--------> pthread-w32
      ..........................|-----> include
      ..........................|-----> lib

      Philippose

       
    • Nobody/Anonymous

      Hello Philippose,

      Once more, thanks a lot.

      > 1. (...)
      I had read Netgen's wiki documentation on Sourceforge.

      > 2. (...)
      I also had downloaded the external libraries tcl / tk/ tik /togl /pthread-32 from the download section on Sourceforge.

      > 3. (...)
      Finally, I had read the wiki and created the structure, but had forgotten to copy the "include" folder from pthread-w32.

      Another difference was that I thought the SVN of Netgen should be placed directly in <netgen_root_folder>/netgen and not in a subfolder of netgen.
      The docs do not tell about this. If I understand, the advantage of placing the sources in a subfolder of netgen is that  after compilation you can delete the sources more easily to free some place on your hard drive. True?

      > 4. (...)
      In my case, OpenCascade binaries were installed and the CASROOT environement variable was OK.

      >5. (...)
      The 2 string for the PATH environment variable were OK.

      I'll try again.

      Have a nice week.

      Julien

       

Log in to post a comment.