Bug#676094: geos: FTBFS: geos_wrap.cxx:856:18: fatal error: ruby.h: No such file, or directory

2012-06-24 Thread peter green

tags 676094 +patch
thanks

Thia package failed to build after being imported to raspbian and I 
needed to get it building so I took a look.


I managed to fix the include file not found issue with some makefile hackery

Unfortunately after I fixed that I got

/bin/bash ../../libtool  --tag=CXX   --mode=compile g++ -fpermissive 
-DHAVE_CONFIG_H -I. -I../../include -I../../include/geos 
-I/usr/include/ruby-1.9.1/x86_64-linux 
-I/usr/include/ruby-1.9.1/x86_64-linux/.. -I../../capi  -DGEOS_INLINE  
-pedantic -Wall -ansi -Wno-long-long  -ffloat-store -g -O2 -MT 
geos_la-geos_wrap.lo -MD -MP -MF .deps/geos_la-geos_wrap.Tpo -c -o 
geos_la-geos_wrap.lo `test -f 'geos_wrap.cxx' || echo './'`geos_wrap.cxx
libtool: compile:  g++ -fpermissive -DHAVE_CONFIG_H -I. -I../../include 
-I../../include/geos -I/usr/include/ruby-1.9.1/x86_64-linux 
-I/usr/include/ruby-1.9.1/x86_64-linux/.. -I../../capi -DGEOS_INLINE 
-pedantic -Wall -ansi -Wno-long-long -ffloat-store -g -O2 -MT 
geos_la-geos_wrap.lo -MD -MP -MF .deps/geos_la-geos_wrap.Tpo -c 
geos_wrap.cxx  -fPIC -DPIC -o .libs/geos_la-geos_wrap.o

geos_wrap.cxx: In function 'void SWIG_Ruby_define_class(swig_type_info*)':
geos_wrap.cxx:1517:9: warning: variable 'klass' set but not used 
[-Wunused-but-set-variable]

geos_wrap.cxx: In function 'VALUE SWIG_AUX_NUM2DBL(VALUE*)':
geos_wrap.cxx:2658:9: warning: unused variable 'type' [-Wunused-variable]
geos_wrap.cxx: In function 'VALUE _wrap_create_polygon(int, VALUE*, VALUE)':
geos_wrap.cxx:7878:33: error: 'struct RArray' has no member named 'len'

I was able to hack arround this with a bit of sed magic on the generated 
code.


However even after the build completed the package generation was 
unsuccesful as the packaging was all setup for ruby 1.8 . At this point 
I decided to give up on the ruby 1.9 approach. Patch for the final 
attempt of that approach is attatched as geos-ruby1.9.1-attempt.patch


At this point I decided to take a different approach, rather than try 
and make the package work with ruby 1.9.1 I instead decided to simply 
adjust the build-depends and build-conflicts so that the package was 
built against 1.8,


That gave me a succesful build. Patch for that adjustment is in 
geos-force-ruby1.8.patch . I have uploaded that patched version to 
raspbian, I have not uploaded it to debian as I have no idea how to test 
the package actually works. I also noticed that at the end of the build 
my changes to debian/control were getting obliterated. Looks like the 
changes in the patch should really be applied to control.in as well as 
to control if you go down this route.


diff -urN geos-3.3.3/debian/changelog geos-3.3.3.ruby1.9.1-attempt/debian/changelog
--- geos-3.3.3/debian/changelog	2012-05-23 13:39:19.0 +
+++ geos-3.3.3.ruby1.9.1-attempt/debian/changelog	2012-06-25 01:56:04.0 +
@@ -1,3 +1,11 @@
+geos (3.3.3-2+rpi1) wheezy; urgency=low
+
+  * fixes to make package build with current ruby (Closes: 676094)
++ add makefile hack to fix ruby include path 
++ hack swig output to fix compile error
+
+ -- Peter Michael Green plugw...@p10link.net  Sun, 24 Jun 2012 23:34:34 +
+
 geos (3.3.3-1) unstable; urgency=low
 
   * New upstream bugfixing version. This is useful because correctly
diff -urN geos-3.3.3/debian/patches/fix_ruby_includes geos-3.3.3.ruby1.9.1-attempt/debian/patches/fix_ruby_includes
--- geos-3.3.3/debian/patches/fix_ruby_includes	1970-01-01 00:00:00.0 +
+++ geos-3.3.3.ruby1.9.1-attempt/debian/patches/fix_ruby_includes	2012-06-25 01:07:44.0 +
@@ -0,0 +1,51 @@
+Description: check parent directory of ruby include dir for ruby includes
+ The ruby includes are now split between /usr/include/ruby-1.9.1/
+ and /usr/include/ruby-version/architecture reference/
+
+ The check for ruby include path in the configure script returns
+ /usr/lib/ruby/version/architecture reference/
+
+ This patch modifies the makefile to fix this up
+
+Author: Peter Michael Green plugw...@p10link.net
+Bug-Debian: http://bugs.debian.org/676094
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: vendor|upstream|other, url of original patch
+Bug: url in upstream bugtracker
+Bug-Debian: http://bugs.debian.org/bugnumber
+Bug-Ubuntu: https://launchpad.net/bugs/bugnumber
+Forwarded: no|not-needed|url proving that it has been forwarded
+Reviewed-By: name and email of someone who approved the patch
+Last-Update: -MM-DD
+
+Index: geos-3.3.3/swig/ruby/Makefile.in
+===
+--- geos-3.3.3.orig/swig/ruby/Makefile.in	2012-06-25 00:02:59.0 +
 geos-3.3.3/swig/ruby/Makefile.in	2012-06-25 01:07:41.0 +
+@@ -336,7 +336,7 @@
+ @ENABLE_RUBY_TRUE@rubyextensiondirdir = $(RUBY_EXTENSION_DIR)
+ 
+ # Setup includes

Bug#676094: geos: FTBFS: geos_wrap.cxx:856:18: fatal error: ruby.h: No such file or directory

2012-06-04 Thread Lucas Nussbaum
Source: geos
Version: 3.3.3-1
Severity: serious
Tags: wheezy sid
User: debian...@lists.debian.org
Usertags: qa-ftbfs-20120604 qa-ftbfs
User: debian-r...@lists.debian.org
Usertags: default19
Justification: FTBFS on amd64

Hi,

During a rebuild of all packages in sid, your package failed to build on
amd64.

Relevant part:
 /bin/bash ../../libtool  --tag=CXX   --mode=compile g++ -fpermissive 
 -DHAVE_CONFIG_H -I. -I../../include -I../../include/geos 
 -I/usr/lib/ruby/1.9.1/x86_64-linux -I../../capi  -DGEOS_INLINE  -pedantic 
 -Wall -ansi -Wno-long-long  -ffloat-store -g -O2 -MT geos_la-geos_wrap.lo -MD 
 -MP -MF .deps/geos_la-geos_wrap.Tpo -c -o geos_la-geos_wrap.lo `test -f 
 'geos_wrap.cxx' || echo './'`geos_wrap.cxx
 libtool: compile:  g++ -fpermissive -DHAVE_CONFIG_H -I. -I../../include 
 -I../../include/geos -I/usr/lib/ruby/1.9.1/x86_64-linux -I../../capi 
 -DGEOS_INLINE -pedantic -Wall -ansi -Wno-long-long -ffloat-store -g -O2 -MT 
 geos_la-geos_wrap.lo -MD -MP -MF .deps/geos_la-geos_wrap.Tpo -c geos_wrap.cxx 
  -fPIC -DPIC -o .libs/geos_la-geos_wrap.o
 geos_wrap.cxx:856:18: fatal error: ruby.h: No such file or directory
 compilation terminated.
 make[5]: *** [geos_la-geos_wrap.lo] Error 1

The full build log is available from:
   http://people.debian.org/~lucas/logs/2012/06/04/geos_3.3.3-1_unstable.log

A list of current common problems and possible solutions is available at 
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

About the archive rebuild: The rebuild was done on EC2 VM instances from
Amazon Web Services, using a clean, minimal and up-to-date chroot. Every
failed build was retried once to eliminate random failures.



___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel