bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linker flags leaked into "ncurses*-config --libs"


From: Sven Joachim
Subject: Re: linker flags leaked into "ncurses*-config --libs"
Date: Sat, 12 Oct 2019 23:01:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

On 2019-10-12 16:07 -0400, Thomas Dickey wrote:

> On Sat, Oct 12, 2019 at 09:22:14PM +0200, Sven Joachim wrote:
>> There is a problem with the ncurses*-config script, LDFLAGS from the way
>> the library is built are echoed in the "--libs" option:
>>
>> ,----
>> | $ debian/libncurses-dev/usr/bin/ncurses6-config --libs
>> | -Wl,-z,relro -Wl,-z,now -lncurses -ltinfo
>
> hmm - that was intentional (whether it was a Good Thing, we can discuss).

We had this discussion before for the pkg-config files[1], and at that
time you filtered these flags out (thank you for doing that).

> In the past couple of weeks, I was following up on having noticed that
> the AdaCurses pc/config files weren't giving the same values, and that
> neither did the ncurses pc/config files.  In my builds, I added a script
> which compares the two (for each option) and shows a diff.  There's some
> difference with rpath "../lib" which I'm considering amending (one shows
> the "../lib" while the other does not), but aside from that, the two sets
> of files are the same now, given the same $LDFLAGS and $LIBS.

For me it is not the same, I see the linker flags in the *-config
scripts but not in the .pc files.

> Is this a problem with the specific flags, or with the non -L/-l option?
>
> If it's the specific relro/now flags, I was considering whether I should
> filter those out but was uncertain if it was important.  Reading the
> description of "now" (earlier in the day...) I suspect that you'd like
> that filtered out "now".

I want these to be filtered out before I make an upload to Debian, which
will probably be relatively soon given the crash reports.  But I can
certainly wait a week or look how to filter these flags out myself.

> Looking at my Debian/testing machine, I see a few other packages
> whose ".pc" file gives extra options.  This is from --libs-only-other:
>
> ** cally-1.0
> -pthread
> ** clutter-1.0
> -pthread
> ** clutter-cogl-1.0
> -pthread
> ** clutter-egl-1.0
> -pthread
> ** clutter-gdk-1.0
> -pthread
> ** clutter-glx-1.0
> -pthread
> ** clutter-gtk-1.0
> -pthread
> ** clutter-wayland-1.0
> -pthread
> ** clutter-wayland-compositor-1.0
> -pthread
> ** clutter-x11-1.0
> -pthread
> ** cogl-1.0
> -pthread
> ** cogl-2.0-experimental
> -pthread
> ** cogl-gl-1.0
> -pthread
> ** cogl-pango-1.0
> -pthread
> ** cogl-pango-2.0-experimental
> -pthread
> ** cogl-path-1.0
> -pthread
> ** cogl-path-2.0-experimental
> -pthread
> ** gmodule-2.0
> -Wl,--export-dynamic -pthread
> ** gmodule-export-2.0
> -Wl,--export-dynamic -pthread
> ** gmodule-no-export-2.0
> -pthread
> ** gthread-2.0
> -pthread
> ** libbsd-ctor
> -Wl,-z,nodlopen -Wl,-u,libbsd_init_func

Okay, but none of these contains "-Wl,-z,relro" which is what
dpkg-buildflags emits (the additional "-Wl,-z,now" comes from the
bindnow hardening option applied in ncurses' debian/rules).

> as well as (for example, from my test-builds)
>
> ** form
> -Wl,-rpath,../lib:/usr/local/ncurses/lib

That may make sense, but on Debian ncurses will always be built without
an rpath.

Cheers,
       Sven


1. https://lists.gnu.org/archive/html/bug-ncurses/2015-05/msg00024.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]