On Fri, 10 Aug 2012 00:29:57 +0200, Pierre-Louis Bonicoli wrote: > gdal-bin fails to build if ruby1.9.1 is installed and /usr/bin/ruby > refers to /usr/bin/ruby1.9.1 (via alternatives). > > Error is: > /usr/bin/make -f RubyMakefile.mk build > -e:1: Use RbConfig instead of obsolete and deprecated Config. > -e:1: Use RbConfig instead of obsolete and deprecated Config. > -e:1: Use RbConfig instead of obsolete and deprecated Config. > -e:1: Use RbConfig instead of obsolete and deprecated Config. > -e:1: Use RbConfig instead of obsolete and deprecated Config. > make[2]: entrant dans le répertoire « /tmp/gdal-1.9.0/swig/ruby » > /bin/bash /tmp/gdal-1.9.0/libtool --mode=compile --tag=CXX g++ -g -O2 > -Wall -fPIC -DPIC -I/tmp/gdal-1.9.0/port -I/tmp/gdal-1.9.0/gcore > -I/tmp/gdal-1.9.0/alg -I/tmp/gdal-1.9.0/ogr > -I/tmp/gdal-1.9.0/ogr/ogrsf_frmts -I/usr/include/ruby-1.9.1 > -I/usr/include/ruby-1.9.1/x86_64-linux -c gdal_wrap.cpp > libtool: compile: g++ -g -O2 -Wall -fPIC -DPIC -I/tmp/gdal-1.9.0/port > -I/tmp/gdal-1.9.0/gcore -I/tmp/gdal-1.9.0/alg -I/tmp/gdal-1.9.0/ogr > -I/tmp/gdal-1.9.0/ogr/ogrsf_frmts -I/usr/include/ruby-1.9.1 > -I/usr/include/ruby-1.9.1/x86_64-linux -c gdal_wrap.cpp -fPIC -DPIC -o > .libs/gdal_wrap.o > gdal_wrap.cpp:856:18: fatal error: ruby.h: No such file or directory > compilation terminated. > > > If "ruby" is replaced with "ruby1.8" in debian/control and > swig/ruby/RubyMakefile.mk then the error disappears.
My findings so far: - this does not happen in a clean chroot because the package build-depends only on ruby1.8{,-dev} and nothing pulls in ruby1.9* - if I install ruby1.9.1{,-dev} additionally I get a FTBFS (slightly different, it fails later when it tries to install the then missing files) - forcing ruby1.8 in swig/ruby/RubyMakefile.mk indeed works even if ruby1.9.1{-dev} is installed, with a change in debian/rules (patch attached) - adding Build-Conflicts should also work Not sure if this is really RC, and if yes, which fix to prefer (and if my patch is correct). Cheers, gregor -- .''`. Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06 : :' : Debian GNU/Linux user, admin, and developer - http://www.debian.org/ `. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe `- NP: Juilliard Ensemble, Berberian,: Différences
diff -Nru gdal-1.9.0/debian/patches/force-ruby1.8 gdal-1.9.0/debian/patches/force-ruby1.8 --- gdal-1.9.0/debian/patches/force-ruby1.8 1970-01-01 01:00:00.000000000 +0100 +++ gdal-1.9.0/debian/patches/force-ruby1.8 2012-08-27 18:41:58.000000000 +0200 @@ -0,0 +1,27 @@ +--- a/swig/ruby/RubyMakefile.mk ++++ b/swig/ruby/RubyMakefile.mk +@@ -13,18 +13,18 @@ + + BINDING = ruby + GDAL_ROOT = ../.. +-RUBY = ruby ++RUBY = ruby1.8 + + include $(GDAL_ROOT)/GDALmake.opt + + RUBY_MODULES_LIN = gdal.so ogr.so gdalconst.so osr.so # Linux, Solaris, ... + RUBY_MODULES_MAC = gdal.bundle ogr.bundle gdalconst.bundle osr.bundle # Darwin + +-RUBY_INCLUDE_DIR := $(shell ruby -rrbconfig -e "puts Config::CONFIG['rubyhdrdir'] || Config::CONFIG['archdir']") +-RUBY_ARCH_INCLUDE_DIR := $(shell ruby -rrbconfig -e "puts Config::CONFIG['rubyhdrdir'] + '/' + Config::CONFIG['arch'] unless Config::CONFIG['rubyhdrdir'].nil?") +-RUBY_LIB_DIR := $(shell ruby -rrbconfig -e "puts Config::CONFIG['libdir']") +-RUBY_SO_NAME := $(shell ruby -rrbconfig -e "puts Config::CONFIG['RUBY_SO_NAME']") +-RUBY_EXTENSIONS_DIR := $(shell ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']") ++RUBY_INCLUDE_DIR := $(shell $(RUBY) -rrbconfig -e "puts Config::CONFIG['rubyhdrdir'] || Config::CONFIG['archdir']") ++RUBY_ARCH_INCLUDE_DIR := $(shell $(RUBY) -rrbconfig -e "puts Config::CONFIG['rubyhdrdir'] + '/' + Config::CONFIG['arch'] unless Config::CONFIG['rubyhdrdir'].nil?") ++RUBY_LIB_DIR := $(shell $(RUBY) -rrbconfig -e "puts Config::CONFIG['libdir']") ++RUBY_SO_NAME := $(shell $(RUBY) -rrbconfig -e "puts Config::CONFIG['RUBY_SO_NAME']") ++RUBY_EXTENSIONS_DIR := $(shell $(RUBY) -rrbconfig -e "puts Config::CONFIG['sitearchdir']") + INSTALL_DIR := $(RUBY_EXTENSIONS_DIR)/gdal + + ifeq ($(RUBY_ARCH_INCLUDE_DIR),) diff -Nru gdal-1.9.0/debian/patches/series gdal-1.9.0/debian/patches/series --- gdal-1.9.0/debian/patches/series 2012-06-05 14:29:19.000000000 +0200 +++ gdal-1.9.0/debian/patches/series 2012-08-27 18:22:45.000000000 +0200 @@ -9,3 +9,4 @@ mrsid-plugin symver spatialite +force-ruby1.8 diff -Nru gdal-1.9.0/debian/rules gdal-1.9.0/debian/rules --- gdal-1.9.0/debian/rules 2012-06-05 14:29:19.000000000 +0200 +++ gdal-1.9.0/debian/rules 2012-08-27 18:31:18.000000000 +0200 @@ -10,7 +10,8 @@ PYVERS=$(shell pyversions -v -r debian/control) PYDEF=$(shell pyversions -dv) -RUBYDEF=$(shell ruby --version|cut -d' ' -f2|cut -d. -f1,2) +#RUBYDEF=$(shell ruby --version|cut -d' ' -f2|cut -d. -f1,2) +RUBYDEF=1.8 PERLDEF=$(shell perl -V:version|cut -d\' -f2) PERL_VENDOR_ARCH=$(shell perl -V:vendorarch|cut -d\' -f2) PERL_ARCH_NAME=$(shell perl -V:archname|cut -d\' -f2)
signature.asc
Description: Digital signature