EmeraldLoc / sm_osx

sm_osx is a Super Mario 64 Pc Port Launcher for macOS
https://github.com/EmeraldLoc/sm_osx
GNU General Public License v3.0
7 stars 1 forks source link

Fails to link audio stuff when compiling sm64ex #20

Closed Kurtjwest closed 1 year ago

Kurtjwest commented 1 year ago

Whenever I attempt to build on my M2 Macbook Pro I encounter the same error:

gcc-12 -I../include -I. -Wall -Wextra -Wno-unused-parameter -pedantic -std=c99 -O2 -s -Iaudiofile -Wno-uninitialized sdk-tools/tabledesign/codebook.c sdk-tools/tabledesign/estimate.c sdk-tools/tabledesign/print.c sdk-tools/tabledesign/tabledesign.c -o tabledesign -lm -Laudiofile -laudiofile -lstdc++ -lm ld: warning: option -s is obsolete and being ignored ld: warning: ignoring file audiofile/libaudiofile.a, building for macOS-arm64 but attempting to link with file built for macOS-arm64 Undefined symbols for architecture arm64: "_afGetChannels", referenced from: _main in ccTwJNem.o "_afGetFrameCount", referenced from: _main in ccTwJNem.o "_afGetRate", referenced from: _main in ccTwJNem.o "_afGetSampleFormat", referenced from: _main in ccTwJNem.o "_afGetTrackIDs", referenced from: _main in ccTwJNem.o "_afOpenFile", referenced from: _main in ccTwJNem.o "_afReadFrames", referenced from: _main in ccTwJNem.o ld: symbol(s) not found for architecture arm64 collect2: error: ld returned 1 exit status gmake[1]: [Makefile:54: tabledesign] Error 1 gmake[1]: Leaving directory '/Users/kjw/sm64ex/tools' Makefile:270: Failed to build tools. Stop.

I have installed, updated, and reinstalled all of the relevant dependencies. The full compilation log can be viewed here: https://pastebin.com/PQMbZpna

OS: macOS 13.2.1 Xcode: 14.1 (14B47b)

EmeraldLoc commented 1 year ago

Sorry for the late reply, I dont recognize your issue, nor can I reproduce it, but, if you have macports installed, tell me and I can try to fix it if thats it. Otherwise make sure you have intel and arm homebrew installed (in sm_osx there should be no text referring to homebrew in the launcher page) You can also try to install the dependencies manually, etc run 'brew install glfw audiofile' (I include glfw because their is a issue inside sm_osx where it tries to install the no longer symlinked glfw3, it had glfw3 due to old issues), if that does not work, run 'brew --prefix' and tell me the output. The weirdest part about this issue is this: "building for macOS-arm64 but attempting to link with file built for macOS-arm64" Also, is that your full log? because I think there are things missing....

EmeraldLoc commented 1 year ago

Hold up, what the heck, why is it not in the SM64Repos directory, are you using sm_osx to compile the repo??!?

EmeraldLoc commented 1 year ago

You can try running '/usr/local/bin/brew uninstall libaudiofile', but I doubt thats the issue

Kurtjwest commented 1 year ago

Hold up, what the heck, why is it not in the SM64Repos directory, are you using sm_osx to compile the repo??!?

Sorry for the confusion, that log was when I tried to compile outside of sm_osx, but I was having the same issue when using sm_osx as well.

Kurtjwest commented 1 year ago

Hello I did what you asked and am still having the same issue. If it would help I can attach the log directly from sm_osx but it seems to be the exact same issue as from the log from my own compilation attempt.

EmeraldLoc commented 1 year ago

Yea, I would appreciate a lot directly from sm_osx that would help a lot

Kurtjwest commented 1 year ago

Ok here is the link to the log: https://pastebin.com/F1JftmLJ Thanks

EmeraldLoc commented 1 year ago

'gcc@11"

were on gcc 12, can you run in the command line

'brew install gcc'

if that does not fix it, run

'brew uninstall gcc@11'

EmeraldLoc commented 1 year ago

gcc-12 -I../include -I. -Wall -Wextra -Wno-unused-parameter -pedantic -std=c99 -O2 -s -Iaudiofile -Wno-uninitialized sdk-tools/tabledesign/codebook.c sdk-tools/tabledesign/estimate.c sdk-tools/tabledesign/print.c sdk-

At the first log, your using gcc-12, did you manipulate something?

Kurtjwest commented 1 year ago

Yea sorry I unlinked gcc for another project, I have relinked gcc-12. Here is the updated log file: https://pastebin.com/1m2Vhh0a As far as I am aware, the issue is the same

Kurtjwest commented 1 year ago

Ok somehow did not notice that I had binutils linked via brew. Unlinked and the issue resolved itself. Regardless, thanks for the help and the quick response time. You the man