libigl / libigl

Simple MPL-2.0-licensed C++ geometry processing library.
http://libigl.github.io/libigl/
GNU General Public License v3.0
4.6k stars 1.14k forks source link

Segmentation fault when building on windows? #1443

Closed lukkio88 closed 1 year ago

lukkio88 commented 4 years ago

Hi,

I'm trying to build libigl in windows 10 and Visual Studio 2015. From the libigl root folder I simply run

mkdir build && cd build
cmake ../ -G "Visual Studio 14 2015 Win64"

The output I get is:

-- Selecting Windows SDK version  to target Windows 10.0.15063.
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- MSVC -> forcing use of statically-linked runtime.
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Creating target: igl::core (igl)
-- Creating target: igl::comiso (igl_comiso)
-- Found Git: C:/Program Files/Git/mingw64/bin/git.exe (found version "2.25.1.windows.1")
CMake Warning (dev) at external/embree/common/cmake/test.cmake:31 (SET):
  implicitly converting 'INT' to 'STRING' type.
Call Stack (most recent call first):
  external/embree/CMakeLists.txt:101 (INCLUDE)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Creating target: igl::embree (igl_embree)
-- Creating target: igl::opengl (igl_opengl)
-- Found OpenGL: opengl32
-- Creating target: igl::opengl_glfw (igl_opengl_glfw)
-- Using Win32 for window creation
-- Creating target: igl::opengl_glfw_imgui (igl_opengl_glfw_imgui)
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Failed
-- Performing Test COMPILER_HAS_DEPRECATED
-- Performing Test COMPILER_HAS_DEPRECATED - Success
-- Creating target: igl::png (igl_png)
-- Creating target: igl::tetgen (igl_tetgen)
-- Creating target: igl::triangle (igl_triangle)
-- Creating target: igl::predicates (igl_predicates)
-- Creating target: igl::xml (igl_xml)
-- Found PythonInterp: C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python36_64/python.exe (found suitable version "3.6.6", minimum required is "3.4")
-- Found PythonLibs: C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python36_64/libs/python36.lib (found suitable version "3.6.6", minimum required is "3.4")
-- Found PythonInterp: C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python36_64/python.exe (found version "3.6.6")
-- Found PythonLibs: C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python36_64/libs/Python36.lib
-- pybind11 v2.3.dev0
-- Performing Test HAS_MSVC_GL_LTCG
-- Performing Test HAS_MSVC_GL_LTCG - Success
-- LTO enabled
-- Configuring done
Segmentation fault

Any clue on why I'm getting a segmentation fault? I've also tried Visual Studio 2017, the result is the same. ...

Check all that apply (change to [x])

See https://libigl.github.io/CONTRIBUTING/#bugreport for more tips.

jdumas commented 4 years ago

Hi, please try the latest dev branch and let us know if the problem still persists.

lukkio88 commented 4 years ago

Just tried, same error. Can you help?

jdumas commented 4 years ago

Seems that you are trying to run CMake through mingw or smth like that. Please try to generate a VS project via CMake GUI instead (and compile normally through Visual Studio).

lukkio88 commented 4 years ago

I can't see why it would be different but I'll give it a go

lukkio88 commented 4 years ago

That didn't work either. However I was using cmake 3.17, downgrading to the previous release worked instead. (cmake 3.16).

jdumas commented 4 years ago

CMake 3.17 is not a stable release yet. I would wait until they release a stable version and double-check again if the compilation is still failing.

alecjacobson commented 1 year ago

Closing due to inactivity, please feel free to reopen if needed.