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

Fail build on macOS #122

Open
naymapl opened this issue Mar 1, 2022 · 3 comments
Open

Fail build on macOS #122

naymapl opened this issue Mar 1, 2022 · 3 comments

Comments

@naymapl
Copy link

naymapl commented Mar 1, 2022

Hi.
I try to build it on macOS but always have issue ith missing file AL/al.h. I install openal-soft via brew and never had any problems with openal with others github builds.

[ 70%] Building CXX object src/game/CMakeFiles/dustrac-game.dir/__/common/tracktilebase.cpp.o
[ 71%] Building CXX object src/game/CMakeFiles/dustrac-game.dir/__/common/mapbase.cpp.o
In file included from /Users/nayma.plrmbp/DustRacing2D/build/src/game/dustrac-game_autogen/mocs_compilation.cpp:4:
In file included from /Users/nayma.plrmbp/DustRacing2D/build/src/game/dustrac-game_autogen/PZONOMFGYT/moc_audioworker.cpp:10:
In file included from /Users/nayma.plrmbp/DustRacing2D/build/src/game/dustrac-game_autogen/PZONOMFGYT/../../../../../src/game/audio/audioworker.hpp:24:
/Users/nayma.plrmbp/DustRacing2D/src/game/audio/openaldevice.hpp:21:10: fatal error: 'AL/al.h' file not found
#include <AL/al.h>
         ^~~~~~~~~
In file included from /Users/nayma.plrmbp/DustRacing2D/src/game/game.cpp:21:
In file included from /Users/nayma.plrmbp/DustRacing2D/src/game/audio/audioworker.hpp:24:
/Users/nayma.plrmbp/DustRacing2D/src/game/audio/openaldevice.hpp:21:10: fatal error: 'AL/al.h' file not found
#include <AL/al.h>
         ^~~~~~~~~
[ 71%] Building CXX object src/game/CMakeFiles/dustrac-game.dir/audio/audioworker.cpp.o
[ 71%] Building CXX object src/game/CMakeFiles/dustrac-game.dir/audio/audiosource.cpp.o
[ 72%] Building CXX object src/game/CMakeFiles/dustrac-game.dir/audio/openaldata.cpp.o
In file included from /Users/nayma.plrmbp/DustRacing2D/src/game/audio/openaldata.cpp:16:
/Users/nayma.plrmbp/DustRacing2D/src/game/audio/openaldata.hpp:19:10: fatal error: 'AL/al.h' file not found
#include <AL/al.h>
         ^~~~~~~~~
In file included from /Users/nayma.plrmbp/DustRacing2D/src/game/scene.cpp:19:
In file included from /Users/nayma.plrmbp/DustRacing2D/src/game/audio/audioworker.hpp:24:
/Users/nayma.plrmbp/DustRacing2D/src/game/audio/openaldevice.hpp:21:10: fatal error: 'AL/al.h' file not found
#include <AL/al.h>
         ^~~~~~~~~
1 error generated.
make[2]: *** [src/game/CMakeFiles/dustrac-game.dir/dustrac-game_autogen/mocs_compilation.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 error generated.
make[2]: *** [src/game/CMakeFiles/dustrac-game.dir/game.cpp.o] Error 1
1 error generated.
make[2]: *** [src/game/CMakeFiles/dustrac-game.dir/audio/openaldata.cpp.o] Error 1
1 error generated.
make[2]: *** [src/game/CMakeFiles/dustrac-game.dir/scene.cpp.o] Error 1
In file included from /Users/nayma.plrmbp/DustRacing2D/src/game/audio/audioworker.cpp:16:
In file included from /Users/nayma.plrmbp/DustRacing2D/src/game/audio/audioworker.hpp:24:
/Users/nayma.plrmbp/DustRacing2D/src/game/audio/openaldevice.hpp:21:10: fatal error: 'AL/al.h' file not found
#include <AL/al.h>
         ^~~~~~~~~
1 error generated.
make[2]: *** [src/game/CMakeFiles/dustrac-game.dir/audio/audioworker.cpp.o] Error 1
make[1]: *** [src/game/CMakeFiles/dustrac-game.dir/all] Error 2
make: *** [all] Error 2
@juzzlin
Copy link
Owner

juzzlin commented Mar 1, 2022

I don't own Apple's machines so the macOS build has never been tested or guaranteed to work. It would probably need some fine tuning.

@naymapl
Copy link
Author

naymapl commented Mar 2, 2022

@juzzlin ok - thank you for answer. Is it any way to try fix this issue ? I got info if that is just missing OpenAL headers. I think is issue with this: AL/al.h file.

@usakhelo
Copy link

usakhelo commented Nov 11, 2022

The game builds fine on Mac M1:

  • Installed qt5, libvorbis, libogg, openal-soft with brew
  • mkdir build && cd build
  • cmake -DCMAKE_PREFIX_PATH="/opt/homebrew/Cellar/qt@5/5.15.6/lib/cmake" -DCMAKE_CXX_FLAGS="-I/opt/homebrew/Cellar/libogg/1.3.5/include -I/opt/homebrew/opt/openal-soft/include -I/opt/homebrew/Cellar/libvorbis/1.3.7/include" ..
  • I built Debug version and had to manually copy DustRacing2D/data folder to DustRacing2D/build/Debug

Optionally can be built for Xcode (for debugging): cmake -G Xcode and all the above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants