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

JackLockedEngine.h: internal compiler error: in objc_eh_runtime_type, at objc/objc-next-runtime-abi-01.cc #950

Open
barracuda156 opened this issue Jul 28, 2023 · 9 comments
Labels

Comments

@barracuda156
Copy link

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

@falkTX
Copy link
Member

falkTX commented Jul 29, 2023

an internal compiler error is not an issue in jack2 but in the compiler. not much we can do to fix this

@barracuda156
Copy link
Author

@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.

@falkTX
Copy link
Member

falkTX commented Jul 30, 2023

You can always try to disable optimizations, either globally or in that specific part of the code by use of __attribute__((optnone))

@barracuda156
Copy link
Author

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: argtable/argtable3@7704006

@barracuda156
Copy link
Author

@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: #951

@barracuda156
Copy link
Author

barracuda156 commented Jul 30, 2023

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

@barracuda156
Copy link
Author

@alarixnia Could you say if jack2 builds via pkgsrc for Darwin ppc? If you know or could check.

@alarixnia
Copy link

@alarixnia Could you say if jack2 builds via pkgsrc for Darwin ppc? 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.

@barracuda156
Copy link
Author

barracuda156 commented May 10, 2024

@alarixnia Could you say if jack2 builds via pkgsrc for Darwin ppc? 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).

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

No branches or pull requests

3 participants