Re: Compilation Error with Passenger 2.2.1

774 views
Skip to first unread message

Ben Tucker

unread,
Apr 21, 2009, 10:00:45 AM4/21/09
to Phusion Passenger Discussions
On Apr 21, 8:54 am, daphonz <cdre...@gmail.com> wrote:
> /usr/lib/libaprutil-0.so: undefined reference to
> `XML_SetElementHandler'
> /usr/lib/libaprutil-0.so: undefined reference to `XML_Parse'
> /usr/lib/libaprutil-0.so: undefined reference to `XML_ParserFree'
> /usr/lib/libaprutil-0.so: undefined reference to
> `XML_SetCharacterDataHandler'
> /usr/lib/libaprutil-0.so: undefined reference to `XML_ErrorString'
> /usr/lib/libaprutil-0.so: undefined reference to `XML_ParserCreate'
> /usr/lib/libaprutil-0.so: undefined reference to `XML_SetUserData'
> /usr/lib/libaprutil-0.so: undefined reference to `XML_GetErrorCode'
> collect2: ld returned 1 exit status

I'm guessing you're missing libexpat. If you're on an apt-based
system (like ubuntu), try 'sudo apt-get install libexpat1 libexpat1-
dev'

-Ben

daphonz

unread,
Apr 21, 2009, 10:01:43 AM4/21/09
to Phusion Passenger Discussions
I've actually solved my own problem. The XML Parser it couldn't find
was C eXpat libraries. We had them installed in /usr/lib/libexpat.so,
but for some reason, the Passenger compilation routine wasn't looking
there.

The solution was to modify line #53 of /usr/local/lib/ruby/gems/1.8/
gems/passenger-2.2.1/Rakefile

from:

EXTRA_LDFLAGS = ""

to:

EXTRA_LDFLAGS = "-lexpat"

Then, running ./passenger-install-apache2-module compiled
successfully.

-c

On Apr 21, 8:54 am, daphonz <cdre...@gmail.com> wrote:
> As of Passenger version 2.2, I've been unable to successfully compile
> Passenger on my server.  (2.0.2 - 2.1.3 all worked fine).  I'm running
> Red Hat Enterprise Linux AS release 4 (Nahant Update 7) on a 32-bit
> Intel system running Apache.
>
> When I try to run "passenger-install-apache2-module", everything seems
> to be going fine until I see this:
>
> g++ -I../../.. -fPIC -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/kerberos/include -I/usr/include/httpd -
> D_REENTRANT -I/usr/local/include -Wall -g -DPASSENGER_DEBUG -
> DBOOST_DISABLE_ASSERTS -c ../../../oxt/tracable_exception.cpp
>
> ar cru ext/apache2/libboost_oxt.a ext/apache2/libboost_oxt/boost/*.o
> ext/apache2/libboost_oxt/oxt/*.o
> ranlib ext/apache2/libboost_oxt.a
> g++ ext/common/ApplicationPoolServerExecutable.cpp -o ext/apache2/
> ApplicationPoolServerExecutable -Iext -Iext/common  -fPIC -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/kerberos/include -I/usr/
> include/httpd -D_REENTRANT -I/usr/local/include -Wall -g -
> DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS ext/apache2/
> libpassenger_common.a ext/apache2/libboost_oxt.a -fPIC -L/usr/lib -
> lapr-0 -L/usr/lib -laprutil-0 -lpthread
> /usr/lib/libaprutil-0.so: undefined reference to
> `XML_SetElementHandler'
> /usr/lib/libaprutil-0.so: undefined reference to `XML_Parse'
> /usr/lib/libaprutil-0.so: undefined reference to `XML_ParserFree'
> /usr/lib/libaprutil-0.so: undefined reference to
> `XML_SetCharacterDataHandler'
> /usr/lib/libaprutil-0.so: undefined reference to `XML_ErrorString'
> /usr/lib/libaprutil-0.so: undefined reference to `XML_ParserCreate'
> /usr/lib/libaprutil-0.so: undefined reference to `XML_SetUserData'
> /usr/lib/libaprutil-0.so: undefined reference to `XML_GetErrorCode'
> collect2: ld returned 1 exit status
> rake aborted!
> Command failed with status (1): [g++ ext/common/
> ApplicationPoolServerExecut...]
> /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.1/Rakefile:211:in
> `define_common_library_task'
> (See full trace by running task with --trace)
>
> --------------------------------------------
>
> It looks like something went wrong
>
> This happens with both 2.2.0 and 2.2.1.  I'm not sure how to interpret
> this error, beyond that it's possibly looking for some XML library
> that may not exist.
>
> Any help or comments would be appreciated.
>
> Thanks,
> Casey

Guillaume Desrat

unread,
Apr 22, 2009, 4:26:16 AM4/22/09
to Phusion Passenger Discussions
I got the same problem under Solaris 10 (SunOS 5.10 Generic_118833-20
sun4u sparc SUNW,Sun-Fire-V240).

EXTRA_LDFLAGS = "-lexpat -liconv" allowed to compile Passenger 2.2.1
successfully .


Thanks for the tip daphonz.
> > Casey- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -

gdelfino

unread,
Apr 25, 2009, 8:07:37 AM4/25/09
to Phusion Passenger Discussions
Thank you daphonz. This solved the problem for me under CentOS 5.3.

Regards,

Gustavo Delfino
Reply all
Reply to author
Forward
Message has been deleted
0 new messages