Skip to content
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

Trying to build for Apple Silicon using Clang 16. #544

Open
ntrischi opened this issue Dec 1, 2024 · 1 comment
Open

Trying to build for Apple Silicon using Clang 16. #544

ntrischi opened this issue Dec 1, 2024 · 1 comment
Labels
building issue related to compiling or packaging the game

Comments

@ntrischi
Copy link

ntrischi commented Dec 1, 2024

Attempting to build with Apple clang version 16.0.0 (clang-1600.0.26.4) on Apple silicon: arm64-apple-darwin24.1.0. Any ideas to resolve include errors.

[ 80%] Building C object CMakeFiles/pd.dir/port/src/utils.c.o
[ 81%] Building C object CMakeFiles/pd.dir/port/src/video.c.o
1 warning generated.
[ 81%] Building CXX object CMakeFiles/pd.dir/port/fast3d/gfx_cc.cpp.o
[ 81%] Building CXX object CMakeFiles/pd.dir/port/fast3d/gfx_opengl.cpp.o
In file included from /Users/ntrischi/Downloads/perfect_dark/port/fast3d/gfx_cc.cpp:1:
/Users/ntrischi/Downloads/perfect_dark/port/fast3d/gfx_cc.h:8:10: fatal error: 'compare' file not found
    8 | #include <compare>
      |          ^~~~~~~~~
1 error generated.
make[2]: [ 81%] Building CXX object CMakeFiles/pd.dir/port/fast3d/gfx_sdl2.cpp.o
*** [CMakeFiles/pd.dir/port/fast3d/gfx_cc.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 81%] Building CXX object CMakeFiles/pd.dir/port/fast3d/gfx_pc.cpp.o
/Users/ntrischi/Downloads/perfect_dark/port/fast3d/gfx_pc.cpp:3:10: fatal error: 'cmath' file not found
    3 | #include <cmath>
      |          ^~~~~~~
/Users/ntrischi/Downloads/perfect_dark/port/fast3d/gfx_opengl.cpp:6:10: fatal error: 'map' file not found
    6 | #include <map>
      |          ^~~~~
1 error generated.
make[2]: *** [CMakeFiles/pd.dir/port/fast3d/gfx_pc.cpp.o] Error 1
1 error generated.
make[2]: *** [CMakeFiles/pd.dir/port/fast3d/gfx_opengl.cpp.o] Error 1
make[1]: *** [CMakeFiles/pd.dir/all] Error 2
make: *** [all] Error 2

@fgsfdsfgs
Copy link
Owner

fgsfdsfgs commented Dec 1, 2024

fatal error: 'cmath' file not found

This seems to imply your compiler is horribly misconfigured. Not sure how you would fix this, as I'm not well educated on building things on OSX.
In addition is there any reason why you're building with actual Clang instead of using the gcc packages provided in Homebrew?

@fgsfdsfgs fgsfdsfgs added the building issue related to compiling or packaging the game label Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building issue related to compiling or packaging the game
Projects
None yet
Development

No branches or pull requests

2 participants