Debian Bug report logs - #483076
dpkg-cross: corrupted pkg-config data for libcairo-directfb

version graph

Package: dpkg-cross; Maintainer for dpkg-cross is Debian Embedded Group <debian-embedded@lists.debian.org>; Source for dpkg-cross is src:dpkg-cross.

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

Date: Mon, 26 May 2008 21:19:15 UTC

Severity: minor

Tags: patch

Found in versions dpkg-cross/2.2.1, dpkg-cross/2.2.4

Fixed in version dpkg-cross/2.3.0

Done: Neil Williams <codehelp@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 Group <debian-embedded@lists.debian.org>:
Bug#483076; Package dpkg-cross. 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 Group <debian-embedded@lists.debian.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-cross: corrupted pkg-config data for libcairo-directfb
Date: Mon, 26 May 2008 22:17:22 +0100
[Message part 1 (text/plain, inline)]
Package: dpkg-cross
Version: 2.2.1
Severity: minor

$ pkg-config --cflags cairo-directfb
-D_REENTRANT -I/usr/lib/libcairo-directfb/include/cairo
-I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12
-I/usr/include/pixman-1  
$ PKG_CONFIG_PATH=/usr/arm-linux-gnu/lib/pkgconfig/ pkg-config --cflags
cairo-directfb
-D_REENTRANT -I/usr/arm-linux-gnu/include/cairo
-I/usr/arm-linux-gnu/include/freetype2 -I/usr/arm-linux-gnu/include
-I/usr/arm-linux-gnu/include/directfb
-I/usr/arm-linux-gnu/include/libpng12
-I/usr/arm-linux-gnu/include/pixman-1  

What is missing there is:
-I/usr/arm-linux-gnu/lib/libcairo-directfb/include/cairo

instead there is:
-I/usr/arm-linux-gnu/include/cairo

This causes a build failure in the gtk+ udeb which cannot find the
libcairo-directfb headers:


$ tail -20 ../gtk+2.0_2.12.9-4em1_arm.build
	then mv -f ".deps/gdkdrawable-directfb.Tpo"
".deps/gdkdrawable-directfb.Plo"; \
	else rm -f ".deps/gdkdrawable-directfb.Tpo"; exit 1; \
	fi
 arm-linux-gnu-gcc -DHAVE_CONFIG_H -I.
