Escaped quote needed for macro disappears #168

Closed
opened 2018-01-17 19:24:48 +00:00 by Jehan · 3 comments
Jehan commented 2018-01-17 19:24:48 +00:00 (Migrated from github.com)

Hi!

The data package mypaint-brushes (https://github.com/Jehan/mypaint-brushes) which is a dependency in GIMP uses the following syntax:

Cflags: -DMYPAINT_BRUSHES_DIR="\"${brushesdir}\""

With pkg-config, I get successfully the expected result:

pkg-config --cflags mypaint-brushes-1.0 
-DMYPAINT_BRUSHES_DIR=\"/home/jehan/.local/share/mypaint-data/1.0/brushes\"

With pkgconf, someone reported that the output was:

-DMYPAINT_BRUSHES_DIR="/usr/local/share/mypaint-data/1.0/brushes"

Obviously as a conclusion, GIMP fails to build, because the macro lost its quotes, making the compiler choke on the expanded macro.

pkgconf should not get rid of such escaped quote.

Hi! The data package mypaint-brushes (https://github.com/Jehan/mypaint-brushes) which is a dependency in GIMP uses the following syntax: `Cflags: -DMYPAINT_BRUSHES_DIR="\"${brushesdir}\""` With pkg-config, I get successfully the expected result: ``` pkg-config --cflags mypaint-brushes-1.0 -DMYPAINT_BRUSHES_DIR=\"/home/jehan/.local/share/mypaint-data/1.0/brushes\" ``` With pkgconf, someone reported that the output was: ``` -DMYPAINT_BRUSHES_DIR="/usr/local/share/mypaint-data/1.0/brushes" ``` Obviously as a conclusion, GIMP fails to build, because the macro lost its quotes, making the compiler choke on the expanded macro. pkgconf should not get rid of such escaped quote.

can i get the full build log of the failure?

can i get the full build log of the failure?

this seems to be related to the quotign change in pkgconf 1.4, gcc does not like the quotes for whatever reason.

pkgconf 1.4.1 will be released soon to correct this

this seems to be related to the quotign change in pkgconf 1.4, gcc does not like the quotes for whatever reason. pkgconf 1.4.1 will be released soon to correct this
Jehan commented 2018-01-18 18:53:17 +00:00 (Migrated from github.com)

can i get the full build log of the failure?

I don't have the logs because I don't have the problem (even though I realize I use pkgconf as well, and not pkg-config as I thought in my initial comment, version 1.3.12 doesn't have the problem indeed). This was reported to me.

But no log is really needed. All is needed is to run pkgconf on escaped-quoted variable and see they disappear whereas they should not. ;-)

this seems to be related to the quotign change in pkgconf 1.4, gcc does not like the quotes for whatever reason.

Well this has always been the behavior of the shell (not gcc, the problem occurs before this data even gets to gcc). Quotes are not part of the option, they are just delimiters. So these are both equivalent:

-DMYPAINT_BRUSHES_DIR="/usr/local/share/mypaint-data/1.0/brushes"
-DMYPAINT_BRUSHES_DIR=/usr/local/share/mypaint-data/1.0/brushes

To keep the quotes, they need to be protected by a backslash. Therefore pkgconf must absolutely not get rid of backslash-protected quote as it seems to do now. pkgconf was doing the right thing in 1.3 but this changed in 1.4.

pkgconf 1.4.1 will be released soon to correct this

Perfect! Thanks.

> can i get the full build log of the failure? I don't have the logs because I don't have the problem (even though I realize I use pkgconf as well, and not pkg-config as I thought in my initial comment, version 1.3.12 doesn't have the problem indeed). This was reported to me. But no log is really needed. All is needed is to run pkgconf on escaped-quoted variable and see they disappear whereas they should not. ;-) > this seems to be related to the quotign change in pkgconf 1.4, gcc does not like the quotes for whatever reason. Well this has always been the behavior of the shell (not gcc, the problem occurs before this data even gets to gcc). Quotes are not part of the option, they are just delimiters. So these are both equivalent: > -DMYPAINT_BRUSHES_DIR="/usr/local/share/mypaint-data/1.0/brushes" > -DMYPAINT_BRUSHES_DIR=/usr/local/share/mypaint-data/1.0/brushes To keep the quotes, they need to be protected by a backslash. Therefore `pkgconf` must absolutely not get rid of backslash-protected quote as it seems to do now. `pkgconf` was doing the right thing in 1.3 but this changed in 1.4. > pkgconf 1.4.1 will be released soon to correct this Perfect! Thanks.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ariadne/pkgconf#168
There is no content yet.