perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niko Tyni <>
Subject mod_perl2, MP_INLINE and gcc 5
Date Wed, 17 Jun 2015 17:27:28 GMT
[resending to the correct list address]


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. See details at

The symptoms are lots of warnings like
  In file included from mod_perl.h:91:0,
                   from modperl_config.c:17:
  modperl_cgi.h:35:15: warning: inline function 'modperl_cgi_header_parse' declared but never
   MP_INLINE int modperl_cgi_header_parse(request_rec *r, char *buffer,
and the test suite failing straight away with

  waiting 300 seconds for server to start: .apache2: Syntax error on line 79 of /home/niko/tmp/libapache2-mod-perl2/t/conf/httpd.conf:
Cannot load /home/niko/tmp/libapache2-mod-perl2/src/modules/perl/ into server:
/home/niko/tmp/libapache2-mod-perl2/src/modules/perl/ undefined symbol: modperl_handler_name

The old semantics can be enabled with the -fgnu89-inline option (accepted
by GCC since 4.1.3), and the build seems to work fine with that, with
the full test suite passing for me.

I believe (but haven't tested) that clang exhibits similar behaviour
and can be forced to the old inline semantics with the -std=gnu89 option.
This may well be the reason for some reported MP_INLINE problems on OS X like$9a87f2a0$cf97d7e0$@com%3E

Google also finds the supporting

If it's not too late for 2.0.9, perhaps a note in README about this
would be useful? Maybe something like (improvements welcome; MP_CCOPTS
works for me but I'm not sure what the right way is):

diff --git a/README b/README
index 8d7c79e..cef8df4 100644
--- a/README
+++ b/README
@@ -25,6 +25,13 @@ Perl:
   configurations) are currently believed to work, but this is not
   guaranteed to be the case, either now or in the future.
+C compiler:
+  The mod_perl source currently relies on GNU89 inline semantics, while GCC 5
+  and Clang default 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" (GCC) or "-std=gnu89" (Clang)
+  to MP_CCOPTS may help.
 *** Status ***
 mod_perl is currently considered stable.

Niko Tyni

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message