-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiling Embree with MinGW (windows platform) #279
Comments
FYI embree-aarch64 started to support compiling Embree with llvm-mingw: MinGW gcc compiles OK, but it seg faults at runtime(due to memory alignment issue) https://github.com/lighttransport/embree-aarch64/blob/master/scripts/bootstrap-mingw-cross.sh |
I can't build embree with mingw... embree3/3.12.0: Applying build-requirement: mingw-w64/8.1
-- Build files have been written to: E:/conan_new/embree3/3.12.0///build/15347b79d2fd32ede87f10f5f235e5a5c6d52d6a/build_subfolder |
For the record, we're building Embree with MinGW successfully in Godot Engine. We're not using the CMake buildsystem though as we reimplement just the minimal stuff we need in our own SCons buildsystem: https://github.com/godotengine/godot/blob/master/modules/raycast/SCsub There used to be crash issues but they have been ironed out in recent releases. @AndreyMlashkin's issue seems to be that the CMake buildsystem still detects the configuration as being MSVC, so it tries to apply MSVC build flags instead of GCC/Clang-compatible ones. You might have better luck with a MinGW+LLVM distribution as there seems to be some code to handle it: But GCC isn't handled indeed (though it works well when not using CMake, but that's not a recommended workflow and a proper solution to this issue). |
@akien-mga Awesome! Nice work! |
Ah actually I forgot to mention/check, we do have some downstream patches: https://github.com/godotengine/godot/tree/master/thirdparty/embree/patches Including one which does fix MinGW-related crashes IIRC: https://github.com/godotengine/godot/blob/master/thirdparty/embree/patches/godot-changes-misc.patch Would be happy to work on upstreaming the non Godot-specific fixes if there's interest. |
OS: Windows 10 Problem: [ 0%] Building CXX object common/sys/CMakeFiles/sys.dir/sysinfo.cpp.obj
g++.exe: error: /D__SSE__: No such file or directory
g++.exe: error: /D__SSE2__: No such file or directory
g++.exe: error: /D__SSE3__: No such file or directory
g++.exe: error: /D__SSSE3__: No such file or directory
g++.exe: error: /D__SSE4_1__: No such file or directory
g++.exe: error: /D__SSE4_2__: No such file or directory
g++.exe: error: /arch:AVX: No such file or directory
mingw32-make[2]: *** [common\sys\CMakeFiles\sys.dir\build.make:82: common/sys/CMakeFiles/sys.dir/sysinfo.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:268: common/sys/CMakeFiles/sys.dir/all] Error 2
mingw32-make: *** [Makefile:171: all] Error 2 |
Has anyone compiled embree with MinGW?
The text was updated successfully, but these errors were encountered: