discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GUI test with -fobjc-arc yields ABI Error


From: Patryk Laurent
Subject: GUI test with -fobjc-arc yields ABI Error
Date: Fri, 27 Dec 2013 20:04:14 +0000 (GMT)


David,

Another oddity that maybe will help diagnose the issue:  If I compile a GUI test program without -fobjc-arc, everything works fine.  However, if I include -fobjc-arc, compilation is successful but running is not, see below:

patryk@paklbox:~$ clang `gnustep-config --objc-flags` `gnustep-config --objc-libs`  -fobjc-runtime=gnustep-1.7 -fblocks -fobjc-arc  -lobjc -ldispatch -lgnustep-base -lgnustep-gui  guitest.m
patryk@paklbox:~$ ./a.out
Objective-C ABI Error: Loading modules from incompatible ABIs while loading ./GSBackend.m
a.out: /home/patryk/libobjc2/loader.c:53: void __objc_exec_class(struct objc_module_abi_8 *): Assertion `objc_check_abi_version(module)' failed.
Aborted (core dumped)

(This is under Ubuntu 13.10 Desktop, following the instructions here: http://wiki.gnustep.org/index.php/GNUstep_under_Ubuntu_Linux)

Patryk


Here is the source to guitest.m:

patryk@paklbox:~$ cat guitest.m
#import <AppKit/AppKit.h>

int main()
{
NSApplication *app;  // Without these 2 lines, seg fault may occur
app = [NSApplication sharedApplication];

NSAlert * alert = [[NSAlert alloc] init];
[alert setMessageText:@"Hello alert"];
[alert addButtonWithTitle:@"All done"];
[alert runModal];
}

Compiling it without -fobjc-arc works fine:

patryk@paklbox:~$ clang `gnustep-config --objc-flags` `gnustep-config --objc-libs`  -fobjc-runtime=gnustep-1.7 -fblocks   -lobjc -ldispatch -lgnustep-base -lgnustep-gui  guitest.m   # NSAlert test works fine without -fobjc-arc.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]