Open halpz opened 2 years ago
i've made a PR with changes related to this
This works on my 2020 MacBook Air M1 (8gb) with Ventura 13.0.1. Thanks!
Hi folks, I'm working on a version that automatically detects arm64 vs Intel architecture and uses the right flag.
Were you folks able to build a recent version of the tester branch on the M1? I'm getting a lot of issues with miniaudio including Apple Frameworks and getting lost.
E.g.,
gcc-12 -c -O2 -I /opt/homebrew/include -I include -I build/us_pc -I build/us_pc/include -I src -I . -DDYNOS -DRAPI_GL=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -I`sdl2-config --prefix`/include -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DGIT_HASH="\"b86a6827\"" -DNON_MATCHING -DAVOID_UB -DOSX_BUILD -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DFS_BASEDIR="\"res\"" -o build/us_pc/levels/wmotr/geo.o levels/wmotr/geo.c
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudio.h:18,
from ./include/miniaudio.h:30305,
from data/r96/r96_miniaudio.h:7,
from data/dynos_audio.cpp:5:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:162:2: error: expected unqualified-id before '^' token
162 | (^AudioObjectPropertyListenerBlock)( UInt32 inNumberAddresses,
| ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:162:2: error: expected ')' before '^' token
162 | (^AudioObjectPropertyListenerBlock)( UInt32 inNumberAddresses,
| ~^
| )
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:400:41: error: 'AudioObjectPropertyListenerBlock' has not been declared
400 | AudioObjectPropertyListenerBlock inListener) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_7_0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:421:41: error: 'AudioObjectPropertyListenerBlock' has not been declared
421 | AudioObjectPropertyListenerBlock inListener) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_7_0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:804:2: error: expected unqualified-id before '^' token
804 | (^AudioDeviceIOBlock)( const AudioTimeStamp* inNow,
| ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:804:2: error: expected ')' before '^' token
804 | (^AudioDeviceIOBlock)( const AudioTimeStamp* inNow,
| ~^
| )
I can easily build this with clang, but then again it would be easier if I could build everything with the same compiler.
I've submitted a pull request with the changes needed to compile this on macOS: https://github.com/Render96/Render96ex/pull/74
@sofakng, I'm a few months late and not sure if something else broken the branch, but while I can compile the tester
branch on macOS (both Intel and M1 Apple Silicon), the application fails to start ("Can't start the container"). alpha
and tester_rt64alpha
are building and running fine. Can you check if the game is still building / working for you?
I'm on macOS Ventura 13.4.1, following the build instructions at https://github.com/flatmapthatshit/Render96ex_macOS#build-instructions btw.
I get an error in the tester branch as well:-
neil@Neils-Air Render96ex_macOS % gmake -j4
find: /opt/local/bin/gcc: No such file or directory
find: /opt/local/bin/gcc: No such file or directory
find: /opt/local/bin/gcc*: No such file or directory
gmake[1]: Entering directory '/Users/neil/Desktop/Render96ex_macOS/tools'
gcc-mp- -I../include -I. -Wall -Wextra -Wno-unused-parameter -pedantic -std=c99 -O2 -s aiff_extract_codebook.c -o aiff_extract_codebook -lm
gmake[1]: gcc-mp-: No such file or directory
gmake[1]: [Makefile:47: aiff_extract_codebook] Error 127
gmake[1]: Waiting for unfinished jobs....
gmake[2]: Entering directory '/Users/neil/Desktop/Render96ex_macOS/tools/audiofile'
g++-mp- -std=c++11 -DNDEBUG -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -O2 -I. -c audiofile.cpp
gmake[2]: g++-mp-: No such file or directory
gmake[2]: [Makefile:7: audiofile.o] Error 127
gmake[2]: Leaving directory '/Users/neil/Desktop/Render96ex_macOS/tools/audiofile'
gmake[1]: [Makefile:34: audiofile/libaudiofile.a] Error 2
gmake[1]: Leaving directory '/Users/neil/Desktop/Render96ex_macOS/tools'
Makefile:214: *** Failed to build tools. Stop.
I get an error in the tester branch as well:-.
Do you have the latest gcc version installed with homebrew + all dependencies (see Step 4 from my guide above)? I got the tester
branch to compile, but the application errors out during initialisation. The other two branches that I've mentioned are working fine for me.
I get an error in the tester branch as well:-.
Also, drop the -j4
for now as they haven't merged my fix to parallel builds to all branches (#84).
how are you supposed to do the tester rt64? i tried with render api rt64 but it is only supported on windows. i used only gmake -j4 and it worked but no raytracing.
I spent a long time trying to figure out how to build this on my M1 computer, I found a fix, in the makefile there is this section:
on M1, the homebrew folder is /opt/homebrew/ so if you change this to:
it will now build using gmake
not sure if there is a way to edit the makefile to set the cflags to the brew prefix rather than setting it explicitly