reopen 787956
thanks

On 26.11.2016 19:42, Mark Brown wrote:
> On Sat, Nov 26, 2016 at 03:56:21PM +0100, Matthias Klose wrote:
> 
>> Control: severity -1 serious
> 
> This appears to be some random bug that's a user error and should've
> been closed after the initial discussion with the submitter (which I'm
> now doing).   I'm not sure I can relate it to...
> 
>> now that libgphobos, the gdc's D runtime library is built as a shared 
>> library,
>> I'd like to use the still present multilib builds.  There is currently a
>> fall-back to embed the library, but that doesn't sound as clean as using the
>> multilib packages.  Dropping the multilib packages isn't yet an option from 
>> my
>> point of view, because the buildds are not able to depend on other 
>> architectures.
> 
> ...any of this.  Can you please file a new bug that's a bit more
> explicit about whatever it is that you're looking for here.  As far as
> I can tell this might be a request for multilib packages but zlib
> already has multilib packages so I'm pretty confused.
> 
>> I'm preparing a NMU for that.
> 
> Please allow at least a little time for a response, I've no real idea
> what you're even asking for here.

well, I asked you in private before, without getting replies on all messages and
proposals.

This exactly is the correct issue, not "some random bug".

$ cat tst.c
#include <zlib.h>
$ gcc -m32 -c tst.c
In file included from tst.c:1:0:
/usr/include/zlib.h:34:19: fatal error: zconf.h: No such file or directory
 #include "zconf.h"
                   ^
compilation terminated.


attaching the diff for the proposed changes

