Closed darkoverlordofdata closed 3 years ago
The ABI is picked by the -fobjc-runtime=
flag. If you do -fobjc-runtime=gnustep-1.{x}
then you get the 1.x ABI, if you do -fobjc-runtime=gnustep-2.0
then you get the 2.0 ABI. I believe clang 7 is too old to support the 2.0 ABI (it might be the first version to support it?). This looks as if you are using some things compiled with gcc and trying to mix them with things compiled with a newer ABI. This is not supported.
I think the problem was clang7. I found https://github.com/plaurent/gnustep-build, which had some build scripts. There was one for ubuntu 19.04 - I have ubuntu 18.04, so I tried it. But it looks like the big difference is that it installs clang8. Noe everything works correctly.
Agreed - you need to fix the documentation. The reason I was using 7 was this statement in the readme: The modern (v2) ABI, which provides richer reflection metadata, smaller binaries and reduced memory usage. This is selected with the -fobjc-runtime=gnustep-2.0 flag in Clang 7.0 or later.
Clang 7 does support the new ABI, and I think the 7.0.1 release fixes the bug that caused the GNUstep configure scripts to think that it didn't. Your issue was caused by compiling and linking GNUstep against GCC libobjc, and then compiling your code against this runtime. As the documentation says, the v2 ABI is not backwards compatible, you cannot (dynamically or statically) link things that use the two ABIs together and expect them to work. The error message reports this.
I'm glad that's clear to someone. To be honest, documentation on gnustep is so obfuscated and hard to find that I've given up on it.
On Fri, Apr 2, 2021 at 9:45 AM David Chisnall @.***> wrote:
Clang 7 does support the new ABI, and I think the 7.0.1 release fixes the bug that caused the GNUstep configure scripts to think that it didn't. Your issue was caused by compiling and linking GNUstep against GCC libobjc, and then compiling your code against this runtime. As the documentation says, the v2 ABI is not backwards compatible, you cannot (dynamically or statically) link things that use the two ABIs together and expect them to work. The error message reports this.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gnustep/libobjc2/issues/196#issuecomment-812610463, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJUE4UHF77PVR55QJKOGZTTGXYEJANCNFSM4YM6HVGQ .
--
Bruce Davidson
Using ubuntu 18.04.2 & clang version 7.0.0-3 After installing gnustep & gnustep-devel, I build and installed libobjc2. When I try to run my helloworld, which compiles and runs on FreeBSD, I get a runtime error:
There was a warning in the build that seems related:
I find these files which seem conflicting:
How do I resolve this?