discuss-gnustep
[Top][All Lists]
Advanced

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

Re: GUI test with -fobjc-arc yields ABI Error


From: Patryk Laurent
Subject: Re: GUI test with -fobjc-arc yields ABI Error
Date: Fri, 27 Dec 2013 23:15:43 +0000 (GMT)

David,

I had already specified -fobjc-runtime=gnustep-1.7 when I got the ABI Error.  (See below)

(If I try -fobjc-nonfragile-abi I get: clang-3.5: warning: argument unused during compilation: '-fobjc-nonfragile-abi')

Thanks,
Patryk


On Dec 27, 2013, at 01:11 PM, David Chisnall <theraven@sucs.org> wrote:

If you want to use ARC, then you must use the new ABI. Either specify -fobjc-runtime=gnustep-1.7, or -fobjc-nonfragile-abi.

David

On 27 Dec 2013, at 20:04, Patryk Laurent <plaurent@me.com> wrote:

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.


-- Sent from my Difference Engine




reply via email to

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