Compiz fails to build tests with recent pkg-config and xorg-gtest

Bug #1521366 reported by Marco Trevisan (Treviño) on 2015-11-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz
Medium
Marco Trevisan (Treviño)
Xorg-gtest
Unknown
Medium
compiz (Ubuntu)
Medium
Marco Trevisan (Treviño)
Xenial
Medium
Marco Trevisan (Treviño)
xorg-gtest (Ubuntu)
High
Marco Trevisan (Treviño)
Xenial
High
Marco Trevisan (Treviño)

Bug Description

When compiling with g++ 5 xorg-gtest fails because of the CPPflags defined in xorg-gtest.pc

Compiz FTB in /usr/src/xorg-gtest/src/environment.cpp: In constructor 'xorg::testing::Environment::Private::Private()':
<command-line>:0:17: error: expected primary-expression before '/' token
/usr/src/xorg-gtest/src/environment.cpp:48:28: note: in expansion of macro 'DUMMY_CONF_PATH'
   Private() : path_to_conf(DUMMY_CONF_PATH),
                            ^
<command-line>:0:18: error: 'usr' was not declared in this scope
/usr/src/xorg-gtest/src/environment.cpp:48:28: note: in expansion of macro 'DUMMY_CONF_PATH'
   Private() : path_to_conf(DUMMY_CONF_PATH),
                            ^
<command-line>:0:22: error: 'share' was not declared in this scope
/usr/src/xorg-gtest/src/environment.cpp:48:28: note: in expansion of macro 'DUMMY_CONF_PATH'
   Private() : path_to_conf(DUMMY_CONF_PATH),
                            ^
<command-line>:0:32: error: expected primary-expression before '/' token
/usr/src/xorg-gtest/src/environment.cpp:48:28: note: in expansion of macro 'DUMMY_CONF_PATH'
   Private() : path_to_conf(DUMMY_CONF_PATH),
                            ^
<command-line>:0:33: error: 'gtest' was not declared in this scope
/usr/src/xorg-gtest/src/environment.cpp:48:28: note: in expansion of macro 'DUMMY_CONF_PATH'
   Private() : path_to_conf(DUMMY_CONF_PATH),
                            ^
<command-line>:0:39: error: 'dummy' was not declared in this scope
/usr/src/xorg-gtest/src/environment.cpp:48:28: note: in expansion of macro 'DUMMY_CONF_PATH'
   Private() : path_to_conf(DUMMY_CONF_PATH),
                            ^
<command-line>:0:13: error: expected primary-expression before '/' token
/usr/src/xorg-gtest/src/defines.h:4:30: note: in expansion of macro 'LOGFILE_DIR'
 #define DEFAULT_XORG_LOGFILE LOGFILE_DIR "/Xorg.GTest.log"
                              ^
/usr/src/xorg-gtest/src/environment.cpp:49:32: note: in expansion of macro 'DEFAULT_XORG_LOGFILE'
               path_to_log_file(DEFAULT_XORG_LOGFILE),
                                ^
<command-line>:0:14: error: 'tmp' was not declared in this scope
/usr/src/xorg-gtest/src/defines.h:4:30: note: in expansion of macro 'LOGFILE_DIR'
 #define DEFAULT_XORG_LOGFILE LOGFILE_DIR "/Xorg.GTest.log"
                              ^
/usr/src/xorg-gtest/src/environment.cpp:49:32: note: in expansion of macro 'DEFAULT_XORG_LOGFILE'
               path_to_log_file(DEFAULT_XORG_LOGFILE),

Related branches

Changed in xorg-gtest (Ubuntu):
milestone: none → ubuntu-16.04

The attachment "xorg-gtest_0.7.1-0ubuntu2.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch

Created attachment 120222
xorg-gtest.pc.in-Fix-CPPflags-escaping-for-string-pa.patch

As per the pkg-config fix for Bug 67904, xorg-gtest CPPflags aren't properly escaped anymore.

old_behavior $ 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\"

new_behavior $ 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

Attached is a patch that fixes this

Changed in xorg-gtest:
importance: Unknown → Medium
status: Unknown → Confirmed
summary: - Compiz fails to build tests with recent g++ and xorg-gtest
+ Compiz fails to build tests with recent pkg-config and xorg-gtest
Changed in compiz:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in compiz (Ubuntu Xenial):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
milestone: none → ubuntu-16.04
Changed in compiz:
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.12.2+16.04.20151211-0ubuntu1

---------------
compiz (1:0.9.12.2+16.04.20151211-0ubuntu1) xenial; urgency=medium

  [ Marco Trevisan (Treviño) ]
  * FindXorgGTest: escape unscaped quotes on pkg-config variables (LP:
    #1521366)
  * Scale: use current monitor workarea to check whether the mouse is
    inside or not (LP: #1516599)
  * backends: drop gconf support

  [ Sebastien Bacher ]
  * Update the apport hook, get the gsettings config not the gconf one
    (LP: #1508974)

 -- Marco Trevisan (Treviño) <mail@3v1n0.net> Fri, 11 Dec 2015 10:00:39 +0000

Changed in compiz (Ubuntu Xenial):
status: In Progress → Fix Released
Sebastien Bacher (seb128) wrote :

unsubscribing sponsors for now, the issue was workarounded if I'm right and there is a pkgconfig bug filed upstream and waiting for feedback, https://bugs.freedesktop.org/show_bug.cgi?id=93284

Mathew Hodson (mhodson) on 2016-07-04
Changed in compiz (Ubuntu):
milestone: ubuntu-16.04 → none
Changed in xorg-gtest (Ubuntu):
milestone: ubuntu-16.04 → none
Changed in compiz:
status: Fix Committed → Fix Released

-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/test/xorg-gtest/issues/2.

Changed in xorg-gtest:
status: Confirmed → Unknown
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.