Error installing Passenger 3.0.8 Nginx module on Ubuntu 11.10 Alpha 3

975 views
Skip to first unread message

Halle

unread,
Aug 14, 2011, 5:08:59 PM8/14/11
to Phusion Passenger Discussions
Hello,

I have a successful Passenger install for which I'm trying to install
the Nginx module. sudo passenger-install-nginx-module results in the
following error:

/usr/bin/ld: /usr/lib/ruby/gems/1.8/gems/passenger-3.0.8/ext/nginx/../
common/libpassenger_common.a(aggregate.o): undefined reference to
symbol 'pow@@GLIBC_2.0'
/usr/bin/ld: note: 'pow@@GLIBC_2.0' is defined in DSO /usr/lib/i386-
linux-gnu/libm.so so try adding it to the linker command line
/usr/lib/i386-linux-gnu/libm.so: could not read symbols: Invalid
operation
collect2: ld returned 1 exit status
make[1]: *** [objs/nginx] Error 1
make[1]: Leaving directory `/tmp/root-passenger-6878/nginx-1.0.5'
make: *** [build] Error 2
--------------------------------------------

It looks like something went wrong


This is a pretty new system install so it's unlikely that anything is
particularly out of the ordinary with it yet. Is there a way to work
around this error? Thanks.

Hongli Lai

unread,
Aug 15, 2011, 3:53:26 AM8/15/11
to phusion-...@googlegroups.com
Can you paste a bit more of the output? I can't see the compilation command.

> --
> You received this message because you are subscribed to the Google Groups "Phusion Passenger Discussions" group.
> To post to this group, send email to phusion-...@googlegroups.com.
> To unsubscribe from this group, send email to phusion-passen...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/phusion-passenger?hl=en.
>
>

--
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)

Halle

unread,
Aug 15, 2011, 4:26:51 AM8/15/11
to Phusion Passenger Discussions
Hi Hongli,

Thank you, here is the entire output with some parts trimmed for
readability (this is with the automatic install -- this is my first
install so if I have to install with any specific arguments it will be
helpful for me to get the complete command to copy/paste):

Compiling Passenger support files...
# /usr/bin/ruby1.8 /usr/bin/rake nginx:clean nginx RELEASE=yes
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 agents/nginx/PassengerHelperAgent
mkdir -p ext/common/libboost_oxt
g++ -Iext -D_REENTRANT -I/usr/local/include -
DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -
DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wextra -Wno-
unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-
missing-field-initializers -Wno-long-long -g -DPASSENGER_DEBUG -
DBOOST_DISABLE_ASSERTS -o ext/common/libboost_oxt/aggregate.o -c ext/
common/libboost_oxt/aggregate.cpp
mkdir -p ext/common/libboost_oxt
rm -rf ext/common/libboost_oxt.a
ar cru ext/common/libboost_oxt.a ext/common/libboost_oxt/aggregate.o
ranlib ext/common/libboost_oxt.a
mkdir -p ext/common/libpassenger_common
g++ -Iext -Iext/common -Iext/libev -D_REENTRANT -I/usr/local/include -
DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -
DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wextra -Wno-
unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-
missing-field-initializers -Wno-long-long -g -DPASSENGER_DEBUG -
DBOOST_DISABLE_ASSERTS -o ext/common/libpassenger_common/aggregate.o -
c ext/common/libpassenger_common/aggregate.cpp
rm -rf ext/common/libpassenger_common.a
ar cru ext/common/libpassenger_common.a ext/common/libpassenger_common/
aggregate.o
ranlib ext/common/libpassenger_common.a
g++ ext/nginx/HelperAgent.cpp -o agents/nginx/PassengerHelperAgent -
Iext -Iext/common -D_REENTRANT -I/usr/local/include -
DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -
DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wextra -Wno-
unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-
missing-field-initializers -Wno-long-long -g -DPASSENGER_DEBUG -
DBOOST_DISABLE_ASSERTS ext/common/libpassenger_common.a ext/common/
libboost_oxt.a -lpthread -rdynamic
In file included from ext/nginx/HelperAgent.cpp:63:0:
ext/common/Utils/Dechunker.h:232:8: warning: extra tokens at end of
#endif directive [enabled by default]
g++ ext/common/Watchdog.cpp -o agents/PassengerWatchdog -Iext -Iext/
common -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -
DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -
DHAS_LFENCE -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-
arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -
g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS ext/common/
libpassenger_common.a ext/common/libboost_oxt.a -lpthread -rdynamic
g++ ext/common/LoggingAgent/Main.cpp -o agents/PassengerLoggingAgent -
Iext -Iext/common -Iext/libev -D_REENTRANT -I/usr/local/include -
DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -
DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wextra -Wno-
unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-
missing-field-initializers -Wno-long-long -g -DPASSENGER_DEBUG -
DBOOST_DISABLE_ASSERTS ext/common/libpassenger_common.a ext/common/
libboost_oxt.a ext/libev/.libs/libev.a -L/usr/lib/i386-linux-gnu -
lcurl -Wl,-Bsymbolic-functions -lz -lpthread -rdynamic

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

Compiling and installing Nginx...
# sh ./configure --prefix='/opt/nginx' --with-http_ssl_module --with-
cc-opt='-Wno-error' --add-module='/usr/lib/ruby/gems/1.8/gems/
passenger-3.0.8/ext/nginx'
checking for OS
+ Linux 3.0.0-8-generic-pae i686
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 4.6.1 (Ubuntu/Linaro 4.6.1-6ubuntu6)

[Lots of checks trimmed for readability]

configuring additional modules
adding module in /usr/lib/ruby/gems/1.8/gems/passenger-3.0.8/ext/nginx
checking for Math library ... found
+ ngx_http_passenger_module was configured
checking for PCRE library ... found
checking for OpenSSL library ... found
checking for zlib library ... found
creating objs/Makefile

Configuration summary
+ using system PCRE library
+ using system OpenSSL library
+ md5: using OpenSSL library
+ sha1: using OpenSSL library
+ using system zlib library

nginx path prefix: "/opt/nginx"
nginx binary file: "/opt/nginx/sbin/nginx"
nginx configuration prefix: "/opt/nginx/conf"
nginx configuration file: "/opt/nginx/conf/nginx.conf"
nginx pid file: "/opt/nginx/logs/nginx.pid"
nginx error log file: "/opt/nginx/logs/error.log"
nginx http access log file: "/opt/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"
# make
make -f objs/Makefile
make[1]: Entering directory `/tmp/root-passenger-9772/nginx-1.0.5'

[lots of gcc output trimmed for readability]

gcc -o objs/nginx \

[lots of .o trimmed for readability]

-lpthread -lcrypt -lm /usr/lib/ruby/gems/1.8/gems/passenger-3.0.8/ext/
nginx/../common/libpassenger_common.a /usr/lib/ruby/gems/1.8/gems/
passenger-3.0.8/ext/nginx/../common/libboost_oxt.a -lstdc++ -lpthread -
lpcre -lssl -lcrypto -ldl -lz
/usr/bin/ld: /usr/lib/ruby/gems/1.8/gems/passenger-3.0.8/ext/nginx/../
common/libpassenger_common.a(aggregate.o): undefined reference to
symbol 'pow@@GLIBC_2.0'
/usr/bin/ld: note: 'pow@@GLIBC_2.0' is defined in DSO /usr/lib/i386-
linux-gnu/libm.so so try adding it to the linker command line
/usr/lib/i386-linux-gnu/libm.so: could not read symbols: Invalid
operation
collect2: ld returned 1 exit status
make[1]: *** [objs/nginx] Error 1
make[1]: Leaving directory `/tmp/root-passenger-9772/nginx-1.0.5'
make: *** [build] Error 2
--------------------------------------------

It looks like something went wrong

Please read our Users guide for troubleshooting tips:

/usr/lib/ruby/gems/1.8/gems/passenger-3.0.8/doc/Users guide
Nginx.html

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

http://www.modrails.com/

We'll do our best to help you.
> > For more options, visit this group athttp://groups.google.com/group/phusion-passenger?hl=en.
>
> --
> Phusion | Ruby & Rails deployment, scaling and tuning solutions
>
> Web:http://www.phusion.nl/
> E-mail: i...@phusion.nl

Hongli Lai

unread,
Aug 15, 2011, 6:03:31 AM8/15/11
to phusion-...@googlegroups.com
On Mon, Aug 15, 2011 at 10:26 AM, Halle <win...@politepix.com> wrote:
> Hi Hongli,
>
> Thank you, here is the entire output with some parts trimmed for
> readability (this is with the automatic install -- this is my first
> install so if I have to install with any specific arguments it will be
> helpful for me to get the complete command to copy/paste):
>
> Compiling and installing Nginx...
> # sh ./configure --prefix='/opt/nginx' --with-http_ssl_module --with-
> cc-opt='-Wno-error' --add-module='/usr/lib/ruby/gems/1.8/gems/
> passenger-3.0.8/ext/nginx'
> checking for OS
>  + Linux 3.0.0-8-generic-pae i686
> checking for C compiler ... found
>  + using GNU C compiler
>  + gcc version: 4.6.1 (Ubuntu/Linaro 4.6.1-6ubuntu6)
>
> [Lots of checks trimmed for readability]

Could you post the checks? The configure script should check for the
availability of the math library.

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

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

Halle

unread,
Aug 15, 2011, 6:30:39 AM8/15/11
to Phusion Passenger Discussions

On Aug 15, 12:03 pm, Hongli Lai <hon...@phusion.nl> wrote:

> Could you post the checks? The configure script should check for the
> availability of the math library.

Certainly, here they are:

# sh ./configure --prefix='/opt/nginx' --with-http_ssl_module --with-
cc-opt='-Wno-error' --add-module='/usr/lib/ruby/gems/1.8/gems/
passenger-3.0.8/ext/nginx'
checking for OS
+ Linux 3.0.0-8-generic-pae i686
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 4.6.1 (Ubuntu/Linaro 4.6.1-6ubuntu6)
checking for gcc -pipe switch ... found
checking for gcc builtin atomic operations ... found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for unistd.h ... found
checking for inttypes.h ... found
checking for limits.h ... found
checking for sys/filio.h ... not found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for crypt.h ... found
checking for Linux specific features
checking for epoll ... found
checking for sendfile() ... found
checking for sendfile64() ... found
checking for sys/prctl.h ... found
checking for prctl(PR_SET_DUMPABLE) ... found
checking for sched_setaffinity() ... found
checking for crypt_r() ... found
checking for sys/vfs.h ... found
checking for nobody group ... not found
checking for nogroup group ... found
checking for poll() ... found
checking for /dev/poll ... not found
checking for kqueue ... not found
checking for crypt() ... not found
checking for crypt() in libcrypt ... found
checking for F_READAHEAD ... not found
checking for posix_fadvise() ... found
checking for O_DIRECT ... found
checking for F_NOCACHE ... not found
checking for directio() ... not found
checking for statfs() ... found
checking for statvfs() ... found
checking for dlopen() ... not found
checking for dlopen() in libdl ... found
checking for sched_yield() ... found
checking for SO_SETFIB ... not found
checking for accept4() ... found
checking for int size ... 4 bytes
checking for long size ... 4 bytes
checking for long long size ... 8 bytes
checking for void * size ... 4 bytes
checking for uint64_t ... found
checking for sig_atomic_t ... found
checking for sig_atomic_t size ... 4 bytes
checking for socklen_t ... found
checking for in_addr_t ... found
checking for in_port_t ... found
checking for rlim_t ... found
checking for uintptr_t ... uintptr_t found
checking for system endianess ... little endianess
checking for size_t size ... 4 bytes
checking for off_t size ... 8 bytes
checking for time_t size ... 4 bytes
checking for setproctitle() ... not found
checking for pread() ... found
checking for pwrite() ... found
checking for sys_nerr ... found
checking for localtime_r() ... found
checking for posix_memalign() ... found
checking for memalign() ... found
checking for mmap(MAP_ANON|MAP_SHARED) ... found
checking for mmap("/dev/zero", MAP_SHARED) ... found
checking for System V shared memory ... found
checking for POSIX semaphores ... not found
checking for POSIX semaphores in libpthread ... found
checking for struct msghdr.msg_control ... found
checking for ioctl(FIONBIO) ... found
checking for struct tm.tm_gmtoff ... found
checking for struct dirent.d_namlen ... not found
checking for struct dirent.d_type ... found

Hongli Lai

unread,
Aug 15, 2011, 8:00:55 AM8/15/11
to phusion-...@googlegroups.com
On Mon, Aug 15, 2011 at 12:30 PM, Halle <win...@politepix.com> wrote:
> Certainly, here they are:

> checking for Math library ... found

Looks like the math library is correctly detected and correctly linked
to. Maybe it has got something to do with the linking order. Can you
run that big link command (gcc -o objs/nginx ...) but move the
argument "-lm" from the middle to the end? Does that help?

acamargo

unread,
Sep 2, 2011, 4:35:44 PM9/2/11
to phusion-...@googlegroups.com
hi. I'm getting same error on beta1. how did this finish? :) any progress?

acamargo

unread,
Sep 5, 2011, 7:20:06 AM9/5/11
to phusion-...@googlegroups.com
hey! I solve this issue moving block:

ngx_feature="Math library"
ngx_feature_name=
ngx_feature_run=no
ngx_feature_incs="#include <math.h>"
ngx_feature_path=
ngx_feature_libs="-lm"
ngx_feature_test="pow(1, 2)" 
. auto/feature
if [ $ngx_found = yes ]; then
    CORE_LIBS="$CORE_LIBS -lm"
fi

to after:

ngx_addon_name=ngx_http_passenger_module
HTTP_MODULES="$HTTP_MODULES ngx_http_passenger_module"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS \
    ${ngx_addon_dir}/ngx_http_passenger_module.c \
    ${ngx_addon_dir}/Configuration.c \
    ${ngx_addon_dir}/ContentHandler.c \
    ${ngx_addon_dir}/StaticContentHandler.c"
NGX_ADDON_DEPS="$NGX_ADDON_DEPS \
    ${ngx_addon_dir}/Configuration.h \
    ${ngx_addon_dir}/ContentHandler.h \
    ${ngx_addon_dir}/StaticContentHandler.h \
    ${ngx_addon_dir}/ngx_http_passenger_module.h \
    ${ngx_addon_dir}/../common/Constants.h"
CORE_LIBS="$CORE_LIBS  \
    ${ngx_addon_dir}/../common/libpassenger_common.a \
    ${ngx_addon_dir}/../common/libboost_oxt.a \
    -lstdc++ -lpthread"

in ext/nginx/config

Hongli, you are right, this is a linking parameter order issue...

PS.: It worked on passenger 3.0.8 and 3.0.9

jamesr

unread,
Nov 8, 2011, 9:55:21 AM11/8/11
to phusion-...@googlegroups.com
I can confirm this change works for me also with the latest version of Ubuntu (10.11) and the lastest version of passenger.

It was broken and I had the same error before changing the order of that file.
Reply all
Reply to author
Forward
0 new messages