Source: ruby-ffi
Version: 1.0.9debian-1
Severity: serious
Justification: fails to build from source
Tags: patch

Hi,

ruby-ffi FTBFS on some architecture.
  https://buildd.debian.org/status/package.php?p=ruby-ffi
  http://buildd.debian-ports.org/status/package.php?p=ruby-ffi

Because option of "-m32" and  "-m64"  is architecture specific.

-----
make install
make[1]: Entering directory
`/build/buildd-ruby-ffi_1.0.9debian-1-armel-3vXWYL/ruby-ffi-1.0.9debian/ext/ffi_c'
/bin/mkdir -p 
/build/buildd-ruby-ffi_1.0.9debian-1-armel-3vXWYL/ruby-ffi-1.0.9debian/debian/ruby-ffi/usr/lib/ruby/vendor_ruby/1.9.1/arm-linux-eabi
/usr/bin/install -c -m 0755 ffi_c.so
/build/buildd-ruby-ffi_1.0.9debian-1-armel-3vXWYL/ruby-ffi-1.0.9debian/debian/ruby-ffi/usr/lib/ruby/vendor_ruby/1.9.1/arm-linux-eabi
make[1]: Leaving directory
`/build/buildd-ruby-ffi_1.0.9debian-1-armel-3vXWYL/ruby-ffi-1.0.9debian/ext/ffi_c'
/usr/bin/ruby1.8 -I/usr/lib/ruby/vendor_ruby
/usr/lib/ruby/vendor_ruby/gem2deb/test_runner.rb
make[1]: Entering directory
`/build/buildd-ruby-ffi_1.0.9debian-1-armel-3vXWYL/ruby-ffi-1.0.9debian'
cc -m32  -O2 -fno-omit-frame-pointer -fno-strict-aliasing -W -Werror
-Wall -Wno-unused -Wno-parentheses -I"build" -fPIC -D_REENTRANT -c
libtest/Benchmark.c -o build/libtest/Benchmark.o
cc1: error: unrecognized command line option '-m32'
make[1]: *** [build/libtest/Benchmark.o] Error 1
make[1]: Leaving directory
`/build/buildd-ruby-ffi_1.0.9debian-1-armel-3vXWYL/ruby-ffi-1.0.9debian'
debian/ruby-tests.rb:2: Failed to build test library (RuntimeError)
ERROR: Test "ruby1.8" failed. Exiting.
dh_auto_install: dh_ruby --install
/build/buildd-ruby-ffi_1.0.9debian-1-armel-3vXWYL/ruby-ffi-1.0.9debian/debian/tmp
returned exit code 1
make: *** [binary-arch] Error 1
-----

I made a patch which revise this problem. Could you apply this patch?

Best regards,
 Nobuhiro
-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
diff -Nru ruby-ffi-1.0.9debian/debian/changelog ruby-ffi-1.0.9debian/debian/changelog
--- ruby-ffi-1.0.9debian/debian/changelog	2011-09-15 03:36:28.000000000 +0900
+++ ruby-ffi-1.0.9debian/debian/changelog	2011-09-16 10:33:05.000000000 +0900
@@ -1,3 +1,9 @@
+ruby-ffi (1.0.9debian-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+
+ -- Nobuhiro Iwamatsu <iwama...@debian.org>  Fri, 16 Sep 2011 10:33:01 +0900
+
 ruby-ffi (1.0.9debian-1) unstable; urgency=low
 
   * New upstream release
diff -Nru ruby-ffi-1.0.9debian/debian/patches/debian-changes-1.0.9debian-1.1 ruby-ffi-1.0.9debian/debian/patches/debian-changes-1.0.9debian-1.1
--- ruby-ffi-1.0.9debian/debian/patches/debian-changes-1.0.9debian-1.1	1970-01-01 09:00:00.000000000 +0900
+++ ruby-ffi-1.0.9debian/debian/patches/debian-changes-1.0.9debian-1.1	2011-09-16 10:38:50.000000000 +0900
@@ -0,0 +1,71 @@
+Description: Upstream changes introduced in version 1.0.9debian-1.1
+ This patch has been created by dpkg-source during the package build.
+ Here's the last changelog entry, hopefully it gives details on why
+ those changes were made:
+ .
+ ruby-ffi (1.0.9debian-1.1) unstable; urgency=low
+ .
+   * Non-maintainer upload.
+ .
+ The person named in the Author field signed this changelog entry.
+Author: Nobuhiro Iwamatsu <iwama...@debian.org>
+
+---
+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: <YYYY-MM-DD>
+
+--- ruby-ffi-1.0.9debian.orig/libtest/GNUmakefile
++++ ruby-ffi-1.0.9debian/libtest/GNUmakefile
+@@ -9,8 +9,6 @@ ifeq ($(CPU),)
+   CPU := $(shell uname -m | sed -e 's/i[345678]86/i386/')
+ endif
+ 
+-MODEL = 32 # Default to 32bit compiles
+-
+ PLATFORM = $(CPU)-$(OS)
+ 
+ ifeq ($(OS), sunos)
+@@ -96,34 +94,6 @@ ifneq ($(findstring bsd, $(OS)),)
+   LDFLAGS += -pthread
+ endif
+ 
+-ifeq ($(CPU), sparcv9)
+-  MODEL = 64
+-endif
+-
+-ifeq ($(CPU), amd64)
+-  MODEL = 64
+-endif
+-
+-ifeq ($(CPU), x86_64)
+-  MODEL = 64
+-endif
+-
+-ifeq ($(CPU), ppc64)
+-  MODEL = 64
+-endif
+-
+-ifeq ($(CPU), powerpc64)
+-  MODEL = 64
+-endif
+-
+-# On platforms (linux, solaris) that support both 32bit and 64bit, force building for one or the other
+-ifneq ($(or $(findstring linux, $(OS)), $(findstring solaris, $(OS))),)
+-  # Change the CC/LD instead of CFLAGS/LDFLAGS, incase other things in the flags
+-  # makes the libffi build choke
+-  CC += -m$(MODEL)
+-  LD += -m$(MODEL)
+-endif
+-
+ LIBTEST = $(BUILD_DIR)/$(LIBNAME)
+ 
+ all:	$(LIBTEST)
diff -Nru ruby-ffi-1.0.9debian/debian/patches/series ruby-ffi-1.0.9debian/debian/patches/series
--- ruby-ffi-1.0.9debian/debian/patches/series	2011-09-15 02:28:36.000000000 +0900
+++ ruby-ffi-1.0.9debian/debian/patches/series	2011-09-16 10:38:50.000000000 +0900
@@ -1 +1,2 @@
 0001-Only-load-under-MRI.patch
+debian-changes-1.0.9debian-1.1

Reply via email to