Bug#675347: ruby1.8-dev: rdepends FTBFS because of missing depends on gcc-4.6
Package: src:ruby1.8
Version: 1.8.7.358-3
Affects: src:ruby-rmagick
Severity: critical
Tags: sid wheezy patch
X-Debbugs-Cc: debian-ruby@lists.debian.org
Justification: breaks unrelated software
Hi,
ruby-rmagick now FTBFS against ruby1.8 1.8.7.358-3 in sid.
This is because ruby1.8 forced compilation with gcc-4.6, and that choice
is stored as CONFIG["CC"] on the system's rbconfig.rb.
When building ruby-rmagick, gcc-4.6 might not be available if it is not
the system's default gcc and there is no explicit dependency. Recently
some arches defaulted to gcc-4.7, but on the other hand sparc still has
gcc-4.4 and has the same issue.
The rbconfig.rb file is owned by libruby1.8 but not all its users may
want to install a compiler. ruby-rmagick (and presumably others) has a
Depends on ruby1.8-dev which may be a better place for this; that
package depends on a libruby1.8 of the same package version.
So I think the best solution is for ruby1.8-dev to add a Depends on
gcc-4.6. Otherwise it only Depends on libc6-dev, which in turn
Recommends any c-compiler where gcc-4.6 might not have otherwise been
chosen as the preferred one.
Build log excerpt:
> ---> ext/RMagick
> /usr/bin/ruby1.8 /build/buildd-ruby-rmagick_2.13.1-5-kfreebsd-i386-pbFqNE/ruby-rmagick-2.13.1/ext/RMagick/extconf.rb
> checking for Ruby version >= 1.8.5... yes
> checking for gcc-4.6... no
> No C compiler found in ${ENV['PATH']}. See mkmf.log for details.
> *** /build/buildd-ruby-rmagick_2.13.1-5-kfreebsd-i386-pbFqNE/ruby-rmagick-2.13.1/ext/RMagick/extconf.rb failed ***
> Could not create Makefile due to some reason, probably lack of
> necessary libraries and/or headers. Check the mkmf.log file for more
> details. You may need configuration options.
Thanks!
Regards,
--
Steven Chamberlain
steven@pyro.eu.org
diff --git a/debian/control b/debian/control
index 784eac7..8f20fef 100644
--- a/debian/control
+++ b/debian/control
@@ -58,7 +58,7 @@
Package: ruby1.8-dev
Architecture: any
-Depends: libruby1.8 (= ${binary:Version}), libc6-dev, ${misc:Depends}
+Depends: libruby1.8 (= ${binary:Version}), libc6-dev, ${misc:Depends}, gcc-4.6
Recommends: ruby1.8 (= ${binary:Version})
Provides: ruby-dev
Description: Header files for compiling extension modules for the Ruby 1.8
diff --git a/debian/rules b/debian/rules
index 04069c8..5b68664 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,7 +19,7 @@
DEB_AUTO_UPDATE_AUTOCONF = YES
-CC = gcc-4.6 # see #674541
+CC = gcc-4.6 # see #674541; same version must be in Depends of ruby1.8-dev
CFLAGS += -fno-strict-aliasing -g
CXXFLAGS += -fno-strict-aliasing -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
Reply to: