All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kconfig: add tinfo library if it exists to lxdialog linking flags
@ 2015-04-25 16:05 sylvain.bertrand
  2015-04-26 21:19 ` Paul Bolle
  0 siblings, 1 reply; 5+ messages in thread
From: sylvain.bertrand @ 2015-04-25 16:05 UTC (permalink / raw)
  To: linux-kbuild, linux-kernel

HOSTLD  scripts/kconfig/mconf
/bin/ld: scripts/kconfig/lxdialog/checklist.o: undefined reference to symbol 'acs_map'

Add tinfo library to lxdiablog linking flags, if it exists.

Signed-off-by: Sylvain BERTRAND <sylvain.bertrand@gmail.com>
---
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -4,6 +4,9 @@
 # What library to link
 ldflags()
 {
+	# Some ncurses symbols are in tinfo library, if it exists
+	pkg-config --libs tinfow 2>/dev/null
+	pkg-config --libs tinfo 2>/dev/null
 	pkg-config --libs ncursesw 2>/dev/null && exit
 	pkg-config --libs ncurses 2>/dev/null && exit
 	for ext in so a dll.a dylib ; do

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kconfig: add tinfo library if it exists to lxdialog linking flags
  2015-04-25 16:05 [PATCH] kconfig: add tinfo library if it exists to lxdialog linking flags sylvain.bertrand
@ 2015-04-26 21:19 ` Paul Bolle
  2015-04-27 12:00   ` sylvain.bertrand
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Bolle @ 2015-04-26 21:19 UTC (permalink / raw)
  To: sylvain.bertrand; +Cc: linux-kbuild, linux-kernel

On Sat, 2015-04-25 at 16:05 +0000, sylvain.bertrand@gmail.com wrote:
> HOSTLD  scripts/kconfig/mconf
> /bin/ld: scripts/kconfig/lxdialog/checklist.o: undefined reference to symbol 'acs_map'
> 
> Add tinfo library to lxdiablog linking flags, if it exists.
> 
> Signed-off-by: Sylvain BERTRAND <sylvain.bertrand@gmail.com>
> ---
> --- a/scripts/kconfig/lxdialog/check-lxdialog.sh
> +++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
> @@ -4,6 +4,9 @@
>  # What library to link
>  ldflags()
>  {
> +	# Some ncurses symbols are in tinfo library, if it exists
> +	pkg-config --libs tinfow 2>/dev/null
> +	pkg-config --libs tinfo 2>/dev/null
>  	pkg-config --libs ncursesw 2>/dev/null && exit
>  	pkg-config --libs ncurses 2>/dev/null && exit
>  	for ext in so a dll.a dylib ; do

It looks like commit fc9c6e000f62 ("menuconfig: optionally use
pkg-config to detect ncurses libs") claims to already fix this. And your
patch is obviously done on top of that commit.

So I did some further, well, research. That is: I skimmed man pkg-config
and stared a bit at the pkg-config related files shipped with
ncurses-devel (for Fedora 20). And to me it seems
	pkg-config --libs ncursesw

or
	pkg-config --libs ncurses

should already add -ltinfow or -ltinfo if those flags would be needed,
just like that commit implies.

Is that how pkg-config should work? If so, I wonder why it fails for
you.

Thanks,


Paul Bolle


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kconfig: add tinfo library if it exists to lxdialog linking flags
  2015-04-26 21:19 ` Paul Bolle
@ 2015-04-27 12:00   ` sylvain.bertrand
  2015-04-28  8:19     ` Paul Bolle
  0 siblings, 1 reply; 5+ messages in thread
From: sylvain.bertrand @ 2015-04-27 12:00 UTC (permalink / raw)
  To: Paul Bolle; +Cc: linux-kbuild, linux-kernel

On Sun, Apr 26, 2015 at 11:19:08PM +0200, Paul Bolle wrote:
> Is that how pkg-config should work? If so, I wonder why it fails for
> you.

The pkg-config file I use is straight from the ncurses distribution with the
lastest "rollup" patch.

Either it's a fedora specific modification, either a genuine ncurses patch
released after the lastest "rollup" patch.

As far I understand it, from an application point of view, "standard" ncurses
programming, in the case where tinfo lib is outside of ncurses lib, involves
linking to libncurses library only. libtinfo linking would be required only in
some special features are used, which seems to be the case with lxdialog.

Please correct me if I'm wrong.

regards,

-- 
Sylvain BERTRAND

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kconfig: add tinfo library if it exists to lxdialog linking flags
  2015-04-27 12:00   ` sylvain.bertrand
@ 2015-04-28  8:19     ` Paul Bolle
  2015-04-29 15:20       ` sylvain.bertrand
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Bolle @ 2015-04-28  8:19 UTC (permalink / raw)
  To: sylvain.bertrand; +Cc: linux-kbuild, linux-kernel

On Mon, 2015-04-27 at 12:00 +0000, sylvain.bertrand@gmail.com wrote:
> The pkg-config file I use is straight from the ncurses distribution with the
> lastest "rollup" patch.
> 
> Either it's a fedora specific modification, either a genuine ncurses patch
> released after the lastest "rollup" patch.

(If I read ftp://invisible-island.net/ncurses/5.9/README correctly, a
rollup is the patch that should be applied on top of the latest ncurses
release in order to get a development snapshot.)

What version of ncurses are you actually using?

> As far I understand it, from an application point of view, "standard" ncurses
> programming, in the case where tinfo lib is outside of ncurses lib, involves
> linking to libncurses library only. libtinfo linking would be required only in
> some special features are used, which seems to be the case with lxdialog.

On my Fedora 20 box linking to libtinfo is only necessary if you're
linking an application that's using libncurses statically.

> Please correct me if I'm wrong.

I have no idea.

Perhaps - and I'm speculating here - some features got moved from
ncurses(w) to tinfo. Anyhow, over here linking to tinfo is unneeded but
doesn't break mconf as far as I noticed. But, personally, I'd like to
know what triggered the issue you ran into before considering this
patch.


Paul Bolle


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kconfig: add tinfo library if it exists to lxdialog linking flags
  2015-04-28  8:19     ` Paul Bolle
@ 2015-04-29 15:20       ` sylvain.bertrand
  0 siblings, 0 replies; 5+ messages in thread
From: sylvain.bertrand @ 2015-04-29 15:20 UTC (permalink / raw)
  To: Paul Bolle; +Cc: linux-kbuild, linux-kernel

Did a little bit of investigation and got in touch with ncurses developer.

The pkg-config file in the official ncurses distribution has been broken for
years (I'm the second one to report this bug since 2011).

acs_map symbol declaration misled me. Then, yes, do disregard my patch.
 
Since the fix is closed to a typo fix, it has been silently fixed by all
distros out there with a shared split ncurses package, without reporting it
upstream (and that's quite a fail).

At least, the info is now in all mailing list archives :)

regards,

-- 
Sylvain

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-04-29 15:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-25 16:05 [PATCH] kconfig: add tinfo library if it exists to lxdialog linking flags sylvain.bertrand
2015-04-26 21:19 ` Paul Bolle
2015-04-27 12:00   ` sylvain.bertrand
2015-04-28  8:19     ` Paul Bolle
2015-04-29 15:20       ` sylvain.bertrand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.