-
Notifications
You must be signed in to change notification settings - Fork 122
Description
I have tried building Oolite using the supported Clang gnustep-2.2. I get just one linker error. This error does not occur when building Oolite with Clang gnustep 1.9 or gcc.
I have made a cut down example that demonstrates the issue: https://github.com/mcarans/objc_abi2.2_issue. That example builds with Clang gnustep-1.9, so the undefined reference only happens with gnustep-2.2.
The error I get (which occurs on both MinGW64 and Kubuntu) is:
/usr/bin/ld: ./obj/HelloWorld.obj/OOCache.m.o: in function `_i_OOCache_DebugGraphViz_generateGraphVizBodyWithRootNamed_':
/home/mcarans/Code/OoliteRelated/objc_abi2.2_issue/OOCache.m:1098:(.text+0xcdf): undefined reference to `__objc_ivar_offset_OOCache.cache.^{OOCacheImpl=^{OOCacheNode}^{OOCacheNode}^{OOCacheNode}I}'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It may have something to do with these C structs that are used from Objective-C:
struct OOCacheImpl
{
// Splay tree root
OOCacheNode *root;
// Ends of age list
OOCacheNode *oldest, *youngest;
unsigned count;
NSString *name;
};
struct OOCacheNode
{
// Payload
id<OOCacheComparable> key;
id value;
// Splay tree
OOCacheNode *leftChild, *rightChild;
// Age list
OOCacheNode *younger, *older;
};
My guess is that this is a change in the way C structs are handled in different ABIs within libobjc2, so I closed the issue I had made in libs-base and opened here instead, but if it isn't related to libobjc2, then please let me know.