Re: mod_perl and apache 2.4

Michael Schout <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
On 5/8/15 7:55 PM, GLG wrote:
> It doesn't matter how I install mod_perl (dynamic or static. Also tried via
> Webmin), the end result is always the same. This on FreeBSD 10.1
...
> httpd: Syntax error on line 107 of /usr/local/etc/apache22/httpd.conf:
> Cannot load /usr/local/libexec/apache22/mod_perl.so into server:
> /usr/local/libexec/apache22/mod_perl.so: Undefined symbol
> "modperl_io_perlio_restore_stdout"
> -------------------------------------

I know this is old, but I'm going to reply because I ran into this a
while back (and solved it).  Hopefully I can help others.

This problem has to do with the fact that FreeBSD uses clang to compile
mod_perl, and clang handles C99 inline functions differently from gcc's
default mode (which is C89 for GCC < 5.0).  You'll run into this exact
same problem everywhere clang is used (e.g.: OS X).

The short answer is you have two choices:

1) compile with gcc
or
2) patch src/modules/perl/modperl_common_util.h and make sure APR_INLINE
is not defined before compiling.

See the ports Makefile in www/mod_perl2 under the post-patch rule for
how the ports tree handles this (unset APR_INLINE)

I realize this may be too late to help you, but hopefully this will help
someone else down the line.

See: http://clang.llvm.org/compatibility.html#inline

Regards,
Michael Schout
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.