View Issue Details

IDProjectCategoryView StatusLast Update
0004055libextractorbuild systempublic2018-11-18 10:24
Reporterbeberking Assigned Tobeberking Due Date
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformDebian 
Product Version1.5 
Target Version1.8Fixed in Version1.8 
Summary0004055: configure.ac messes up with user variables CFLAGS, CPPFLAGS, LIBS and LDFLAGS and generate wrong pkgconfig files
Descriptionconfigure.ac messes up with user variables CFLAGS, CPPFLAGS, LIBS and LDFLAGS.
Since these are used to generate pkgconfig files, the user flags are wrongly passed to libextractor.pc (see on Debian -D_FORTIFY_SOURCE=2).

configure.ac should use AM_CFLAGS and friends, which are then passed to automake and used by modern version of AX_CREATE_PKGCONFIG_INFO.

See https://www.gnu.org/software/autoconf/manual/autoconf-2.66/html_node/Preset-Output-Variables.html
> Sometimes package developers are tempted to set user variables such as CFLAGS
> because it appears to make their job easier. However, the package itself
> should never set a user variable, particularly not to include switches that
> are required for proper compilation of the package. Since these variables are
> documented as being for the package builder, that person rightfully expects
> to be able to override any of these variables at build time. If the package
> developer needs to add switches without interfering with the user, the proper
> way to do that is to introduce an additional variable. Automake makes this
> easy by introducing AM_CFLAGS (see Flag Variables Ordering), but the concept
> is the same even if Automake is not used.
TagsNo tags attached.

Activities

Christian Grothoff

2015-11-17 07:42

manager   ~0009909

Tried to fix this in SVN 36667. Could you please let me know if this fixes it for you?

beberking

2016-05-02 21:21

reporter   ~0010608

Thanks for the patch. Unfortunetaly it does not work yet. I was hoping to investigate and help on this issue, but I am no autoconf guru...

I think we should at least update AX_CREATE_PKGCONFIG_INFO to the last version (but this is not enough).

The following test shows the issue:
autoreconf -f -i
CPPFLAGS='-Wdate-time -D_FORTIFY_SOURCE=2' ./configure

At the line "checking our pkgconfig cppflags...", version 1.3 gives wrongly -Wdate-time -D_FORTIFY_SOURCE=2 and gives (which is right) all the necessary includes.
With the fix from svn 36667, it gives only -Wdate-time -D_FORTIFY_SOURCE=2, but no includes.

I will try to investigate this more in the next week-end.

Cheers,
Bertrand

beberking

2017-09-24 08:05

reporter   ~0012430

Thanks to Sven Joachim for pointing this out. By updating AX_CREATE_PKGCONFIG_INFO to the last version, this seems to be fixed.

Could you please update it according to http://git.savannah.nongnu.org/cgit/autoconf-archive.git/tree/m4/ax_create_pkgconfig_info.m4

Christian Grothoff

2018-07-12 20:44

manager   ~0013142

Fixed now, sadly just saw your comment after pushing 1.7. Will be in 1.8 though.

Issue History

Date ModifiedUsernameFieldChange
2015-11-15 17:20beberkingNew Issue
2015-11-17 07:06Christian GrothoffAssigned To => Christian Grothoff
2015-11-17 07:06Christian GrothoffStatusnew => assigned
2015-11-17 07:42Christian GrothoffNote Added: 0009909
2016-05-02 07:14Christian GrothoffAssigned ToChristian Grothoff => beberking
2016-05-02 07:14Christian GrothoffStatusassigned => feedback
2016-05-02 21:21beberkingNote Added: 0010608
2016-05-02 21:21beberkingStatusfeedback => assigned
2017-09-24 08:05beberkingNote Added: 0012430
2018-07-12 20:44Christian GrothoffNote Added: 0013142
2018-07-12 20:44Christian GrothoffStatusassigned => resolved
2018-07-12 20:44Christian GrothoffResolutionopen => fixed
2018-07-12 20:44Christian GrothoffFixed in Version => 1.8
2018-07-12 20:44Christian GrothoffProduct Version => 1.5
2018-07-12 20:44Christian GrothoffTarget Version => 1.8
2018-11-18 10:24Christian GrothoffStatusresolved => closed