Open jay20162016 opened 3 years ago
There are still some issues with the macOS build for sure. I need to look into it because the scripts haven't been fully working for quite a while so I have no idea if manual compiling works anymore. I wonder if it would work to just specify clang++
rather than just clang
.
it seems like clang++ produces a lot of errors, too.
It seems like
$ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -I/usr/local/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/MarbleMarcher.dir/src/Main.cpp.o -o MarbleMarcher src/libMarbleMarcherSources.a -framework OpenGL -framework OpenGL -lAntTweakBar -lsfml-system -lsfml-window -lsfml-graphics -lsfml-audio -L/usr/local/lib -v -lGLEW
works in version 1.4.4, not sure how to incorporate it into your script. Thanks!
I'll have to look at it deeper after my exams are done. I am a lot more experienced with C++ now than I was when I wrote the script so I realise that I did quite a few things incorrectly which is properly part of the source of the problems.
Now i seem to be getting segfaults when I open the app.
Oh, I use radeon, and I'm getting compute Shader compilation errors. Maybe that's the reason.
Depends how old/what your Radeon GPU is; I use a Radeon RX 590 in Marble Marcher, so it does work on AMD GPUs that are new enough. (see the troubleshooting section) However the MacOS build has been broken for a while, so it probably isn't due to your GPU.
In 1.4.4, this works:
118 )
119 elseif(UNIX)
120 target_link_libraries(MarbleMarcher
121 MarbleMarcherSources
122 ${OPENGL_LIBRARIES}
123 libAntTweakBar.so
124 ${GLEW_LIBRARIES}
125 #stdc++fs #COMMENT HERE!!!
126 libsfml-system.so
127 libsfml-window.so
128 libsfml-graphics.so
129 libsfml-audio.so
130 )
131 install(TARGETS MarbleMarcher
change line 125 ^^ and then cmake -DCMAKE_CXX_FLAGS="-I/usr/local/include -L/usr/local/lib -lGLEW" instead of cmake -DCMAKE_CXX_FLAGS="-I/usr/local/include"
mainly due to the fact that stdc++fs is included in macos standard library already
There is probably some way to check if it is macOS specifically and only remove it in that case
It seems to be a OpenGL version issue, as mac's latest version of OpenGL doesn't support compute shaders. I'll try to find a alternative.
Currently, I'm trying MoltenGL, but I'm getting a few errors.
After removing -lstdc++fs
, it does build for me inside a Nix derivation on aarch64-darwin.
Building for Mac OS doesn't seem to work. On running the linker (the cause of the error), it gives me a error as follows: