FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian dpkg

 
 
LinkBack Thread Tools
 
Old 04-20-2011, 10:33 PM
Cyril Brulebois
 
Default Insufficient check on pkg-config

Hi,

not sure how you want to solve it, but autoreconf'ing without
pkg-config installed leads to a bad configure-time error.

autoreconf:
,----
| …
| autoreconf: running: aclocal --force -I m4
| configure.ac:50: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd
| m4/dpkg-libs.m4:55: DPKG_LIB_SELINUX is expanded from...
| configure.ac:50: the top level
| autoreconf: configure.ac: tracing
| configure.ac:50: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd
| m4/dpkg-libs.m4:55: DPKG_LIB_SELINUX is expanded from...
| configure.ac:50: the top level
| autoreconf: configure.ac: not using Libtool
| autoreconf: running: /usr/bin/autoconf --force
| configure.ac:50: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd
| m4/dpkg-libs.m4:55: DPKG_LIB_SELINUX is expanded from...
| configure.ac:50: the top level
| autoreconf: running: /usr/bin/autoheader --force
| configure.ac:50: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd
| m4/dpkg-libs.m4:55: DPKG_LIB_SELINUX is expanded from...
| configure.ac:50: the top level
| autoreconf: running: automake --add-missing --copy --force-missing
| configure.ac:50: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd
| m4/dpkg-libs.m4:55: DPKG_LIB_SELINUX is expanded from...
| configure.ac:50: the top level
| …
`----

./configure:
,----
| checking for bzlib.h... no
| ./configure: line 8878: PKG_PROG_PKG_CONFIG: command not found
| ./configure: line 8928: syntax error near unexpected token `libselinux,'
| ./configure: line 8928: ` PKG_CHECK_EXISTS(libselinux,'
`----

KiBi.
 
Old 04-21-2011, 01:11 AM
Jonathan Nieder
 
Default Insufficient check on pkg-config

Hi,

Cyril Brulebois wrote:

> not sure how you want to solve it, but autoreconf'ing without
> pkg-config installed leads to a bad configure-time error.

Maybe something along these lines?

-- >8 --
Subject: build: Catch attempts to autoreconf without pkg-config installed

The PKG_PROG_PKG_CONFIG macro contains some m4_pattern_forbid rules to
catch unexpanded pkg-config macros, but that doesn't help much if
pkg-config is not installed at aclocal time. So unexpanded macros
can escape into the configure script, producing errors at configure
time. Add our own rules to give the user a hint about where to start
towards building dpkg:

$ autoreconf -is
configure.ac:119: error: missing some pkg-config macros
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

While at it, catch unexpanded DPKG_ macros in the same way.

Reported-by: Cyril Brulebois <kibi@debian.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
configure.ac | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 390a868..f8996e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,6 +6,9 @@ AC_CONFIG_SRCDIR([lib/dpkg/dpkg.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])

+m4_pattern_forbid([^PKG_[A-Z_]+$], [missing some pkg-config macros])
+m4_pattern_forbid([^_?DPKG_[A-Z_]+$])
+
AC_USE_SYSTEM_EXTENSIONS
DPKG_ARCHITECTURE

--
1.7.5.rc3


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110421011115.GA23355@elie">http://lists.debian.org/20110421011115.GA23355@elie
 
Old 04-21-2011, 08:46 AM
Cyril Brulebois
 
Default Insufficient check on pkg-config

Hi,

Jonathan Nieder <jrnieder@gmail.com> (20/04/2011):
> Maybe something along these lines?

looks very nice, thanks.

> -- >8 --
> Subject: build: Catch attempts to autoreconf without pkg-config installed
>
> The PKG_PROG_PKG_CONFIG macro contains some m4_pattern_forbid rules to
> catch unexpanded pkg-config macros, but that doesn't help much if
> pkg-config is not installed at aclocal time. So unexpanded macros
> can escape into the configure script, producing errors at configure
> time. Add our own rules to give the user a hint about where to start
> towards building dpkg:
>
> $ autoreconf -is
> configure.ac:119: error: missing some pkg-config macros
> If this token and others are legitimate, please use m4_pattern_allow.
> See the Autoconf documentation.
> autoreconf: /usr/bin/autoconf failed with exit status: 1
>
> While at it, catch unexpanded DPKG_ macros in the same way.

Checked with DPKG_FOO_DOES_NOT_EXIST, looks also right:
| configure.ac:47: error: possibly undefined macro: DPKG_FOO_DOES_NOT_EXIST
| If this token and others are legitimate, please use m4_pattern_allow.
| See the Autoconf documentation.

> Reported-by: Cyril Brulebois <kibi@debian.org>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>

Tested-by: Cyril Brulebois <kibi@debian.org>

KiBi.
 
Old 10-13-2011, 08:20 AM
Guillem Jover
 
Default Insufficient check on pkg-config

Hi!

On Wed, 2011-04-20 at 20:11:33 -0500, Jonathan Nieder wrote:
> Cyril Brulebois wrote:
> > not sure how you want to solve it, but autoreconf'ing without
> > pkg-config installed leads to a bad configure-time error.

> -- >8 --
> Subject: build: Catch attempts to autoreconf without pkg-config installed

> diff --git a/configure.ac b/configure.ac
> index 390a868..f8996e0 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -6,6 +6,9 @@ AC_CONFIG_SRCDIR([lib/dpkg/dpkg.h])
> AC_CONFIG_MACRO_DIR([m4])
> AC_CONFIG_AUX_DIR([build-aux])
>
> +m4_pattern_forbid([^PKG_[A-Z_]+$], [missing some pkg-config macros])

The problem with this is that it's managing someone else's namespace,
which I don't think it's right. Instead I've just checked explicitly
if PKG_PROG_PKG_CONFIG is not defined.

> +m4_pattern_forbid([^_?DPKG_[A-Z_]+$])

I've added a modified version of this though.

thanks,
guillem


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111013082044.GA363@gaara.hadrons.org">http://lists.debian.org/20111013082044.GA363@gaara.hadrons.org
 
Old 10-13-2011, 08:47 AM
Jonathan Nieder
 
Default Insufficient check on pkg-config

Guillem Jover wrote:
> On Wed, 2011-04-20 at 20:11:33 -0500, Jonathan Nieder wrote:

>> +m4_pattern_forbid([^PKG_[A-Z_]+$], [missing some pkg-config macros])
>
> The problem with this is that it's managing someone else's namespace,
> which I don't think it's right. Instead I've just checked explicitly
> if PKG_PROG_PKG_CONFIG is not defined.

Thanks, Guillem. I agree with explanation and the fix you commited
looks good.


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111013084707.GA29805@elie.hsd1.il.comcast.net">h ttp://lists.debian.org/20111013084707.GA29805@elie.hsd1.il.comcast.net
 

Thread Tools




All times are GMT. The time now is 11:48 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org