fangq / iso2mesh

Iso2Mesh - a 3D surface and volumetric mesh generator for MATLAB/Octave
http://iso2mesh.sf.net
Other
183 stars 73 forks source link

compatibility with CGAL 6.0 #79

Closed sloriot closed 3 months ago

fangq commented 4 months ago

@sloriot, thanks for the patch - can you add macros to allow this patched code to be also compiled with older versions of CGAL? I will be happy to test if you add those.

sloriot commented 4 months ago

What is the minimal version of CGAL you want to be compatible with?

sloriot commented 4 months ago

WIth the patches, it will be compatible with CGAL 5.4, CGAL 5.5, CGAL 5.6 and the upcoming CGAL 6.0. We can get more but we would need to modify the CMakeLists.txt.

fangq commented 4 months ago

@sloriot, thanks again for the patch - I tested this on Ubuntu 20.04, the cmake command failed with the following error:

if test -f cgalmesh/CMakeLists.txt; then cd cgalmesh && cmake . && cd ..; fi
-- Using header-only CGAL
-- Targetting Unix Makefiles
-- Using /usr/bin/c++ compiler.
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.48")  
-- Boost include dirs: /usr/include
-- Boost libraries:    
-- Using gcc version 4 or later. Adding -frounding-math
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0")  
CMake Error at CMakeLists.txt:45 (include):
  include could not find load file:

    CGAL_TBB_support

CMake Warning at /usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_enable_end_of_configuration_hook.cmake:99 (message):
  =======================================================================

  CGAL performance notice:

  The variable CMAKE_BUILD_TYPE is set to "".  For performance reasons, you
  should set CMAKE_BUILD_TYPE to "Release".

  Set CGAL_DO_NOT_WARN_ABOUT_CMAKE_BUILD_TYPE to TRUE if you want to disable
  this warning.

  =======================================================================
Call Stack (most recent call first):
  CMakeLists.txt:9999 (CGAL_run_at_the_end_of_configuration)

it appears that this is related to the newly required CGAL_TBB_support file. would it be possible to add support to Ubuntu 20.04 (with libcgal-dev 5.0.3)?

sloriot commented 3 months ago

@fangq I tested locally with CGAL 5.0 and it works now. Please give it another try.

fangq commented 3 months ago

@sloriot, thanks a lot for polishing this patch.

after updating with your latest commit, I was able to build cgalmesh on my Ubuntu 20.04 boxes, but now the build gave the following error when building cgalsimp2. I tested the original makefile on 20.04 and it builds cgalsimp2 correctly.

are you able to reproduce this error?

if test -f cgalsimp2/CMakeLists.txt; then cd cgalsimp2 && cmake . && cd ..; fi
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
CMake Error: Generator: execution of make failed. Make command was: /usr/bin/gmake cmTC_94bd2/fast && 
-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler

    "/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/users/fangq/space/git/Temp/iso2mesh/tools/cgalsimp2/CMakeFiles/CMakeTmp

    Run Build Command(s):/usr/bin/gmake cmTC_94bd2/fast && No such file or directory
    Generator: execution of make failed. Make command was: /usr/bin/gmake cmTC_94bd2/fast && 

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:4 (project)

-- Configuring incomplete, errors occurred!
fangq commented 3 months ago

I have merged this patch. thanks for contributing!

the Ubuntu 20.04 compilation issue seems to be related to make/cmake instead of cgal. I was able to build everything on an Ubuntu 22.04 box with cgal 5.4. I will troubleshoot the 20.04 error at a later time.

lrineau commented 1 month ago

Hi @fangq, there has not been any new version of iso2mesh for a long time, and the changes since then is a bit more than cosmetic: https://github.com/fangq/iso2mesh/compare/v1.9.6...master?w=1#files_bucket

I see that you are also maintainer of the Fedora package, that is FTBFS since CGAL-6.0 was introduced in Rawhide (bug created from Koschei).

And iso2mesh is also marked for removal from Debian testing for the same reason (FTBFS): https://tracker.debian.org/pkg/octave-iso2mesh.

Should not you publish a new release to fix those issues?

fangq commented 1 month ago

@lrineau, thanks for the message - yes, I agree that creating a new release will be of high priority to include these fixes.

let me work on the documentation update now.