configure: do not quote $PKG_CONFIG
PATCH 1/1 configure: do not quote $PKG_CONFIG
We should not quote the PKG_CONFIG setting as this deviates from the canonical upstream behavior that gets integrated with all other build systems, and deviates from how we treat all other toolchain variables that we get from the environment.
Ultimately, the point is that it breaks passing custom flags directly to pkg-config via the env var where this normally works elsewhere, and it used to work in the past.
--- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
configure +2 -2
@@ -245,7 +245,7 @@ strip="${STRIP-${cross_prefix}strip}" windres="${WINDRES-${cross_prefix}windres}" pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}" query_pkg_config() { - "${pkg_config_exe}" ${QEMU_PKG_CONFIG_FLAGS} "$@" + ${pkg_config_exe} ${QEMU_PKG_CONFIG_FLAGS} "$@" } pkg_config=query_pkg_config sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}"
@@ -1511,7 +1511,7 @@ fi ########################################## # pkg-config probe -if ! has "$pkg_config_exe"; then +if ! has $pkg_config_exe; then echo "Error: pkg-config binary '$pkg_config_exe' not found" exit 1 fi
Signature · 1 line
1.7.9.7
Am 15.07.2012 22:26, schrieb Mike Frysinger:
Quoted 8 lines
We should not quote the
PKG_CONFIGsetting as this deviates from the canonical upstream behavior that gets integrated with all other build systems, and deviates from how we treat all other toolchain variables that we get from the environment.Ultimately, the point is that it breaks passing custom flags directly to pkg-config via the env var where this normally works elsewhere, and it used to work in the past.
What about passing custom flags with QEMU_PKG_CONFIG_FLAGS?
Removing the quotes will not allow paths containing spaces, so that's not a good idea.
Regards,
Stefan Weil
Quoted 28 lines
Signed-off-by Mike Frysinger <[email protected]>--- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)configure +2
-2@@ -245,7 +245,7 @@ strip="${STRIP-${cross_prefix}strip}" windres="${WINDRES-${cross_prefix}windres}" pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}" query_pkg_config() { - "${pkg_config_exe}" ${QEMU_PKG_CONFIG_FLAGS} "$@" + ${pkg_config_exe} ${QEMU_PKG_CONFIG_FLAGS} "$@" } pkg_config=query_pkg_config sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}"@@ -1511,7 +1511,7 @@ fi ########################################## # pkg-config probe -if ! has "$pkg_config_exe"; then +if ! has $pkg_config_exe; then echo "Error: pkg-config binary '$pkg_config_exe' not found" exit 1 fi
Quoted 6 lines · On Sunday 15 July 2012 15:54:51 Stefan Weil wrote:
Am 15.07.2012 22:26, schrieb Mike Frysinger:
Quoted 5 lines
We should not quote the
PKG_CONFIGsetting as this deviates from the canonical upstream behavior that gets integrated with all other build systems, and deviates from how we treat all other toolchain variables that we get from the environment.
Quoted 8 lines
Quoted 3 lines
Ultimately, the point is that it breaks passing custom flags directly to pkg-config via the env var where this normally works elsewhere, and it used to work in the past.
What about passing custom flags with
QEMU_PKG_CONFIG_FLAGS?Removing the quotes will not allow paths containing spaces, so that's not a good idea.
except that doesn't work with other build variables (like CC/etc...), nor does it work with the standard pkg-config build environments. making qemu deviate from the standard to support non-existent setups makes no sense. -mike
Quoted 11 lines · Stefan Weil
Am 15.07.2012 22:26, schrieb Mike Frysinger:
Quoted 8 lines
We should not quote the
PKG_CONFIGsetting as this deviates from the canonical upstream behavior that gets integrated with all other build systems, and deviates from how we treat all other toolchain variables that we get from the environment.Ultimately, the point is that it breaks passing custom flags directly to pkg-config via the env var where this normally works elsewhere, and it used to work in the past.
Quoted 4 lines
What about passing custom flags with
QEMU_PKG_CONFIG_FLAGS?Removing the quotes will not allow paths containing spaces, so that's not a good idea.
Actually, it IS a good idea. The de facto standard build environment requires that pkg-config is not allowed to live in a path containing spaces, precisely so that you can override the variable to pass options to your preferred location of pkg-config; and if your build setup is truly so messed up as to have pkg-config installed in a canonical location with spaces, then you can also tweak your unusual environment to provide a symlink to pkg-config that does not contain spaces as the workaround.
Signature · 2 lines
Eric Blake [email protected] +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Am 16.07.2012 17:39, schrieb Eric Blake:
Quoted 17 lines · Stefan Weil
Quoted 11 lines
Am 15.07.2012 22:26, schrieb Mike Frysinger:
Quoted 8 lines
We should not quote the
PKG_CONFIGsetting as this deviates from the canonical upstream behavior that gets integrated with all other build systems, and deviates from how we treat all other toolchain variables that we get from the environment.Ultimately, the point is that it breaks passing custom flags directly to pkg-config via the env var where this normally works elsewhere, and it used to work in the past.
Quoted 4 lines
What about passing custom flags with
QEMU_PKG_CONFIG_FLAGS?Removing the quotes will not allow paths containing spaces, so that's not a good idea.
Quoted 8 lines
Actually, it IS a good idea. The de facto standard build environment requires that pkg-config is not allowed to live in a path containing spaces, precisely so that you can override the variable to pass options to your preferred location of pkg-config; and if your build setup is truly so messed up as to have pkg-config installed in a canonical location with spaces, then you can also tweak your unusual environment to provide a symlink to pkg-config that does not contain spaces as the workaround.
That sounds reasonable. Then the following patch was at least partially unnecessary:
commit 17884d7b6462b0fe497f08fec6091ffbe04caa8d
Author: Sergei Trofimovich <[email protected]> Date: Tue Jan 31 22:03:45 2012 +0300
./configure: request pkg-config to provide private libs when static
linking
Added wrapper around pkg-config to allow:
- safe options injection via ${QEMU_PKG_CONFIG_FLAGS}
- spaces in path to pkg-config
With Mike's new patch, QEMU_PKG_CONFIG_FLAGS is no longer needed because options can be passed using the pkg-config macro. I suggest to remove it.
Regards,
Stefan W.
Quoted 40 lines · On Monday 16 July 2012 11:58:55 Stefan Weil wrote:
Am 16.07.2012 17:39, schrieb Eric Blake:
Quoted 16 lines · Stefan Weil
Quoted 6 lines
Am 15.07.2012 22:26, schrieb Mike Frysinger:
Quoted 5 lines
We should not quote the
PKG_CONFIGsetting as this deviates from the canonical upstream behavior that gets integrated with all other build systems, and deviates from how we treat all other toolchain variables that we get from the environment.Quoted 8 lines
Quoted 3 lines
Ultimately, the point is that it breaks passing custom flags directly to pkg-config via the env var where this normally works elsewhere, and it used to work in the past.
What about passing custom flags with
QEMU_PKG_CONFIG_FLAGS?Removing the quotes will not allow paths containing spaces, so that's not a good idea.
Quoted 8 lines
Actually, it IS a good idea. The de facto standard build environment requires that pkg-config is not allowed to live in a path containing spaces, precisely so that you can override the variable to pass options to your preferred location of pkg-config; and if your build setup is truly so messed up as to have pkg-config installed in a canonical location with spaces, then you can also tweak your unusual environment to provide a symlink to pkg-config that does not contain spaces as the workaround.
That sounds reasonable. Then the following patch was at least partially unnecessary:
commit
17884d7b6462b0fe497f08fec6091ffbe04caa8dAuthor: Sergei Trofimovich <[email protected]> Date: Tue Jan 31 22:03:45 2012 +0300./configure: request pkg-config to provide private libs when static
linkingAdded wrapper around pkg-config to allow:
- safe options injection via ${QEMU_PKG_CONFIG_FLAGS}
- spaces in path to pkg-config
Quoted 7 lines
Signed-off-by Sergei Trofimovich <[email protected]>CC Peter Maydell <[email protected]>Signed-off-by Anthony Liguori <[email protected]>With Mike's new patch,
QEMU_PKG_CONFIG_FLAGSis no longer needed because options can be passed using the pkg-config macro. I suggest to remove it.
i'm ambivalent on the additional functionality that qemu provides in its build system -- i'm just concerned with the baseline being the same as all other build systems. some people probably find this handy.
-mike
Quoted 9 lines · On Sunday 15 July 2012 15:54:51 Stefan Weil wrote:
Am 15.07.2012 22:26, schrieb Mike Frysinger:
Quoted 8 lines
We should not quote the
PKG_CONFIGsetting as this deviates from the canonical upstream behavior that gets integrated with all other build systems, and deviates from how we treat all other toolchain variables that we get from the environment.Ultimately, the point is that it breaks passing custom flags directly to pkg-config via the env var where this normally works elsewhere, and it used to work in the past.
ping ...
-mike
Am 16.09.2012 21:52, schrieb Mike Frysinger:
Quoted 7 lines · On Sunday 15 July 2012 15:54:51 Stefan Weil wrote:
Quoted 6 lines
Am 15.07.2012 22:26, schrieb Mike Frysinger:
Quoted 5 lines
We should not quote the
PKG_CONFIGsetting as this deviates from the canonical upstream behavior that gets integrated with all other build systems, and deviates from how we treat all other toolchain variables that we get from the environment.
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
Ultimately, the point is that it breaks passing custom flags directly to pkg-config via the env var where this normally works elsewhere, and it used to work in the past.
ping ...
-mike
The complete discussion is here: http://patchwork.ozlabs.org/patch/171087/.
I suggested using Mike's patch and removing commit 17884d7b6462b0fe497f08fec6091ffbe04caa8d. (./configure: request pkg-config to provide private libs when static linking).
Anthony, Sergei, any comments?
Regards
Stefan
Quoted 14 lines · On Sun, 16 Sep 2012 22:21:31 +0200 Stefan Weil <[email protected]> wrote:
Am 16.09.2012 21:52, schrieb Mike Frysinger:
Quoted 7 lines · On Sunday 15 July 2012 15:54:51 Stefan Weil wrote:
Quoted 6 lines
Am 15.07.2012 22:26, schrieb Mike Frysinger:
Quoted 5 lines
We should not quote the
PKG_CONFIGsetting as this deviates from the canonical upstream behavior that gets integrated with all other build systems, and deviates from how we treat all other toolchain variables that we get from the environment.Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
Ultimately, the point is that it breaks passing custom flags directly to pkg-config via the env var where this normally works elsewhere, and it used to work in the past.
ping ...
-mike
Quoted 8 lines
The complete discussion is here: http://patchwork.ozlabs.org/patch/171087/.
I suggested using Mike's patch and removing commit
17884d7b6462b0fe497f08fec6091ffbe04caa8d. (./configure: request pkg-config to provide private libs when static linking).Anthony, Sergei, any comments?
I'm fine with Mke's patch.
Signature · 1 line
Sergei
Quoted 10 lines · Mike Frysinger
We should not quote the
PKG_CONFIGsetting as this deviates from the canonical upstream behavior that gets integrated with all other build systems, and deviates from how we treat all other toolchain variables that we get from the environment.Ultimately, the point is that it breaks passing custom flags directly to pkg-config via the env var where this normally works elsewhere, and it used to work in the past.
Signed-off-by Mike Frysinger <[email protected]>
This doesn't make any sense to me. What is the command line that
you're trying to execute?
This obviously would introduce a bug if there was a space in the filename of the pkg-config binary.
Regards,
Anthony Liguori
Quoted 28 lines
--- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)configure +2
-2@@ -245,7 +245,7 @@ strip="${STRIP-${cross_prefix}strip}" windres="${WINDRES-${cross_prefix}windres}" pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}" query_pkg_config() { - "${pkg_config_exe}" ${QEMU_PKG_CONFIG_FLAGS} "$@" + ${pkg_config_exe} ${QEMU_PKG_CONFIG_FLAGS} "$@" } pkg_config=query_pkg_config sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}"@@ -1511,7 +1511,7 @@ fi ########################################## # pkg-config probe -if ! has "$pkg_config_exe"; then +if ! has $pkg_config_exe; then echo "Error: pkg-config binary '$pkg_config_exe' not found" exit 1 fiSignature · 1 line
1.7.9.7
Quoted 11 lines · Anthony Liguori
Quoted 9 lines · Mike Frysinger
We should not quote the
PKG_CONFIGsetting as this deviates from the canonical upstream behavior that gets integrated with all other build systems, and deviates from how we treat all other toolchain variables that we get from the environment.Ultimately, the point is that it breaks passing custom flags directly to pkg-config via the env var where this normally works elsewhere, and it used to work in the past.
Quoted 7 lines
Quoted 1 line
Signed-off-by Mike Frysinger <[email protected]>This doesn't make any sense to me. What is the command line that
you're trying to execute?This obviously would introduce a bug if there was a space in the filename of the pkg-config binary.
Except that the de facto standard is that the pkg-config binary already is prohibited from having a space in the filename.
https://lists.gnu.org/archive/html/qemu-devel/2012-07/msg02015.html
Signature · 2 lines
Eric Blake [email protected] +1-919-301-3266 Libvirt virtualization library http://libvirt.org
PATCH v2 1/1 configure: do not quote $PKG_CONFIG
In reply to Mike FrysingerWe should not quote the PKG_CONFIG setting as this deviates from the canonical upstream behavior that gets integrated with all other build systems, and deviates from how we treat all other toolchain variables that we get from the environment.
Ultimately, the point is that it breaks passing custom flags directly to pkg-config via the env var where this normally works elsewhere, and it used to work in the past.
---
v2
- rebased onto latest master
- people were happy with this in the previous thread:
http://permalink.gmane.org/gmane.comp.emulators.qemu/160198
configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
configure +2 -2
@@ -291,7 +291,7 @@ strip="${STRIP-${cross_prefix}strip}" windres="${WINDRES-${cross_prefix}windres}" pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}" query_pkg_config() { - "${pkg_config_exe}" ${QEMU_PKG_CONFIG_FLAGS} "$@" + ${pkg_config_exe} ${QEMU_PKG_CONFIG_FLAGS} "$@" } pkg_config=query_pkg_config sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}"
@@ -1424,7 +1424,7 @@ fi ########################################## # pkg-config probe -if ! has "$pkg_config_exe"; then +if ! has $pkg_config_exe; then error_exit "pkg-config binary '$pkg_config_exe' not found" fi
Signature · 1 line
1.8.2.1