phusion / passenger

A fast and robust web server and application server for Ruby, Python and Node.js
https://www.phusionpassenger.com/
MIT License
4.99k stars 548 forks source link

[Phusion passenger] Compilation failed on sparc #300

Closed FooBarWidget closed 10 years ago

FooBarWidget commented 10 years ago

From jeremie.horhant@titinux.net on February 08, 2009 16:41:35

*\ What steps will reproduce the problem?

  1. Try to install phusion-passenger on sparc

*\ What is the expected output? What do you see instead?

I've attached my build log. I think there is a problem to link with boost lib.

*\ What version of the product are you using? On what operating system?

I'm using gentoo linux on a ultra-sparc. I've tried 2.0.3 and 2.0.6 (with gem system, gentoo packages and from source).

*\ Please provide any additional information below.

I don't know if these information will be usefull but there is a full description of my system

Portage 2.1.6.4 (default/linux/sparc/2008.0/server, gcc-4.1.2,

glibc-2.6.1- r0 , 2.6.27-gentoo sparc64)

System uname: Linux-2.6.27-gentoo-sparc64-sun4u-with-glibc2.0

Timestamp of tree: Sat, 07 Feb 2009 22:45:01 +0000

app-shells/bash:3.2_p39

dev-lang/python:2.4.4- r14 , 2.5.2- r7 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1- r2 sys-devel/autoconf: 2.63 sys-devel/automake: 1.5, 1.7.9- r1 , 1.9.6- r2 , 1.10.2 sys-devel/binutils: 2.18- r3 sys-devel/gcc-config: 1.4.0- r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.27- r2 ACCEPT_KEYWORDS="sparc" CBUILD="sparc-unknown-linux-gnu" CFLAGS="-O2 -mcpu=ultrasparc -pipe -mvis" CHOST="sparc-unknown-linux-gnu" CONFIG_PROTECT="/etc /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-O2 -mcpu=ultrasparc -pipe -mvis" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS=" ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ " LDFLAGS="-Wl,-O1" LINGUAS="fr" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="acl apache2 bzip2 clamav cli cracklib crypt dri fortran gcc64 gdbm gpm iconv ipv6 isdnlog logrotate mailwrapper midi mudflap mysql nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session snmp sparc spl ssl sysfs tcpd threads truetype unicode vhosts xml xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr" USERLAND="GNU" VIDEO_CARDS="fbdev glint mach64 mga r128 radeonsunbw2 suncg14 suncg3 suncg6 sunffb sunleo tdfx voodoo" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Attachment: build.log

Original issue: http://code.google.com/p/phusion-passenger/issues/detail?id=200

FooBarWidget commented 10 years ago

From honglilai on February 09, 2009 09:07:47

Which gcc version do you have?

FooBarWidget commented 10 years ago

From jeremie.horhant@titinux.net on February 09, 2009 11:41:31

I use gcc 4.1.2

FooBarWidget commented 10 years ago

From jeremie.horhant@titinux.net on February 19, 2009 01:55:54

I've finally found a solution on this page http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=485434 I've modified the Rakefile

I will test this build in pre-production and i'll post result here.

FooBarWidget commented 10 years ago

From honglilai on February 19, 2009 02:02:12

Could you try the Phusion Passenger version from git master? I believe this has been fixed a few weeks ago.

FooBarWidget commented 10 years ago

From jeremie.horhant@titinux.net on February 19, 2009 14:28:35

I'm afraid that I have the same error with master version. I've also tried with gcc 4.3.2 with the same result. :-\

FooBarWidget commented 10 years ago

From honglilai on March 15, 2009 03:28:09

So defining BOOST_SP_USE_PTHREADS works for you?

Do you know whether defining this macro on Solaris-Sparc might cause problems for other versions of Solaris?

FooBarWidget commented 10 years ago

From jeremie.horhant@titinux.net on March 15, 2009 09:19:57

I've just try to build the 2.1.2 version of passenger on my sparc and the problem is still present.


In ext/apache2:

g++ ApplicationPoolServerExecutable.cpp Utils.o Logging.o SystemTime.o CachedFileStat.o -o ApplicationPoolServerExecutable -I.. -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -D_REENTRANT -D_GLIBCPPPTHREADS -I/usr/local/include ../libboost_oxt.a -lpthread /tmp/cc3AIVSD.o: In function boost::detail::atomic_decrement(int*)': /root/tmp/passenger-2.1.2/ext/apache2/../boost/detail/sp_counted_base_sync.hpp:44: undefined reference tosync_fetch_and_add_4' /tmp/cc3AIVSD.o: In function boost::detail::atomic_increment(int*)': /root/tmp/passenger-2.1.2/ext/apache2/../boost/detail/sp_counted_base_sync.hpp:39: undefined reference tosync_fetch_and_add_4' /tmp/cc3AIVSD.o: In function boost::detail::atomic_conditional_increment(int*)': /root/tmp/passenger-2.1.2/ext/apache2/../boost/detail/sp_counted_base_sync.hpp:62: undefined reference tosync_val_compare_and_swap_4' collect2: ld returned 1 exit status rake aborted! Command failed with status (1): [g++ ApplicationPoolServerExecutable.cpp Ut...] /root/tmp/passenger-2.1.2/Rakefile:177

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

The THREADING_FLAGS var seems to have been removed from the Rakefile so i've modified the CXXFLAGS var

+CXXFLAGS = "-Wall #{OPTIMIZATION_FLAGS} -DBOOST_SP_USE_PTHREADS"

And with this modification all works fine with and without optimization.

@honglila I'm sorry but I have never used Solaris so I can't tell you anything related with it.

FooBarWidget commented 10 years ago

From honglilai on March 15, 2009 09:24:57

Oops, I mistook the report to mean Solaris on Sparc. You're running Gentoo. :)

Can you post the output of the following command?

echo | cpp -dM

FooBarWidget commented 10 years ago

From jeremie.horhant@titinux.net on March 15, 2009 09:31:04

Of course ;-)

My version of cpp is "(Gentoo 4.3.2- r3 p1.6, pie-10.1.5) 4.3.2"

define DBL_MIN_EXP (-1021)

define FLT_MIN 1.17549435e-38F

define DEC64_DEN 0.000000000000001E-383DD

define CHAR_BIT 8

define WCHAR_MAX 2147483647

define DBL_DENORM_MIN 4.9406564584124654e-324

define FLT_EVAL_METHOD 0

define unix 1

define DBL_MIN_10_EXP (-307)

define FINITE_MATH_ONLY 0

define GNUC_PATCHLEVEL 2

define DEC64_MAX_EXP 384

define sparc 1

define SHRT_MAX 32767

define LDBL_MAX 1.18973149535723176508575932662800702e+4932L

define UINTMAX_TYPE long long unsigned int

define **linux 1

define __DEC32_EPSILON** 1E-6DF

define **unix 1

define __LDBL_MAX_EXP** 16384

define linux 1

define SCHAR_MAX 127

define DBL_DIG 15

define SIZEOF_INT 4

define SIZEOF_POINTER 4

define USER_LABEL_PREFIX

define STDC_HOSTED 1

define LDBL_HAS_INFINITY 1

define FLT_EPSILON 1.19209290e-7F

define LDBL_MIN 3.36210314311209350626267781732175260e-4932L

define DEC32_MAX 9.999999E96DF

define SIZEOF_LONG 4

define DECIMAL_DIG 36

define gnu_linux 1

define LDBL_HAS_QUIET_NAN 1

define GNUC 4

define FLT_HAS_DENORM 1

define SIZEOF_LONG_DOUBLE 16

define DBL_MAX 1.7976931348623157e+308

define DBL_HAS_INFINITY 1

define DEC32_MIN_EXP (-95)

define LDBL_HAS_DENORM 1

define DEC128_MAX 9.999999999999999999999999999999999E6144DL

define DEC32_MIN 1E-95DF

define DBL_MAX_EXP 1024

define DEC128_EPSILON 1E-33DL

define LONG_LONG_MAX 9223372036854775807LL

define SIZEOF_SIZE_T 4

define sparc 1

define SIZEOF_WINT_T 4

define **GXX_ABI_VERSION 1002

define __FLT_MIN_EXP** (-125)

define DBL_MIN 2.2250738585072014e-308

define DEC128_MIN 1E-6143DL

define REGISTER_PREFIX

define DBL_HAS_DENORM 1

define NO_INLINE 1

define FLT_MANT_DIG 24

define VERSION "4.3.2"

define **sparc 1

define __DEC64_EPSILON** 1E-15DD

define DEC128_MIN_EXP (-6143)

define unix 1

define SIZE_TYPE unsigned int

define DEC32_DEN 0.000001E-95DF

define ELF 1

define FLT_RADIX 2

define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L

define SIZEOF_PTRDIFF_T 4

define FLT_HAS_QUIET_NAN 1

define FLT_MAX_10_EXP 38

define LONG_MAX 2147483647L

define FLT_HAS_INFINITY 1

define DEC64_MAX 9.999999999999999E384DD

