Package: gdb
Version: 7.2-1
Severity: minor
Tags: patch

        Hey

 in rules, --build=$(DEB_HOST_GNU_TYPE) is obviously incorrect and
 prevents cross-builds:
[...]
touch debian/stamp-autotools-files
chmod a+x /srv/hudson.dooz.org/home/jobs/xdeb-test/workspace/gdb/./configure
mkdir -p /srv/hudson.dooz.org/home/jobs/xdeb-test/workspace/gdb/build/objdir
cd /srv/hudson.dooz.org/home/jobs/xdeb-test/workspace/gdb/build/objdir &&   
CFLAGS="-g -O2" CXXFLAGS="-g -O2 -g -Wall -O2" CPPFLAGS="" 
LDFLAGS="-Wl,-Bsymbolic-functions" 
/srv/hudson.dooz.org/home/jobs/xdeb-test/workspace/gdb/./configure 
--build=x86_64-linux-gnu --host=arm-linux-gnueabi --prefix=/usr 
--includedir="\${prefix}/include" --mandir="\${prefix}/share/man" 
--infodir="\${prefix}/share/info" --sysconfdir=/etc --localstatedir=/var 
--libexecdir="\${prefix}/lib/gdb" --disable-maintainer-mode 
--disable-dependency-tracking --disable-silent-rules   --host=arm-linux-gnueabi 
--disable-gdbtk --disable-shared 
--srcdir=/srv/hudson.dooz.org/home/jobs/xdeb-test/workspace/gdb 
--with-system-readline --with-system-gdbinit=/etc/gdb/gdbinit 
--build=arm-linux-gnueabi --enable-tui --with-expat --with-python 
configure: loading site script /etc/dpkg-cross/cross-config.armel
checking build system type... arm-unknown-linux-gnueabi
checking host system type... arm-unknown-linux-gnueabi
checking whether the C compiler works... configure: error: in 
`/srv/hudson.dooz.org/home/jobs/xdeb-test/workspace/gdb/build/objdir':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
make: *** [debian/stamp-autotools] Error 1

 note the bogus --build= above; config.log just says that it couldn't
 run the test, but it's not supposed to run it at all in
 cross-compilation mode.

 Attaching a debdiff which helps the build for me; it doesn't complete,
 but it goes much much farther:
[...]
checking for iconv... yes checking for iconv declaration... install-shextern 
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, 
size_t *outbytesleft); checking for library containing waddstr... no configure: 
error: no enhanced curses library found; disable TUI
make[2]: *** [configure-gdb] Error 1 make[2]: Leaving directory 
`/srv/hudson.dooz.org/home/jobs/xdeb-test/workspace/gdb/build/objdir' make[1]: 
*** [all] Error 2 make[1]: Leaving directory 
`/srv/hudson.dooz.org/home/jobs/xdeb-test/workspace/gdb/build/objdir' make: *** 
[debian/stamp-makefile-build] Error 2 dpkg-buildpackage: error: debian/rules 
build gave error exit status 2

 The above failure is probably a result of my setup though.


 I also suggest you change your dpkg-architecture ":=" assignments to
 "?=" as to save some time running rules.

   Thanks,
-- 
Loïc Minier
diff -Nru gdb-7.2/debian/changelog gdb-7.2/debian/changelog
--- gdb-7.2/debian/changelog	2010-09-05 23:09:58.000000000 +0200
+++ gdb-7.2/debian/changelog	2010-10-22 18:37:37.000000000 +0200
@@ -1,3 +1,10 @@
+gdb (7.2-2) UNRELEASED; urgency=low
+
+  * Set DEB_BUILD_GNU_TYPE and use it for --build= instead of
+    DEB_HOST_GNU_TYPE; fixes cross-builds.
+
+ -- Loïc Minier <[email protected]>  Fri, 22 Oct 2010 18:37:00 +0200
+
 gdb (7.2-1) unstable; urgency=low
 
   * New upstream release, including:
diff -Nru gdb-7.2/debian/rules gdb-7.2/debian/rules
--- gdb-7.2/debian/rules	2010-08-31 16:59:42.000000000 +0200
+++ gdb-7.2/debian/rules	2010-10-22 18:36:57.000000000 +0200
@@ -25,6 +25,7 @@
 # untested command fails.
 SHELL += -e
 
+DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 DEB_HOST_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
 DEB_HOST_GNU_CPU := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
 DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
@@ -110,7 +111,7 @@
 # causes a harmless, but ugly, testsuite failure in maint.exp.
 EXTRA_FLAGS := --disable-gdbtk --disable-shared \
 	--srcdir=$(shell pwd) --with-system-readline \
-	$(arch_config_args) --build=$(DEB_HOST_GNU_TYPE)
+	$(arch_config_args) --build=$(DEB_BUILD_GNU_TYPE)
 
 # Debian does not include 64-bit expat packages yet, so --with-expat
 # is here rather than in EXTRA_FLAGS.  Similarly Python.

Reply via email to