Package: zlib
Version: 1.2.7.dfsg
Severity: normal
User: multiarch-de...@lists.alioth.debian.org
Usertag: multiarch

A requirement of multiarch is that files in non arch-specific paths in
Multi-Arch: same (i.e library and -dev) packages are identical.

Whilst doing the arm64 port I discovered that zlib1g-dev:amd64 and
zlib1g-dev:arm64 were not coinstallable as they should be, because zconf.h
did not match in both packages, but is installed in /usr/include/zconf.h

The difference  is:
zconf.h:amd64 
  #define Z_U4 unsigned   /* ./configure put the #define Z_U4 here */
zconf.h:arm64 
  /* ./configure may #define Z_U4 here */

This line is replaced by configure if a test built with the
compiler/cross-compiler runs successfully.

The test in my case is run as: 
aarch64-linux-gnu-gcc -g -O2 --param=ssp-buffer-size=4 -Wformat
-Werror=format-security -D_FORTIFY_SOURCE=2 -Wall -D_REENTRANT -O3
-D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN ztest26484.c -o ztest26484
Looking for a four-byte integer type... Not found.

Because the test is built with the cross-compiler when cross-compiling
it will (in general) not be able to run so if this package is
cross-built then that line is not replaced. If it is built natively
then it is replaced. i.e cross and natively built packages have
different zconf.h files This is a problem when bootstrapping a new
architecture when low-level libraries like this must be cross-built
until the arch is self-hosting. 

It also seems to be the case that is likely to have different results
on different architectures even when natively built. Although it must
be the same on i386, amd64, armel, and armhf (and powerpc?) at least otherwise
someone would have noticed this issue before.  

So I think the right answer is for this file to be
architecture-qualified because it can not be assumed to be
arch-invariant across debian - i.e moved to
/usr/include/$(DEB_HOST_MULTIARCH)/zconf.h

But perhaps it makes sense to change it so that it won't be different
when crossbuilding and won't be different across multiple
architectures. This could be fixed with respect to crossbuilding by simply 
removing that
configure test and relying on limits.h in debian (and/or adding c99
types). I'm not sure about the different architectures. This may
simply not be practical or desirable. Hence copying upstream. 

-- System Information:
Debian Release: 6.0.6
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32.33-kvm-i386-20111128-dirty (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to