[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libs-base fails to compile on OpenBSD
From: |
Wolfgang Lux |
Subject: |
Re: libs-base fails to compile on OpenBSD |
Date: |
Wed, 5 Dec 2018 11:15:15 +0100 |
> Am 05.12.2018 um 10:38 schrieb Riccardo Mottola <address@hidden>:
>
> Hi Wolfgang,
>
> Wolfgang Lux wrote:
>> I haven't been using OpenBSD for years, so I'm not sure why there is an
>> /usr/include/objc header directory that does not match the compiler. But
>> anyway, this is a problem that you'll see on every system where you use a
>> gcc version which does not match the default compiler. Gcc knowns about the
>> special directory containing the Objective-C headers and includes that in
>> the default search path. However, that applies only to Objective-C files and
>> not to plain C files like runtime.c. I think the best way to move forward
>> would be renaming runtime.c into runtime.m so that this file gets compiled
>> with the correct search path.
>
> it could be a trick... I think here it is a little more awkward, however: the
> "pkg" gcc is in its own directory:
>
> /usr/local/lib/gcc/i386-unknown-openbsd6.4/4.9.4/include/objc/objc.h
>
> The system gcc, is system-wide in the search path:
> /usr/include/objc/objc.h
>
> Now, I suppose the GCC trick is that including "objc.h" works correctly.
>
> However, if you include objc-api.h, which does not exist anylonger in more
> recent versions of gcc, it will include the "Old" one because it is the only
> one and it is in a valid search path, do you get my reasoning?
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. :-)
Wolfgang
- libs-base fails to compile on OpenBSD, Riccardo Mottola, 2018/12/02
- Re: libs-base fails to compile on OpenBSD, Sebastian Reitenbach, 2018/12/02
- Re: libs-base fails to compile on OpenBSD, Riccardo Mottola, 2018/12/02
- Re: libs-base fails to compile on OpenBSD, Wolfgang Lux, 2018/12/02
- Re: libs-base fails to compile on OpenBSD, Wolfgang Lux, 2018/12/02
- Re: libs-base fails to compile on OpenBSD, Riccardo Mottola, 2018/12/05
- Re: libs-base fails to compile on OpenBSD,
Wolfgang Lux <=
- Re: libs-base fails to compile on OpenBSD, Riccardo Mottola, 2018/12/17
- Re: libs-base fails to compile on OpenBSD, Fred Kiefer, 2018/12/18
- Re: libs-base fails to compile on OpenBSD, Riccardo Mottola, 2018/12/18
- Re: libs-base fails to compile on OpenBSD, Wolfgang Lux, 2018/12/19