gem won't install

Discussion in 'Bug Reports' started by brandondrew, Jan 9, 2008.

  1. brandondrew

    brandondrew New Member

    The ruby-lsapi gem won't install for me.

    I'm running LiteSpeed 3.3.3 Standard on OS X 10.5 (Leopard) on a MacBook (with an Intel processor, of course).

    I've installed lots of gems, so as far as I know the problem is not with my system. Here's the console input and output:

    Code:
    DrTeeth:litespeed brandon$ sudo gem install ruby-lsapi
    Bulk updating Gem source index for: [url]http://gems.rubyforge.org[/url]
    Building native extensions.  This could take a while...
    ERROR:  Error installing ruby-lsapi:
            [COLOR="Red"]ERROR: Failed to build gem native extension.[/COLOR]
    
    /usr/local/bin/ruby extconf.rb install ruby-lsapi
    checking for main() in -lsocket... no
    creating Makefile
    
    make
    gcc -I. -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.10.1 -I.  -fno-common -g -O2  -fno-common -pipe -fno-common  -c lsapilib.c
    gcc -I. -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.10.1 -I.  -fno-common -g -O2  -fno-common -pipe -fno-common  -c lsruby.c
    cc -dynamic -bundle -undefined suppress -flat_namespace  -L"/usr/local/lib" -o lsapi.bundle lsapilib.o lsruby.o  -lruby  -lpthread -ldl -lobjc  
    /usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libpthread.dylib unknown flags (type) of section 6 (__TEXT,__dof_plockstat) in load command 0
    /usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libdl.dylib unknown flags (type) of section 6 (__TEXT,__dof_plockstat) in load command 0
    /usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libobjc.dylib load command 9 unknown cmd field
    /usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib unknown flags (type) of section 6 (__TEXT,__dof_plockstat) in load command 0
    /usr/bin/ld: /usr/lib/libSystem.B.dylib unknown flags (type) of section 6 (__TEXT,__dof_plockstat) in load command 0
    collect2: ld returned 1 exit status
    make: *** [lsapi.bundle] Error 1
    
    
    Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/ruby-lsapi-2.9 for inspection.
    Results logged to /usr/local/lib/ruby/gems/1.8/gems/ruby-lsapi-2.9/ext/lsapi/gem_make.out
    DrTeeth:litespeed brandon$ 
    It's easy to reproduce, I just type
    Code:
    sudo gem install ruby-lsapi
  2. brandondrew

    brandondrew New Member

    nor will it install from souce

    I tried following the directions for installing from source and it failed using that method as well. Here's my console output, to show exactly what I did:

    Code:
    DrTeeth:Downloads brandon$ curl -o ruby-lsapi.tgz http://www.litespeedtech.com/packages/lsapi/ruby-lsapi-2.9.tar.gz
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 30310  100 30310    0     0  49049      0 --:--:-- --:--:-- --:--:-- 1973k
    DrTeeth:Downloads brandon$ ls ruby*
    ruby-lsapi.tgz
    DrTeeth:Downloads brandon$ tar -xzvf ruby-lsapi.tgz 
    ruby-lsapi-2.9/
    ruby-lsapi-2.9/rails/
    ruby-lsapi-2.9/rails/dispatch.lsapi
    ruby-lsapi-2.9/scripts/
    ruby-lsapi-2.9/scripts/lsruby_runner.rb
    ruby-lsapi-2.9/examples/
    ruby-lsapi-2.9/examples/testlsapi.rb
    ruby-lsapi-2.9/examples/testcgi.rb
    ruby-lsapi-2.9/README
    ruby-lsapi-2.9/ext/
    ruby-lsapi-2.9/ext/lsapi/
    ruby-lsapi-2.9/ext/lsapi/lsapilib.h
    ruby-lsapi-2.9/ext/lsapi/lsapidef.h
    ruby-lsapi-2.9/ext/lsapi/extconf.rb
    ruby-lsapi-2.9/ext/lsapi/lsapilib.c
    ruby-lsapi-2.9/ext/lsapi/lsruby.c
    ruby-lsapi-2.9/setup.rb
    DrTeeth:Downloads brandon$ cd ruby-lsapi-2.9/
    DrTeeth:ruby-lsapi-2.9 brandon$ ls
    README          examples        ext             rails           scripts         setup.rb
    DrTeeth:ruby-lsapi-2.9 brandon$ ruby setup.rb config
    ---> ext
    ---> ext/lsapi
    /usr/local/bin/ruby /Resources/Downloads/ruby-lsapi-2.9/ext/lsapi/extconf.rb
    checking for main() in -lsocket... no
    creating Makefile
    <--- ext/lsapi
    <--- ext
    DrTeeth:ruby-lsapi-2.9 brandon$ ruby setup.rb setup
    ---> ext
    ---> ext/lsapi
    make
    gcc -I. -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.10.1 -I/Resources/Downloads/ruby-lsapi-2.9/ext/lsapi  -fno-common -g -O2  -fno-common -pipe -fno-common  -c lsapilib.c
    gcc -I. -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.10.1 -I/Resources/Downloads/ruby-lsapi-2.9/ext/lsapi  -fno-common -g -O2  -fno-common -pipe -fno-common  -c lsruby.c
    cc -dynamic -bundle -undefined suppress -flat_namespace  -L"/usr/local/lib" -o lsapi.bundle lsapilib.o lsruby.o  -lruby  -lpthread -ldl -lobjc  
    /usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libpthread.dylib unknown flags (type) of section 6 (__TEXT,__dof_plockstat) in load command 0
    /usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libdl.dylib unknown flags (type) of section 6 (__TEXT,__dof_plockstat) in load command 0
    /usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libobjc.dylib load command 9 unknown cmd field
    /usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib unknown flags (type) of section 6 (__TEXT,__dof_plockstat) in load command 0
    /usr/bin/ld: /usr/lib/libSystem.B.dylib unknown flags (type) of section 6 (__TEXT,__dof_plockstat) in load command 0
    collect2: ld returned 1 exit status
    make: *** [lsapi.bundle] Error 1
    setup.rb:655:in `command': system("make") failed (RuntimeError)
            from setup.rb:664:in `make'
            from setup.rb:1258:in `setup_dir_ext'
            from setup.rb:1532:in `__send__'
            from setup.rb:1532:in `traverse'
            from setup.rb:1549:in `dive_into'
            from setup.rb:1530:in `traverse'
            from setup.rb:1534:in `traverse'
            from setup.rb:1533:in `each'
             ... 8 levels...
            from setup.rb:826:in `__send__'
            from setup.rb:826:in `invoke'
            from setup.rb:773:in `invoke'
            from setup.rb:1578
    DrTeeth:ruby-lsapi-2.9 brandon$ 

    Please let me know if there's any other info I can supply that would be useful. Thanks.
  3. mistwang

    mistwang LiteSpeed Staff

    Those errors are between ld and system libraries, so, I guess maybe your compiler environment need some special options, like building universal binary or something like that.

    It will be very helpful if you can find a gem that builds native ruby extension, and post the compiling parameters used for gcc, cc, ld, etc. One pop in my head is the fcgi extension.
  4. mistwang

    mistwang LiteSpeed Staff

  5. brandondrew

    brandondrew New Member

    That solved it.

    Thanks! Upgrading to Xcode 3 did the trick for the gem. Now I'll see if that fixes the PHP compilation problem too.

Share This Page