The environment LDFLAGS is leaked to final pkg-config file due to broken m4/ax_create_pkgconfig_info.m4

146 views
Skip to first unread message

Samuli Suominen

unread,
Nov 20, 2011, 12:35:16 AM11/20/11
to isl Development
To reproduce:

# export LDFLAGS="-Wl,-O1 -Wl,--as-needed"
# ./configure
# make
# make install

Now the "-Wl,-O1 -Wl,--as-needed" is in the Libs: line of the pkg-
config file (isl.pc)

This should not happen

Libs and Libs.private lines are really only for libs and libpaths, as
in -l and -L flags

The responsible .m4 macro should be patch to get rid of this LDFLAGS
reference to avoid polluting the system

Samuli Suominen

unread,
Nov 20, 2011, 12:37:32 AM11/20/11
to isl Development
Also reported here, http://bugs.gentoo.org/382737

On Nov 20, 7:35 am, Samuli Suominen <ssuominen.priv...@gmail.com>
wrote:

Sven Verdoolaege

unread,
Nov 20, 2011, 9:21:54 AM11/20/11
to Samuli Suominen, isl Development
On Sat, Nov 19, 2011 at 09:35:16PM -0800, Samuli Suominen wrote:
> The responsible .m4 macro should be patch to get rid of this LDFLAGS
> reference to avoid polluting the system

Do you have such a patch?

skimo

Samuli Suominen

unread,
Dec 12, 2011, 3:14:07 PM12/12/11
to isl Development

--- m4/ax_create_pkgconfig_info.m4
+++ m4/ax_create_pkgconfig_info.m4
@@ -214,7 +214,7 @@
Description: @PACKAGE_DESCRIPTION@
Version: @PACKAGE_VERSION@
Requires: @PACKAGE_REQUIRES@
-Libs: -L\${libdir} @LDFLAGS@ @LIBS@
+Libs: -L\${libdir} @LIBS@
Cflags: -I\${includedir} @CPPFLAGS@
AXEOF
fi # DONE generate $pkgconfig_generate.in

Sven Verdoolaege

unread,
Dec 12, 2011, 4:36:58 PM12/12/11
to Samuli Suominen, isl Development
On Mon, Dec 12, 2011 at 12:14:07PM -0800, Samuli Suominen wrote:
> --- m4/ax_create_pkgconfig_info.m4
> +++ m4/ax_create_pkgconfig_info.m4

I'd rather not touch this file, unless you can get it changed
upstream (http://savannah.gnu.org/projects/autoconf-archive/).

Btw, please read doc/SubmittingPatches for guidelines on how
to submit patches.

skimo

dirtye...@gmail.com

unread,
Jan 6, 2013, 7:12:22 PM1/6/13
to isl-dev...@googlegroups.com, Samuli Suominen, sk...@kotnet.org
On Monday, 12 December 2011 15:36:58 UTC-6, skimo wrote:
On Mon, Dec 12, 2011 at 12:14:07PM -0800, Samuli Suominen wrote:
> --- m4/ax_create_pkgconfig_info.m4
> +++ m4/ax_create_pkgconfig_info.m4

I'd rather not touch this file, unless you can get it changed
upstream (http://savannah.gnu.org/projects/autoconf-archive/).

Sven Verdoolaege

unread,
Jan 8, 2013, 12:24:58 PM1/8/13
to dirtye...@gmail.com, isl-dev...@googlegroups.com, Samuli Suominen
Would you care to send a proper patch
to update ax_create_pkgconfig_info.m4 in isl?

skimo

dirtye...@gmail.com

unread,
Jan 15, 2013, 8:41:25 PM1/15/13
to isl-dev...@googlegroups.com, Samuli Suominen, sk...@kotnet.org
On Tuesday, 8 January 2013 11:24:58 UTC-6, skimo wrote:

Would you care to send a proper patch
to update ax_create_pkgconfig_info.m4 in isl?

Attached patch syncs the file with upstream.  Note the license changed to GPL-3.
isl-0.11.1-ax_create_pkgconfig_info.patch

Sven Verdoolaege

unread,
Jan 16, 2013, 2:49:51 PM1/16/13
to dirtye...@gmail.com, isl-dev...@googlegroups.com, Samuli Suominen
> https://groups.google.com/forum/?fromgroups=#!topic/isl-development/N62HZVflDyw
>
> 2013-01-13 Ryan Hill <dirt...@gentoo.org>
>
> * m4/ax_create_pkgconfig_info.m4: Sync with upstream.

I'm sorry, but especially for a small patch like this,
I'm going to have to insist on a _proper_ patch
(according to the guidelines in doc/SubmittingPatches).

In particular, the commit message does not have a one-line summary,
there is no explanation of why this change is useful and there
is no sign-off.

skimo

ssuomine...@gmail.com

unread,
Apr 6, 2013, 2:56:15 AM4/6/13
to isl-dev...@googlegroups.com, dirtye...@gmail.com, Samuli Suominen, sk...@kotnet.org
So, for 2 years ISL has been adding the build host's LDFLAGS to the resulting .pc file which ends up in all generated packages causing all builds fail... The file you are using is fixed in upstream... And now you have to read a handbook to get
it synced?

That's insane. I don't know about others but I'll rather keep patching this locally than go through reading handbook for this.
Reply all
Reply to author
Forward
0 new messages