Debian Bug report logs - #439979
Please export PKG_CONFIG_LIBDIR in dpkg-buildpackage -a

version graph

Package: dpkg-dev; Maintainer for dpkg-dev is Dpkg Developers <debian-dpkg@lists.debian.org>; Source for dpkg-dev is src:dpkg.

Reported by: Neil Williams <codehelp@debian.org>

Date: Tue, 28 Aug 2007 20:30:04 UTC

Severity: normal

Tags: patch

Found in version dpkg/1.14.5

Fixed in version dpkg/1.14.17

Done: Guillem Jover <guillem@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, debian-embedded@lists.debian.org, Dpkg Developers <team@dpkg.org>:
Bug#439979; Package dpkg. Full text and rfc822 format available.

Acknowledgement sent to Neil Williams <codehelp@debian.org>:
New Bug report received and forwarded. Copy sent to debian-embedded@lists.debian.org, Dpkg Developers <team@dpkg.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Neil Williams <codehelp@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: dpkg-dev: Please support removal of dpkg-cross diversions
Date: Tue, 28 Aug 2007 21:27:56 +0100
[Message part 1 (text/plain, inline)]
Package: dpkg
Version: 1.14.5
Severity: normal
Tags: patch

As outlined on the debian-dpkg lists, I've been testing the removal of
the dpkg-cross diversions of dpkg-buildpackage and dpkg-shlibdeps during
the rewrite of dpkg-cross and I now have two patches (slightly modified
from the last ones posted to the list) that I would like to see in
dpkg-dev as a beginning to a process to merge dpkg-cross back into dpkg.

The first part is to remove the diversions and requires PATH and
environment changes within 'dpkg-buildpackage -a' via a small set of
shell functions provided by dpkg-cross. Cross support for dpkg-shlibdeps
needs a few more PATH changes and a dependency on binutils-multiarch.

