Error while running passenger-install-apache2-module in

65 views
Skip to first unread message

DedPihto

unread,
Feb 24, 2011, 12:17:48 PM2/24/11
to Phusion Passenger Discussions
Hi all,

I am trying to upgrade from Passenger Phusion 2.2.11 to 3.0.3. This is
my environment.

RedHat version: Red Hat Enterprise Linux AS release 4 (Nahant Update
5)
Kernel: Linux someserver.xxx.yyy 2.6.9-55.ELsmp #1 SMP Fri Apr 20
17:03:35 EDT 2007 i686 i686 i386 GNU/Linux

Below is the error I am getting while running passenger-install-
apache2-module. I would appreciate any thoughts on how to fix this.

Thank you,
Eugene

Compiling and installing Apache 2 module...
cd /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.3
/usr/local/bin/ruby /usr/local/bin/rake apache2:clean apache2
RELEASE=yes
# /usr/local/bin/ruby /usr/local/bin/rake apache2:clean apache2
RELEASE=yes
(in /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.3)
rm -rf ext/common/libboost_oxt.a ext/common/libboost_oxt
rm -rf ext/common/libpassenger_common.a ext/common/libpassenger_common
rm -f agents/PassengerWatchdog agents/PassengerLoggingAgent
rm -rf ext/apache2/module_libboost_oxt.a ext/apache2/
module_libboost_oxt
rm -rf ext/apache2/module_libpassenger_common.a ext/apache2/
module_libpassenger_common
rm -rf ext/apache2/Configuration.o ext/apache2/Bucket.o ext/apache2/
Hooks.o ext/apache2/mod_passenger.o ext/apache2/mod_passenger.so
agents/PassengerHelperAgent
mkdir -p ext/apache2/module_libpassenger_common
g++ -Iext -Iext/common -Iext/libev -fPIC -fvisibility=hidden -
DVISIBILITY_ATTRIBUTE_SUPPORTED -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -
I/usr/include/apr-0 -I/usr/include/apr-0 -g -pipe -m32 -march=i386 -
mtune=pentium4 -I/usr/include/httpd -D_REENTRANT -I/usr/local/include -
DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<ext/hash_fun.h>" -
DHAS_SFENCE -DHAS_LFENCE -Wall -g -DPASSENGER_DEBUG -
DBOOST_DISABLE_ASSERTS -o ext/apache2/module_libpassenger_common/
aggregate.o -c ext/apache2/module_libpassenger_common/aggregate.cpp
rm -rf ext/apache2/module_libpassenger_common.a
ar cru ext/apache2/module_libpassenger_common.a ext/apache2/
module_libpassenger_common/aggregate.o
ranlib ext/apache2/module_libpassenger_common.a
mkdir -p ext/apache2/module_libboost_oxt
g++ -Iext -fPIC -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -
DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -I/usr/include/apr-0 -I/usr/
include/apr-0 -g -pipe -m32 -march=i386 -mtune=pentium4 -I/usr/include/
httpd -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -
DHASH_FUN_H="<ext/hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wall -g -
DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/apache2/
module_libboost_oxt/aggregate.o -c ext/apache2/module_libboost_oxt/
aggregate.cpp
mkdir -p ext/apache2/module_libboost_oxt
rm -rf ext/apache2/module_libboost_oxt.a
ar cru ext/apache2/module_libboost_oxt.a ext/apache2/
module_libboost_oxt/aggregate.o
ranlib ext/apache2/module_libboost_oxt.a
gcc -Iext -Iext/common -fPIC -fvisibility=hidden -
DVISIBILITY_ATTRIBUTE_SUPPORTED -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -
I/usr/include/apr-0 -I/usr/include/apr-0 -g -pipe -m32 -march=i386 -
mtune=pentium4 -I/usr/include/httpd -D_REENTRANT -I/usr/local/include -
DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<ext/hash_fun.h>" -
DHAS_SFENCE -DHAS_LFENCE -Wall -g -DPASSENGER_DEBUG -
DBOOST_DISABLE_ASSERTS -o ext/apache2/mod_passenger.o -c ext/apache2/
mod_passenger.c
g++ -Iext -Iext/common -fPIC -fvisibility=hidden -
DVISIBILITY_ATTRIBUTE_SUPPORTED -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -
I/usr/include/apr-0 -I/usr/include/apr-0 -g -pipe -m32 -march=i386 -
mtune=pentium4 -I/usr/include/httpd -D_REENTRANT -I/usr/local/include -
DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<ext/hash_fun.h>" -
DHAS_SFENCE -DHAS_LFENCE -Wall -g -DPASSENGER_DEBUG -
DBOOST_DISABLE_ASSERTS -o ext/apache2/Configuration.o -c ext/apache2/
Configuration.cpp
In file included from ext/common/LoggingAgent/FilterSupport.h:34,
from ext/apache2/Configuration.cpp:39:
/usr/include/regex.h:319: error: conflicting declaration 'REG_NOMATCH'
/usr/include/httpd/pcreposix.h:57: error: 'REG_NOMATCH' has a previous
declaration as `<anonymous enum> REG_NOMATCH'
/usr/include/regex.h:319: error: declaration of `REG_NOMATCH'
/usr/include/httpd/pcreposix.h:57: error: conflicts with previous
declaration `<anonymous enum> REG_NOMATCH'
/usr/include/regex.h:323: error: conflicting declaration 'REG_BADPAT'
/usr/include/httpd/pcreposix.h:42: error: 'REG_BADPAT' has a previous
declaration as `<anonymous enum> REG_BADPAT'
/usr/include/regex.h:323: error: declaration of `REG_BADPAT'
/usr/include/httpd/pcreposix.h:42: error: conflicts with previous
declaration `<anonymous enum> REG_BADPAT'
/usr/include/regex.h:324: error: conflicting declaration
'REG_ECOLLATE'
/usr/include/httpd/pcreposix.h:46: error: 'REG_ECOLLATE' has a
previous declaration as `<anonymous enum> REG_ECOLLATE'
/usr/include/regex.h:324: error: declaration of `REG_ECOLLATE'
/usr/include/httpd/pcreposix.h:46: error: conflicts with previous
declaration `<anonymous enum> REG_ECOLLATE'
/usr/include/regex.h:325: error: conflicting declaration 'REG_ECTYPE'
/usr/include/httpd/pcreposix.h:47: error: 'REG_ECTYPE' has a previous
declaration as `<anonymous enum> REG_ECTYPE'
/usr/include/regex.h:325: error: declaration of `REG_ECTYPE'
/usr/include/httpd/pcreposix.h:47: error: conflicts with previous
declaration `<anonymous enum> REG_ECTYPE'
/usr/include/regex.h:326: error: conflicting declaration 'REG_EESCAPE'
/usr/include/httpd/pcreposix.h:48: error: 'REG_EESCAPE' has a previous
declaration as `<anonymous enum> REG_EESCAPE'
/usr/include/regex.h:326: error: declaration of `REG_EESCAPE'
/usr/include/httpd/pcreposix.h:48: error: conflicts with previous
declaration `<anonymous enum> REG_EESCAPE'
/usr/include/regex.h:327: error: conflicting declaration 'REG_ESUBREG'
/usr/include/httpd/pcreposix.h:54: error: 'REG_ESUBREG' has a previous
declaration as `<anonymous enum> REG_ESUBREG'
/usr/include/regex.h:327: error: declaration of `REG_ESUBREG'
/usr/include/httpd/pcreposix.h:54: error: conflicts with previous
declaration `<anonymous enum> REG_ESUBREG'
/usr/include/regex.h:328: error: conflicting declaration 'REG_EBRACK'
/usr/include/httpd/pcreposix.h:45: error: 'REG_EBRACK' has a previous
declaration as `<anonymous enum> REG_EBRACK'
/usr/include/regex.h:328: error: declaration of `REG_EBRACK'
/usr/include/httpd/pcreposix.h:45: error: conflicts with previous
declaration `<anonymous enum> REG_EBRACK'
/usr/include/regex.h:329: error: conflicting declaration 'REG_EPAREN'
/usr/include/httpd/pcreposix.h:50: error: 'REG_EPAREN' has a previous
declaration as `<anonymous enum> REG_EPAREN'
/usr/include/regex.h:329: error: declaration of `REG_EPAREN'
/usr/include/httpd/pcreposix.h:50: error: conflicts with previous
declaration `<anonymous enum> REG_EPAREN'
/usr/include/regex.h:330: error: conflicting declaration 'REG_EBRACE'
/usr/include/httpd/pcreposix.h:44: error: 'REG_EBRACE' has a previous
declaration as `<anonymous enum> REG_EBRACE'
/usr/include/regex.h:330: error: declaration of `REG_EBRACE'
/usr/include/httpd/pcreposix.h:44: error: conflicts with previous
declaration `<anonymous enum> REG_EBRACE'
/usr/include/regex.h:331: error: conflicting declaration 'REG_BADBR'
/usr/include/httpd/pcreposix.h:41: error: 'REG_BADBR' has a previous
declaration as `<anonymous enum> REG_BADBR'
/usr/include/regex.h:331: error: declaration of `REG_BADBR'
/usr/include/httpd/pcreposix.h:41: error: conflicts with previous
declaration `<anonymous enum> REG_BADBR'
/usr/include/regex.h:332: error: conflicting declaration 'REG_ERANGE'
/usr/include/httpd/pcreposix.h:51: error: 'REG_ERANGE' has a previous
declaration as `<anonymous enum> REG_ERANGE'
/usr/include/regex.h:332: error: declaration of `REG_ERANGE'
/usr/include/httpd/pcreposix.h:51: error: conflicts with previous
declaration `<anonymous enum> REG_ERANGE'
/usr/include/regex.h:333: error: conflicting declaration 'REG_ESPACE'
/usr/include/httpd/pcreposix.h:53: error: 'REG_ESPACE' has a previous
declaration as `<anonymous enum> REG_ESPACE'
/usr/include/regex.h:333: error: declaration of `REG_ESPACE'
/usr/include/httpd/pcreposix.h:53: error: conflicts with previous
declaration `<anonymous enum> REG_ESPACE'
/usr/include/regex.h:334: error: conflicting declaration 'REG_BADRPT'
/usr/include/httpd/pcreposix.h:43: error: 'REG_BADRPT' has a previous
declaration as `<anonymous enum> REG_BADRPT'
/usr/include/regex.h:334: error: declaration of `REG_BADRPT'
/usr/include/httpd/pcreposix.h:43: error: conflicts with previous
declaration `<anonymous enum> REG_BADRPT'
/usr/include/regex.h:338: error: conflicting declaration 'REG_ESIZE'
/usr/include/httpd/pcreposix.h:52: error: 'REG_ESIZE' has a previous
declaration as `<anonymous enum> REG_ESIZE'
/usr/include/regex.h:338: error: declaration of `REG_ESIZE'
/usr/include/httpd/pcreposix.h:52: error: conflicts with previous
declaration `<anonymous enum> REG_ESIZE'
/usr/include/regex.h:420: error: conflicting declaration 'typedef
struct re_pattern_buffer regex_t'
/usr/include/httpd/pcreposix.h:66: error: 'regex_t' has a previous
declaration as `typedef struct regex_t regex_t'
/usr/include/regex.h:420: error: declaration of `typedef struct
re_pattern_buffer regex_t'
/usr/include/httpd/pcreposix.h:66: error: conflicts with previous
declaration `typedef struct regex_t regex_t'
/usr/include/regex.h:420: error: declaration of `typedef struct
re_pattern_buffer regex_t'
/usr/include/httpd/pcreposix.h:66: error: conflicts with previous
declaration `typedef struct regex_t regex_t'
/usr/include/regex.h:420: error: declaration of `typedef struct
re_pattern_buffer regex_t'
/usr/include/httpd/pcreposix.h:66: error: conflicts with previous
declaration `typedef struct regex_t regex_t'
/usr/include/regex.h:451: error: conflicting declaration 'typedef
struct regmatch_t regmatch_t'
/usr/include/httpd/pcreposix.h:75: error: 'regmatch_t' has a previous
declaration as `typedef struct regmatch_t regmatch_t'
/usr/include/regex.h:451: error: declaration of `typedef struct
regmatch_t regmatch_t'
/usr/include/httpd/pcreposix.h:75: error: conflicts with previous
declaration `typedef struct regmatch_t regmatch_t'
/usr/include/regex.h:451: error: declaration of `typedef struct
regmatch_t regmatch_t'
/usr/include/httpd/pcreposix.h:75: error: conflicts with previous
declaration `typedef struct regmatch_t regmatch_t'
/usr/include/regex.h:451: error: declaration of `typedef struct
regmatch_t regmatch_t'
/usr/include/httpd/pcreposix.h:75: error: conflicts with previous
declaration `typedef struct regmatch_t regmatch_t'
In file included from ext/apache2/Configuration.cpp:39:
ext/common/LoggingAgent/FilterSupport.h:492: warning: `class
Passenger::FilterSupport::SimpleContext' has virtual functions but non-
virtual destructor
ext/common/LoggingAgent/FilterSupport.h:520: warning: `class
Passenger::FilterSupport::ContextFromLog' has virtual functions but
non-virtual destructor
ext/common/LoggingAgent/FilterSupport.h:722: warning: `struct
Passenger::FilterSupport::Filter::MultiExpression' has virtual
functions but non-virtual destructor
ext/common/LoggingAgent/FilterSupport.h:747: warning: `struct
Passenger::FilterSupport::Filter::Negation' has virtual functions but
non-virtual destructor
ext/common/LoggingAgent/FilterSupport.h:927: warning: `struct
Passenger::FilterSupport::Filter::Comparison' has virtual functions
but non-virtual destructor
ext/common/LoggingAgent/FilterSupport.h:983: warning: `struct
Passenger::FilterSupport::Filter::FunctionCall' has virtual functions
but non-virtual destructor
ext/common/LoggingAgent/FilterSupport.h:989: warning: `struct
Passenger::FilterSupport::Filter::StartsWithFunctionCall' has virtual
functions but non-virtual destructor
ext/common/LoggingAgent/FilterSupport.h:1003: warning: `struct
Passenger::FilterSupport::Filter::HasHintFunctionCall' has virtual
functions but non-virtual destructor
rake aborted!
Command failed with status (1): [g++ -Iext -Iext/common -fPIC -
fvisibility=...]

