Success Clang ABI 2.2!

For test results, bug reports, announcements of new builds etc.

Moderators: another_commander, winston, Getafix

Post Reply
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 724
Joined: Sun Jun 20, 2010 6:00 pm

Success Clang ABI 2.2!

Post by mcarans »

When building Oolite under GNUStep 2.2 Clang, I get one linker error. I have made an issue against GNUStep libobjc2 to ask about it: https://github.com/gnustep/libobjc2/issues/357

If I set the line below in config.make, Oolite builds successfully, but fails on startup:
```
DEBUG_GRAPHVIZ = no
```

The error is:
```
oolite: src/Core/Entities/ShipEntity.m:14876: -[ShipEntity(SubEntityRelationship) isShipWithSubEntityShip:]: Assertion `[self isShip]' failed.
Aborted (core dumped)
```

Is DEBUG_GRAPHVIZ = yes critical for Oolite to work under gcc or does it normally work if this value is no? If it fails similarly under gcc with DEBUG_GRAPHVIZ = no, then the GNUStep 2.2 build may be fixed by resolving the linker error.
Last edited by mcarans on Sat Nov 01, 2025 9:17 pm, edited 3 times in total.
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 724
Joined: Sun Jun 20, 2010 6:00 pm

Re: Clang GNUStep ABI 2.2 build linker error

Post by mcarans »

Answering my own question, DEBUG_GRAPHVIZ = yes does not appear to be critical. With Clang gnustep-1.9, Oolite starts fine with DEBUG_GRAPHVIZ = no. Clearly the 2.2 ABI has deeper issues that would need to be investigated beyond the linker error.
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 724
Joined: Sun Jun 20, 2010 6:00 pm

Re: Clang GNUStep ABI 2.2 build linker error

Post by mcarans »

Following a GNUStep developer's guidance, I moved up OOCacheImpl and OOCacheNode C structs to just below their typedefs in OOCache.m and that fixed the one linking error with gnustep-2.2. However, there is still a core dump:

```
oolite: src/Core/Entities/ShipEntity.m:14876: -[ShipEntity(SubEntityRelationship) isShipWithSubEntityShip:]: Assertion `[self isShip]' failed.
Aborted (core dumped)
```

So there are no linking errors now, only runtime errors (which may or may not be difficult to fix).
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 724
Joined: Sun Jun 20, 2010 6:00 pm

Re: Success Clang ABI 2.2!

Post by mcarans »

With further help from a GNUStep dev, a Clang ABI 2.2 build worked!

The dev said there might be a bug with bitfield non-fragle ivars. If as advised, I delete the `: 1` here: https://github.com/OoliteProject/oolite ... tity.h#L91, then Oolite starts up and I have been able to fly around.

My gcc and Clang installers for the GNUStep libraries for Ubuntu based distros are here:
https://github.com/mcarans/oolite_ubuntu_environment

On Windows, Oolite builds and links ok with the built in MSYS2 MinGW64 libobjc2 and GNUStep packages using Clang ABI 2.2, but has an issue when running.
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 800
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: Success Clang ABI 2.2!

Post by Lone_Wolf »

For clarity :

Is ABI 2.2 supported in both ubuntu installs ?
If not, does oolite need extra code to work with 2 different objc abi versions ?
OS : Arch Linux 64-bit - rolling release

From: The Netherlands, Europe

OXPs : My user page (needs updating)

Retired, occasionally active
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 724
Joined: Sun Jun 20, 2010 6:00 pm

Re: Success Clang ABI 2.2!

Post by mcarans »

Lone_Wolf wrote: Sun Nov 02, 2025 1:23 pm
For clarity :

Is ABI 2.2 supported in both ubuntu installs ?
If not, does oolite need extra code to work with 2 different objc abi versions ?
ABI 2.2 is only for Clang. gcc doesn't work with libobjc2 (which is installed as libobjc.so.4.6 in Ubuntu) and must use its own Objective-C support (which is installed as libobjc.so.4.0.0 in Ubuntu).

Oolte does not need extra code, but due to bugs in libobjc2, 2 minor edits that probably don't affect the gcc build are needed. One is to move up the OOCacheImpl and OOCacheNode C structs to just below their typedefs in OOCache.m. The other is to delete the `: 1` here: https://github.com/OoliteProject/oolite ... tity.h#L91. A GNUStep dev will look at these bugs ("Thanks for the reports, I’ll try to put together some minimal test cases and see if I can fix them in clang.") so hopefully these edits won't be necessary in future.
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 800
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: Success Clang ABI 2.2!

Post by Lone_Wolf »

/usr/lib/libobjc.so.4.0.0 is also what's used with gcc 15.2 on archlinux .

That suggests the differences should be covered by include/header files provided by gcc & llvm/clang upstream
Allowing for such differences in oolite sourcecode should not be harder then allowing for different compilers & versions in general.
OS : Arch Linux 64-bit - rolling release

From: The Netherlands, Europe

OXPs : My user page (needs updating)

Retired, occasionally active
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 724
Joined: Sun Jun 20, 2010 6:00 pm

Re: Success Clang ABI 2.2 Windows!

Post by mcarans »

Clang 2.2 build now works on Windows too. It requires a newer version of GNUStep Base than the standard MSYS2 package.
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 724
Joined: Sun Jun 20, 2010 6:00 pm

Re: Success Clang ABI 2.2!

Post by mcarans »

The GNUStep Base MSYS2 package was rebuilt so now the Clang 2.2 build works with it. The only thing it lacks are the very recent changes to allow overriding of plist format. Once the next version of GNUStep Base is released then Oolite will no longer need to build the GNUStep packages.
Post Reply