diff -Nru zlib-1.2.8.dfsg/debian/changelog zlib-1.2.8.dfsg/debian/changelog
--- zlib-1.2.8.dfsg/debian/changelog    2014-08-16 23:48:57.000000000 +0200
+++ zlib-1.2.8.dfsg/debian/changelog    2016-11-26 15:57:08.000000000 +0100
@@ -1,3 +1,14 @@
+zlib (1:1.2.8.dfsg-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Install the zconf.h header file for the multilib packages. Closes: #787956.
+  * Use the target prefixed ar, available since binutils 2.26.
+  * Run dh_makeshlibs for the 64bit multilib library.
+  * Add ${misc:Depends} to zlib1g-dbg's dependencies.
+  * Support nobiarch build profile (Johannes Schauer). Closes: #709623.
+
+ -- Matthias Klose <d...@debian.org>  Sat, 26 Nov 2016 15:57:08 +0100
+
 zlib (1:1.2.8.dfsg-2) unstable; urgency=low
 
   * Drop zlib-bin package as minizip has now been packaged separately,
diff -Nru zlib-1.2.8.dfsg/debian/control zlib-1.2.8.dfsg/debian/control
--- zlib-1.2.8.dfsg/debian/control      2014-08-16 16:13:26.000000000 +0200
+++ zlib-1.2.8.dfsg/debian/control      2016-11-26 15:57:08.000000000 +0100
@@ -2,9 +2,9 @@
 Section: libs
 Priority: optional
 Maintainer: Mark Brown <broo...@debian.org>
-Standards-Version: 3.9.4
+Standards-Version: 3.9.8
 Homepage: http://zlib.net/
-Build-Depends: debhelper (>= 8.1.3~), binutils (>= 2.18.1~cvs20080103-2) [mips 
mipsel], gcc-multilib [amd64 i386 kfreebsd-amd64 mips mipsel powerpc ppc64 s390 
sparc s390x], dpkg-dev (>= 1.16.1)
+Build-Depends: debhelper (>= 9), gcc-multilib [amd64 i386 kfreebsd-amd64 mips 
mipsel powerpc ppc64 s390 sparc s390x] <!nobiarch>, dpkg-dev (>= 1.16.1)
 
 Package: zlib1g
 Architecture: any
@@ -35,7 +35,7 @@
 Section: debug
 Priority: extra
 Architecture: any
-Depends: zlib1g (= ${binary:Version})
+Depends: zlib1g (= ${binary:Version}), ${misc:Depends}
 Provides: libz-dbg
 Description: compression library - development
  zlib is a library implementing the deflate compression method found
@@ -56,6 +56,7 @@
 Architecture: sparc s390 i386 powerpc mips mipsel
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Replaces: amd64-libs (<< 1.4)
+Build-Profiles: <!nobiarch>
 Description: compression library - 64 bit runtime
  zlib is a library implementing the deflate compression method found
  in gzip and PKZIP.  This package includes a 64 bit version of the
@@ -67,6 +68,7 @@
 Depends: lib64z1 (= ${binary:Version}), zlib1g-dev (= ${binary:Version}), 
lib64c-dev, ${misc:Depends}
 Replaces: amd64-libs-dev (<< 1.4)
 Provides: lib64z-dev
+Build-Profiles: <!nobiarch>
 Description: compression library - 64 bit development
  zlib is a library implementing the deflate compression method found
  in gzip and PKZIP.  This package includes the development support
@@ -77,6 +79,7 @@
 Conflicts: libc6-i386 (<= 2.9-18)
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Replaces: ia32-libs (<< 1.5)
+Build-Profiles: <!nobiarch>
 Description: compression library - 32 bit runtime
  zlib is a library implementing the deflate compression method found
  in gzip and PKZIP.  This package includes a 32 bit version of the
@@ -89,6 +92,7 @@
 Depends: lib32z1 (= ${binary:Version}), zlib1g-dev (= ${binary:Version}), 
lib32c-dev, ${misc:Depends}
 Provides: lib32z-dev
 Replaces: ia32-libs-dev (<< 1.5)
+Build-Profiles: <!nobiarch>
 Description: compression library - 32 bit development
  zlib is a library implementing the deflate compression method found
  in gzip and PKZIP.  This package includes the development support
@@ -97,6 +101,7 @@
 Package: libn32z1
 Architecture: mips mipsel
 Depends: ${shlibs:Depends}, ${misc:Depends}
+Build-Profiles: <!nobiarch>
 Description: compression library - n32 runtime
  zlib is a library implementing the deflate compression method found
  in gzip and PKZIP.  This package includes a n32 version of the shared
@@ -107,6 +112,7 @@
 Architecture: mips mipsel
 Depends: libn32z1 (= ${binary:Version}), zlib1g-dev (= ${binary:Version}), 
libn32c-dev, ${misc:Depends}
 Provides: libn32z-dev
+Build-Profiles: <!nobiarch>
 Description: compression library - n32 development
  zlib is a library implementing the deflate compression method found
  in gzip and PKZIP.  This package includes the development support
diff -Nru zlib-1.2.8.dfsg/debian/rules zlib-1.2.8.dfsg/debian/rules
--- zlib-1.2.8.dfsg/debian/rules        2014-08-16 16:13:56.000000000 +0200
+++ zlib-1.2.8.dfsg/debian/rules        2016-11-26 15:57:08.000000000 +0100
@@ -17,22 +17,12 @@
 DEB_HOST_ARCH_OS    ?= $(shell dpkg-architecture -qDEB_HOST_GNU_OS)
 DEB_HOST_MULTIARCH  ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
+export DEB_CFLAGS_MAINT_STRIP = -O2
+export DEB_CFLAGS_MAINT_APPEND = -O3
 CFLAGS = `dpkg-buildflags --get CFLAGS` `dpkg-buildflags --get CPPFLAGS` -Wall 
-D_REENTRANT
 LDFLAGS = `dpkg-buildflags --get LDFLAGS`
 
-# binutils doesn't supply the prefixed version normally like GCC does so
-# we can't just unconditionally use DEB_HOST_GNU_TYPE-ar
-ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
-       AR=ar
-else
-       AR=$(DEB_HOST_GNU_TYPE)-ar
-endif
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-       CFLAGS += -O0
-else
-       CFLAGS += -O3
-endif
+AR=$(DEB_HOST_GNU_TYPE)-ar
 
 32-ARCHS=amd64 ppc64 kfreebsd-amd64 s390x
 64-ARCHS=s390 sparc i386 powerpc mips mipsel
@@ -69,6 +59,11 @@
 mn32=-mabi=n32
 endif
 
+ifneq (,$(findstring nobiarch,$(DEB_BUILD_PROFILES)))
+override EXTRA_BUILD=
+override EXTRA_INSTALL=
+endif
+
 UNALIGNED_ARCHS=i386 amd64 kfreebsd-i386 kfreebsd-amd64 hurd-i386 lpia
 ifneq (,$(findstring $(DEB_HOST_ARCH), $(UNALIGNED_ARCHS)))
 CFLAGS+=-DUNALIGNED_OK
@@ -81,7 +76,7 @@
 
        if [ ! -f Makefile.stash ]; then cp Makefile Makefile.stash ; fi
 
-       AR=$(AR) CC="$(DEB_HOST_GNU_TYPE)-gcc" CFLAGS="$(CFLAGS)" 
LDFLAGS="$(LDFLAGS)" uname=GNU ./configure --shared --prefix=/usr 
--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
+       AR="$(DEB_HOST_GNU_TYPE)-ar" CC="$(DEB_HOST_GNU_TYPE)-gcc" 
CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" uname=GNU ./configure --shared 
--prefix=/usr --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
 
        touch $@
 
@@ -90,7 +85,7 @@
 
        mkdir -p debian/64
        cp -r $(COPYLIST) debian/64
-       cd debian/64 && AR=$(AR) CC="$(DEB_HOST_GNU_TYPE)-gcc $(m64)" \
+       cd debian/64 && AR="$(DEB_HOST_GNU_TYPE)-ar" 
CC="$(DEB_HOST_GNU_TYPE)-gcc $(m64)" \
            CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
            uname=GNU ./configure --shared --prefix=/usr  
--libdir=\$${prefix}/usr/lib64
        touch $@
@@ -100,7 +95,7 @@
 
        mkdir -p debian/32
        cp -r $(COPYLIST) debian/32
-       cd debian/32 && AR=$(AR) CC="$(DEB_HOST_GNU_TYPE)-gcc $(m32)" \
+       cd debian/32 && AR="$(DEB_HOST_GNU_TYPE)-ar" 
CC="$(DEB_HOST_GNU_TYPE)-gcc $(m32)" \
            CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
            uname=GNU ./configure --shared --prefix=/usr 
--libdir=\$${prefix}/usr/lib32
        touch $@
@@ -110,11 +105,13 @@
 
        mkdir -p debian/n32
        cp -r $(COPYLIST) debian/n32
-       cd debian/n32 && AR=$(AR) CC="$(DEB_HOST_GNU_TYPE)-gcc $(mn32)" \
+       cd debian/n32 && AR="$(DEB_HOST_GNU_TYPE)-ar" 
CC="$(DEB_HOST_GNU_TYPE)-gcc $(mn32)" \
            CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
            uname=GNU ./configure --shared --prefix=/usr 
--libdir=\$${prefix}/usr/lib32
        touch $@
 
+build-arch: build
+build-indep: build
 build: build-stamp $(EXTRA_BUILD)
 build-stamp: configure-stamp
        dh_testdir
@@ -188,6 +185,30 @@
        dh_installdocs -s
        dh_installexamples -s
        dh_install -s --sourcedir=debian/tmp
+ifneq (,$(m32))
+  ifeq ($(DEB_HOST_ARCH),amd64)
+       mkdir -p debian/lib32z1-dev/usr/include/i386-linux-gnu
+       cp debian/32/zconf.h debian/lib32z1-dev/usr/include/i386-linux-gnu/.
+  else ifeq ($(DEB_HOST_ARCH),ppc64)
+       mkdir -p debian/lib32z1-dev/usr/include/powerpc-linux-gnu
+       cp debian/32/zconf.h debian/lib32z1-dev/usr/include/powerpc-linux-gnu/.
+  else ifeq ($(DEB_HOST_ARCH),s390x)
+       mkdir -p debian/lib32z1-dev/usr/include/s390-linux-gnu
+       cp debian/32/zconf.h debian/lib32z1-dev/usr/include/s390-linux-gnu/.
+  endif
+endif
+ifneq (,$(m64))
+  ifeq ($(DEB_HOST_ARCH),i386)
+       mkdir -p debian/lib64z1-dev/usr/include/x86_64-linux-gnu
+       cp debian/64/zconf.h debian/lib64z1-dev/usr/include/x86_64-linux-gnu/.
+  else ifeq ($(DEB_HOST_ARCH),powerpc)
+       mkdir -p debian/lib64z1-dev/usr/include/powerpc64-linux-gnu
+       cp debian/64/zconf.h 
debian/lib64z1-dev/usr/include/powerpc64-linux-gnu/.
+  else ifeq ($(DEB_HOST_ARCH),s390)
+       mkdir -p debian/lib64z1-dev/usr/include/s390x-linux-gnu
+       cp debian/64/zconf.h debian/lib64z1-dev/usr/include/s390x-linux-gnu/.
+  endif
+endif
        dh_installman -s
        dh_lintian -s
        dh_link -s
@@ -198,11 +219,9 @@
 ifneq (,$(findstring $(DEB_HOST_ARCH), $(32-ARCHS)))
        dh_makeshlibs -plib32z1 -V"lib32z1 (>= 1:1.2.3.3.dfsg-1)"
 endif
-ifneq (,$(findstring $(DEB_HOST_ARCH), $(32-ARCHS)))
 ifneq (,$(findstring $(DEB_HOST_ARCH), $(64-ARCHS)))
        dh_makeshlibs -plib64z1 -V"lib64z1 (>= 1:1.2.3.3.dfsg-1)"
 endif
-endif
 ifneq (,$(findstring $(DEB_HOST_ARCH), $(N32-ARCHS)))
        dh_makeshlibs -plibn32z1 -V"libn32z1 (>= 1:1.2.3.3.dfsg-1)"
 endif

Reply via email to