Control: tag -1 patch Julien Cristau <jcris...@debian.org> (2014-03-19): > Source: shapelib > Version: 1.3.0-2 > Severity: serious > Justification: fails to build from source (but built successfully in the past) > > Hi, > > your package no longer builds on powerpc: > > cc -g -I.. -I/sbuild-nonexistent/bld/include -DPROJ4 -D_LITTLE_ENDIAN > > -DDEBUG -DDEBUG2 shpdxf.c ../shpopen.o ../dbfopen.o ../safileio.o -o > > shpdxf > > In file included from /usr/include/endian.h:36:0, > > from /usr/include/powerpc-linux-gnu/bits/waitstatus.h:64, > > from /usr/include/stdlib.h:42, > > from shpdxf.c:40: > > /usr/include/powerpc-linux-gnu/bits/endian.h:26:4: error: #error Both > > BIG_ENDIAN and LITTLE_ENDIAN defined! > > # error Both BIG_ENDIAN and LITTLE_ENDIAN defined! > > ^ > > make[2]: *** [shpdxf] Error 1 > > See > https://buildd.debian.org/status/fetch.php?pkg=shapelib&arch=powerpc&ver=1.3.0-2&stamp=1395181820 > > Cheers, > Julien
Here's a patch; confirmed by first reproducing the FTBFS on partch, and then seeing it go away once it's applied. Mraw, KiBi.
diff -Nru shapelib-1.3.0/debian/changelog shapelib-1.3.0/debian/changelog --- shapelib-1.3.0/debian/changelog 2014-03-18 22:47:55.000000000 +0100 +++ shapelib-1.3.0/debian/changelog 2014-03-26 10:52:01.000000000 +0100 @@ -1,3 +1,12 @@ +shapelib (1.3.0-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTBFS on powerpc by prefixing _{BIG,LITTLE}_ENDIAN with + LIBSHAPE. (Names starting with an underscore are reserved.) + (Closes: #742148) + + -- Cyril Brulebois <k...@debian.org> Wed, 26 Mar 2014 10:38:30 +0100 + shapelib (1.3.0-2) unstable; urgency=medium * Moved to DEP5 copyright format and annotated double licensing, diff -Nru shapelib-1.3.0/debian/patches/0006-Fix-FTBFS-avoid-clash-with-_ENDIAN-defines.patch shapelib-1.3.0/debian/patches/0006-Fix-FTBFS-avoid-clash-with-_ENDIAN-defines.patch --- shapelib-1.3.0/debian/patches/0006-Fix-FTBFS-avoid-clash-with-_ENDIAN-defines.patch 1970-01-01 01:00:00.000000000 +0100 +++ shapelib-1.3.0/debian/patches/0006-Fix-FTBFS-avoid-clash-with-_ENDIAN-defines.patch 2014-03-26 10:52:12.000000000 +0100 @@ -0,0 +1,39 @@ +Description: Avoid clashing with _*_ENDIAN. +Author: Cyril Brulebois <k...@debian.org> + +Defining _{LITTLE,BIG}_ENDIAN is a bad idea since it can clash with +architecture-specific #define's. So prefix those with LIBSHAPE to +avoid name clashing. +--- +Origin: Debian +Bug-Debian: http://bugs.debian.org/742148 +Last-Update: 2014-03-26 + +--- a/contrib/Makefile ++++ b/contrib/Makefile +@@ -2,8 +2,8 @@ + #LINKOPT = /usr/local/lib/libdbmalloc.a + #CFLAGS = -g + +-# Endian: define either _LITTLE_ENDIAN or _BIG_ENDIAN +-ENDIAN = -D_LITTLE_ENDIAN ++# Endian: define either LIBSHAPE_LITTLE_ENDIAN or LIBSHAPE_BIG_ENDIAN ++ENDIAN = -DLIBSHAPE_LITTLE_ENDIAN + + CFLAGS = -g -I.. -I$(HOME)/bld/include -DPROJ4 $(ENDIAN) -DDEBUG -DDEBUG2 + +--- a/contrib/my_nan.h ++++ b/contrib/my_nan.h +@@ -26,10 +26,10 @@ + + /* IEEE Not A Number. */ + +-#ifdef _BIG_ENDIAN ++#ifdef LIBSHAPE_BIG_ENDIAN + # define __nan_bytes { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 } + #endif +-#ifdef _LITTLE_ENDIAN ++#ifdef LIBSHAPE_LITTLE_ENDIAN + # define __nan_bytes { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f } + #endif + diff -Nru shapelib-1.3.0/debian/patches/series shapelib-1.3.0/debian/patches/series --- shapelib-1.3.0/debian/patches/series 2014-03-18 22:47:55.000000000 +0100 +++ shapelib-1.3.0/debian/patches/series 2014-03-26 10:38:26.000000000 +0100 @@ -2,3 +2,4 @@ 0003-Properly-use-libtool.patch 0004-Dynamically-link-the-shp-binaries-to-libshp.patch 0005-Stop-setting-CFLAGS-and-PREFIX-in-the-Makefile.patch +0006-Fix-FTBFS-avoid-clash-with-_ENDIAN-defines.patch
signature.asc
Description: Digital signature