GNU bug report logs - #13078
[PATCH] configure.ac: Cygwin build breaks when path to pkg-tool contains spaces

Previous Next

Package: emacs;

Reported by: Josh <josh <at> foxtail.org>

Date: Tue, 4 Dec 2012 04:39:01 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#13078: closed ([PATCH] configure.ac: Cygwin build breaks when
 path to pkg-tool contains spaces)
Date: Sun, 09 Dec 2012 02:29:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 08 Dec 2012 18:28:15 -0800
with message-id <50C3F73F.9060809 <at> cs.ucla.edu>
and subject line Re: [PATCH] configure.ac: Cygwin build breaks when path to pkg-tool contains spaces
has caused the debbugs.gnu.org bug report #13078,
regarding [PATCH] configure.ac: Cygwin build breaks when path to pkg-tool contains spaces
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
13078: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13078
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Josh <josh <at> foxtail.org>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] configure.ac: Cygwin build breaks when path to pkg-tool
	contains spaces
Date: Mon, 3 Dec 2012 20:35:02 -0800
Hi,

I tried building trunk under Cygwin for the first time a few days ago
(with the `--with-w32' switch, though I don't think that's relevant)
but the build failed because ./configure was finding a version of
pkg-config whose path contained whitespace.  This exposed some quoting
problems in configure.ac, fixed in the patch below.  Here's a snippet
of the session with some representative errors:

checking for cma_open in -lpthreads... no
./configure: line 10967: /cygdrive/c/Program: No such file or directory
*** Your version of pkg-config is too old. You need version 0.9.0 or newer.
*** See http://www.freedesktop.org/software/pkgconfig
checking for lgetfilecon in -lselinux... no
./configure: line 11304: /cygdrive/c/Program: No such file or directory
*** Your version of pkg-config is too old. You need version 0.9.0 or newer.
*** See http://www.freedesktop.org/software/pkgconfig
checking for gnutls_certificate_set_verify_function... no
[...]
checking for gpm.h... no
./configure: line 13122: /cygdrive/c/Program: No such file or directory
*** Your version of pkg-config is too old. You need version 0.9.0 or newer.
*** See http://www.freedesktop.org/software/pkgconfig
checking whether netdb declares h_errno... yes

In addition to the quoting problem, it appears that failure to open a
file is interpreted as having a version which is too old, which is
perhaps not ideal.  Here's the patch I applied locally that allowed me
to build successfully:

diff --git a/configure.ac b/configure.ac
index 085ca83..85c21e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1189,10 +1189,10 @@ AC_DEFUN([PKG_CHECK_MODULES], [
       *** The pkg-config script could not be found. Make sure it is
in your path, or give the full path to pkg-config with the PKG_CONFIG
environment variable or --with-pkg-config-prog.  Or see
http://www.freedesktop.org/software/pkgconfig to get pkg-config.])],
[$4])
   else
      PKG_CONFIG_MIN_VERSION=0.9.0
-     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+     if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
         AC_MSG_CHECKING(for $2)

-        if $PKG_CONFIG --exists "$2" 2>&AS_MESSAGE_LOG_FD &&
+        if "$PKG_CONFIG" --exists "$2" 2>&AS_MESSAGE_LOG_FD &&
           $1_CFLAGS=`$PKG_CONFIG --cflags "$2" 2>&AS_MESSAGE_LOG_FD` &&
           $1_LIBS=`$PKG_CONFIG --libs "$2" 2>&AS_MESSAGE_LOG_FD`; then
            edit_cflags="
@@ -2027,7 +2027,7 @@ if test x"$pkg_check_gtk" = xyes; then
     AC_DEFINE(USE_GTK, 1, [Define to 1 if using GTK.])
     GTK_OBJ="gtkutil.o $GTK_OBJ"
     USE_X_TOOLKIT=none
-    if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
+    if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then
       :
     else
       AC_MSG_WARN([[Your version of Gtk+ will have problems with


[Message part 3 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 13078-done <at> debbugs.gnu.org
Subject: Re: [PATCH] configure.ac: Cygwin build breaks when path to pkg-tool
	contains spaces
Date: Sat, 08 Dec 2012 18:28:15 -0800
I looked into problems in this area in configure.ac and
fixed all the ones mentioned so far in this bug report,
along with some others, in trunk bzr 111162.  No doubt
there are similar problems in other parts of Emacs,
but at least this bug report we can mark 'done' so I've done that.


This bug report was last modified 11 years and 293 days ago.

Previous Next


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