gnustep-dev
[Top][All Lists]
Advanced

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

Re: [Etoile-discuss] EtoileXML Build Errors


From: David Chisnall
Subject: Re: [Etoile-discuss] EtoileXML Build Errors
Date: Thu, 31 Jul 2008 13:22:17 +0100

On 31 Jul 2008, at 12:47, Quentin Mathé wrote:

Hi Fred,

Le 30 juil. 08 à 20:51, Fred Morcos a écrit :

Making all for framework EtoileXML...
/usr/GNUstep/System/Library/Headers/AppKit/NSCell.h:500: error: inline
function '_sizeForBorderType' declared but never defined

I suppose this is due to -Werror...

Yes. However I don't get this error on Ubuntu. My GCC version is
4.1.3, may be you have a more recent one?
What is your GNUstep version aslo (release number or trunk revision of
the GNUstep repository)?
For my current GNUstep install, this function is defined at the end of
NSCell.m, and I don't see any changes in GNUstep commits that removes
it.

The problem is that there are two inline keywords. One is a GNU extension, one is in C99, and they are incompatible. A modern GCC uses the C99 definition. It sounds like Fred is trying to compile with an old GCC, which is going to fail.

In fact, I wonder if this function shouldn't be declared
GS_STATIC_INLINE as other GNUstep utility functions are usually…

I doubt it. The correct (and, by 'correct' I mean 'standards- compliant but totally unintuitive) way of declaring inline functions is to declare (and define) them inline extern in the header and then declare and (again) define them inline in the implementation file.

Looking at how this is implemented in GNUstep, it's highly unlikely that this is actually being inlined in more than a tiny fraction of its uses.

You can remove -Werror in etoile.make as a temporary solution. May be
there is a GCC flag to turn off this warning too, but I don't know
which one.

Since it's a GNUstep bug, the correct thing to do is fix GNUstep. I've included a patch which should do that, and cc'd the GNUstep dev list, so hopefully someone can review and commit it.

David

Attachment: appkit.diff
Description: Binary data


reply via email to

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