You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Ben Collins-Sussman <su...@collab.net> on 2004/09/17 20:01:59 UTC
Fwd: clean OSX build -- compile error.
This is from a thread on the dev@subversion.tigris.org list. But I'm
guessing that apache would be affected by this problem too.
The mysterious thing is, I had no problems building and installing
httpd-2.0.51 from scratch on this same system. So why is it different?
Any thoughts?
Begin forwarded message:
> From: Ben Collins-Sussman <su...@collab.net>
> Date: September 17, 2004 12:28:51 PM CDT
> To: Ben Collins-Sussman <su...@collab.net>
> Cc: svn-dev-list <de...@subversion.tigris.org>, Greg Hudson
> <gh...@MIT.EDU>
> Subject: Re: clean OSX build -- compile error.
>
> Okay, so it's definitely a bug in the latest toolchain headers shipped
> by Apple. I filed a bug with them. If I insert this bit into a
> couple of darwin kernel headers, Subversion compiles fine with the gcc
> -std=c89 flag:
>
> /* Temporary workaround for broken OSX system headers, shipped in
> XCode 1.5. They're declaring stuff 'static inline', and this is
> incompatible with the '-std=c89' flag we pass to gcc.
> See Apple bug #3805571. */
> #if defined(__APPLE__) && !defined(inline)
> #define inline __inline__
> #endif
>
> So, sure, I could go and remove my toolchain and install an older one.
> But that's not going to prepare us for the floods of bug reports that
> come in once OSX developers start upgrading their own toolchains. I'm
> just the first person to try to compile Subversion with the latest
> stuff, others will follow soon. I think it's best to get a workaround
> committed.
>
> So I tried to put this workaround into various svn header files, but
> it's no use. The bug is triggered by anything that #includes
> <apr_portable.h>. And svn C files *always* include APR headers before
> svn headers, for obvious reasons. So that means either:
>
> * attaching this workaround to a handful of svn C files, or
> * putting the patch in apr_portable.h, in the apr 0.9.x branch
>
> Both of these options kinda stink. If we do the latter, we commit the
> change to apr 0.9.x, then wait for apache 2.0.52? And post a patch in
> the meantime? This is what we did with the bdb 4.2-detection patch
> for apr-util way back when, and it was annoying.
>
> Anyone have any thoughts? Better ideas?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Fwd: clean OSX build -- compile error.
Posted by Max Bowsher <ma...@ukf.net>.
Joe Orton wrote:
> Portable software will not use -std=c89 by default, because it's asking
> the compiler to be less lenient than normal. The fact that this
> eventually found a bug in a system header on some platform is not really
> very surprising. Don't use -std=c89 if you don't want to risk breaking
> stuff.
Agree.
> SVN only seems to enable this for --enable-maintainer-mode with:
>
> case "$host" in
> *freebsd*|*linux*)
> CFLAGS="$CFLAGS -std=c89"
> ;;
> esac
>
> so I'm not sure why Ben is getting it on Mac OS anyway.
The above code snippet is old.
Now we do an AC_TRY_COMPILE to find out if -std=c89 works.
We will be fixing this by #including <apr_portable.h> in our AC_TRY_COMPILE
call.
Max.
Re: Fwd: clean OSX build -- compile error.
Posted by Joe Orton <jo...@redhat.com>.
On Fri, Sep 17, 2004 at 12:08:10PM -0600, Paul Querna wrote:
> On Fri, 2004-09-17 at 13:01 -0500, Ben Collins-Sussman wrote:
> > This is from a thread on the dev@subversion.tigris.org list. But I'm
> > guessing that apache would be affected by this problem too.
> >
> > The mysterious thing is, I had no problems building and installing
> > httpd-2.0.51 from scratch on this same system. So why is it different?
> > Any thoughts?
> >
>
> Apache is not affected because it does not add '-std=c89' to the cflags.
>
> Regardless, I think we should fix apr_portable.h. This is a bug that
> many people will hit on OSX
By adding a conditional #define inline hack? Ick.
Portable software will not use -std=c89 by default, because it's asking
the compiler to be less lenient than normal. The fact that this
eventually found a bug in a system header on some platform is not really
very surprising. Don't use -std=c89 if you don't want to risk breaking
stuff.
SVN only seems to enable this for --enable-maintainer-mode with:
case "$host" in
*freebsd*|*linux*)
CFLAGS="$CFLAGS -std=c89"
;;
esac
so I'm not sure why Ben is getting it on Mac OS anyway.
joe
Re: Fwd: clean OSX build -- compile error.
Posted by Paul Querna <ch...@force-elite.com>.
On Fri, 2004-09-17 at 13:01 -0500, Ben Collins-Sussman wrote:
> This is from a thread on the dev@subversion.tigris.org list. But I'm
> guessing that apache would be affected by this problem too.
>
> The mysterious thing is, I had no problems building and installing
> httpd-2.0.51 from scratch on this same system. So why is it different?
> Any thoughts?
>
Apache is not affected because it does not add '-std=c89' to the cflags.
Regardless, I think we should fix apr_portable.h. This is a bug that
many people will hit on OSX
-Paul Querna