reassign 495023 apt-build
severity 495023 normal
retitle 495023 apt-build: does not handle multilib toolchains
thanks

Hi!

On Thu, 2008-08-14 at 01:40:16 +0200, wolfgang.aig...@gmx.de wrote:
> Package: bzip2
> Version: 1.0.5-0.1
> Severity: minor

> if bzip2 is build with apt-build and following configuration
> 
> Olevel = -O2
> mtune = -mtune=pentium-m 
> options = " -pipe -fomit-frame-pointer  "
> 
> it fails with: 
> gcc -m64 -march=x86-64 -mtune=x86-64 -Wall -Winline -O2 -g 
> -D_FILE_OFFSET_BITS=64  -D_REENTRANT -o blocksort.o -c blocksort.c
> blocksort.c:1: error: CPU you selected does not support x86-64 instruction set
> 
> the reason is that 
> dpkg-architecture -qDEB_HOST_ARCH  --> i386
> but this is no x86-64 architecture.
> 
> I'm not aware of an easy way to fix this cause for global i686 builds
> this behaviour looks fine. 
> 
> Maybe it is possible to add additional architecture values to
> dpkg-architecture and evaluate it.

The problem is in apt-build, as it seems to be wrapping the toolchain
binaries and either appending or replacing specific values (like
“-mtune”). This occurs as bzip2 is using the toolchain multilib
support to build amd64 executables on i386, and then fails as it gets
passed “-mtune=pentium-m” which conflicts with the requested “-march”
argument. Thus the reassignment.

A solution would for apt-build to not replace/append the “-mtune”
arguments (and possibly other arch bound ones) when multilib is in
use, so it would come down to checking if the -m(32|64) argument is
passed and it does not match the current host architecture bits.

Newer dpkg-architecture provides a DEB_HOST_ARCH_BITS variable, that
could be used for that.

> It is likely that this problem also occoured on oether packages.

Possibly all multilib enabled packages.

regards,
guillem



-- 
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