Hi Patryk,

I will.

I need the GUI for a program used for testing. And rather than reinvent the 
wheel, I THOUGHT I would just build GNUstep and be done. Little did I know it 
was not as trivial as it seemed...

Cheers,

Lloyd

On Oct 21, 2013, at 15:09 , Patryk Laurent <[email protected]> wrote:

> Hi Lloyd,
> 
> If you do find out how to build the GUI packages, if would be great if you 
> could update the wiki with some optional instructions.  I was not interested 
> in GUI stuff at the time.
> 
> Thank you,
> Patryk
> 
> 
> On Oct 21, 2013, at 01:01 PM, Lloyd Sargent <[email protected]> wrote:
> 
>> Okay, much of you answer is clear as mud to me as I don't know what they 
>> mean:
>> 
>> 1. non-fragile ABI is indicated by the -fobjc-nonfragile-abi if I'm not 
>> correct. I have compiled the sample program and get the same issue.
>> 
>> 2. If the issue is that EVERYTHING needs to be compiled with the 
>> -objc-nonfragile-abi, then I'm at a loss at how to do this - nor does the 
>> GNUstep website indicate how to do so.
>> 
>> 3. What does gnustep-1.7 mean? Is that the legacy (non-ARC) or the (ARC) or 
>> GC or something altogether different?
>> 
>> 4. I appreciate your answer, but it still doesn't suggest a way for me to 
>> get from where I am (code not running) to where I want to be. BTW, 
>> libdispatch and base appear to work just fine, it is the gui that crashes 
>> and burns.
>> 
>> 5. It's not that I don't appreciate you answer, but I fail to see how it 
>> gets me any closer to where I want to be. Yes, I'm quite aware that things 
>> are not working and there is an ABI mismatch. I think the question is more 
>> "how do I get from this mismatch" to something that is NOT a mismatch.
>> 
>> Cheers,
>> 
>> Lloyd
>> 
>> On Oct 21, 2013, at 10:06 , David Chisnall <[email protected]> wrote:
>> 
>>> ARC is only supported with the non-fragile ABI. If you specify 
>>> -fobjc-runtime=gnustep and -fobjc-arc, then it should default to the 
>>> equivalent of -fobjc-runtime=gnustep-1.7. The rest of your code appears to 
>>> be compiled with the legacy (GCC-compatible) ABI (-fobjc-runtime=gnustep, 
>>> with no version, which is strongly discouraged).
>>> I'd recommend copying how the packages are built on FreeBSD. The GNUstep 
>>> and libdispatch ports work out of the box in this configuration.
>>> David
>>> On 21 Oct 2013, at 15:16, Lloyd Sargent <[email protected]> wrote:
>>>> Basically, I followed the instructions here: 
>>>> http://wiki.gnustep.org/index.php/GNUstep_under_Ubuntu_Linux
>>>> With the extra step of building the gui and back.
>>>> If I build and run a non-gui program, all works well. Only when I add 
>>>> something that uses the gui, like the following:
>>>> // Created by Tobias Lensing on 2/22/13.
>>>> #import <Foundation/Foundation.h>
>>>> #import <AppKit/AppKit.h>
>>>> #import <dispatch/dispatch.h>
>>>> int main(int argc, const char * argv[])
>>>> {
>>>> @autoreleasepool {
>>>> int multiplier = 7;
>>>> int (^myBlock)(int) = ^(int num) {
>>>> return num * multiplier;
>>>> };
>>>> NSLog(@"%d", myBlock(3));
>>>> dispatch_queue_t queue = dispatch_queue_create(NULL, NULL);
>>>> dispatch_sync(queue, ^{
>>>> printf("Hello, world from a dispatch queue!\n");
>>>> });
>>>> // dispatch_release(queue); // ARC takes care of this
>>>> }
>>>> @autoreleasepool {
>>>> [NSApplication sharedApplication];
>>>> NSRunAlertPanel(@"Test", @"Wow it works!", @"OK", nil, nil);
>>>> }
>>>> return 0;
>>>> }
>>>> I compile this with the following:
>>>> clang `gnustep-config --objc-flags` `gnustep-config --objc-libs` 
>>>> -fobjc-arc -fobjc-runtime=gnustep -fblocks -lobjc -ldispatch -lgnustep-gui 
>>>> test.m
>>>> It compiles and links with no errors.
>>>> When I run it, however, it spits out the following ugly-gram:
>>>> Hello, world from a dispatch queue!
>>>> Objective-C ABI Error: Loading modules from incompatible ABI's while 
>>>> loading .GSBackend.m
>>>> a.out: /home/lloyd/projects/ThirdParty/BuildGnuStep/libobjc2/loader.c:53: 
>>>> void __objc_exec_class(struct objc_module_abi_8 *): Assertion 
>>>> `objc_check_abi_verion(module)' failed.
>>>> Aborted (core dumped)
>>>> I have assured myself that there is no other version of libobjc (this is 
>>>> on a virtual machine so I can go back redo my steps).
>>>> Commenting out the following:
>>>> // [NSApplication sharedApplication];
>>>> // NSRunAlertPanel(@"Test", @"Wow it works!", @"OK", nil, nil);
>>>> and everything compiles and runs, aside from the GUI obviously.
>>>> How can I have two ABI's when I build everything from scratch? Do I need 
>>>> to configure the GUI differently? I've been puzzling over this for a 
>>>> couple of weeks.
>>>> My goal is to have ARC, the GUI and (optionally) blocks.
>>>> _______________________________________________
>>>> Discuss-gnustep mailing list
>>>> [email protected]
>>>> https://lists.gnu.org/mailman/listinfo/discuss-gnustep
>>> -- Sent from my brain
>> 
>> 
>> _______________________________________________
>> Discuss-gnustep mailing list
>> [email protected]
>> https://lists.gnu.org/mailman/listinfo/discuss-gnustep

_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to