[Gdal-dev] Re: ruby bindings not compiling from CVS

Ken-ichi Ueda kenichi.ueda at gmail.com
Sat Jul 8 15:00:50 EDT 2006


Cool, thanks Sylvain.  I can confirm that this fixes the problem in  
Gentoo.  However, in Mac OS X I'm encountering a different, and  
probably unrelated problem upon make install:

g++ -shared gdal_wrap.o -o .libs/gdal.so -Wl,-bind_at_load  -L/usr/ 
darwinports/lib -L/usr/local/src/gdal-1.3.2 /usr/local/src/ 
gdal-1.3.2/.libs/libgdal.dylib -lz -ldl -lruby
powerpc-apple-darwin8-g++-4.0.0: unrecognized option '-shared'
/usr/bin/ld: Undefined symbols:
_main
collect2: ld returned 1 exit status
make[3]: *** [gdal.so] Error 1
make[2]: *** [install] Error 2
make[1]: *** [install] Error 2
make: *** [install-actions] Error 2


Any thoughts?

-Ken-ichi



On Jul 6, 2006, at 5:14 AM, s duclos wrote:

> Hi Ken-ichi,
>
> Got the same problem as you!
>
> I'm on Gentoo and the GDAL code is fron yesterday
> CVS (05JUL2006).
>
>
> Here is a patch that work for me:
>
>
> $ cvs diff RubyMakefile.mk
> Index: RubyMakefile.mk
> ===================================================================
> RCS file:
> /cvs/maptools/cvsroot/gdal/swig/ruby/RubyMakefile.mk,v
> retrieving revision 1.5
> diff -r1.5 RubyMakefile.mk
> 44c44
> < install: $(INSTALL_DIR)
> ---
>> install: $(INSTALL_DIR) $(RUBY_MODULES)
>
>
> rgds,
>
>
> Sylvain.
>
>
> --- Ken-ichi Ueda <kueda at nature.berkeley.edu> wrote:
>
>> Hi Charlie et al.,
>>
>> I just gave this another shot, this time on Ubuntu
>> 6.06, and got exactly
>> the same error:
>>
>> (cd man; make install)
>> make[1]: Entering directory
>> `/usr/local/src/gdal-cvs-2006.07.05/man'
>> /usr/local/src/gdal-cvs-2006.07.05/install-sh -d
>> /usr/local/man/man1
>> for f in man1/gdaladdo.1 man1/gdal-config.1
>> man1/gdal_contour.1
>> man1/gdalinfo.1 man1/gdal_merge.1
>> man1/gdal_rasterize.1
>> man1/gdaltindex.1 man1/gdal_translate.1
>> man1/gdal_utilities.1
>> man1/gdalwarp.1 man1/ogr2ogr.1 man1/ogrinfo.1
>> man1/ogrtindex.1
>> man1/ogr_utilities.1 man1/pct2rgb.1 man1/rgb2pct.1 ;
>> do
>> /usr/local/src/gdal-cvs-2006.07.05/install-sh -c -m
>> 0644 $f
>> /usr/local/man/man1 ; done
>> make[1]: Leaving directory
>> `/usr/local/src/gdal-cvs-2006.07.05/man'
>> (cd swig; make install)
>> make[1]: Entering directory
>> `/usr/local/src/gdal-cvs-2006.07.05/swig'
>> for dir in ruby ; do (cd $dir; make install ); done
>> make[2]: Entering directory
>> `/usr/local/src/gdal-cvs-2006.07.05/swig/ruby'
>> make -f RubyMakefile.mk install
>> make[3]: Entering directory
>> `/usr/local/src/gdal-cvs-2006.07.05/swig/ruby'
>> /bin/sh /usr/local/src/gdal-cvs-2006.07.05/libtool
>> --mode=install
>> /usr/local/src/gdal-cvs-2006.07.05/install-sh -c
>> gdal.so ogr.so
>> gdalconst.so osr.so
>> /usr/local/lib/site_ruby/1.8/i486-linux/gdal
>> /usr/local/src/gdal-cvs-2006.07.05/install-sh -c
>> gdal.so
>> /usr/local/lib/site_ruby/1.8/i486-linux/gdal/gdal.so
>> install:  gdal.so does not exist
>> make[3]: *** [install] Error 1
>> make[3]: Leaving directory
>> `/usr/local/src/gdal-cvs-2006.07.05/swig/ruby'
>> make[2]: *** [install] Error 2
>> make[2]: Leaving directory
>> `/usr/local/src/gdal-cvs-2006.07.05/swig/ruby'
>> make[1]: *** [install] Error 2
>> make[1]: Leaving directory
>> `/usr/local/src/gdal-cvs-2006.07.05/swig'
>> make: *** [install-actions] Error 2
>>
>>
>> Again, it looks like gdal.so just isn't getting
>> built.  So either I'm
>> doing something dumb on OS X, Gentoo, and Ubuntu (a
>> definite
>> possibility), or there's a deeper problem.  I would
>> definitely
>> appreciate some help working through this, if you
>> have the time.
>>
>> -Ken-ichi
>> _______________________________________________
>> Gdal-dev mailing list
>> Gdal-dev at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/gdal-dev
>>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com




More information about the Gdal-dev mailing list