tpaviot / oce

OpenCASCADE Community Edition (OCE): a community driven fork of the Open CASCADE library.
http://groups.google.com/group/oce-dev
GNU Lesser General Public License v2.1
811 stars 284 forks source link

OT - mb/geom_smesh_updates compilation #303

Closed tpaviot closed 12 years ago

tpaviot commented 12 years ago

On OSX Snow Leopard 64 bit, following issue while compilinh geom-6.5.0. Seems a missing header Basic_Utils.hxx can't be found.

macbook-pro-de-thomas-paviot:cmake-build thomas$ make
[  1%] Building CXX object CMakeFiles/GEOM.dir/src/ExchangeIGES/ExchangeIGES_Export.cpp.o
/Users/thomas/Devel/pythonocc/src/contrib/geom-6.5.0-for-oce0.10.0/src/ExchangeIGES/ExchangeIGES_Export.cpp:29:28: error: Basics_Utils.hxx: No such file or directory
/Users/thomas/Devel/pythonocc/src/contrib/geom-6.5.0-for-oce0.10.0/src/ExchangeIGES/ExchangeIGES_Export.cpp: In function ‘int Export(const TopoDS_Shape&, const TCollection_AsciiString&, const TCollection_AsciiString&)’:
/Users/thomas/Devel/pythonocc/src/contrib/geom-6.5.0-for-oce0.10.0/src/ExchangeIGES/ExchangeIGES_Export.cpp:157: error: ‘Kernel_Utils’ has not been declared
/Users/thomas/Devel/pythonocc/src/contrib/geom-6.5.0-for-oce0.10.0/src/ExchangeIGES/ExchangeIGES_Export.cpp:157: error: expected `;' before ‘loc’
make[2]: *** [CMakeFiles/GEOM.dir/src/ExchangeIGES/ExchangeIGES_Export.cpp.o] Error 1
make[1]: *** [CMakeFiles/GEOM.dir/all] Error 2
make: *** [all] Error 2
dbarbier commented 12 years ago

@tpaviot this header file comes from Salome, not OCCT.

mblome commented 12 years ago

Hi Thomas,

the header file comes from KERNELsourcesV6.5.0.tar.gz from the Salome files. You can find it in the SMESH inc/ folder. I forgot to include it in the GEOM inc/ because I only added the files in ExchangeIGES while preparing the tgz archives for Fotis (haven't compiled ExchangeIGES on my HD yet). Sorry ..

Regards, Mark

mblome commented 12 years ago

Forgot to mention that the same comment above applies to "ExchangeSTL" and "ExchangeSTEP".

Also for me it is still unclear whether we should include "ExchangeVTK" (it itself depends on "OCC2VTK") in GEOM as this would introduce a dependency to VTK which otherwise wouldn't exist. Again, I haven't compiled ExchangeVTK yet.

tpaviot commented 12 years ago

We should not introduce any dependency upon VTK. pythonocc has to be simple enough to compile.

Regards,

Thomas

2012/10/2 mblome notifications@github.com

Forgot to mention that the same comment above applies to "ExchangeSTL" and "ExchangeSTEP".

Also for me it is still unclear whether we should include "ExchangeVTK" (it itself depends on "OCC2VTK") in GEOM as this would introduce a dependency to VTK which otherwise wouldn't exist. Again, I haven't compiled ExchangeVTK yet.

— Reply to this email directly or view it on GitHubhttps://github.com/tpaviot/oce/issues/303#issuecomment-9071513.

tpaviot commented 12 years ago

Commit 1de45b2c2c0fc34d27ae61008cbaa0249c6c2215 adds missing headers. Compilation goes fine but there's still a linker issue:

ld: duplicate symbol _Export in CMakeFiles/GEOM.dir/src/ExchangeSTEP/ExchangeSTEP_Export.cpp.o and CMakeFiles/GEOM.dir/src/ExchangeIGES/ExchangeIGES_Export.cpp.o
collect2: ld returned 1 exit status
make[2]: *** [cmake-build/libGEOM.dylib] Error 1
make[1]: *** [CMakeFiles/GEOM.dir/all] Error 2
make: *** [all] Error 2

Actually EXPORT and IMPORT functions are defined in both STEP/IGES import/export code.

mblome commented 12 years ago

There is a strong dependency of SMESH V650 to VTK: Internal mesh data structures in SMESH are handled by VTK classes (some SMDS classes derive from VTK classes). Not sure starting from which version of SMESH this dependency was introduced, but I would judge it could be very difficult to remove SMESH VTK dependency...

Regards, Mark

tpaviot commented 12 years ago

Stupid me! I reported a pythonocc issue to the wrong tracker! Issue closed, sorry for the noise.

jf--- commented 12 years ago

Mark, sure VTK is perhaps a dependency, but that does not mean that its required to have VTK in the source tree. I just linked to VTK 5.10 that was already on my machine, and that works. See issue #87, missing VTK headers [ missing, missing, its not the same as on your machine ] I changed the include to /usr/local/include/vtk5.10 and that sidestepped the issue