JackLockedEngine.h: internal compiler error: in objc_eh_runtime_type, at objc/objc-next-runtime-abi-01.cc
Build is broken on PowerPC. Tested on 10.5.8 and 10.6, with gcc7 and gcc12.
during GIMPLE pass: eh
In file included from ../macosx/coreaudio/JackCoreAudioDriver.mm:29:
../common/JackLockedEngine.h: In member function 'int Jack::JackLockedEngine::PortRegister(int, const char*, const char*, unsigned int, unsigned int, jack_port_id_t*)':
../common/JackLockedEngine.h:196:13: internal compiler error: in objc_eh_runtime_type, at objc/objc-next-runtime-abi-01.cc:2795
196 | int PortRegister(int refnum, const char* name, const char *type, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port)
| ^~~~~~~~~~~~
Please submit a full bug report, with preprocessed source (by using -freport-bug).
See <https://trac.macports.org/newticket> for instructions.
../macosx/coremidi/JackCoreMidiInputPort.mm: In member function 'void Jack::JackCoreMidiInputPort::ProcessCoreMidi(const MIDIPacketList*)':
../macosx/coremidi/JackCoreMidiInputPort.mm:163:31: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare]
163 | if (chunkSize + 1 <= sizeof(running_status_buf)) {
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../macosx/coremidi/JackCoreMidiInputPort.mm:208:15: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
208 | if (k < size) goto parse_event;
| ~~^~~~~~
At global scope:
cc1objplus: note: unrecognized command-line option '-Wno-deprecated-register' may have been intended to silence earlier diagnostics
Waf: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_audio_jack/jack/work/jack2-1.9.22/build'
Build failed
-> task in 'coreaudio' failed with exit status 1:
{task 23367152: cxx JackCoreAudioDriver.mm -> JackCoreAudioDriver.mm.7.o}
['/opt/local/bin/g++-mp-12', '-pipe', '-Os', '-arch', 'ppc', '-Wall', '-Wno-invalid-offsetof', '-std=gnu++11', '-Wno-deprecated-register', '-fPIC', '-I.', '-I..', '-Icommon', '-I../common', '-Icommon/jack', '-I../common/jack', '-Imacosx', '-I../macosx', '-Iposix', '-I../posix', '-DAFTEN=1', '-DHAVE_DOXYGEN=0', '-DHAVE_ALSA=0', '-DHAVE_FIREWIRE=0', '-DHAVE_IIO=0', '-DHAVE_PORTAUDIO=0', '-DHAVE_WINMME=0', '-DHAVE_CELT=0', '-DHAVE_TESTS=0', '-DHAVE_OPUS=0', '-DHAVE_SAMPLERATE=1', '-DHAVE_SYSTEMD=0', '-DHAVE_DB=0', '-DHAVE_ALLOCA_H=1', '-DHAVE_EXECINFO_H=1', '-DUSE_CLASSIC_AUTOLAUNCH=1', '-DCLIENT_NUM=256', '-DPORT_NUM_FOR_CLIENT=2048', '-DADDON_DIR="/opt/local/lib/jack"', '-DJACK_LOCATION="/opt/local/bin"', '-DUSE_POSIX_SHM=1', '-DJACKMP=1', '-DHAVE_CONFIG_H', '-DSERVER_SIDE', '../macosx/coreaudio/JackCoreAudioDriver.mm', '-c', '-o/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_audio_jack/jack/work/jack2-1.9.22/build/macosx/coreaudio/JackCoreAudioDriver.mm.7.o', '-I/opt/local/include']
Command failed: cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_audio_jack/jack/work/jack2-1.9.22" && /opt/local/bin/python2.7 ./waf build --verbose
Exit code: 1
https://trac.macports.org/ticket/67794 The bug is not new: https://trac.macports.org/ticket/60420
an internal compiler error is not an issue in jack2 but in the compiler. not much we can do to fix this
@falkTX Thank you for responding. Yes, I understand ICE is not your bug, but maybe you could suggest a possible workaround? It it something not generally acceptable, we can have a local patch in Macports to use only with GCC.
Otherwise jack is broken, at least on PowerPC where no Clang works.
P. S. I need to check, but I recall GCC upstream is aware of the problem, but ObjC no one cares.
You can always try to disable optimizations, either globally or in that specific part of the code by use of __attribute__((optnone))
You can always try to disable optimizations, either globally or in that specific part of the code by use of
__attribute__((optnone))
I will try that, thank you. For GCC, apparently __attribute__((optimize(0))) is correct one: https://github.com/argtable/argtable3/commit/7704006f3cbb556e11da80a5b97469075a32892e
@falkTX Unfortunately, building the whole thing with -O0 (was easier to try and has the same effect as setting respective __attribute__, I assume) did not help, same ICE.
In the meanwhile, a couple of headers are missing in macosx files: https://github.com/jackaudio/jack2/pull/951
I have found a ticket on GCC Bugzilla, it is a bug in GCC for 32-bit targets:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61759 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107530
@alarixnia Could you say if jack2 builds via pkgsrc for Darwin ppc? If you know or could check.
@alarixnia Could you say if
jack2builds viapkgsrcfor Darwinppc? If you know or could check.
A dependency of it requires CMake and I don't have a compiler capable of building CMake for Darwin/ppc.
@alarixnia Could you say if
jack2builds viapkgsrcfor Darwinppc? If you know or could check.A dependency of it requires CMake and I don't have a compiler capable of building CMake for Darwin/ppc.
Unless that dependency is extremely picky, CMake 3.9.6 builds without C++11. Also, gcc7 and gcc10 build on 10.4.11. I think even gcc13 (though gcc13 requires C++11, so one must build gcc7 or gcc10 first).