Open barracuda156 opened 1 year ago
Ok, one thing is wrong is this:
ifeq ($(LD),ld)
LD = $(CC)
endif
When changed to CXX
, linking is fixed. However libm symbols are not recognized still.
That is MacPorts, so should probably be reported there.
Building for PPC without MacPorts is working fine for me using the official Apple toolchain.
You're right that using g++ for linking would be better, though. I'll change that for the next release. But it's not causing issues when using the native toolchain.
But it's not causing issues when using the native toolchain.
This is true, but I cannot get around config.cpp: error: ‘kAudioFormatMPEG4AAC_ELD’ is not a member of ‘CA’
.
(It also shows up with gcc12 eventually, once linking is fixed.)
so should probably be reported there
I did: https://trac.macports.org/ticket/67399
But I actually wanna update the port, and for that I need it fixed on my system to begin with (I test ppc locally, buildbots will tests x86+clang). Any idea what that may fail? I can modify the portfile following your suggestions to have it fixed.
kAudioFormatMPEG4AAC_ELD
is defined in dllinterface.h, line 29 when building for Leopard or earlier.
You earlier error output contains PPCSnowLeopardPorts
, so you're probably trying to build for Snow Leopard and have MAC_OS_X_VERSION_10_6
defined. I assume changing the target to Leopard would fix that issue. As Snow Leopard was never released for PPC, any builds should target Leopard. I don't have experience with MacPorts, though, so I'm not sure how to change that.
I guess you can fix the other linker issues by setting LD=g++
in the portfile if necessary.
But I have no idea what causes the compile issues with standard C headers on GCC 12, so cannot help you with that one. Do you need it to build with GCC 12 for PPC?
kAudioFormatMPEG4AAC_ELD
is defined in dllinterface.h, line 29 when building for Leopard or earlier.
Thank you!
You earlier error output contains
PPCSnowLeopardPorts
, so you're probably trying to build for Snow Leopard and haveMAC_OS_X_VERSION_10_6
defined. I assume changing the target to Leopard would fix that issue. As Snow Leopard was never released for PPC, any builds should target Leopard. I don't have experience with MacPorts, though, so I'm not sure how to change that.
Mostly everything ppc (32-bit) builds fine against 10.6 SDK, but yeah, we had a few cases where 10.5 (or even 10.4) SDK was a must. Easy to try, Macports implements this.
I guess you can fix the other linker issues by setting
LD=g++
in the portfile if necessary.
(Initially I wanted to make a PR to fix that in Makefile-options
, but GitHub is weird today, I could not clone the repo, it kept freezing in the process. We can patch it, until fixed in the next release.)
But I have no idea what causes the compile issues with standard C headers on GCC 12, so cannot help you with that one. Do you need it to build with GCC 12 for PPC?
No, gcc-4.2
is the default, unless a port requires C11/C++11 or higher (or if gcc-4.2
fails to build it – I went to try gcc-12
after gcc-4.2
failed).
With commit 199375d $(CXX)
is now used for linking instead of $(CC)
.
With commit 199375d
$(CXX)
is now used for linking instead of$(CC)
.
@enzo1982 Thank you! I opened a PR which together with your commit fixes the PPC build.
With gcc-4.2 (both natively and in Rosetta):
With gcc-12 it fails differently (this is native):
This is Rosetta: