ruby-lsapi doesn't compile on mac osx leopard

Discussion in 'Ruby/Rails' started by cswilliams, Nov 24, 2007.

  1. cswilliams

    cswilliams New Member

    Hi,
    Not sure if this has already been reported, but I just wanted to let you know that when I try to install ruby-lsapi as a gem on Mac OSX 10.5 (leopard), I get the following error:
    "_environ", referenced from:
    environ$nonlazy_ptr in lsapilib.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    make: * [lsapi.bundle] Error 1

    I followed the instructions on this webpage to get it to work:
    http://blog.jasonherald.name/past/2007/11/3/rubylsapi_on_leopard/

    Anyhow, just wanted to give you a heads up.
  2. karmatoburn

    karmatoburn New Member

    This issue is still occurring, nearly 2 months later. Please fix it :)



    odin# ARCHFLAGS='-arch i386' gem install ruby-lsapi
    Building native extensions. This could take a while...
    ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
    ERROR: Failed to build gem native extension.

    ruby extconf.rb install ruby-lsapi
    checking for main() in -lsocket... no
    creating Makefile

    make
    gcc -I. -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -fno-common -arch i386 -Os -pipe -fno-common -c lsapilib.c
    gcc -I. -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -fno-common -arch i386 -Os -pipe -fno-common -c lsruby.c
    cc -arch i386 -pipe -bundle -o lsapi.bundle lsapilib.o lsruby.o -L"." -L"/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib" -L. -arch i386 -lruby -lpthread -ldl -lm
    Undefined symbols:
    "_environ", referenced from:
    _environ$non_lazy_ptr in lsapilib.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    make: *** [lsapi.bundle] Error 1
  3. mistwang

    mistwang LiteSpeed Staff

  4. karmatoburn

    karmatoburn New Member

    Applying the fix in that thread manually works, thank you.

    I suggest to add it to the next release ;)

Share This Page