Launchpad has imported 1 comments from the remote bug at https://bugs.freedesktop.org/show_bug.cgi?id=93284.
If you reply to an imported comment from within Launchpad, your comment will be sent to the remote bug automatically. Read more about Launchpad's inter-bugtracker facilities at https://help.launchpad.net/InterBugTracking. ------------------------------------------------------------------------ On 2015-12-07T13:54:37+00:00 Marco Trevisan (Treviño) wrote: I'm Marco, from the Ubuntu desktop team; and we're facing an issue with recent pkg-config when using it in cmake. As per commit 50c2867f4a6981e085c721d936c96f174f11f415 in pkg-config, variables are unquoted. This is fine for most of scenarios, but when there are variables such as CPPflags=-I${includedir} -I${includedir}/xorg -I${sourcedir} \ -DDUMMY_CONF_PATH=\"${datarootdir}/xorg/gtest/dummy.conf\" \ -DLOGFILE_DIR=\"/tmp\" Then when using the new pkg-config "pkg-config --variable=CPPflags" returns something like: -I/usr/include -I/usr/include/xorg -I/usr/src/xorg-gtest \ -DDUMMY_CONF_PATH="/usr/share/xorg/gtest/dummy.conf" \ -DLOGFILE_DIR="/tmp" Which is wrong since the quotes aren't escaped. Changing the variable so that it uses something like -DLOGFILE_DIR=\\\"/tmp\\\" Makes it return the proper thing, but not in a subshell, but it doesn't seem the case. In fact pkg-config seems to return the proper thing when called in a subshell, but not when used directly. I.e.: $ pkg-config --variable=CPPflags xorg-gtest + pkg-config --variable=CPPflags xorg-gtest -I/usr/include -I/usr/include/xorg -I/usr/src/xorg-gtest -DDUMMY_CONF_PATH="/usr/share/xorg/gtest/dummy.conf" -DLOGFILE_DIR="/tmp" $ gcc-5 $(pkg-config --variable=CPPflags xorg-gtest) foo.c ++ pkg-config --variable=CPPflags xorg-gtest + gcc-5 -I/usr/include -I/usr/include/xorg -I/usr/src/xorg-gtest '-DDUMMY_CONF_PATH="/usr/share/xorg/gtest/dummy.conf"' '-DLOGFILE_DIR="/tmp"' foo.c As you can see when called in a subshell, the variables are properly single-quoted, making the thing work. But when calling this directly there are no single quotes. So I'm wondering what's the best way to fix this case. Reply at: https://bugs.launchpad.net/ubuntu/+source/pkg- config/+bug/1523508/comments/0 ** Changed in: pkg-config Status: Unknown => Confirmed ** Changed in: pkg-config Importance: Unknown => Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1523508 Title: Building xorg-gtest fails with new pkg-config To manage notifications about this bug go to: https://bugs.launchpad.net/pkg-config/+bug/1523508/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