(See full trace by running task with --trace)

--------------------------------------------

It looks like something went wrong

Please read our Users guide for troubleshooting tips:

/usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.3/doc/Users guide
Apache.html

If that doesn't help, please use our support facilities at:

http://www.modrails.com/

We'll do our best to help you.

Hongli Lai

unread,
Feb 24, 2011, 12:44:46 PM2/24/11
to phusion-...@googlegroups.com, DedPihto
On Thu, Feb 24, 2011 at 6:17 PM, DedPihto <ekh...@hotmail.com> wrote:
> Hi all,
>
> I am trying to upgrade from Passenger Phusion 2.2.11 to 3.0.3. This is
> my environment.
>
> RedHat version: Red Hat Enterprise Linux AS release 4 (Nahant Update
> 5)
> Kernel: Linux someserver.xxx.yyy 2.6.9-55.ELsmp #1 SMP Fri Apr 20
> 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux
>
> Below is the error I am getting while running passenger-install-
> apache2-module. I would appreciate any thoughts on how to fix this.
>
> Thank you,
>  Eugene
>
> In file included from ext/common/LoggingAgent/FilterSupport.h:34,
>                 from ext/apache2/Configuration.cpp:39:
> /usr/include/regex.h:319: error: conflicting declaration 'REG_NOMATCH'
> /usr/include/httpd/pcreposix.h:57: error: 'REG_NOMATCH' has a previous
> declaration as `<anonymous enum> REG_NOMATCH'

Looks like there's something wrong with your Apache C headers.

Try Passenger Standalone instead.

--
Phusion | Ruby & Rails deployment, scaling and tuning solutions

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

DedPihto

unread,
Feb 24, 2011, 2:00:48 PM2/24/11
to Phusion Passenger Discussions
Thank you for the quick reply and thank you for the excellent product.
Please elaborate on what leads you to believe that Apache headers are
the issue. In the past years I was able to install and run Passenger
2.2.4, 2.2.5, and 2.2.11 without any issues. Please explain why c
headers would become an issue with v 3.0.3.

Unfortunately, due to the production configuration in Apache, I can
not run standalone version at this point.

Thank you for your help,
Eugene

On Feb 24, 12:44 pm, Hongli Lai <hon...@phusion.nl> wrote:
> E-mail: i...@phusion.nl

Hongli Lai

unread,
Feb 24, 2011, 3:57:16 PM2/24/11
to phusion-...@googlegroups.com, DedPihto
On Thu, Feb 24, 2011 at 8:00 PM, DedPihto <ekh...@hotmail.com> wrote:
> Thank you for the quick reply and thank you for the excellent product.
> Please elaborate on what leads you to believe that Apache headers are
> the issue.

It was based on the two line I quoted in my email.

Starting from 3.0.3 we now use regex.h, a system header that should
always work properly, and it looks like your Apache headers somehow
mess that up.

> Unfortunately, due to the production configuration in Apache, I can
> not run standalone version at this point.

You can setup Apache to reverse proxy to Standalone.

--
Phusion | Ruby & Rails deployment, scaling and tuning solutions

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl

xav

unread,
Mar 10, 2011, 9:07:43 AM3/10/11
to Phusion Passenger Discussions
For anyone else having this problem an alternative is to install and
older version of passenger from http://rubyforge.org/frs/?group_id=5873
which doesn't use that regex.h

Quick runthrough
cd /opt (or usr/local or whatever)
wget http://rubyforge.org/frs/download.php/71376/passenger-2.2.15.tar.gz
tar -xvzf passenger-2.2.15.tar.gz
./passenger-2.2.15/bin/passenger-install-apache2-module

That worked for me where the newer version failed. I know installing
outdated versions is not recommended but production servers etc.
In this particular case the server was a CentOs running Cpanel and WHM
which seems like it would make this a fairly common scenario. I'm not
too experienced so apologies if this was a stupid/obvious suggestion.

Kudos to phusion for the software,
Thanks,

Xav


On Feb 24, 8:57 pm, Hongli Lai <hon...@phusion.nl> wrote:
> On Thu, Feb 24, 2011 at 8:00 PM, DedPihto <ekhu...@hotmail.com> wrote:
> > Thank you for the quick reply and thank you for the excellent product.
> > Please elaborate on what leads you to believe that Apache headers are
> > the issue.
>
> It was based on the two line I quoted in my email.
>
> Starting from 3.0.3 we now use regex.h, a system header that should
> always work properly, and it looks like your Apache headers somehow
> mess that up.
>
> > Unfortunately, due to the production configuration in Apache, I can
> > not run standalone version at this point.
>
> You can setup Apache to reverse proxy to Standalone.
>
> --
> Phusion | Ruby & Rails deployment, scaling and tuning solutions
>
> Web:http://www.phusion.nl/
> E-mail: i...@phusion.nl
Reply all
Reply to author
Forward
0 new messages