Does not work on ARM platform ( undefined symbol: __sync_val_compare_and_swap_4 )

414 views
Skip to first unread message

Kauko.T

unread,
Mar 24, 2010, 2:23:26 AM3/24/10
to Phusion Passenger Discussions
Hi, i`m trying to set up apache wit ruby on rails. After ruby on rails
installation i pasted the following lines to apache config ( /etc/
httpd/conf/httpd.conf ) :

LoadModule passenger_module /root/passenger/ext/apache2/
mod_passenger.so
PassengerRoot /root/passenger
PassengerRuby /usr/bin/ruby

and restarted apache, i get the following error report.

[root@fedora-arm passenger]# /etc/init.d/httpd restart
Stopping httpd: [FAILED]
Starting httpd: httpd: Syntax error on line 204 of /etc/httpd/conf/
httpd.conf: Cannot load /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/
ext/apache2/mod_passenger.so into server: /usr/lib/ruby/gems/1.8/gems/
passenger-2.2.11/ext/apache2/mod_passenger.so: undefined symbol:
__sync_val_compare_and_swap_4
[FAILED]

My system is Marvell Sheevaplug which is based on ARM architecture.
(Yeah i know, running as root is bad but this is all experimental..)

ruby -e "puts RUBY_PLATFORM" gives me
arm-linux-eabi

Can anyone help me on this?
Thanks!

Hongli Lai

unread,
Mar 24, 2010, 4:36:23 AM3/24/10
to phusion-...@googlegroups.com

What's your GCC version?

--
Phusion | The Computer Science Company

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

Kauko.T

unread,
Mar 24, 2010, 10:58:00 AM3/24/10
to Phusion Passenger Discussions
gcc version 4.4.2 20091019 (Red Hat 4.4.2-5) (GCC)

Additional info on gcc..

gcc -v
Using built-in specs.
Target: armv5tel-redhat-linux-gnueabi
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --
infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/
bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --
enable-checking=release --with-system-zlib --enable-__cxa_atexit --
disable-libunwind-exceptions --enable-gnu-unique-object --enable-
languages=c,c++,objc,obj-c++,java,fortran --enable-java-awt=gtk --
disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-
gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-
mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-
multilib --disable-sjlj-exceptions --build=armv5tel-redhat-linux-
gnueabi
Thread model: posix

Gem passenger is 2.2.11 and apache is 2.2.13.

uname -a gives me

Linux fedora-arm 2.6.33 #2 PREEMPT Tue Mar 2 14:27:17 MST 2010
armv5tel armv5tel armv5tel GNU/Linux

Thanks for the reply.

Hongli Lai

unread,
Apr 2, 2010, 5:07:25 AM4/2/10
to phusion-...@googlegroups.com
Looks like I'll have to disable the use of GCC synchronization
primitives on your platform. Can you tell me the value of your
RUBY_PLATFORM constant?

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

Kauko.T

unread,
Apr 5, 2010, 3:17:47 PM4/5/10
to Phusion Passenger Discussions
ruby -e "puts RUBY_PLATFORM" gives me
armv5tel-linux-eabi

ruby -e "puts RUBY_RELEASE_DATE"
2009-08-04

Hopefully that is the information you need. :)

Hongli Lai

unread,
Apr 15, 2010, 8:31:33 AM4/15/10
to phusion-...@googlegroups.com

Can you check whether this patch works? http://pastie.org/921102

Kauko.T

unread,
Apr 15, 2010, 9:39:10 AM4/15/10
to Phusion Passenger Discussions
I`m not sure how to apply your patch, should it just work by using the
following command ?

patch passenger.so < name_of_patch_file


Please post instructions how to apply the patch.
Thanks.

Hongli Lai

unread,
Apr 15, 2010, 9:44:19 AM4/15/10
to phusion-...@googlegroups.com

Download the Phusion Passenger source code. In the source tree, apply
the patch with 'patch -p1 < patch_file'. Then install Phusion
Passenger as instructed by the README.

Kauko.T

unread,
Apr 15, 2010, 2:06:17 PM4/15/10
to Phusion Passenger Discussions
Followed your instructions, got the source code, applied the patch and
then ran the ./passenger-X.X.X/bin/passenger-install-apache2-module
command.

Patch didnt work. :(

I pasted the install results to http://www.pastie.org/921620

Hongli Lai

unread,
Apr 22, 2010, 11:51:25 AM4/22/10
to phusion-...@googlegroups.com
It looks like it didn't pick up the changes properly. Maybe the
compilation cache needs to be cleared. From the Phusion Passenger
source directory, could you run this?

1. rm -rf .cache
2. ruby -Ilib -rphusion_passenger/platform_info -e 'puts
PlatformInfo.portability_cflags'

Can you paste the result of the second command?

--
Phusion | The Computer Science Company

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

Kauko.T

unread,
Apr 24, 2010, 9:12:07 AM4/24/10
to Phusion Passenger Discussions
I must have messed something up because i got the following reply line
with 'puts.... portability_flags'
-D_REENTRANT -I/usr/local/include

So i got the source again, applied the patch and this time got
different reply.
ruby -Ilib -rphusion_passenger/platform_info -e 'puts gives me

-D_REENTRANT -I/usr/local/include -DBOOST_SP_USE_PTHREADS

And now it looks like everything works! i got the apache server up and
running and so does phusion passenger.

Now i have to keep searching answers for amahi installation problems.

Thank you very much for your help!
Reply all
Reply to author
Forward
0 new messages