gnustep-dev
[Top][All Lists]
Advanced

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

Re: libs-base fails to compile on OpenBSD


From: Fred Kiefer
Subject: Re: libs-base fails to compile on OpenBSD
Date: Tue, 18 Dec 2018 09:30:59 +0100


> Am 18.12.2018 um 00:55 schrieb Riccardo Mottola <address@hidden>:
> Wolfgang Lux wrote:
>> To be honest, no. The runtime.c file unconditionally includes objc-api.h, so 
>> it's obviously not supposed to compiled with a compiler that lacks the 
>> objc-api.h header file. So it doesn't really matter if the compiler would 
>> find the header from a different compiler version because the file shouldn't 
>> be compiled in the first place.:-)
> 
> indeed this is tricky.
> 
> First I tried renaming runtime.c to runtime.m and compile it with ObjC.
> 
> It does not fix the issue.
> 
> then I tried including thr.h instead of objc-api.h and thr.h, but it is not 
> enough, one symbnol I miss is in runtime.h
> If I include that, I get tons of redefinitions, likle this:
> 
> In file included from runtime.m:36:0:
> /usr/local/lib/gcc/i386-unknown-openbsd6.4/4.9.4/include/objc/runtime.h:284:20:
>  error: conflicting types for 'object_getIndexedIvars'
> objc_EXPORT void * object_getIndexedIvars (id object);
>                    ^
> 
> 
> I wonder a bit what kind of magic we are doing there: I actually wonder how 
> it works elsewhere where I use even more modern GCC.

Riccardo,

you seem to be missing out on the underlying problem that Wolfgang tried to 
explain. For the GNUstep base library there are two cases which are supported. 
Either a new Obj-C runtime is installed on your machine then this gets used and 
the GNUstep additions won’t be needed. Or you only have an old Obj-C runtime, 
then the additions get compiled so that base is able to use the new functions 
although the runtime does not provide them. In your case a new runtime and an 
old one are present. Somehow both are detected and the additions get compiled 
against the new runtime. This has never been supported and is totally useless. 
Your unusual setup seem to trigger a bug in the configurations scripts where 
the wrong runtime gets used to decide whether or not to compile the additions.
The best you could do now is just to remove the old runtime and everything 
should be detected correctly.

Hope this helps,
Fred




reply via email to

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