Ruby-LSAPI and Solaris Express Community Edition (SXCE.79)

Discussion in 'Install/Configuration' started by aclement, May 21, 2008.

  1. aclement

    aclement New Member

    Hi everybody,

    I am trying to install the Ruby-LSAPI gem on a Solaris Express Community Edition box (actually, an Amazon EC2 instance), and I can't figure out how to succeed in.

    First, I tried to install the gem:

    gem install ruby-lsapi
    and the following error occured:

    Building native extensions.  This could take a while...
    ERROR:  Error installing ruby-lsapi:
            ERROR: Failed to build gem native extension.
    /usr/ruby/1.8/bin/ruby extconf.rb install ruby-lsapi
    checking for main() in -lsocket... no
    creating Makefile
    /opt/SUNWspro.40/SS11/bin/cc -I. -I. -I/usr/ruby/1.8/lib/ruby/1.8/i386-solaris2.11 -I. -DTEXT_DOMAIN=""  -I/builds2/sfwnv-gate/proto/root_i386/usr/sfw/include  -I/builds2/sfwnv-gate/proto/root_i386/usr/include    -I/builds2/sfwnv-gate/proto/root_i386//readline-5.2/include -KPIC -xO3 -xbuiltin=%all -xinline=auto -xprefetch=auto -xdepend  -KPIC -c lsapilib.c
    sh: /opt/SUNWspro.40/SS11/bin/cc: not found
    *** Error code 1
    make: Fatal error: Command failed for target `lsapilib.o'
    Gem files will remain installed in /usr/ruby/1.8/lib/ruby/gems/1.8/gems/ruby-lsapi-3.2 for inspection.
    Results logged to /usr/ruby/1.8/lib/ruby/gems/1.8/gems/ruby-lsapi-3.2/ext/lsapi/gem_make.out
    Then I went to /usr/ruby/1.8/lib/ruby/gems/1.8/gems/ruby-lsapi-3.2/ext/lsapi and modified the Makefile as follows:
    * right path for CC
    * right libs and includes
    * added -lsocket and -lnsl options

    ... and the file compiled! :D

    Unfortunately, the LS web server log shows the following lines:

    2008-05-21 16:34:13.074 [NOTICE] Loading LiteSpeed/3.3.12 Standard ...
    2008-05-21 16:34:13.190 [NOTICE] [ADMIN] server socket: uds://opt/lsws/admin/tmp/admin.sock.7201
    2008-05-21 16:34:13.190 [NOTICE] Loading configuration from /opt/lsws/conf/httpd_config.xml ...
    2008-05-21 16:34:13.192 [INFO] old priority: 0, new priority: 0
    2008-05-21 16:34:13.192 [INFO] [config:server:basic] For better obscurity, server version number is hidden in the response header.
    2008-05-21 16:34:13.205 [NOTICE] The maximum number of file descriptor limit is set to 65536.
    2008-05-21 16:34:13.255 [ERROR] [config:template:centralConfigLog] Listener [Default] does not exist
    2008-05-21 16:34:13.255 [ERROR] [config:template:PHP_SuEXEC] Listener [Default] does not exist
    2008-05-21 16:34:13.256 [ERROR] [config:template:EasyRailsWithSuEXEC] Listener [Default] does not exist
    2008-05-21 16:34:13.258 [NOTICE] [AutoRestarter] new child process with pid=1364 is forked!
    2008-05-21 16:34:13.261 [NOTICE] [child: 1364] Successfully change current user to ec2admin
    2008-05-21 16:34:13.279 [INFO] [Rails:podtask:/] add child process pid: 1365
    2008-05-21 16:34:13.279 [INFO] [Rails:podtask:/] pid list size: 1 
    2008-05-21 16:34:13.279 [NOTICE] [Child: 1364] Setup swapping space...
    2008-05-21 16:34:13.280 [NOTICE] [Child: 1364] LiteSpeed/3.3.12 Standard starts successfully!
    2008-05-21 16:34:14.142 [NOTICE] [AutoUpdate] Checking for new releases...
    2008-05-21 16:34:14.486 [INFO] [AutoUpdate] No new update.
    2008-05-21 16:34:18.324 [INFO] [AdminPHP] pid list size: 1 
    2008-05-21 16:34:18.324 [INFO] [AdminPHP] add child process pid: 1382
    2008-05-21 16:35:02.931 [INFO] [] connection to [uds://tmp/lshttpd/podtask:_.sock] on request #0, error: Connection reset by peer!
    2008-05-21 16:35:02.932 [INFO] [] connection to [uds://tmp/lshttpd/podtask:_.sock] on request #0, error: Connection reset by peer!
    2008-05-21 16:35:02.932 [INFO] [] connection to [uds://tmp/lshttpd/podtask:_.sock] on request #0, error: Connection reset by peer!
    2008-05-21 16:35:02.932 [NOTICE] [] oops! 503 Service Unavailable
    2008-05-21 16:35:02.932 [NOTICE] [] Content len: 0, Request line: 
    GET / HTTP/1.1
    2008-05-21 16:35:02.932 [NOTICE] [] Redirect: #2, URL: /dispatch.lsapi
    If I try a "require 'lsapi'" at the Ruby "console" (irb), I get the following:

    irb(main):001:0> require 'lsapi'
    LS=> true
    LSG/usr/ruby/1.8/lib/ruby/1.8/irb/input-method.rb:97:in `readline'LS
    : LS1wrong argument type LSAPI (expected File)LS
    LSJ     from /usr/ruby/1.8/lib/ruby/1.8/irb/input-method.rb:97:in `gets'
    LSD     from /usr/ruby/1.8/lib/ruby/1.8/irb.rb:132:in `eval_input'
    LSG     from /usr/ruby/1.8/lib/ruby/1.8/irb.rb:259:in `signal_status'
    LSD     from /usr/ruby/1.8/lib/ruby/1.8/irb.rb:131:in `eval_input'
    LSG     from /usr/ruby/1.8/lib/ruby/1.8/irb/ruby-lex.rb:189:in `call'
    LSL     from /usr/ruby/1.8/lib/ruby/1.8/irb/ruby-lex.rb:189:in `buf_input'
    LSG     from /usr/ruby/1.8/lib/ruby/1.8/irb/ruby-lex.rb:104:in `getc'
    LSG     from /usr/ruby/1.8/lib/ruby/1.8/irb/slex.rb:206:in `match_io'
    LS       ... 9 levels...
    LS>     from /usr/ruby/1.8/lib/ruby/1.8/irb.rb:70:in `start'
    LS>     from /usr/ruby/1.8/lib/ruby/1.8/irb.rb:69:in `catch'
    LS>     from /usr/ruby/1.8/lib/ruby/1.8/irb.rb:69:in `start'
    LS      from /usr/bin/irb:13
    To make a long story short: is there someone who knows how to install Ruby-LSAPI under Solaris Express Community Edition?

    Thank you very much in advance!
    Best regards,
  2. mistwang

    mistwang LiteSpeed Staff

    Try install ruby, RoR and gem from source code.
    If you are using 64bit solaris, make sure do

    export CC=gcc -m64

    to compile everything to 64bit binary.
  3. aclement

    aclement New Member

    Thank you very much for your advice Mistwang. I'll give it a try ASAP and keep you informed.

    Best regards,
  4. aclement

    aclement New Member

    It works!
    Thank you SO very much!

    Have a nice day!

Share This Page