-I/opt/emdebian/trunk/g/gtk+2.0/trunk/gtk+2.0-2.12.9/gdk/directfb
-I../.. -DG_LOG_DOMAIN=\"Gdk-DirectFB\" -DGDK_COMPILATION
-I/opt/emdebian/trunk/g/gtk+2.0/trunk/gtk+2.0-2.12.9
-I/opt/emdebian/trunk/g/gtk+2.0/trunk/gtk+2.0-2.12.9/gdk -I../../gdk
-DG_DISABLE_DEPRECATED -DG_DISABLE_CAST_CHECKS -pthread -D_REENTRANT
-I/usr/arm-linux-gnu/include/glib-2.0
-I/usr/arm-linux-gnu/lib/glib-2.0/include
-I/usr/arm-linux-gnu/include/cairo
-I/usr/arm-linux-gnu/include/freetype2 -I/usr/arm-linux-gnu/include
-I/usr/arm-linux-gnu/include/directfb
-I/usr/arm-linux-gnu/include/libpng12
-I/usr/arm-linux-gnu/include/pixman-1
-I/usr/arm-linux-gnu/include/pango-1.0 -D_REENTRANT
-I/usr/arm-linux-gnu/include/cairo
-I/usr/arm-linux-gnu/include/freetype2 -I/usr/arm-linux-gnu/include
-I/usr/arm-linux-gnu/include/directfb
-I/usr/arm-linux-gnu/include/libpng12
-I/usr/arm-linux-gnu/include/pixman-1 -g -O2 -Wall -g -O2 -MT
gdkdrawable-directfb.lo -MD -MP -MF .deps/gdkdrawable-directfb.Tpo -c
/opt/emdebian/trunk/g/gtk+2.0/trunk/gtk
+2.0-2.12.9/gdk/directfb/gdkdrawable-directfb.c
-fPIC -DPIC -o .libs/gdkdrawable-directfb.o
/opt/emdebian/trunk/g/gtk+2.0/trunk/gtk
+2.0-2.12.9/gdk/directfb/gdkdrawable-directfb.c:49:28:
error: cairo-directfb.h: No such file or directory
/opt/emdebian/trunk/g/gtk+2.0/trunk/gtk
+2.0-2.12.9/gdk/directfb/gdkdrawable-directfb.c:
In function ‘gdk_directfb_ref_cairo_surface’:
/opt/emdebian/trunk/g/gtk+2.0/trunk/gtk
+2.0-2.12.9/gdk/directfb/gdkdrawable-directfb.c:1044:
warning: implicit declaration of function
‘cairo_directfb_surface_create’
/opt/emdebian/trunk/g/gtk+2.0/trunk/gtk
+2.0-2.12.9/gdk/directfb/gdkdrawable-directfb.c:1044:
warning: assignment makes pointer from integer without a cast
make[5]: *** [gdkdrawable-directfb.lo] Error 1
make[5]: Leaving directory
`/opt/emdebian/trunk/g/gtk+2.0/trunk/gtk
+2.0-2.12.9/debian/build/directfb/gdk/directfb'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory
`/opt/emdebian/trunk/g/gtk+2.0/trunk/gtk
+2.0-2.12.9/debian/build/directfb/gdk'
make[3]: *** [all] Error 2
make[3]: Leaving directory
`/opt/emdebian/trunk/g/gtk+2.0/trunk/gtk
+2.0-2.12.9/debian/build/directfb/gdk'



-- Package-specific info:

-- /etc/dpkg-cross/cross-compile --

#
# /etc/dpkg-cross/cross-compile: configuration for dpkg-cross & Co.
#

# default architecture for dpkg-cross (to avoid always typing the -a
option
# if you do cross installations only for one architecture)
# Note: default_arch is managed by debconf - it can be overridden
# if ~/.dpkg-cross/cross-compile exists or by specifying an
# architecture on the command line.
# Use '[sudo] dpkg-reconfigure dpkg-cross' to change this value.
default_arch = arm

#
# general section: paths of cross compiling environment
#
# you can set the following variables here:
#  crossprefix: prefix for cross compiling binaries; default:
$(DEB_HOST_GNU_SYSTEM)-
#  crossbase  : base prefix for the following; default: /usr
#  crossdir   : base directory for architecture; default:
#               $(CROSSBASE)/$(DEB_HOST_GNU_TYPE)
#  crossbin   : dir for binaries; default: $(CROSSDIR)/bin
#  crosslib   : dir for libraries; default: $(CROSSDIR)/lib
#  crossinc   : dir for headers; default: $(CROSSDIR)/include
#  maintainer : maintainer name to pass to original dpkg-buildpackage
#               in -m option. If not set at all, don't pass a -m, thus
#               dpkg-buildpackage will use the name from the changelog
#               file. If set to the special string CURRENTUSER,
#               dpkg-buildpackage will use the name from the
#               changelog, too, but signing the .changes will be done
#               as the current user (default key).
#  removedeps : comma-separated list of package names that should be
removed
#               from depends/conflicts/etc fields
#  keepdeps   : comma-separated list of package names that should be
kept
#               in depends/conflicts/etc fields as is, without adding
#               -arch-cross.
#
# Usually, you need only set crossbase, or maybe also crossdir
#
crossbase = /usr

# A crossroot definition is for the
complete-Debian-system-mounted-somewhere
# approach, mainly used for Hurd.
#crossroot-hurd-i386 = /gnu

#
# This setting for maintainer is usually right:
#
maintainer = CURRENTUSER

#
# This list is no longer being updated - implement on the command line
instead.
#
removedeps = gcc, binutils, gpm, cpp, debianutils, xfree86-common,
libpam-runtime, xlibs-data, debconf, tzdata
keepdeps = gcc-3.3-base, gcc-3.4-base, gcc-4.0-base, gcc-4.1-base

#
# per-package sections: additional environment variables to set
#
# These are no longer updated - implement on the command line instead.

package e2fsprogs:
	unset LD

# by Jorik Jonker <jorik@dnd.utwente.nl>
package glibc:
scope makeflags:
	LINUX_SOURCE = $(CROSSDIR)

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

Kernel: Linux 2.6.25-2-amd64 (SMP w/2 CPU cores)
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-cross depends on:
ii  binutils-multiarch  2.18.1~cvs20080103-6 Binary utilities that
support mult
ii  debconf [debconf-2. 1.5.22               Debian configuration
management sy
ii  dpkg-dev            1.14.19              package building tools for
Debian
ii  libdebian-dpkgcross 2.2.1                functions to aid
cross-compiling D
ii  perl                5.10.0-10            Larry Wall's Practical
Extraction 

Versions of packages dpkg-cross recommends:
ii  fakeroot                      1.9.5      Gives a fake root
environment

-- debconf information:
* dpkg-cross/default-arch: arm

-- 
Neil Williams <codehelp@debian.org>
[signature.asc (application/pgp-signature, inline)]

Blocking bugs of 480722 added: 483076 Request was from Neil Williams <codehelp@debian.org> to control@bugs.debian.org. (Mon, 26 May 2008 21:25:28 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Embedded Group <debian-embedded@lists.debian.org>:
Bug#483076; Package dpkg-cross. Full text and rfc822 format available.

Acknowledgement sent to Neil Williams <codehelp@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Embedded Group <debian-embedded@lists.debian.org>. Full text and rfc822 format available.

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

From: Neil Williams <codehelp@debian.org>
To: Debian Embedded <debian-embedded@lists.debian.org>
Cc: 483076@bugs.debian.org
Subject: Likely fix for #483076
Date: Thu, 10 Jul 2008 17:33:30 +0100
[Message part 1 (text/plain, inline)]
package: dpkg-cross
tags: 483076 + patch
quit

Fix for a build failure in the gtk+ udeb which cannot find the
libcairo-directfb headers because dpkg-cross shortens 

-I/usr/arm-linux-gnu/lib/libcairo-directfb/include/cairo
to:
-I/usr/arm-linux-gnu/include/cairo

$ grep "^prefix=" /usr/lib/pkgconfig/*.pc | grep -v "prefix=/usr$"
/usr/lib/pkgconfig/autoopts.pc:prefix="/usr"
/usr/lib/pkgconfig/cairo-directfb.pc:prefix=/usr/lib/libcairo-directfb

I've tested with both these specific cases and with one typical case.

Index: dpkg-cross
===================================================================
RCS file: /cvsroot/dpkg-cross/dpkg-cross/dpkg-cross,v
retrieving revision 1.50
diff -p -u -b -B -r1.50 dpkg-cross
--- dpkg-cross	26 Jun 2008 15:22:13 -0000	1.50
+++ dpkg-cross	10 Jul 2008 16:21:12 -0000
@@ -509,8 +509,9 @@ sub sub_build {
 			return 0;
 		}
 		while (<FROM>) {
-			if (/^prefix=/) {
-				print TO "prefix=$crossdir\n";
+			# fix for #483076
+			if ((m:^prefix="/usr(.*)"$:) or (m:^prefix=/usr(.*)$:)) {
+				print TO "prefix=${crossdir}${1}\n";
 			} elsif (/^exec_prefix=/) {
 				print TO "exec_prefix=\${prefix}\n";
 			} elsif (/^libdir=/) {

The resulting .pc file for cairo-direct-fb would be:

prefix=/usr/arm-linux-gnu/lib/libcairo-directfb
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: cairo-directfb
Description: Multi-platform 2D graphics library
Version: 1.6.4

Requires.private: freetype2 >= 9.7.3 fontconfig directfb libpng12
pixman-1 >= 0.10.0 
Libs: -L${libdir} -lcairo -Wl,-rpath,${libdir}
Libs.private: -lz -lz -lm
Cflags: -I${includedir}/cairo

The autogen pkg-config data would be:
# pkg-config information for AutoOpts 31.1.6
#
prefix=/usr/arm-linux-gnu
datarootdir="/usr/share"
datadir="/usr/share"
package="autogen"
includedir="/usr/include"
exec_prefix=${prefix}
bindir="/usr/bin"
libdir=${exec_prefix}/lib
ldopts="-Wl,-R"
exeext=""
version="31:1:6"
dotver="31.1.6"
pkgdatadir="/usr/share/autogen"
autogen="/usr/bin/autogen"
libs="-L/usr/lib -lopts"
libsrc="/usr/share/autogen/libopts-31.1.6.tar.gz"
static_libs="/usr/lib/libopts.a"

Name:           AutoOpts
Description:    A semi-automated generated/library option parser
URL:            http://www.gnu.org/software/autogen
Version:        31.1.6
Libs:           -Wl,-R/usr/lib -L/usr/lib -lopts
Cflags:         

A typical package is unaffected:

prefix=/usr/arm-linux-gnu
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
xmldir=/usr/share/xml/qof/qsf
gda_libs=-lgdasql-3.0
qof_sql_libs=

Name: QOF
Description: QOF Query Object Framework Library.
Version: 0.7.5
Requires: glib-2.0
Libs: -L${libdir} -lqof ${qof_sql_libs}
Libs.private: -lm ${gda_libs}
Cflags: -I${includedir}/qof

The modified cairo-directfb pc file gives:
$ PKG_CONFIG_PATH=/usr/arm-linux-gnu/lib/pkgconfig/ pkg-config
--cflags ./test.pc
-D_REENTRANT -I/usr/arm-linux-gnu/lib/libcairo-directfb/include/cairo
-I/usr/arm-linux-gnu/include/freetype2 -I/usr/arm-linux-gnu/include
-I/usr/arm-linux-gnu/include/directfb
-I/usr/arm-linux-gnu/include/libpng12
-I/usr/arm-linux-gnu/include/pixman-1  

Compared to (broken):
$ PKG_CONFIG_PATH=/usr/arm-linux-gnu/lib/pkgconfig/ pkg-config --cflags
cairo-directfb
-D_REENTRANT -I/usr/arm-linux-gnu/include/cairo
-I/usr/arm-linux-gnu/include/freetype2 -I/usr/arm-linux-gnu/include
-I/usr/arm-linux-gnu/include/directfb
-I/usr/arm-linux-gnu/include/libpng12
-I/usr/arm-linux-gnu/include/pixman-1  

and (native)
$ pkg-config --cflags cairo-directfb
-D_REENTRANT -I/usr/lib/libcairo-directfb/include/cairo
-I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12
-I/usr/include/pixman-1

-- 


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


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

Bug marked as found in version 2.2.4. Request was from Neil Williams <codehelp@debian.org> to control@bugs.debian.org. (Thu, 10 Jul 2008 16:36:05 GMT) Full text and rfc822 format available.

Tags added: patch Request was from Neil Williams <codehelp@debian.org> to control@bugs.debian.org. (Thu, 10 Jul 2008 16:54:07 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Embedded Group <debian-embedded@lists.debian.org>:
Bug#483076; Package dpkg-cross. Full text and rfc822 format available.

Acknowledgement sent to Neil Williams <codehelp@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Embedded Group <debian-embedded@lists.debian.org>. Full text and rfc822 format available.

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

From: Neil Williams <codehelp@debian.org>
To: Debian Embedded <debian-embedded@lists.debian.org>
Cc: 483076@bugs.debian.org
Subject: Re: Likely fix for #483076
Date: Thu, 10 Jul 2008 22:19:26 +0100
[Message part 1 (text/plain, inline)]
On Thu, 2008-07-10 at 17:33 +0100, Neil Williams wrote:

> Fix for a build failure in the gtk+ udeb which cannot find the
> libcairo-directfb headers because dpkg-cross shortens 

A second part of the same fix, this time for the .so file and links:

Index: dpkg-cross
===================================================================
RCS file: /cvsroot/dpkg-cross/dpkg-cross/dpkg-cross,v
retrieving revision 1.51
diff -p -u -b -B -r1.51 dpkg-cross
--- dpkg-cross	10 Jul 2008 19:00:52 -0000	1.51
+++ dpkg-cross	10 Jul 2008 21:18:08 -0000
@@ -559,6 +559,11 @@ sub sub_build {
 		} elsif (/^\/usr(\/X11R6)?\/lib32\/([^\/]+\.[ao])$/) {
 			# regular .a or .o file under /usr/lib32 or /usr/X11R6/lib32
 			link_file("$src$_", "$dst$crosslib32/$2") or goto fail;
+		} elsif (m:^/usr/lib/([\w\-/]+)/lib/([^/]+\.so[^/]*)$:) {
+			# regular .so* file under /usr/lib/.*/lib/
+			# e.g. /usr/lib/libcairo-directfb/lib/libcairo.so.2.17.5
+			# See #483076
+			link_file("$src$_", "$dst$crosslib/$1/lib/$2") or goto fail;
 		} elsif (/^(\/usr(\/X11R6)?)?\/lib\/([^\/]+\.so[^\/]*)$/) {
 			# regular .so* file under /lib, /usr/lib or /usr/X11R6/lib
 			if (is_ldscript("$src$_")) {

-- 


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


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

Tags added: pending Request was from Neil Williams <codehelp@debian.org> to control@bugs.debian.org. (Fri, 11 Jul 2008 22:18:04 GMT) Full text and rfc822 format available.

Reply sent to Neil Williams <codehelp@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 #28 received at 483076-close@bugs.debian.org (full text, mbox):

From: Neil Williams <codehelp@debian.org>
To: 483076-close@bugs.debian.org
Subject: Bug#483076: fixed in dpkg-cross 2.3.0
Date: Tue, 15 Jul 2008 14:47:04 +0000
Source: dpkg-cross
Source-Version: 2.3.0

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

dpkg-cross_2.3.0.dsc
  to pool/main/d/dpkg-cross/dpkg-cross_2.3.0.dsc
dpkg-cross_2.3.0.tar.gz
  to pool/main/d/dpkg-cross/dpkg-cross_2.3.0.tar.gz
dpkg-cross_2.3.0_all.deb
  to pool/main/d/dpkg-cross/dpkg-cross_2.3.0_all.deb
libdebian-dpkgcross-perl_2.3.0_all.deb
  to pool/main/d/dpkg-cross/libdebian-dpkgcross-perl_2.3.0_all.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 483076@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Neil Williams <codehelp@debian.org> (supplier of updated dpkg-cross 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: Tue, 15 Jul 2008 14:10:28 +0100
Source: dpkg-cross
Binary: dpkg-cross libdebian-dpkgcross-perl
Architecture: source all
Version: 2.3.0
Distribution: unstable
Urgency: low
Maintainer: Debian Embedded Group <debian-embedded@lists.debian.org>
Changed-By: Neil Williams <codehelp@debian.org>
Description: 
 dpkg-cross - tools for cross compiling Debian packages
 libdebian-dpkgcross-perl - functions to aid cross-compiling Debian packages
Closes: 463588 483076 489567
Changes: 
 dpkg-cross (2.3.0) unstable; urgency=low
 .
   * Same change as apt-cross in the buginfo.sh script:
   * bashism in /bin/sh script (Closes: #489567)
   * corrupted pkg-config data for libcairo-directfb (Closes: #483076)
   * -a amd64 should search /emul/ia32-linux (Closes: #463588)
Checksums-Sha1: 
 a59de12706e85d42404100c2c466687f15ae428d 1259 dpkg-cross_2.3.0.dsc
 83bd95e30960d0461e41bc4304adcd8c388816d7 84931 dpkg-cross_2.3.0.tar.gz
 8eb38b306d3a15aa1c02a51a289ab3703471a499 49192 dpkg-cross_2.3.0_all.deb
 7d3fbb77e7bb4a5a176fabf78378439494fbd5ed 30802 libdebian-dpkgcross-perl_2.3.0_all.deb
Checksums-Sha256: 
 60a1ee6e850bf66e335dceab69d98a13c484226acb8dc2caf160df0291913799 1259 dpkg-cross_2.3.0.dsc
 0e9039daa32c8437c24af7111c7a80c7d47d8277db8e8f4bbb0468e192efe85f 84931 dpkg-cross_2.3.0.tar.gz
 8e7429df31f3f05efaaf783837ba30afed06e3fc8fb64799be6de86ec593fe6b 49192 dpkg-cross_2.3.0_all.deb
 844fc3a7c2b2e309f40478c8e28e01702873a3a50eb9c568f8b347b892b7587f 30802 libdebian-dpkgcross-perl_2.3.0_all.deb
Files: 
 9ff000ca96d9812f9b7380cb2a22927d 1259 utils extra dpkg-cross_2.3.0.dsc
 8672b454f53493b7302578d831ea01b9 84931 utils extra dpkg-cross_2.3.0.tar.gz
 0b51a566ef5683d34e6ef66132799329 49192 utils extra dpkg-cross_2.3.0_all.deb
 f5267c14cc138bad64d7ee7427cacea9 30802 perl extra libdebian-dpkgcross-perl_2.3.0_all.deb

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

iEYEARECAAYFAkh8tRcACgkQiAEJSii8s+PzfwCfYQxWU0BSjlll2nLr16khxpPY
gR8Anjd1DDoYka/IaP2IFfiip2iOc5rh
=55fC
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 24 Aug 2008 07:34:45 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 04:23:39 2014; Machine Name: buxtehude.debian.org

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