Package: root-system

root-system failed to build on raspbian with the following error.

Checking for libX11 ... no
configure: libX11 MUST be installed
See http://root.cern.ch/drupal/content/build-prerequisites
make: *** [config.status] Error 1

Checking the configure script revealed that the multiarch logic in the configure script is only enabled if lsb-release -d returns "debian" "ubuntu" or "mint".

lsb-release is a poor tool for identifying distributions because it has no concept of derivative distributions. i.e. you can't ask "is the system i'm running on a derivative of Debian". It would be possible to just add raspbian to the list but I don't think maintaining an ever growing list of derivatives of Debian is a good soloution.

For a Debian package it would of course be possible to patch out the check completely (make it always use the multiarch codepath) but where possible I like to write patches in a way that they can be upstreamed.

The approach I took is to use "dpkg-vendor --derives-from debian" after checking if dpkg-vendor exists. I later realised a downside of this approach is it will fail with a misleading error on Debian based systems if dpkg-dev isn't installed. Obviously this is not an issue for Debian package builds but may be an issue if the fix is pushed upstream.

Another option may simply be to look for a file that is only likely to exist on Debian and Debian-based systems.

Yet another option may be to simply enable the multiarch related logic unconditionally if it doesn't break things on systems that are not based on Debian.

This is probablly something that should be discussed with upstream.

Another option would be to use /etc/os-release which has the "|ID_LIKE|" field for identifying derivatives but i'm not aware of any conviniant tools for parsing that and it's a relatively recent introduction.

While working on the above issue I also ran into a few other issues as the environment I was working in was not a minimal up to date chroot.

1: the package FTBFS if libqt4-private-dev is installed due to the configure script getting confused about paths. 2: the package fails to build with old versions of libpythia8-dev due to changed file locations (I guess somone updated the configure script to only look in the new locations and forgot to version the build-dep at the same time) 3: the package failed to build with unixodbc-dev installed instead of libiodbc2-dev (which is allowed by a | in the build-depends)

The attatched debdiff alters the configure script to fix the main issue and alters the build-depends/conflicts to fix the other issues.

No intent to NMU.
diff -Nru root-system-5.34.19+dfsg/debian/changelog 
root-system-5.34.19+dfsg/debian/changelog
--- root-system-5.34.19+dfsg/debian/changelog   2014-10-24 11:44:02.000000000 
+0000
+++ root-system-5.34.19+dfsg/debian/changelog   2014-11-28 01:26:02.000000000 
+0000
@@ -1,3 +1,17 @@
+root-system (5.34.19+dfsg-1.1+rpi1) jessie-staging; urgency=medium
+
+  * Adjust configure script so that multiarch logic is enabled on Debian
+    derivatives other than Ubuntu and Mint and hence multiarched libraries
+    are found on said derivatives.
+  * Add build-conflicts on libqt4-private-dev. It contains the directory
+    /usr/include/src/corelib/global/ which confuses the configure script
+  * Version build-depends on libpythia8-dev as (>= 8.1.80-1), the headers 
+    have moved and the configure script expects the new location.
+  * Remove unixodbc-dev alternative from build-depends as the package does not
+    build successfully with it.
+ 
+ -- Peter Michael Green <[email protected]>  Fri, 28 Nov 2014 00:48:37 
+0000
+
 root-system (5.34.19+dfsg-1.1) unstable; urgency=medium
 
   [ Lifeng Sun ]
diff -Nru root-system-5.34.19+dfsg/debian/control 
root-system-5.34.19+dfsg/debian/control
--- root-system-5.34.19+dfsg/debian/control     2014-10-24 11:44:02.000000000 
+0000
+++ root-system-5.34.19+dfsg/debian/control     2014-11-28 01:25:14.000000000 
+0000
@@ -4,7 +4,8 @@
 Maintainer: Debian Science Maintainers 
<[email protected]>
 Uploaders: Lifeng Sun <[email protected]>
 Homepage: http://root.cern.ch
-Build-Depends: debhelper (>= 5.0.37.2), lsb-release, autotools-dev, 
po-debconf, libssl-dev, comerr-dev, libxpm-dev, libltdl-dev, x11proto-xext-dev, 
libxext-dev, libfreetype6-dev, libpcre3-dev, zlib1g-dev | libz-dev, 
liblzma-dev, python-dev (>= 2.1), graphviz, ttf-freefont, libncurses5-dev, 
libgraphviz-dev, libavahi-core-dev, libsqlite3-dev, libxft-dev, dh-python, 
ruby, ruby-dev, libglu1-mesa-dev| xlibmesa-glu-dev |  libglu-dev, libglew-dev, 
libftgl-dev, libgl2ps-dev, libxml2-dev, libgsl0-dev, 
libavahi-compat-libdnssd-dev, libldap2-dev | libldap-dev, libjpeg-dev, 
libpng12-dev, libtiff-dev, libafterimage-dev, libgif-dev, libxinerama-dev, 
libfftw3-dev | fftw3-dev, libpythia8-dev, libglobus-gss-assist-dev, 
libglobus-gsi-credential-dev, libglobus-common-dev, 
libglobus-gsi-sysconfig-dev, libglobus-gssapi-gsi-dev, 
libglobus-gsi-callback-dev, libglobus-gsi-cert-utils-dev, 
libglobus-openssl-module-dev, libglobus-gsi-proxy-core-dev, 
libglobus-callout-dev, globus-proxy-utils,krb5-user|heimdal-clients, 
libmysqlclient-dev, libiodbc2-dev | unixodbc-dev,  libpq-dev, 
gfortran|fortran-compiler, libqt4-dev (>= 4.3.0) | libqt3-mt-dev (>= 3.3.0), 
qt4-dev-tools (>= 4.3.0) | qt3-dev-tools (>= 3.3.0), libqt4-opengl-dev, 
libkrb5-dev|heimdal-dev
+Build-Depends: debhelper (>= 5.0.37.2), lsb-release, autotools-dev, 
po-debconf, libssl-dev, comerr-dev, libxpm-dev, libltdl-dev, x11proto-xext-dev, 
libxext-dev, libfreetype6-dev, libpcre3-dev, zlib1g-dev | libz-dev, 
liblzma-dev, python-dev (>= 2.1), graphviz, ttf-freefont, libncurses5-dev, 
libgraphviz-dev, libavahi-core-dev, libsqlite3-dev, libxft-dev, dh-python, 
ruby, ruby-dev, libglu1-mesa-dev| xlibmesa-glu-dev |  libglu-dev, libglew-dev, 
libftgl-dev, libgl2ps-dev, libxml2-dev, libgsl0-dev, 
libavahi-compat-libdnssd-dev, libldap2-dev | libldap-dev, libjpeg-dev, 
libpng12-dev, libtiff-dev, libafterimage-dev, libgif-dev, libxinerama-dev, 
libfftw3-dev | fftw3-dev, libpythia8-dev (>= 8.1.80-1), 
libglobus-gss-assist-dev, libglobus-gsi-credential-dev, libglobus-common-dev, 
libglobus-gsi-sysconfig-dev, libglobus-gssapi-gsi-dev, 
libglobus-gsi-callback-dev, libglobus-gsi-cert-utils-dev, 
libglobus-openssl-module-dev, libglobus-gsi-proxy-core-dev, 
libglobus-callout-dev, globus-proxy-utils,krb5-user|heimdal-clients, 
libmysqlclient-dev, libiodbc2-dev,  libpq-dev, gfortran|fortran-compiler, 
libqt4-dev (>= 4.3.0) | libqt3-mt-dev (>= 3.3.0), qt4-dev-tools (>= 4.3.0) | 
qt3-dev-tools (>= 3.3.0), libqt4-opengl-dev, libkrb5-dev|heimdal-dev
+Build-Conflicts: libqt4-private-dev
 Standards-Version: 3.9.5
 Vcs-Git: git://anonscm.debian.org/debian-science/packages/root-system.git
 Vcs-Browser: 
http://anonscm.debian.org/gitweb/?p=debian-science/packages/root-system.git
diff -Nru 
root-system-5.34.19+dfsg/debian/patches/79-fix-configure-for-derivatives.patch 
root-system-5.34.19+dfsg/debian/patches/79-fix-configure-for-derivatives.patch
--- 
root-system-5.34.19+dfsg/debian/patches/79-fix-configure-for-derivatives.patch  
    1970-01-01 00:00:00.000000000 +0000
+++ 
root-system-5.34.19+dfsg/debian/patches/79-fix-configure-for-derivatives.patch  
    2014-11-28 01:35:01.000000000 +0000
@@ -0,0 +1,35 @@
+Description: Fix building on derivatives.
+ Previously the multiarch logic in the configure script was only enabled
+ if lsb-release -d returned "debian", "ubuntu" or "mint" on any derivative
+ where this was not the case (for example raspbian) the multiarch logic would
+ not be enabled, this would cause the configure script to fail to find 
libraries
+ and hence cause the package to FTBFS.
+
+ This patch changes the logic to use dpkg-vendor --derives-from Debian
+ instead (with a check that dpkg-architecture actually exists first). So the
+ multiarch logic should be enabled on any derivative that describes itself as
+ being derived from debian.
+
+Author: Peter Michael Green <[email protected]>
+
+Index: root-system-5.34.19+dfsg/configure
+===================================================================
+--- root-system-5.34.19+dfsg.orig/configure
++++ root-system-5.34.19+dfsg/configure
+@@ -2006,14 +2006,8 @@ fi
+ 
+ if test "x$platform" = "xlinux" -o "x$platform" = "xkfreebsd" -o "x$platform" 
= "xhurd"; then
+     linuxdist=
+-    if `$cwhich lsb_release > /dev/null 2>&1` ; then
+-       if lsb_release -d | grep -i 'ubuntu' > /dev/null 2>& 1; then
+-          linuxdist="multiarch"
+-       fi
+-       if lsb_release -d | grep -i 'debian' > /dev/null 2>& 1; then
+-          linuxdist="multiarch"
+-       fi
+-       if lsb_release -d | grep -i 'mint' > /dev/null 2>& 1; then
++    if `$cwhich dpkg-vendor > /dev/null 2>&1` ; then
++       if dpkg-vendor --derives-from Debian > /dev/null 2>& 1; then
+           linuxdist="multiarch"
+        fi
+     fi
diff -Nru root-system-5.34.19+dfsg/debian/patches/series 
root-system-5.34.19+dfsg/debian/patches/series
--- root-system-5.34.19+dfsg/debian/patches/series      2014-10-24 
11:44:02.000000000 +0000
+++ root-system-5.34.19+dfsg/debian/patches/series      2014-11-28 
00:49:59.000000000 +0000
@@ -32,3 +32,4 @@
 76-hurd-i386.patch
 77-ruby-header-path.patch
 78-html-header-logo.patch
+79-fix-configure-for-derivatives.patch
-- 
debian-science-maintainers mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to