Git Product home page Git Product logo

Comments (19)

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From honglilai on April 14, 2008 12:51:17

Could you add '#define _KERNEL' to the beginning of ext/passenger/native_support.c
and check whether that works?

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From honglilai on April 14, 2008 15:36:21

Labels: OpSys-Solaris Portability

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From martin.carpenter on April 15, 2008 01:15:59

Either definition (_KERNEL or _XPG4_2) is sufficient to resolve the issue (and not
introduce any other compilation errors).

#define _XPG_4_2 seems a more sensible choice?

pwd

/usr/local/lib/ruby/gems/1.8/gems/passenger-1.0.1/ext/passenger

make

gcc -I. -I/usr/local/lib/ruby/1.8/sparc-solaris2.10 -I/usr/local/lib/ruby/1.8/sparc-
solaris2.10 -I. -I/usr/local/include -I/usr/local/ssl/include -I/usr/local/include/
ncurses -I/usr/local/BerkeleyDB.4.2/include -I/usr/openwin/include -fPIC -O2 -L/usr/
local/lib -R/usr/local/lib -L/usr/local/ssl/lib -R/usr/local/ssl/lib -L/usr/openwin/
lib -R/usr/openwin/lib -c native_support.c
gcc -shared -L/usr/local/lib -R/usr/local/lib -R/usr/lib -L/usr/lib -R/usr/openwin/
lib -L/usr/openwin/lib -L/usr/local/ssl/lib -R/usr/local/ssl/lib -L/usr/local/
BerkeleyDB.4.2/lib -R/usr/local/BerkeleyDB.4.2/lib -L/usr/X11R6/lib -R/usr/X11R6/
lib -L'/usr/local/lib' -Wl,-R'/usr/local/lib' -o native_support.so
native_support.o -ldl -lcrypt -lm -lc

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From honglilai on April 15, 2008 01:57:24

Compilation succeeds, that's good. But does Passenger actually work after this?

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From martin.carpenter on April 15, 2008 15:31:16

Compilation continues, but the build does not succeed. I have tested manually as
follows:

pwd

/usr/local/lib/ruby/gems/1.8/gems/passenger-1.0.1

rake clean

...

rake

...

I've attached the script of my session, with _XPG4_2 #def'ed early in
native_support.c as above.

There are a two issues:

  1. Redefinitions of UINT8_C, UINT16_C, UINT32_C. Definitions in system file /usr/
    include/sys/int_const.h conflicts with boost/cstdint.hpp. These throw warnings.
  2. uint8/16/32_t typedefs are missing. These throw errors. Needs <stdint.h> from
    somewhere?

Attached full script from my test.

Attachment: typescript

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From yukkestar on April 29, 2008 19:35:36

fails Solaris 10/i386

$ uname -a
SunOS abc 5.10 Generic_118855-33 i86pc i386 i86pc
$ ruby -v
ruby 1.8.6 (2008-03-03 patchlevel 114) [i386-solaris2.10]
$ gem -v
1.1.0
$ gcc -v
Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/specs
Configured with: /builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure
--prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld
--without-gnu-ld --enable-languages=c,c++ --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From robbie.allen on May 01, 2008 13:18:11

Any update on a fix? It fails for me too:

[DEV:/] admin$ uname -a
SunOS z13661AA.textdrive.com 5.11 snv_65 i86pc i386 i86pc
[DEV:/] admin$ ruby -v
ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-solaris2.8]
[DEV:/] admin$ gem -v
0.9.2
[DEV:/] admin$ gcc -v
Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/specs
Configured with: /builds2/sfwnv-gate/usr/src/cmd/gcc/gcc-3.4.3/configure
--prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld
--without-gnu-ld --enable-languages=c,c++,f77,objc --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-20050802)

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From honglilai on May 01, 2008 15:04:30

Well none of our team have Solaris, so a patch would be much appreciated.

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From Rawn027 on May 01, 2008 16:25:13

Something that might be worth it is a development VM for Solaris. If you need any suggestions of tips, let me
know.

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From ausbits on May 06, 2008 07:21:03

I see on http://blog.igorminar.com/2006/09/solaris-lighttpd-fastcgi-ssl-howto.html that the Sun C compiler was required in order to successfully compile ruby-fcgi. I
am wondering if this might also prove useful for mod_rails.

