ctlee / gamer

Geometry-preserving Adaptive Mesher
https://gamer.readthedocs.io
Other
32 stars 10 forks source link

MacOS 13 #60

Closed dupaysjm closed 1 year ago

dupaysjm commented 1 year ago

Hello,

I menaged under macOS 12 (Command Line Tools for Xcode 13) to install libGAMer but I have the following error on macOS 13 INTEL or M2 (Command Line Tools for Xcode 15). The other components are the strictly the same on all the platforms (python=3.9.1, gcc-13, ...).

$ cmake -DBUILD_PYTHONEXT=on .. -- Setting build type to 'Release' as none was specified. -- The C compiler identification is GNU 13.2.0 -- The CXX compiler identification is GNU 13.2.0 -- Checking whether C compiler has -isysroot -- Checking whether C compiler has -isysroot - yes -- Checking whether C compiler supports OSX deployment target flag -- Checking whether C compiler supports OSX deployment target flag - yes -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /opt/homebrew/bin/gcc-13 - skipped -- Detecting C compile features -- Detecting C compile features - done -- Checking whether CXX compiler has -isysroot -- Checking whether CXX compiler has -isysroot - yes -- Checking whether CXX compiler supports OSX deployment target flag -- Checking whether CXX compiler supports OSX deployment target flag - yes -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /opt/homebrew/bin/g++-13 - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- GAMer version: v2.0.7-2-g726de48 -- Found Git: /usr/bin/git (found version "2.39.3 (Apple Git-145)") -- casc v1.0.5 -- Configuring done (15.4s) -- Generating done (0.0s) CMake Warning: Manually-specified variables were not used by the project:

BUILD_PYTHONEXT

-- Build files have been written to: ...

$ cmake --build . --config Release [ 6%] Building CXX object libraries/tetgen/CMakeFiles/tet_objlib.dir/tetgen.cxx.o [ 12%] Building CXX object libraries/tetgen/CMakeFiles/tet_objlib.dir/predicates.cxx.o [ 12%] Built target tet_objlib [ 18%] Linking CXX static library ../../lib/libtetstatic.a [ 18%] Built target tetstatic [ 25%] Building CXX object CMakeFiles/gamer_objlib.dir/src/CurvatureCalcs.cpp.o [ 31%] Building CXX object CMakeFiles/gamer_objlib.dir/src/OBJ_SurfaceMesh.cpp.o [ 37%] Building CXX object CMakeFiles/gamer_objlib.dir/src/OFF_SurfaceMesh.cpp.o [ 43%] Building CXX object CMakeFiles/gamer_objlib.dir/src/PDBReader.cpp.o [ 50%] Building CXX object CMakeFiles/gamer_objlib.dir/src/SurfaceMesh.cpp.o [ 56%] Building CXX object CMakeFiles/gamer_objlib.dir/src/SurfaceMeshDetail.cpp.o [ 62%] Building CXX object CMakeFiles/gamer_objlib.dir/src/TetMesh.cpp.o [ 68%] Building CXX object CMakeFiles/gamer_objlib.dir/src/Vertex.cpp.o [ 75%] Building CXX object CMakeFiles/gamer_objlib.dir/src/comsol_io.cpp.o [ 81%] Building CXX object CMakeFiles/gamer_objlib.dir/src/pdb2mesh.cpp.o [ 87%] Building CXX object CMakeFiles/gamer_objlib.dir/version.cpp.o [ 87%] Built target gamer_objlib [ 93%] Linking CXX shared library lib/libgamer.dylib ld: warning: ignoring duplicate libraries: '-lgcc' 0 0x104f8f648 __assert_rtn + 72 1 0x104ec3fac ld::AtomPlacement::findAtom(unsigned char, unsigned long long, ld::AtomPlacement::AtomLoc const&, long long&) const + 1204 2 0x104ed9924 ld::InputFiles::SliceParser::parseObjectFile(mach_o::Header const) const + 15164 3 0x104ee6e30 ld::InputFiles::parseAllFiles(void (ld::AtomFile const*) block_pointer)::$_7::operator()(unsigned long, ld::FileInfo const&) const + 420 4 0x1946a4440 _dispatch_client_callout2 + 20 5 0x1946b7f1c _dispatch_apply_invoke + 224 6 0x1946a4400 _dispatch_client_callout + 20 7 0x1946b5fb8 _dispatch_root_queue_drain + 684 8 0x1946b66c0 _dispatch_worker_thread2 + 164 9 0x194850038 _pthread_wqthread + 228 ld: Assertion failed: (resultIndex < sectData.atoms.size()), function findAtom, file Relocations.cpp, line 1336. collect2: error: ld returned 1 exit status make[2]: [lib/libgamer.dylib] Error 1 make[1]: [CMakeFiles/gamershared.dir/all] Error 2 make: *** [all] Error 2

ctlee commented 1 year ago

Thanks for your interest. I'm not sure that this error is related to GAMer. The error's are coming from another namespace. I found the following thread with similar error message on apple developer forums: https://developer.apple.com/forums/thread/737707

Xcode 15 has a new linker implementation which may be causing issues. They suggest a temporary fix is to downgrade your Xcode version.

I'm going to close this issue for now as it appears to be unrelated to this code base. Please feel free to reopen if I'm mistaken.