[Rubygems-developers] Passing LDFLAGS?

Eric Hodel drbrain at segment7.net
Wed Jan 23 16:39:34 EST 2008


On Jan 23, 2008, at 05:39 AM, Austin Ziegler wrote:

> I'm trying to install the FXRuby RubyGem while using Fox installed in
> /opt/local via MacPorts and the Leopard-default Ruby. I'm passing the
> following:
>
> sudo env CPPFLAGS="-I/opt/local/include" ARCHFLAGS="-arch i386" \
>         LDFLAGS="-L/opt/local/lib" gem install fxruby
>
> CPPFLAGS is sent across just fine:
>
> g++ -I. -I. \
>        -I/System/Library/Frameworks/Ruby.framework/[...] -I. \
>        -DHAVE_SYS_TIME_H -DHAVE_SIGNAL_H \
>        -I/usr/local/include/fxscintilla -I/usr/local/include/fox-1.6 \
>        -I/opt/local/include/fox-1.6 -I/opt/local/include/fxscintilla \
>        -fno-common -arch i386 -Os -pipe -fno-common -O0 -Iinclude \
>        -DWITH_FXSCINTILLA -DHAVE_FOX_1_6   -c \
>        unregisterOwnedObjects.cpp
>
> But LDFLAGS isn't being respected at all:
>
> cc -arch i386 -pipe -bundle -o fox16.bundle librb.o core_wrap.o \
>       dc_wrap.o dialogs_wrap.o frames_wrap.o fx3d_wrap.o FXRbApp.o \
>       FXRbDataTarget.o FXRbGLViewer.o FXRuby.o iconlist_wrap.o \
>       icons_wrap.o image_wrap.o impl.o label_wrap.o layout_wrap.o \
>       list_wrap.o markfuncs.o mdi_wrap.o menu_wrap.o  
> scintilla_wrap.o \
>       table_wrap.o text_wrap.o treelist_wrap.o ui_wrap.o \
>       unregisterOwnedObjects.o -L"." \
>       -L"/System/Library/Frameworks/Ruby.framework/[...]" \
>       -L"/usr/local/lib" -L"/usr/X11R6/lib" -L. -arch i386    -lruby \
>       -lfxscintilla -lFOX-1.6 -lGLU -lX11 -lXext -lz -lstdc++ \
>       -lpthread -ldl -lm
>
> which results in:
>
>    ld: library not found for -lfxscintilla
>    collect2: ld returned 1 exit status
>    make: *** [fox16.bundle] Error 1
>
> (I have to do "-arch i386" because at least one of the dep libraries  
> in
> MacPorts won't build universal, which means that Fox won't build
> universal. As soon as I have time, I'll be taking that up with them,
> hopefully with a fix.)
>
> Why isn't LDFLAGS being passed along to make in the Gem?

Does it get passed without sudo?

AFAIK, nothing is changed in the LDFLAGS within rubygems.


More information about the Rubygems-developers mailing list