tags 629567 + patch thanks On 2011-06-07 20:50 +0200, Sven Joachim wrote:
> Emacs does FTBFS with libc6-dev 2.13-5, because crt1.o has moved from > /usr/lib to /usr/lib/$DEB_HOST_MULTIARCH: > > ,---- > | make[3]: Entering directory > `/usr/local/src/deb-src/emacs23/emacs23-23.3+1/debian/build-x/src' > | gcc -c -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H > | -I. -I/usr/local/src/deb-src/emacs23/emacs23-23.3+1/debian/build-x/src > | -D_BSD_SOURCE -pthread -I/usr/include/gtk-2.0 > | -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 > | -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 > | -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ > | -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include > | -I/usr/include/pixman-1 -I/usr/include/freetype2 > | -I/usr/include/libpng12 -I/usr/include/freetype2 -I/usr/include/alsa > | -pthread -I/usr/include/librsvg-2.0 -I/usr/include/glib-2.0 > | -I/usr/lib/glib-2.0/include -I/usr/include/gdk-pixbuf-2.0 > | -I/usr/include/cairo -I/usr/include/libpng12 -I/usr/include/pixman-1 > | -I/usr/include/freetype2 -I/usr/include/dbus-1.0 > | -I/usr/lib/dbus-1.0/include -DORBIT2=1 -pthread > | -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 > | -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DDEBIAN -g -O2 > | -I/usr/include/freetype2 -MMD -MF deps/pre-crt0.d pre-crt0.c > | make[3]: *** No rule to make target `/usr/lib/crt1.o', needed by `temacs'. > Stop. > | make[3]: Leaving directory > `/usr/local/src/deb-src/emacs23/emacs23-23.3+1/debian/build-x/src' > | make[2]: *** [src] Error 2 > `---- > > Some additional information is available at > https://bugs.launchpad.net/ubuntu/+source/emacs23/+bug/746510. Note > that the workaround to pass "--with-crt-dir=…" to `configure' does not > seem to work in Emacs 23. :-( It needs a patch for src/s/gnu-linux.h that has been applied on the Emacs trunk back in April 2010. See the attached debdiff. Cheers, Sven
diff -Nru emacs23-23.3+1/debian/changelog emacs23-23.3+1/debian/changelog --- emacs23-23.3+1/debian/changelog 2011-04-10 19:40:31.000000000 +0200 +++ emacs23-23.3+1/debian/changelog 2011-06-25 09:15:16.000000000 +0200 @@ -1,3 +1,13 @@ +emacs23 (23.3+1-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Cope with multiarch location of crt1.o (closes: #629567): + - Add "--with-crt-dir=/usr/lib/$(DEB_HOST_MULTIARCH)" to confflags. + - Use $(CRT_DIR) in src/s/gnu-linux.h. Patch taken from Emacs trunk, + revision 100042. + + -- Sven Joachim <svenj...@gmx.de> Sat, 25 Jun 2011 08:25:48 +0200 + emacs23 (23.3+1-1) unstable; urgency=low * Incorporate new upstream version 23.3. diff -Nru emacs23-23.3+1/debian/patches/0014-Cope-with-multiarch-location-of-crt1.o.patch emacs23-23.3+1/debian/patches/0014-Cope-with-multiarch-location-of-crt1.o.patch --- emacs23-23.3+1/debian/patches/0014-Cope-with-multiarch-location-of-crt1.o.patch 1970-01-01 01:00:00.000000000 +0100 +++ emacs23-23.3+1/debian/patches/0014-Cope-with-multiarch-location-of-crt1.o.patch 2011-06-25 08:34:48.000000000 +0200 @@ -0,0 +1,27 @@ +Author: Sven Joachim <svenj...@gmx.de> +Date: Sat, 25 Jun 2011 08:25:48 +0200 +Bug-Debian: http://bugs.debian.org/629567 +Subject: Cope with multiarch location of crt1.o +Appied-Upstream: http://lists.gnu.org/archive/html/emacs-diffs/2010-04/msg00325.html +--- + +--- emacs23-23.3+1.orig/src/s/gnu-linux.h ++++ emacs23-23.3+1/src/s/gnu-linux.h +@@ -168,7 +168,7 @@ along with GNU Emacs. If not, see <http + /* Ask GCC where to find libgcc.a. */ + #define LIB_GCC `$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name` + +-#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o ++#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o + + /* Here is how to find X Windows. LD_SWITCH_X_SITE_AUX gives an -R option + says where to find X windows at run time. */ +@@ -198,7 +198,7 @@ along with GNU Emacs. If not, see <http + #define LIBS_DEBUG + #undef LIB_GCC + #define LIB_GCC +-#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o ++#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o + + /* Don't use -g in test compiles in configure. + This is so we will use the same shared libs for that linking diff -Nru emacs23-23.3+1/debian/patches/series emacs23-23.3+1/debian/patches/series --- emacs23-23.3+1/debian/patches/series 2011-04-10 19:33:31.000000000 +0200 +++ emacs23-23.3+1/debian/patches/series 2011-06-25 08:36:23.000000000 +0200 @@ -11,3 +11,4 @@ 0011-Don-t-clear-FONTCONFIG_LIBS-and-FONTCONFIG_CFLAGS-in.patch 0012-Fix-a-tty-related-preprocessor-inclusion-error-affec.patch 0013-Expect-0-from-kill-for-zombies-on-GNU-Hurd.patch +0014-Cope-with-multiarch-location-of-crt1.o.patch diff -Nru emacs23-23.3+1/debian/rules emacs23-23.3+1/debian/rules --- emacs23-23.3+1/debian/rules 2011-04-10 19:33:31.000000000 +0200 +++ emacs23-23.3+1/debian/rules 2011-06-25 07:41:42.000000000 +0200 @@ -159,6 +159,9 @@ export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +# Needed for configure's --with-crt-dir option +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + # FOR AUTOCONF 2.52 AND NEWER ONLY ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) confflags += --build $(DEB_HOST_GNU_TYPE) @@ -440,6 +443,7 @@ confflags += --prefix=/usr confflags += --sharedstatedir=/var/lib confflags += --libexecdir=/usr/lib +confflags += --with-crt-dir=/usr/lib/$(DEB_HOST_MULTIARCH) confflags += --localstatedir=/var/lib confflags += --infodir=/usr/share/info confflags += --mandir=/usr/share/man