gptoolbox icon indicating copy to clipboard operation
gptoolbox copied to clipboard

Compilation of mesh_boolean, issues with CGAL

Open vmonkey opened this issue 7 years ago • 2 comments

Hello,

I am struggling with compilation of the mesh_boolean mex function (on Linux), and thus ask for a kind help. I have already found that I need to set LIBIGL_WITH_CORK in ./gptoolbox/mex/CMakeLists.txt to ON. Regarding CGAL compilation: Without any changes into CGAL or gptoolbox files, I receive an error ... can not be used when making a shared object; recompile with -fPIC. Thus, I tried to recompile CGAL with this flag by putting -DCMAKE_POSITION_INDEPENDENT=ON into CMAKE_ARGS of the ./libigl/external/CMakeLists.txt. Although the compliation went fine then, Matlab showed an error indicating that the resulting mex file is not valid.

Do you have any suggestions? What is the proper way to build the mesh_boolean and other CGAL-dependent functions?

Thanks for help.

Marek

vmonkey avatar Jul 12 '18 09:07 vmonkey

What's your OS and compiler setup?

You shouldn't have to set LIBIGL_WITH_CORK to ON. If it's OFF it should just have fewer features.

The CGAL thing sounds familiar but it doesn't happen to me on Mac.

alecjacobson avatar Jul 12 '18 13:07 alecjacobson

Thanks for the answer. It is really weird, but after starting from scratch it suddenly worked. Previously, I had a problem that even if CGAL was compiled the cmake command in ./gptoolbox/mex/build folder avoided building of mesh_boolean at all, that's why I used LIBIGL_WITH_CORK option enforcing building of mesh_boolean. Sorry for creating this issue, I think it can be closed.

vmonkey avatar Jul 13 '18 11:07 vmonkey