This is a totally naive comment on my part, but I am keen to see passenger up and
running on Solaris so I thought I would mention it as another thing to try.

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From chris.a.williams on May 20, 2008 07:19:57

Just a note that someone did manage to get it compiled under Sun Studio on an
OpenSolaris machine: http://tempusfactor.com/2008/04/the-joy-of-c/ Though when I tried to run bin/passenger-install-apache2-module on a Joyent machine
with the tarball he links I wasn't able to get it to compile.

David Kleiner is also trying and ran into issues: http://opensolaris.org/jive/thread.jspa?threadID=57357&tstart=15 and http://groups.google.com/group/phusion-passenger/browse_thread/thread/6870c2f026926ae2/0c6deb7df69f9d37 I'd really like to get this working on my Joyent box, it seems like combined we're
pretty close to getting it compiling - but I'm useless with fixing builds and C/C++
code myself.

Has anyone managed to get it to work? I can provide SSH/SFTP access to a Joyent box
for you if it'll help Hongli. It'd be great to get mod_rails on Joyent as they are
one of the more well-known Rails hosting providers....

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From chris.a.williams on May 20, 2008 07:24:18

I should note that the box I'm trying to get it compiled on outputs the following for
uname -a:
SunOS xxx.joyent.us 5.11 snv_86 i86pc i386 i86pc

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From harrisj.home on June 03, 2008 08:20:42

I actually got mod_rails to finally compile on Solaris 10 x86 with GCC by making a
few modifications to the rake files and source. It ran through all the tests too,
although I haven't yet tried using it to serve content. But this is what worked for
me (thanks to the suggestions made by others previously):

  • I placed a #define _XPG4_2 directive at the top of native_support.c
  • In the extconf.rb for native_support.c, I added the following line
    have_library('xnet')
    would only want to do this for Solaris.
  • In the Rakefile, I added the following CPPFLAGS
    -D_XOPEN_SOURCE=500 -D_XPG4_2 -D__EXTENSIONS__ -DBOOST_HAS_STDINT_H
    I am no expert in Solaris compilation, but the purpose of 3 of these are to tell
    Solaris to use Posix/Xopen/XNS directives in the include and a smarter person than I
    could probably figure out a better way to do that. The last directive is to keep
    Boost from loading its own definitions for the types in stdint.h
  • To the LDFLAGS, I added the following "-lxnet -lrt -lsocket -lnsl" to link in
    Solaris' networking libraries (someone can probably figure out a better way of
    including this stuff).
  • In the apache module code, I replaced all references to mutex with boost::mutex to
    disambiguate which mutex class I was using.

And that seemed to do the trick. The hard part was figuring out how to enable various
functionality in the Solaris includes and what linker/define flags to use. Just
because it compiles does not necessarily mean it's linked correctly. Some linking
problems were apparent only when I ran rake test:apache. And I haven't actually
tested it with an application yet. And I'm sure some Solaris expert will be happy to
tell me all the backward ways I've done things here. But I hoped this might be useful
to some users and the Phusion team. Thank you.

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From harrisj.home on June 17, 2008 09:28:13

Okay, I've gotten in working on Solaris x86, but need help testing the patch on other
machines... http://groups.google.com/group/phusion-passenger/browse_thread/thread/d97540b42cd76dd7?hl=en#

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From alex.kiernan on September 10, 2008 06:27:27

I've just been trying to get passenger to work on Solaris 10 Sparc (using the code
from git), whilst it builds, it explodes with SIGBUS at run time. Changing things
around so it always uses the SOLARIS9 code for file descriptor passing fixes it
up. I think the reason the code works on Solaris 10 x86 is because x86 will allow
unaligned accesses to succeed, whereas they SIGBUS on Sparc.

Attachment: solaris-sparc.diff

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From honglilai on September 10, 2008 09:19:09

Thanks, I've applied the patch. Can anyone else confirm whether the problem is now
fixed? Can this issue be closed now?

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From honglilai on September 10, 2008 09:19:30

Thanks, I've applied the patch. Can anyone else confirm whether the problem is now
fixed? Can this issue be closed now?

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From steelfu on December 10, 2008 19:59:25

I've tried installing Passenger via 2.0.5 gem on Open Solaris on Joyent but failed with the same error. I did get it
to install via master tree on github.

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From honglilai on December 11, 2008 01:37:55

Status: Fixed
Labels: Milestone-2.1.0

from passenger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.