On Sun, 22 Feb 2009 17:42:06 +0100
Andreas Metzler <ametz...@downhill.at.eu.org> wrote:

> On 2009-02-22 Elimar Riesebieter <riese...@lxtec.de> wrote:
> > Package: wnpp
> > Severity: normal
> 
> > Hi Debian ALSA developers,
> 
> > I want to prepare alsa-lib 1.0.19 for upload. Building alsa-lib on i386 and
> > amd64 gives:
> > ...
> > checking for strip... strip
> > checking for cross-compiler... i486-i486-pc-linux-gnu-gcc
> > checking for i486-linux-gnu-gcc... i486-i486-pc-linux-gnu-gcc
> > checking for C compiler default output file name...
> > configure: error: C compiler cannot create executables
> > See `config.log' for more details.
> [...]
> > The correct compiler should be: i486-linux-gnu-gcc and not
> > i486-i486-pc-linux-gnu-gcc!

It should actually probably be just gcc or cc. i486-linux-gnu-gcc is how
a cross-compiler would be called. See the discussion on debian-devel
some months back:

http://lists.debian.org/debian-devel/2007/11/msg00151.html

Steve Langasek <vor...@debian.org> wrote:
"There *is* a need to specify --build when not cross-compiling, if
your upstream build rules do clever things when the architecture is
detected as "i686" instead of "i386".  This was the point in my previous
comment.

There is no need to specify --host when not cross-compiling, and
specifying it will result in autoconf believing that the compiler
should be invoked as a cross-compiler.  Sometimes this has strange side
effects as well."

The issue here is that --host should only be passed when
cross-compiling and --build should be passed alone in a native build.

> I am not sure, but I think (see
> /usr/share/doc/autotools-dev/README.Debian.gz) you are invoking
> ./configure the wrong way. This makes it build successfully for me:

Slight tweak, needed. See: http://wiki.debian.org/EmdebianGuide

DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
CONF_ARGS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
else
CONF_ARGS= --build $(DEB_BUILD_GNU_TYPE)
endif

The actual variable name you use is at your discretion, the point is
that it only contains '--build $(DEB_BUILD_GNU_TYPE)' unless
cross-compiling when it also adds the relevant --host entry.

Then replace:
> -                   --host=$(DEB_BUILD_GNU_TYPE) \
> +                   --build $(DEB_BUILD_GNU_TYPE) \

with
+                   $(CONF_ARGS)

> 
> -----------------------
> --- debian/rules        (Revision 2165)
> +++ debian/rules        (Arbeitskopie)
> @@ -56,7 +56,7 @@
>                     --mandir=\$${prefix}/share/man \
>                     --infodir=\$${prefix}/share/info \
>                     --datadir=\$${prefix}/share \
> -                   --host=$(DEB_BUILD_GNU_TYPE) \
> +                   --build $(DEB_BUILD_GNU_TYPE) \
>                     --enable-static --disable-maintainer-mode
>         touch configure-stamp
> 
> @@ -72,7 +72,7 @@
>                     --mandir=\$${prefix}/share/man \
>                     --infodir=\$${prefix}/share/info \
>                     --datadir=\$${prefix}/share \
> -                   --host=$(DEB_HOST_GNU_TYPE) \
> +                   --build $(DEB_BUILD_GNU_TYPE) \
>                     --enable-static --disable-maintainer-mode \
>                     --disable-python --with-plugindir=/$(bilibdir)/alsa-lib
>         #ln -sf . include/alsa
> -----------------------


-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: pgpuMeVqqI7bg.pgp
Description: PGP signature

Reply via email to