define DEC64_MANT_DIG 16

define DEC32_MAX_EXP 96

define linux 1

define DEC128_DEN 0.000000000000000000000000000000001E-6143DL

define LDBL_MANT_DIG 113

define DBL_HAS_QUIET_NAN 1

define _LONGLONG 1

define __WCHAR_TYPE__ int

define SIZEOF_FLOAT 4

define DEC64_MIN_EXP (-383)

define FLT_DIG 6

define INT_MAX 2147483647

define LONG_DOUBLE_128 1

define FLT_MAX_EXP 128

define DBL_MANT_DIG 53

define DEC64_MIN 1E-383DD

define WINT_TYPE unsigned int

define SIZEOF_SHORT 2

define LDBL_MIN_EXP (-16381)

define LDBL_MAX_10_EXP 4932

define DBL_EPSILON 2.2204460492503131e-16

define SIZEOF_WCHAR_T 4

define DEC_EVAL_METHOD 2

define INTMAX_MAX 9223372036854775807LL

define FLT_DENORM_MIN 1.40129846e-45F

define FLT_MAX 3.40282347e+38F

define SIZEOF_DOUBLE 8

define FLT_MIN_10_EXP (-37)

define INTMAX_TYPE long long int

define DEC128_MAX_EXP 6144

define GNUC_MINOR 3

define DEC32_MANT_DIG 7

define DBL_MAX_10_EXP 308

define LDBL_DENORM_MIN 6.47517511943802511092443895822764655e-4966L

define STDC 1

define PTRDIFF_TYPE int

define DEC128_MANT_DIG 34

define LDBL_MIN_10_EXP (-4931)

define SIZEOF_LONG_LONG 8

define LDBL_DIG 33

define GNUC_GNU_INLINE 1

FooBarWidget commented 10 years ago

From honglilai on March 15, 2009 09:53:33

What happens if you modify ext/boost/detail/sp_counted_base.hpp and change

elif defined(GNUC) && ( defined( sparcv8 ) || defined( sparcv9 ) )

to

elif defined(GNUC) && ( defined( sparc ) || defined( __sparcv8 ) ||

defined( __sparcv9 ) )

FooBarWidget commented 10 years ago

From jeremie.horhant@titinux.net on March 15, 2009 11:02:49

I've remove my old modification and i've put your's.

The error is different :

In ext/apache2:

g++ ApplicationPoolServerExecutable.cpp Utils.o Logging.o SystemTime.o CachedFileStat.o -o ApplicationPoolServerExecutable -I.. -Wall -g -O2 -DBOOST_DISABLE_ASSERTS -D_REENTRANT -D_GLIBCPP__PTHREADS -I/usr/local/include ../libboost_oxt.a -lpthread

/tmp/ccriPSIb.s: Assembler messages:

/tmp/ccriPSIb.s:102: Error: Architecture mismatch on "cas".

/tmp/ccriPSIb.s:102: (Requires v9|v9a|v9b; requested architecture is sparclite.)

/tmp/ccriPSIb.s:501: Error: Architecture mismatch on "cas".

/tmp/ccriPSIb.s:501: (Requires v9|v9a|v9b; requested architecture is sparclite.)

/tmp/ccriPSIb.s:1719: Error: Architecture mismatch on "cas".

/tmp/ccriPSIb.s:1719: (Requires v9|v9a|v9b; requested architecture is sparclite.)

/tmp/ccriPSIb.s:1785: Error: Architecture mismatch on "cas".

/tmp/ccriPSIb.s:1785: (Requires v9|v9a|v9b; requested architecture is sparclite.) .... hundreads of lines like that. :-\

FooBarWidget commented 10 years ago

From honglilai on March 15, 2009 11:58:05

OK so that doesn't work. I'll go with the other solution.

Could you post the output of:

ruby -e "puts RUBY_PLATFORM"

FooBarWidget commented 10 years ago

From jeremie.horhant@titinux.net on March 15, 2009 13:28:48

The output is sparc-linux

FooBarWidget commented 10 years ago

From honglilai on March 15, 2009 13:38:52

Could you check whether the latest git commit works?

FooBarWidget commented 10 years ago

From jeremie.horhant@titinux.net on March 15, 2009 16:50:15

I build passenger with the master branch and all works fine.

Thank you very much for your work. :-)

And in the future, if you have to test something on sparc I would be pleased to help you. (My username on github is titinux)

FooBarWidget commented 10 years ago

From honglilai on March 16, 2009 02:07:31

Status: Fixed
Labels: Milestone-2.2.0