Once these patches are included, maybe the shell functions and the
existing cross-config.$arch files can also be merged into dpkg-dev,
leaving dpkg-cross with the original task of preparing foreign shared
objects as Architecture:all packages that can be installed into
/usr/$arch-triplet/lib etc. to make the libraries and headers accessible
to the cross-compiler.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.21-2-amd64 (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

Versions of packages dpkg depends on:
ii  coreutils                     5.97-5.4   The GNU core utilities
ii  libc6                         2.6.1-1    GNU C Library: Shared libraries

dpkg recommends no packages.

-- no debconf information
[buildpackage.diff (text/plain, attachment)]
[shlibs.diff (text/plain, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <team@dpkg.org>:
Bug#439979; Package dpkg. Full text and rfc822 format available.

Acknowledgement sent to Neil Williams <codehelp@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <team@dpkg.org>. Full text and rfc822 format available.

Message #10 received at 439979@bugs.debian.org (full text, mbox):

From: Neil Williams <codehelp@debian.org>
To: 439979@bugs.debian.org
Subject: reversed patches
Date: Tue, 28 Aug 2007 21:39:40 +0100
[Message part 1 (text/plain, inline)]
Bah!

Patches were the wrong way around. Try these.

The /usr/share/dpkg-cross/buildcross file is part of dpkg-cross 1.99
+2.0.0pre2 which is due to be uploaded to experimental just after pre1
leaves NEW.

dpkg-cross will need to depend on the version of dpkg-dev that includes
these patches before migrating into unstable.

-- 


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

[buildpackage.diff (text/x-diff, attachment)]
[shlibs.diff (text/x-diff, attachment)]
[Message part 4 (application/pgp-signature, inline)]

Blocking bugs of 283626 added: 439979 Request was from Neil Williams <codehelp@debian.org> to control@bugs.debian.org. (Tue, 28 Aug 2007 21:09:04 GMT) Full text and rfc822 format available.

Blocking bugs of 440929 added: 439979 Request was from Neil Williams <codehelp@debian.org> to control@bugs.debian.org. (Wed, 05 Sep 2007 15:51:04 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <team@dpkg.org>:
Bug#439979; Package dpkg. Full text and rfc822 format available.

Acknowledgement sent to Frank Lichtenheld <djpig@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <team@dpkg.org>. Full text and rfc822 format available.

Message #19 received at 439979@bugs.debian.org (full text, mbox):

From: Frank Lichtenheld <djpig@debian.org>
To: Neil Williams <codehelp@debian.org>, 439979@bugs.debian.org
Subject: Re: Bug#439979: reversed patches
Date: Sun, 23 Sep 2007 13:56:24 +0200
On Tue, Aug 28, 2007 at 09:39:40PM +0100, Neil Williams wrote:
> The /usr/share/dpkg-cross/buildcross file is part of dpkg-cross 1.99
> +2.0.0pre2 which is due to be uploaded to experimental just after pre1
> leaves NEW.
[...]
> --- dpkg.old/scripts/dpkg-buildpackage.sh	2007-08-27 23:23:28.000000000 +0100
> +++ dpkg-1.14.5/scripts/dpkg-buildpackage.sh	2007-08-28 20:06:39.000000000 +0100
> @@ -84,6 +84,18 @@
>  passopts=''
>  admindir=''
>  
> +DPKGCROSSENABLE=0
> +if [ -f /usr/share/dpkg-cross/buildcross ]; then
> + . /usr/share/dpkg-cross/buildcross
> + DPKGCROSSENABLE=1
> +fi
> +
> +function enhance_cross {
> +	if [ $DPKGCROSSENABLE -gt 0 ]; then
> +		setup_cross
> +	fi
> +}
> +

Just to make your life harder ;) I've now decided to convert
dpkg-buildpackage to a Perl script (see head of master branch
in git). Therefor this part of the patch doesn't apply anymore.

Gruesse,
-- 
Frank Lichtenheld <djpig@debian.org>
www: http://www.djpig.de/




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <team@dpkg.org>:
Bug#439979; Package dpkg. Full text and rfc822 format available.

Acknowledgement sent to Neil Williams <codehelp@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <team@dpkg.org>. Full text and rfc822 format available.

Message #24 received at 439979@bugs.debian.org (full text, mbox):

From: Neil Williams <codehelp@debian.org>
To: Frank Lichtenheld <djpig@debian.org>
Cc: 439979@bugs.debian.org, Dpkg List <debian-dpkg@lists.debian.org>
Subject: Re: Bug#439979: reversed patches
Date: Sun, 23 Sep 2007 14:11:25 +0100
[Message part 1 (text/plain, inline)]
On Sun, 23 Sep 2007 13:56:24 +0200
Frank Lichtenheld <djpig@debian.org> wrote:

> On Tue, Aug 28, 2007 at 09:39:40PM +0100, Neil Williams wrote:
> > The /usr/share/dpkg-cross/buildcross file is part of dpkg-cross 1.99
> > +2.0.0pre2 which is due to be uploaded to experimental just after pre1
> > leaves NEW.
> [...]
> > --- dpkg.old/scripts/dpkg-buildpackage.sh	2007-08-27 23:23:28.000000000 +0100
> > +++ dpkg-1.14.5/scripts/dpkg-buildpackage.sh	2007-08-28 20:06:39.000000000 +0100
> > @@ -84,6 +84,18 @@
> >  passopts=''
> >  admindir=''
> >  
> > +DPKGCROSSENABLE=0
> > +if [ -f /usr/share/dpkg-cross/buildcross ]; then
> > + . /usr/share/dpkg-cross/buildcross
> > + DPKGCROSSENABLE=1
> > +fi
> > +
> > +function enhance_cross {
> > +	if [ $DPKGCROSSENABLE -gt 0 ]; then
> > +		setup_cross
> > +	fi
> > +}
> > +
> 
> Just to make your life harder ;) I've now decided to convert
> dpkg-buildpackage to a Perl script (see head of master branch
> in git). Therefor this part of the patch doesn't apply anymore.

It isn't a problem - this is a workaround patch. Guillem doesn't want
the external lookup involved in the workaround, he wants an internal
solution. The perl version simply needs to implement the functionality
of setup_cross which, in turn, needs to setup and use a directory of
symlinks that are only in the PATH when cross-compiling and which allow
the command line paths passed to the cross-compiler to be manipulated
in real time to set the actual location of the cross header and -dev
package contents.

$args =~ s,/usr/include/,/usr/$arch_type/include/;
where $arch_type is "arm-linux-gnu", for example, retrieved from
dpkg-architecture (which in turn is set by the -a switch).

That functionality is available as gccross in the dpkg-cross source at
the moment and could be implemented that way in dpkg -
dpkg-buildpackage just needs to setup the PATH to put the directory
containing gccross first.

http://alioth.debian.org/plugins/scmcvs/cvsweb.php/dpkg-cross/buildcross?rev=1.1;content-type=text%2Fplain;cvsroot=dpkg-cross


-- 


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

[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <team@dpkg.org>:
Bug#439979; Package dpkg. Full text and rfc822 format available.

Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <team@dpkg.org>. Full text and rfc822 format available.

Message #29 received at 439979@bugs.debian.org (full text, mbox):

From: Raphael Hertzog <hertzog@debian.org>
To: Neil Williams <codehelp@debian.org>, 439979@bugs.debian.org
Subject: Re: Bug#439979: dpkg-dev: Please support removal of dpkg-cross diversions
Date: Wed, 28 Nov 2007 08:55:35 +0100
user dpkg@packages.debian.org
clone 439979 -1
reassign 439979 dpkg-dev 1.14.5
reassign -1 dpkg-dev 1.14.5
retile 439979 dpkg-buildpackage: support cross-building by setting up the environment
usertag 439979 dpkg-buildpackage
retitle -1 dpkg-shlibdeps: support cross-building by scanning required directories
usertag -1 dpkg-shlibdeps
thanks

On Tue, 28 Aug 2007, Neil Williams wrote:
> As outlined on the debian-dpkg lists, I've been testing the removal of
> the dpkg-cross diversions of dpkg-buildpackage and dpkg-shlibdeps during
> the rewrite of dpkg-cross and I now have two patches (slightly modified
> from the last ones posted to the list) that I would like to see in
> dpkg-dev as a beginning to a process to merge dpkg-cross back into dpkg.

Okay, to make it easier to not loose track of this I properly reassigned
this to dpkg-dev and split it in two issues: one for dpkg-buildpackage and
one for dpkg-shlibdeps.

Contrary to what Hector forwarded from you on -devel, the changes for
dpkg-shlibdeps are relatively independant from the rest and since I've
been doing the work on dpkg-shlibdeps I can review and merge a good patch
of you.

If you don't provide the patch, it'll take some more time but I'll get
around to it sometime.

Cheers,
-- 
Raphaël Hertzog

Premier livre français sur Debian GNU/Linux :
http://www.ouaza.com/livre/admin-debian/




Bug 439979 cloned as bug 453267. Request was from Raphael Hertzog <hertzog@debian.org> to control@bugs.debian.org. (Wed, 28 Nov 2007 07:57:02 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <team@dpkg.org>:
Bug#439979; Package dpkg. Full text and rfc822 format available.

Acknowledgement sent to Neil Williams <codehelp@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <team@dpkg.org>. Full text and rfc822 format available.

Message #36 received at 439979@bugs.debian.org (full text, mbox):

From: Neil Williams <codehelp@debian.org>
To: 439979@bugs.debian.org
Cc: debian-devel@lists.debian.org, debian-embedded@lists.debian.org
Subject: dpkg-cross, gccross wrapper and libtool
Date: Sat, 15 Dec 2007 20:07:44 +0000
[Message part 1 (text/plain, inline)]
(For the debian-devel audience, gccross is a wrapper script in the
dpkg-cross package that remaps the @ARGV values passed to the cross
compiler during the cross build so that the correct locations are
specified. i.e. it remaps every call to arm-linux-gnu-gcc at every stage
of the cross build. -L/usr/lib is remapped to -L/usr/arm-linux-gnu/lib
if --host=arm-linux-gnu etc. If no -L option is given, the -l option has
a suitable -L variable prepended. This allows the cross compiler and
libtool to continue even if the original arguments would have caused an
attempt to link against object files of the wrong architecture. Whilst
useful, it is a gross hack and needs a better solution that does not
involve running a script to reprocess every single instruction.)

I've recently spent a lot of time building and testing a variety of
cross built packages, trying to identify reasons for certain common
build failures and bugs and identifying which parts of the current cross
build support are package-specific, which are dpkg-specific and which
can be removed.

One result of this analysis is that the gccross handling inherited from
the dpkg-cross diversion of dpkg-buildpackage and currently handled
within emdebuild from emdebian-tools, is *not* needed for all packages,
just some. Typically, it is required for those packages that both build
a shared library *and* link other objects against that internal library
(whether the linked objects are packaged or not appears immaterial).

The idea for emdebian-tools (>= 0.8.0) is that this workaround will only
be enabled for those packages that require it by putting a tag into
debian/xcontrol (via Emdebian patches) and filing a wishlist crossbuilt
tag against the package as part of the long term mass bug filing for
cross build support. (See the debian-xcontrol package for info on that.)

The problem appears when internal libraries are linked against binaries
built within the same package - a common task. The .la file gets the
wrong location and without gccross, the build tries to link the internal
library against other dependencies in /usr/lib/ which then fails with
"wrong architecture" or "unknown file format".

I originally thought this was due to a broken libtool script - it is not.

I managed to reproduce the problem with one of my own upstream library
packages and this made it a lot easier to work out where things were
going wrong. With the following section in debian/rules, libqof1 can now
be cross built using just 'dpkg-buildpackage -a' (albeit that it
requires a patched dpkg-shlibdeps that is the subject of a separate bug
report):

ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
# internal libraries need to be redirected to cross version
DEB_MAKE_INVOKE+="QOF_LIBS=-L/usr/$(DEB_HOST_GNU_TYPE)/lib -lqof"
# prevent CDBS overwriting CC (see bug #450483)
DEB_CONFIGURE_SCRIPT_ENV =
# Emdebian-specific customisation
DEB_CONFIGURE_EXTRA_FLAGS += --disable-gdasql
# enable dpkg-shlibdeps to find the internal libraries.
DEB_SHLIBDEPS_INCLUDE_libqof1 = ./debian/tmp/usr/lib/
else
# only run make check if not cross compiling
DEB_MAKE_CHECK_TARGET = check
endif

(This is for the upcoming libqof1 0.7.3-1 release, --disable-gdasql is
not supported in QOF 0.7.2).

For this bug, the relevant instructions are:

ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
# internal libraries need to be redirected to cross version
DEB_MAKE_INVOKE+="QOF_LIBS=-L/usr/$(DEB_HOST_GNU_TYPE)/lib -lqof"
endif

Like many upstreams, QOF defines QOF_LIBS as a hardcoded value of
QOF_LIBS="-lqof" in configure.in|ac and is unable to rely on pkg-config
because that would make the package pre-depend on itself (or run
./configure twice just to parse the pkg-config data for a value that is
obvious to the upstream developer(s) anyway). I decided not to
explicitly set this value in the upstream because I cannot be sure that
other cross-building situations outside Debian would actually want to
use /usr/arm-linux-gnu/lib.

Other non-CDBS packages can have similar values passed to $(MAKE) using
the same process as the current mass bug filing for general cross
building support which already uses ifneq
($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
by extending $(CROSS) or $(confflags).

I intend to incorporate these variables into existing cross building
support where necessary, via the same mass bug filing.

A more common need is relatively simple for dpkg-buildpackage to adopt:
pkg-config needs the PKG_CONFIG_LIBDIR variable to be set by
'dpkg-buildpackage -a' as
'PKG_CONFIG_LIBDIR=/usr/$(DEB_HOST_GNU_TYPE)/lib/pkgconfig'.

This setting is needed to cross build all packages that use
pkg-config so it would make sense for this setting to be in
dpkg-buildpackage.

$ pkg-config --libs qof-1
-lqof -lglib-2.0
$ PKG_CONFIG_LIBDIR=/usr/arm-linux-gnu/lib/pkgconfig pkg-config --libs qof-1
-L/usr/arm-linux-gnu/lib -lqof -lglib-2.0
$ pkg-config --cflags qof-1
-I/usr/include/qof -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
$ PKG_CONFIG_LIBDIR=/usr/arm-linux-gnu/lib/pkgconfig pkg-config --cflags
qof-1
-I/usr/arm-linux-gnu/include/qof -I/usr/arm-linux-gnu/include/libxml2
-I/usr/arm-linux-gnu/include/glib-2.0
-I/usr/arm-linux-gnu/lib/glib-2.0/include

In this way, all the other variables used by the QOF build are already
remapped by pkg-config when PKG_CONFIG_LIBDIR is set correctly.

Once that is set, a lot of packages will cross build without needing
gccross support. Those that do will have crossbuilt bugs filed against
them (wishlist) and will require the workaround support from
emdebian-tools until those bugs are closed. gccross can then become a
conditional part of cross building support and emdebuild can skip that
stage whenever possible, simplifying the cross build process enormously.

Other packages can be modified within debian/rules to provide the custom
data required for the cross compiler to correctly locate the internal
objects and for libtool to correctly relink those objects upon
installation into debian/tmp/usr/lib or debian/foo/usr/lib etc. as
appropriate.

It would be good if dpkg-buildpackage could ensure that the
PKG_CONFIG_LIBDIR is set when 'dpkg-buildpackage -a' is called.

I have therefore decided *not* to seek the support of gccross within
dpkg itself so I'm retitling this bug to only seek the PKG_CONFIG_LIBDIR
change.

-- 

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

[signature.asc (application/pgp-signature, attachment)]

Changed Bug title to `Please export PKG_CONFIG_LIBDIR in dpkg-buildpackage -a' from `dpkg-dev: Please support removal of dpkg-cross diversions'. Request was from Neil Williams <codehelp@debian.org> to control@bugs.debian.org. (Sat, 15 Dec 2007 20:12:02 GMT) Full text and rfc822 format available.

Bug reassigned from package `dpkg' to `dpkg-dev'. Request was from Raphael Hertzog <hertzog@debian.org> to control@bugs.debian.org. (Sat, 29 Dec 2007 15:51:06 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <team@dpkg.org>:
Bug#439979; Package dpkg-dev. Full text and rfc822 format available.

Acknowledgement sent to Neil Williams <codehelp@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <team@dpkg.org>. Full text and rfc822 format available.

Message #45 received at 439979@bugs.debian.org (full text, mbox):

From: Neil Williams <codehelp@debian.org>
To: 439979@bugs.debian.org
Subject: extra setting for Architecture:all pkgconfig data
Date: Tue, 1 Jan 2008 13:30:44 +0000
[Message part 1 (text/plain, inline)]
The full setting for PKG_CONFIG_LIBDIR is:

$ENV{PKG_CONFIG_LIBDIR}="/usr/$(DEB_HOST_GNU_TYPE)/lib/pkgconfig/:/usr/share/pkgconfig/";

Adding /usr/share/ allows the few Architecture: all packages that
contain pkgconfig data to be located during cross builds. (e.g.
gnome-mime-data).

-- 

Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#439979; Package dpkg-dev. Full text and rfc822 format available.

Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. Full text and rfc822 format available.

Message #50 received at 439979@bugs.debian.org (full text, mbox):

From: Raphael Hertzog <hertzog@debian.org>
To: Neil Williams <codehelp@debian.org>
Cc: 439979@bugs.debian.org
Subject: Re: extra setting for Architecture:all pkgconfig data
Date: Fri, 28 Mar 2008 14:43:53 +0100
[Message part 1 (text/plain, inline)]
On Tue, 01 Jan 2008, Neil Williams wrote:
> The full setting for PKG_CONFIG_LIBDIR is:
> 
> $ENV{PKG_CONFIG_LIBDIR}="/usr/$(DEB_HOST_GNU_TYPE)/lib/pkgconfig/:/usr/share/pkgconfig/";
> 
> Adding /usr/share/ allows the few Architecture: all packages that
> contain pkgconfig data to be located during cross builds. (e.g.
> gnome-mime-data).

Please review the attached patch. I hope it does what you want.
If it works for you, then I'll integrate it for the next dpkg.

Having the opinion of Frank and Guillem would be nice too.

I believe it's worthwhile to try to get those changes for lenny. 

I have no definitive opinion on this particular patch, but it's important
to have a sane cross-compilation toolchain and if that helps Neil, then
I'm ok for it.

Cheers,
-- 
Raphaël Hertzog

Le best-seller français mis à jour pour Debian Etch :
http://www.ouaza.com/livre/admin-debian/
[0001-Ease-cross-compilation-by-giving-a-default-value-to.patch (text/x-diff, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#439979; Package dpkg-dev. Full text and rfc822 format available.

Acknowledgement sent to Neil Williams <codehelp@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. Full text and rfc822 format available.

Message #55 received at 439979@bugs.debian.org (full text, mbox):

From: Neil Williams <codehelp@debian.org>
To: Raphael Hertzog <hertzog@debian.org>
Cc: 439979@bugs.debian.org
Subject: Re: extra setting for Architecture:all pkgconfig data
Date: Fri, 28 Mar 2008 20:49:38 +0000
[Message part 1 (text/plain, inline)]
On Fri, 2008-03-28 at 14:43 +0100, Raphael Hertzog wrote:
> On Tue, 01 Jan 2008, Neil Williams wrote:
> > The full setting for PKG_CONFIG_LIBDIR is:
> > 
> > $ENV{PKG_CONFIG_LIBDIR}="/usr/$(DEB_HOST_GNU_TYPE)/lib/pkgconfig/:/usr/share/pkgconfig/";
> > 
> > Adding /usr/share/ allows the few Architecture: all packages that
> > contain pkgconfig data to be located during cross builds. (e.g.
> > gnome-mime-data).
> 
> Please review the attached patch. I hope it does what you want.
> If it works for you, then I'll integrate it for the next dpkg.

It works perfectly, thanks Raphael.

I've been testing it on a variety of existing Emdebian packages and it
works exactly as requested.

> Having the opinion of Frank and Guillem would be nice too.
> 
> I believe it's worthwhile to try to get those changes for lenny. 

Closing this and #453267 would provide sane cross-building support
native to dpkg in Lenny and that is fantastic news. It may not sound
like a big event to the rest of Debian, but IMHO this warrants being
listed as one of the major improvements between Etch and Lenny for
anyone interested in embedded development.

> I have no definitive opinion on this particular patch, but it's important
> to have a sane cross-compilation toolchain and if that helps Neil, then
> I'm ok for it.

I may be the one filing the bugs but there are lots of other people who
want to use Debian as their platform-of-choice when developing embedded
software.

Thanks for committing this improvement to dpkg!

-- 


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


[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#439979; Package dpkg-dev. Full text and rfc822 format available.

Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. Full text and rfc822 format available.

Message #60 received at 439979@bugs.debian.org (full text, mbox):

From: Raphael Hertzog <hertzog@debian.org>
To: control@bugs.debian.org
Cc: 439979@bugs.debian.org
Subject: setting package to dselect dpkg-dev dpkg, tagging 439979
Date: Sat, 29 Mar 2008 14:26:05 +0100
# Automatically generated email from bts, devscripts version 2.10.20
#
# dpkg (1.14.17) UNRELEASED; urgency=low
#
#  * dpkg-buildpackage will set PKG_CONFIG_LIBDIR (but not override an existing
#    value) in case of cross-compilation so that pkgconfig finds .pc files
#    in the directory specific to the target architecture. Closes: #439979
#

package dselect dpkg-dev dpkg
tags 439979 + pending





Tags added: pending Request was from Raphael Hertzog <hertzog@debian.org> to control@bugs.debian.org. (Sat, 29 Mar 2008 13:27:08 GMT) Full text and rfc822 format available.

Reply sent to Guillem Jover <guillem@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Neil Williams <codehelp@debian.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #67 received at 439979-close@bugs.debian.org (full text, mbox):

From: Guillem Jover <guillem@debian.org>
To: 439979-close@bugs.debian.org
Subject: Bug#439979: fixed in dpkg 1.14.17
Date: Sun, 30 Mar 2008 10:17:05 +0000
Source: dpkg
Source-Version: 1.14.17

We believe that the bug you reported is fixed in the latest version of
dpkg, which is due to be installed in the Debian FTP archive:

dpkg-dev_1.14.17_all.deb
  to pool/main/d/dpkg/dpkg-dev_1.14.17_all.deb
dpkg_1.14.17.dsc
  to pool/main/d/dpkg/dpkg_1.14.17.dsc
dpkg_1.14.17.tar.gz
  to pool/main/d/dpkg/dpkg_1.14.17.tar.gz
dpkg_1.14.17_i386.deb
  to pool/main/d/dpkg/dpkg_1.14.17_i386.deb
dselect_1.14.17_i386.deb
  to pool/main/d/dpkg/dselect_1.14.17_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 439979@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guillem Jover <guillem@debian.org> (supplier of updated dpkg package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sun, 30 Mar 2008 12:48:22 +0300
Source: dpkg
Binary: dpkg dpkg-dev dselect
Architecture: source i386 all
Version: 1.14.17
Distribution: experimental
Urgency: low
Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
Changed-By: Guillem Jover <guillem@debian.org>
Description: 
 dpkg       - package maintenance system for Debian
 dpkg-dev   - package building tools for Debian
 dselect    - user tool to manage Debian packages
Closes: 4588 4628 4655 12564 17243 68981 114774 142042 151540 203792 215374 217622 220758 246918 248693 255882 308285 311843 323909 355654 363018 366555 379028 435126 439979 443338 445552 448946 453267 462225 462403 462413 463048 463398 465282 465420 465651 466135 466321 466957 467470 468916 469520 469838 471342 472332
Changes: 
 dpkg (1.14.17) experimental; urgency=low
 .
   [ Guillem Jover ]
   * Replace strdup plus error checking usage with a new m_strdup function.
     Closes: #379028
   * Add new keybinding in dselect to restore all selections back to
     whatever's currently installed. Closes: #151540
     Thanks to Colin Watson.
   * Use system timersub and fix timeval normalization in multiplication in
     start-stop-daemon. Thanks to Andreas Påhlsson. Closes: #462225
   * Cosmetic fixes to start-stop-daemon output and man page. Document that
     --chuid will change the group even if it has not been specified. Add
     EXIT STATUS and EXAMPLE sections to man page. Thanks to Justin Pryzby.
   * Add Raphael Hertzog to Uploaders, and remove Brendan O'Dea and
     Christian Perrier with their permission.
   * Use functions from libcompat when those are not provided by the system.
     - Add strnlen to libcompat.
     - Link programs against libcompat which provides obstack. Closes: #142042
   * Change dpkg-gencontrol to not output the Homapage field on udeb.
   * Reintroduce 'no-debsig' back in dpkg.cfg to avoid failing to install any
     package when debsig-verify is installed. Closes: #311843
   * Fix some small memory leaks. Closes: #469520
     Thanks to Sean Finney.
   * Correct broken dselect logic for self-conflicting packages.
     Thanks to Ian Jackson.
   * Implement 'Breaks' properly in dselect. Closes: #448946
     Thanks to Ian Jackson.
   * Fix erroneous description of Breaks in dselect output.
     Thanks to Ian Jackson.
   * Allow compilation with --disable-nls on systems without libintl.h where
     a non glibc claims to be glibc. Closes: #465420
   * Fix crash when a .deb file becomes unreadable while dpkg is starting.
     Thanks to Ian Jackson. Closes: #255882
   * Few file descriptor cleanup and error handling fixes.
     Thanks to Ian Jackson. Closes: #443338
   * Move test suite invokation to a new check target in debian/rules.
   * Add support for nocheck DEB_BUILD_OPTIONS in debian/rules, so that the
     dpkg test suite can be skept if desired.
   * Improve log and status-fd output by printing more status change updates
     and actions. Thanks to Ian Jackson.
   * Implement triggers support. Thanks to Ian Jackson.
     Closes: #17243, #68981, #215374, #217622, #248693, #308285
 .
   [ Raphael Hertzog ]
   * Add a warning displayed by dpkg-genchanges if the current version is
     smaller than the previous one. Closes: #4655
   * Add -d and -c options in dpkg-checkbuilddeps to override
     build-depends/conflicts. Closes: #114774
   * Include list of libraries in dpkg-gensymbols' warning about new/lost
     libraries.
   * Add -R option to dpkg-buildpackage so that one can replace the usual
     "debian/rules" by something else. Closes: #355654
   * Always list all binary packages in the Description: field of .changes
     files. It's nice for reviewers and mentors.debian.net was using this field
     on source only uploads to display short description of what the package is
     about.
   * Handle the case when the library has a different SONAME than the one used
     to find it. Closes: #462413
   * Fix Dpkg::Version and Dpkg::Fields::Object to import _g() from
     Dpkg::Gettext. Thanks to Adam Heath and Olivier Berger for spotting
     this. Closes: #465651
   * Change PATH during make check to look into build directories containing
     dpkg and the related scripts. Thanks to Mike Frysinger. Closes: #466957
   * Some lintian cleanup:
     - add overrides for some useless I: tags
     - drop unused overrides
     - updated several manual pages to fix hyphen-used-as-minus-sign
     - fixed manpage-has-errors-from-man in several manual pages
     - removed empty debian/dpkg.prerm
   * Removed old upgrade code from dpkg's preinst and postinst which only
     concerns upgrading from dpkg version older than the one in oldstable
     already. And thus we get rid of old the last usage of read in those
     scripts (fixes lintian's warning read-in-maintainer-script).
   * Removed sorting of dependencies in dpkg-gencontrol and dpkg-source. But
     kept it for all other fields (Enhances, Conflicts, Replaces, Breaks,
     Build-Conflicts and Build-Conflicts-Indep).
   * Instead changed dpkg-shlibdeps to sort the dependencies generated in
     ${shlibs:*} variables.
   * Changed the logic of simplification of dependencies: if any dependency
     must be discarded due to another dependency appearing further
     in the field, the superseding dependency will take the place of the
     discarded one. Added a test case for this.
   * dpkg-shlibdeps properly accounts usage of symbols provided by private
     libraries without SONAME. Closes: #469838
   * Add a new warning to dpkg-shlibdeps when a library NEEDED is in fact
     not used by any of the binaries analyzed. Closes: #472332
   * Add a new --warnings=<value> option to select the set of warnings to
     activate. By default, do not activate the warning about useless
     libraries at the binary level (instead the new warning above is activated
     by default: it's less strict and more useful).
   * dpkg-source has been heavily refactored to make it easier to support
     multiple source package formats. Several new source package formats have
     been added:
     - the format "2.0" is the original wig&pen
     - the format "3.0 (quilt)" is based on 2.0. It uses a tarball for the
       debian directory and can thus include binary files. Binaries
       outside of the debian directory can be also included if they
       are listed in debian/source/include-binaries (and option
       --include-binaries will generate this file automatically).
       Closes: #4588, #4628
     - thus it will also preserve timestamps on Debian-provided
       documentation like README.Debian. Closes: #366555
     - it handles an explicit series of patches and the patch can thus be
       named without constraints. Patches can contain arbitrary
       headers/comments between file chunks. Closes: #363018
     - it ignores changes on a number of temporary and VCS-specific files
       by default. Closes: #203792, #323909
     - the patches in debian/patches can remove files. Closes: #12564
     - the patches are applied at unpack time. Closes: #463048
     - the formats "3.0 (quilt/native)" don't include VCS directories by
       default. Closes: #435126
     - the format "3.0 (custom)" can be used to create a source package
       containing arbitrary files. It's useful for helper tools that can
       generate the files by themselves in a more efficient way
       (like all the *-buildpackage tools). Closes: #246918
     - the formats "3.0 (git/bzr)" are experimental formats based
       on corresponding VCS repositories. Thanks to Joey Hess and Colin Watson
       respectively.
   * dpkg-source has a new --no-check option. It disables GPG check and
     checksums checks. Closes: #220758
   * dpkg-shlibdeps is now able to look into directories containing libraries
     used by cross-built binaries provided that the right environment variable
     are set. Closes: #453267
   * Change default value of LDFLAGS (set by dpkg-buildpackage) to ''
     instead of '-Wl,-Bsymbolic-functions'. It's safer at this point of the
     release cycle.
   * dpkg-buildpackage will set PKG_CONFIG_LIBDIR (but not override an existing
     value) in case of cross-compilation so that pkgconfig finds .pc files
     in the directory specific to the target architecture. Closes: #439979
 .
   [ Frank Lichtenheld ]
   * Add a warning in dpkg-buildpackage if the build-dependencies are not
     satisfied during -S. Closes: #445552
   * Add a missing space in the German scripts translation. Closes: #463398
   * Add improved deb-shlibs.5 manual page by Zack Weinberg. Closes: #466135
   * dpkg-buildpackage exports some build related environment variables
     now. Based on a patch by Matthias Klose. Closes: #465282
     (See dpkg-buildpackage(1) and https://wiki.ubuntu.com/DistCompilerFlags
      for details)
   * Add support for use of SHA1 and SHA256 checksums in .dsc and
     .changes files. Information will be available in Checksums-Sha{1,256}
     fields. .changes format version increased to 1.8.
   * Link dselect against libncursesw. Closes: #466321
   * Forward port a patch from the old changelog parser to the new
     one that got lost during the transition. '+' and '.' can now
     be used in distribution names yet again. Reported by dann frazier.
     Closes: #467470
 .
   [ Updated dpkg translations ]
   * Korean (Changwoo Ryu).
   * Polish (Robert Luberda).
   * Romanian (Eddy Petrişor).
   * Slovak (Ivan Masár). Closes: #471342
   * Swedish (Peter Karlsson).
   * Thai (Theppitak Karoonboonyanan). Closes: #468916
 .
   [ Updated manpages translations ]
   * German (Helge Kreutzmann).
   * Polish (Robert Luberda).
   * Swedish (Peter Karlsson).
 .
   [ Updated dselect translations ]
   * Basque. (Piarres beobide). Closes: #462403
 .
   [ Updated scripts translations ]
   * German (Helge Kreutzmann).
   * Polish (Robert Luberda).
   * Swedish (Peter Karlsson).
 .
   [ Updated dselect translations ]
   * Polish (Robert Luberda).
   * Romanian (Eddy Petrişor).
Files: 
 56444961ee40787d3ea5021dcc06a876 1205 admin required dpkg_1.14.17.dsc
 0ca6340578ada3e552d65da20a156f63 6379035 admin required dpkg_1.14.17.tar.gz
 358289c629a4b576fc2b442c7651a415 2122620 admin required dpkg_1.14.17_i386.deb
 84ab760fccbd19f8471d0699adbcd5a0 736746 admin optional dselect_1.14.17_i386.deb
 faca7bfb16abe077738e7607379d64ec 626054 utils optional dpkg-dev_1.14.17_all.deb
Checksums-Sha1: 
 cac35895c30cbd70ab57139306353ee0168aa29e 968 dpkg_1.14.17.dsc
 15faa3d798821d27b05fc09a3250fb26bacfb4a4 6379035 dpkg_1.14.17.tar.gz
 fc2c83f6f73b59dd173d944ad2dbf456725b6728 2122620 dpkg_1.14.17_i386.deb
 22214ad294485c59baa3c268d89f44e4e7e5b76f 736746 dselect_1.14.17_i386.deb
 913250129eef33396fcbed06aa051d5d19d3460c 626054 dpkg-dev_1.14.17_all.deb
Checksums-Sha256: 
 59d7e12cf3ab6096a27c87b3181a9c950574398dd38c83afbad5493035b581f4 968 dpkg_1.14.17.dsc
 9c45ae389e305a76070340415169383ae1126c1e7e77376c16feaf35cc40b6d2 6379035 dpkg_1.14.17.tar.gz
 4e8f8a1d24aaa7584fc94aaa7f40d87b4a8bf66bfdc31cc2a4a6a0b66c656c2d 2122620 dpkg_1.14.17_i386.deb
 4b788d10b1779ea032dea864aebfc7171607c7a5de6a71a39f7b190b679e81a7 736746 dselect_1.14.17_i386.deb
 a598e6468317c6401593c5830fc7c7380f0acdce8dc61c45b07157834c92eb18 626054 dpkg-dev_1.14.17_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFH72VTuW9ciZ2SjJsRAtvcAKC3lKxZP+TcJkXuNk2YrhWMr54UJgCgp/Es
81b/wWSjXuYpn8Vku+tiby8=
=y/qC
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 25 May 2008 07:38:24 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 07:51:55 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.