tpaviot / smesh

An extension to oce, provides advanced meshing features
69 stars 24 forks source link

smesh 6.7 build issue #31

Closed hobbes1069 closed 7 years ago

hobbes1069 commented 8 years ago

I'm not sure what different between patched 6.5.3.1 and 6.6 but I get the following error when trying to build:

CMakeFiles/MeshBasicGeometries_test.dir/MeshBasicGeometries_test.cpp.o: In functionMeshBasicGeometriesSuite_testMeshBox_Test::TestBody()': /builddir/build/BUILD/smesh-6.6/test/MeshBasicGeometries_test/MeshBasicGeometries_test.cpp:28: undefined reference to StdMeshers_AutomaticLength::StdMeshers_AutomaticLength(int, int, SMESH_Gen*)' /builddir/build/BUILD/smesh-6.6/test/MeshBasicGeometries_test/MeshBasicGeometries_test.cpp:29: undefined reference toStdMeshers_TrianglePreference::StdMeshers_TrianglePreference(int, int, SMESHGen)' collect2: error: ld returned 1 exit status test/MeshBasicGeometries_test/CMakeFiles/MeshBasicGeometries_test.dir/build.make:132: recipe for target 'test/MeshBasicGeometries_test/MeshBasicGeometriestest' failed make[2]: Leaving directory '/builddir/build/BUILD/smesh-6.6/build' make[2]: ** [test/MeshBasicGeometries_test/MeshBasicGeometries_test] Error 1 `

tpaviot commented 8 years ago

@hobbes1069 I enabled smesh testing by default, maybe this causes a compilation failure. Maybe a missing lib.

tpaviot commented 8 years ago

@hobbes1069 Try to force smesh testing to false -DSMESH_TESTING=OFF

hobbes1069 commented 8 years ago

Disabling testing got a good build. What library linkage is missing?

jf--- commented 8 years ago

gtest is used to run the tests

tpaviot commented 8 years ago

@hobbes1069 I don't know exactly what happens on your machine, it's a specific linking issue that does not occur on travis osx and linux, or my mingw32 windows.

hobbes1069 commented 8 years ago

Not surprisingly I'm still seeing this in 6.7. Do you have a link handy for an automatic build I can use to compare build flags?

tpaviot commented 8 years ago

Thanks for your feedback @hobbes1069 What is your os/gcc version ? I did not test smesh build on linux/osx (I use to trust travis builds), I'll be back to work on August 15th, I'll try to see what's going on. I'll release an smesh 6.8 before september, I noticed another issue with oce-0.17 support.

hobbes1069 commented 8 years ago

Fedora 23 x86_64 $ gcc --version gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)

Haven't tried a Rawhide build yet, it's running GCC 6.

hobbes1069 commented 8 years ago

I think i have figured out part of the problem.

The test application STL2Mesh_test is being linked prior to libStdMeshers being created. I tried adding it as a required library for STL2Mesh_test in the macro:

--- a/test/STL2Mesh_test/CMakeLists.txt
+++ b/test/STL2Mesh_test/CMakeLists.txt
@@ -5,4 +5,4 @@ configure_file( ${CMAKE_CURRENT_SOURCE_D
 include_directories(${CMAKE_BINARY_DIR}/test_inc)

-add_smesh_test(STL2Mesh_test "SMESH")
+add_smesh_test(STL2Mesh_test "SMESH" StdMeshers)

But it didn't seem to get added to the linking line.

hobbes1069 commented 8 years ago

Helps if you understand how the parameters are passed to the macro :)

--- a/test/MeshBasicGeometries_test/CMakeLists.txt
+++ b/test/MeshBasicGeometries_test/CMakeLists.txt
@@ -1 +1 @@
-add_smesh_test(MeshBasicGeometries_test "TKPrim;SMESH")
+add_smesh_test(MeshBasicGeometries_test "TKPrim;SMESH;StdMeshers")
--- a/test/STL2Mesh_test/CMakeLists.txt
+++ b/test/STL2Mesh_test/CMakeLists.txt
@@ -5,4 +5,4 @@ configure_file( ${CMAKE_CURRENT_SOURCE_D
 include_directories(${CMAKE_BINARY_DIR}/test_inc)

-add_smesh_test(STL2Mesh_test "SMESH")
+add_smesh_test(STL2Mesh_test "SMESH;StdMeshers")

Now everything builds but one of the tests fail...

https://dl.dropboxusercontent.com/u/34775202/smesh-test.log

hobbes1069 commented 7 years ago

Ping... Any help with the build dependencies? Maybe I'm running into this because of parallel build (make -jX)?

tpaviot commented 7 years ago

@hobbes1069 please try latest 6.7.1 release https://github.com/tpaviot/smesh/releases/tag/6.7.1