Bug#777935: mod_perl2, MP_INLINE and gcc 5

Niko Tyni ntyni at debian.org
Thu Jun 18 08:08:40 UTC 2015


On Wed, Jun 17, 2015 at 10:26:47PM +0100, Steve Hay wrote:
> On 17 June 2015 at 19:57, Niko Tyni <ntyni at debian.org> wrote:
> > On Wed, Jun 17, 2015 at 08:27:28PM +0300, Niko Tyni wrote:
> >
> >> mod_perl2 (up to and including 2.0.9-RC3) fails to build with GCC 5,
> >> because the default inline semantics have changed from GNU89 to C99 and
> >> require changes in mod_perl source.
> >
> > Ah, reading my own references properly, it looks like it might be a
> > bit more complicated than that, and probably only happens when apr and
> > mod_perl are compiled with different inline semantics. Is that correct?
> >
> > Sorry for the confusion. I still think a note somewhere could help...
> 
> I was just about to roll the release this evening when I saw this. A
> minor README update surely doesn't warrant a new RC so I'm prepared to
> slip the note in now. Is the wording still accurate, given that the
> situation is more complicated than you first thought?

Thanks, and sorry for delaying the release :)

I think the wording could be amended a bit.

Reading apr.h, it defines APR_INLINE (which is the same thing as MP_INLINE
unless MP_DEBUG is defined) to __inline__ on GCC 2.7 or later, otherwise
it's left empty. I don't understand how building apr on gcc vs. clang
would affect the definition, it's not hardcoded at apr build time. AFAICS
building with clang should just work (without any inlines).

Given I haven't tried building clang myself, I guess that part could
be made less authoritative. Maybe

C compiler:
  The mod_perl source currently uses GNU89 inline semantics on GCC, but
  GCC 5 defaults to newer C99 semantics. If you see MP_INLINE related
  warnings during the build and missing symbols when starting the test
  suite, adding "-fgnu89-inline" to MP_CCOPTS may help.
  There are also some reports of this happening with the Clang compiler,
  where the corresponding option to try is "-std=gnu89".

-- 
Niko Tyni   ntyni at debian.org



More information about the pkg-perl-maintainers mailing list