about compatibility issue with latest gnustep-base
error refers to first declaration in /usr/GNUstep/System/Library/Headers/ObjectiveC2/runtime.h
which looks like
Code: Select all
size_t class_getInstanceSize(Class cls);
as you can see its not static.
i also noticed that this function is not declared anywhere in the previous version of gnustep-base.
so probably a trivial solution will be conditional compiling of this function in oolite.
Code: Select all
--- src/Core/Entities/Entity.m 2010-05-13 14:24:30.360987504 +0600
+++ src/Core/Entities/Entity.m 2010-05-13 14:16:57.392987425 +0600
@@ -50,12 +50,16 @@
#if OOLITE_MAC_OS_X
#import <objc/objc-class.h>
#endif
+#if GNUSTEP_BASE_MAJOR_VERSION < 1 || \
+ GNUSTEP_BASE_MAJOR_VERSION == 1 && \
+ GNUSTEP_BASE_MINOR_VERSION < 20
OOINLINE size_t class_getInstanceSize(Class cls)
{
return cls->instance_size;
}
#endif
#endif
+#endif
static NSString * const kOOLogEntityAddToList = @"entity.linkedList.add";
--- src/Core/Universe.m 2010-05-13 14:24:17.678986950 +0600
+++ src/Core/Universe.m 2010-05-13 14:20:06.751237014 +0600
@@ -200,11 +200,15 @@
#if OOLITE_MAC_OS_X
#import <objc/objc-class.h>
#endif
+#if GNUSTEP_BASE_MAJOR_VERSION < 1 || \
+ GNUSTEP_BASE_MAJOR_VERSION == 1 && \
+ GNUSTEP_BASE_MINOR_VERSION < 20
OOINLINE size_t class_getInstanceSize(Class cls)
{
return cls->instance_size;
}
#endif
+#endif
@implementation Universe
--- ./src/Core/NSNumberOOExtensions.m 2010-05-13 15:53:02.542237662 +0600
+++ ./src/Core/NSNumberOOExtensions.m 2010-05-13 16:04:43.933987708 +0600
@@ -73,7 +73,9 @@
@end
-#ifdef GNUSTEP
+#if defined(GNUSTEP) && (GNUSTEP_BASE_MAJOR_VERSION < 1 || \
+ GNUSTEP_BASE_MAJOR_VERSION == 1 && \
+ GNUSTEP_BASE_MINOR_VERSION < 20)
/* As an optimization, we override the implementation on NSBoolNumber to
always return YES. In practical terms, we could always return NO in
but i'm not sure about implementation int the gnustep.
the next error i got isalready in linking stage
Code: Select all
Linking objc_program oolite ...
./obj.spk/oolite.obj/NSNumberOOExtensions.m.o:(.data.rel+0x8): undefined reference to `__objc_class_name_NSBoolNumber'
Edit: ok, i've updated patch above with fixed conditions and addition for linkage