Opened 16 years ago

Closed 9 years ago

#2275 closed defect (wontfix)

OSX 10.5.2 GDAL build with Ruby bindings broken ( see ticket 2138 )

Reported by: jstehle Owned by: cfis
Priority: high Milestone:
Component: RubyBindings Version: unspecified
Severity: blocker Keywords:
Cc:

Description

Ticket 2138 reports this issue on Debian. I have tried the fix suggested, updating the ltmain.sh, but this creates other issues.

I got the latest build from gdal/daily gdal-svn-stable-2008.03.13.tar.gz 13-Mar-2008 02:20 5.7M

MacBook OSX 10.5.2

make -f RubyMakefile.mk build /bin/sh /Users/johnstehle/gdal-svn-stable-2008.03.13/libtool --mode=link g++ -shared -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -I/usr/include -lsqlite3 -L/usr/lib -lexpat -lpq -L/usr/local/pgsql/lib -lpq -lz -ldl -lcurl -lssl -lcrypto -lz -L/Users/johnstehle/gdal-svn-stable-2008.03.13 -lgdal -lruby gdal_wrap.o -o gdal.so libtool: link: g++ -I/usr/include gdal_wrap.o -o .libs/gdal.so -Wl,-bind_at_load -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L/usr/lib -L/usr/local/pgsql/lib -L/Users/johnstehle/gdal-svn-stable-2008.03.13 /Users/johnstehle/gdal-svn-stable-2008.03.13/.libs/libgdal.dylib -lsqlite3 /usr/lib/libexpat.dylib -lpq -ldl -lcurl -lssl -lcrypto -lz -lruby Undefined symbols:

"_main", referenced from:

start in crt1.10.5.o

ld: symbol(s) not found collect2: ld returned 1 exit status make[3]: * [gdal.so] Error 1 make[2]: * [build] Error 2 make[1]: * [build] Error 2 make: * [swig-modules] Error 2

Any workarounds would be welcome.

Change History (5)

comment:1 by jstehle, 16 years ago

My build sequence ..

./autogen.sh ./configure --with-ruby --with-geos=/usr/local/bin make

comment:2 by jstehle, 16 years ago

I came up with this work around. The main libraries were built and in .lib at the top level. In swig/ruby I ran the following ...

libtool -dynamic -o gdal.so gdal_wrap.o -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L/usr/lib -L/usr/local/pgsql/lib -L/Users/johnstehle/gdal-svn-stable-2008.03.13/.libs -lgdal -lsqlite3 /usr/lib/libexpat.dylib -lpq -ldl -lcurl -lssl -lcrypto -lz -lruby -lstdc++.6

which built the .so which I copied to a Ruby 'Site' dir and renamed gdal.bundle and the libgdal.*.dylib were moved to /usr/local/lib.

I was able to start a script/console and require 'gdal' with success. I have not run any test scripts against gdal with Ruby.

comment:3 by honzasterba, 15 years ago

Confirmed that jstehle's workaround works and the problem is apparent on multiple platforms as descibred in linked ticket.

comment:4 by Jukka Rahkonen, 9 years ago

Ruby bindings, OSX and a 7 year old ticket with a tested workaround. What to do for a ticket like this?

comment:5 by Jukka Rahkonen, 9 years ago

Resolution: wontfix
Status: newclosed

Closing due to no feedback and a workaround that worked 7 years ago.

Note: See TracTickets for help on using tickets.