All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/sngrep: add missing ncurses dependencies
@ 2017-02-18 15:43 Romain Naour
  2017-02-18 15:49 ` Thomas Petazzoni
  2017-02-21 21:41 ` Thomas Petazzoni
  0 siblings, 2 replies; 8+ messages in thread
From: Romain Naour @ 2017-02-18 15:43 UTC (permalink / raw)
  To: buildroot

ncurses panel and forms libraries are needed to build sngrep, otherwise
the configure script report the following errors:

Without panel library:
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking for initscr in -lncurses... yes
checking for new_panel in -lpanel... no
configure: error:  You need to have ncurses panel library installed to compile sngrep.

Without form library:
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking for initscr in -lncurses... yes
checking for new_panel in -lpanel... yes
checking for new_form in -lform... no
configure: error:  You need to have ncurses forms library installed to compile sngrep.

Fixes:
http://autobuild.buildroot.net/results/ee5/ee58cd4252e4da95e9bd025ced9ad3ba0fb7cb08

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Adam Duskett <aduskett@codeblue.com>
---
 package/sngrep/Config.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/sngrep/Config.in b/package/sngrep/Config.in
index 4d0d80c..70d2354 100644
--- a/package/sngrep/Config.in
+++ b/package/sngrep/Config.in
@@ -5,6 +5,8 @@ config BR2_PACKAGE_SNGREP
 	bool "sngrep"
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_PACKAGE_NCURSES
+	select BR2_PACKAGE_NCURSES_TARGET_PANEL
+	select BR2_PACKAGE_NCURSES_TARGET_FORM
 	select BR2_PACKAGE_LIBPCAP
 	help
 	  sngrep is a tool for displaying SIP calls message flows from
-- 
2.9.3

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

* [Buildroot] [PATCH] package/sngrep: add missing ncurses dependencies
  2017-02-18 15:43 [Buildroot] [PATCH] package/sngrep: add missing ncurses dependencies Romain Naour
@ 2017-02-18 15:49 ` Thomas Petazzoni
  2017-02-18 16:03   ` Romain Naour
  2017-02-18 18:21   ` Bernd Kuhls
  2017-02-21 21:41 ` Thomas Petazzoni
  1 sibling, 2 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2017-02-18 15:49 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 18 Feb 2017 16:43:33 +0100, Romain Naour wrote:
> ncurses panel and forms libraries are needed to build sngrep, otherwise
> the configure script report the following errors:
> 
> Without panel library:
> checking ncurses.h usability... yes
> checking ncurses.h presence... yes
> checking for ncurses.h... yes
> checking for initscr in -lncurses... yes
> checking for new_panel in -lpanel... no
> configure: error:  You need to have ncurses panel library installed to compile sngrep.
> 
> Without form library:
> checking ncurses.h usability... yes
> checking ncurses.h presence... yes
> checking for ncurses.h... yes
> checking for initscr in -lncurses... yes
> checking for new_panel in -lpanel... yes
> checking for new_form in -lform... no
> configure: error:  You need to have ncurses forms library installed to compile sngrep.
> 
> Fixes:
> http://autobuild.buildroot.net/results/ee5/ee58cd4252e4da95e9bd025ced9ad3ba0fb7cb08
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Adam Duskett <aduskett@codeblue.com>

I still believe there is a bigger issue. I can build sngrep here
without those additional ncurses options and it builds fine.

In fact, our ncurses package is completely broken. It always installs
*all* the libraries to staging, and all what
BR2_PACKAGE_NCURSES_TARGET_PANEL or BR2_PACKAGE_NCURSES_TARGET_FORM is
doing is installing the libraries to the target. So you end up in a
situation where some libraries are available in staging, and therefore
detected by the build process of other packages, but will in fact not
be present on the target.

However, I still don't understand how it can fail on the autobuilders.
Have you been able to reproduce the issues locally?

Even though yes this patch probably fixes the issue, there's an
underlying issue which I would like to also understand and fix.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] package/sngrep: add missing ncurses dependencies
  2017-02-18 15:49 ` Thomas Petazzoni
@ 2017-02-18 16:03   ` Romain Naour
  2017-02-18 17:23     ` Thomas Petazzoni
  2017-02-18 18:21   ` Bernd Kuhls
  1 sibling, 1 reply; 8+ messages in thread
From: Romain Naour @ 2017-02-18 16:03 UTC (permalink / raw)
  To: buildroot

Hi Thomas, All,

Le 18/02/2017 ? 16:49, Thomas Petazzoni a ?crit :
> Hello,
> 
> On Sat, 18 Feb 2017 16:43:33 +0100, Romain Naour wrote:
>> ncurses panel and forms libraries are needed to build sngrep, otherwise
>> the configure script report the following errors:
>>
>> Without panel library:
>> checking ncurses.h usability... yes
>> checking ncurses.h presence... yes
>> checking for ncurses.h... yes
>> checking for initscr in -lncurses... yes
>> checking for new_panel in -lpanel... no
>> configure: error:  You need to have ncurses panel library installed to compile sngrep.
>>
>> Without form library:
>> checking ncurses.h usability... yes
>> checking ncurses.h presence... yes
>> checking for ncurses.h... yes
>> checking for initscr in -lncurses... yes
>> checking for new_panel in -lpanel... yes
>> checking for new_form in -lform... no
>> configure: error:  You need to have ncurses forms library installed to compile sngrep.
>>
>> Fixes:
>> http://autobuild.buildroot.net/results/ee5/ee58cd4252e4da95e9bd025ced9ad3ba0fb7cb08
>>
>> Signed-off-by: Romain Naour <romain.naour@gmail.com>
>> Cc: Adam Duskett <aduskett@codeblue.com>
> 
> I still believe there is a bigger issue. I can build sngrep here
> without those additional ncurses options and it builds fine.
> 
> In fact, our ncurses package is completely broken. It always installs
> *all* the libraries to staging, and all what
> BR2_PACKAGE_NCURSES_TARGET_PANEL or BR2_PACKAGE_NCURSES_TARGET_FORM is
> doing is installing the libraries to the target. So you end up in a
> situation where some libraries are available in staging, and therefore
> detected by the build process of other packages, but will in fact not
> be present on the target.
> 
> However, I still don't understand how it can fail on the autobuilders.
> Have you been able to reproduce the issues locally?

Yes, I'm able to reproduce the issues locally and I had to add these two
variables to fix these two issues...

> 
> Even though yes this patch probably fixes the issue, there's an
> underlying issue which I would like to also understand and fix.

Agree, something is weird here.

Best regards,
Romain

> 
> Thanks,
> 
> Thomas
> 

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

* [Buildroot] [PATCH] package/sngrep: add missing ncurses dependencies
  2017-02-18 16:03   ` Romain Naour
@ 2017-02-18 17:23     ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2017-02-18 17:23 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 18 Feb 2017 17:03:47 +0100, Romain Naour wrote:

> > However, I still don't understand how it can fail on the autobuilders.
> > Have you been able to reproduce the issues locally?  
> 
> Yes, I'm able to reproduce the issues locally and I had to add these two
> variables to fix these two issues...

I don't understand how the issue can occur. Indeed, even if those
sub-options are *NOT* enabled, the corresponding libraries are
installed in staging.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] package/sngrep: add missing ncurses dependencies
  2017-02-18 15:49 ` Thomas Petazzoni
  2017-02-18 16:03   ` Romain Naour
@ 2017-02-18 18:21   ` Bernd Kuhls
  2017-02-18 19:09     ` Romain Naour
  2017-02-19  9:01     ` Thomas Petazzoni
  1 sibling, 2 replies; 8+ messages in thread
From: Bernd Kuhls @ 2017-02-18 18:21 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
@public.gmane.org> wrote in news:20170218164928.59e0f1c5 at free-electrons.com:

> However, I still don't understand how it can fail on the autobuilders.

because the autobuilders fail with BR2_PACKAGE_NCURSES_WCHAR=y:
http://lists.busybox.net/pipermail/buildroot/2017-January/182468.html

Regards, Bernd

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

* [Buildroot] [PATCH] package/sngrep: add missing ncurses dependencies
  2017-02-18 18:21   ` Bernd Kuhls
@ 2017-02-18 19:09     ` Romain Naour
  2017-02-19  9:01     ` Thomas Petazzoni
  1 sibling, 0 replies; 8+ messages in thread
From: Romain Naour @ 2017-02-18 19:09 UTC (permalink / raw)
  To: buildroot

Hi Bernd, Thomas, All,

Le 18/02/2017 ? 19:21, Bernd Kuhls a ?crit :
> Hi Thomas,
> 
> Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
> @public.gmane.org> wrote in news:20170218164928.59e0f1c5 at free-electrons.com:
> 
>> However, I still don't understand how it can fail on the autobuilders.
> 
> because the autobuilders fail with BR2_PACKAGE_NCURSES_WCHAR=y:
> http://lists.busybox.net/pipermail/buildroot/2017-January/182468.html

Thanks Bernd for the link.

You're right, the problem come from --disable-unicode option which force sngrep
to use the the non-wide-character ncurses library.
So sngrep is looking for libpanel.so and libform.so even if
BR2_PACKAGE_NCURSES_WCHAR is selected.

When BR2_PACKAGE_NCURSES_WCHAR is selected a symlink between libncurses.so and
libncursesw.so is created unconditionally. But this is not the case for the
other ncurses libraries like libpanel and libfrom!
The symlink is only created when BR2_PACKAGE_NCURSES_TARGET_PANEL and
BR2_PACKAGE_NCURSES_TARGET_FORM are selected

See [1]:

NCURSES_LIBS-y = ncurses
NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_MENU) += menu
NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_PANEL) += panel
NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_FORM) += form

[...]

ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
NCURSES_CONF_OPTS += --enable-widec
NCURSES_LIB_SUFFIX = w

[...]

define NCURSES_LINK_LIBS_SHARED
	$(foreach lib,$(NCURSES_LIBS-y:%=lib%), \
		ln -sf $(lib)$(NCURSES_LIB_SUFFIX).so $(1)/usr/lib/$(lib).so
	)
	ln -sf libncurses$(NCURSES_LIB_SUFFIX).so \
		$(1)/usr/lib/libcurses.so
endef

[...]

NCURSES_LINK_STAGING_LIBS = \
	$(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call
NCURSES_LINK_LIBS_SHARED,$(STAGING_DIR)))

[...]

else # BR2_PACKAGE_NCURSES_WCHAR
NCURSES_ABI_VERSION = 5
endif # BR2_PACKAGE_NCURSES_WCHAR

So selecting BR2_PACKAGE_NCURSES_TARGET_PANEL and
BR2_PACKAGE_NCURSES_TARGET_FORM is the right thing to do here to create a the
missing symlinks in staging directory.

But the help text in BR2_PACKAGE_NCURSES_TARGET_[FORM,MENU,PANEL] is about
target directory only. But staging is also affected.

Best regards,
Romain

[1] https://git.busybox.net/buildroot/tree/package/ncurses/ncurses.mk

> 
> Regards, Bernd
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 

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

* [Buildroot] [PATCH] package/sngrep: add missing ncurses dependencies
  2017-02-18 18:21   ` Bernd Kuhls
  2017-02-18 19:09     ` Romain Naour
@ 2017-02-19  9:01     ` Thomas Petazzoni
  1 sibling, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2017-02-19  9:01 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 18 Feb 2017 19:21:29 +0100, Bernd Kuhls wrote:

> > However, I still don't understand how it can fail on the autobuilders.  
> 
> because the autobuilders fail with BR2_PACKAGE_NCURSES_WCHAR=y:
> http://lists.busybox.net/pipermail/buildroot/2017-January/182468.html

Nope, I tried with BR2_PACKAGE_NCURSES_WCHAR=y locally and it builds
fine.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] package/sngrep: add missing ncurses dependencies
  2017-02-18 15:43 [Buildroot] [PATCH] package/sngrep: add missing ncurses dependencies Romain Naour
  2017-02-18 15:49 ` Thomas Petazzoni
@ 2017-02-21 21:41 ` Thomas Petazzoni
  1 sibling, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2017-02-21 21:41 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 18 Feb 2017 16:43:33 +0100, Romain Naour wrote:

> diff --git a/package/sngrep/Config.in b/package/sngrep/Config.in
> index 4d0d80c..70d2354 100644
> --- a/package/sngrep/Config.in
> +++ b/package/sngrep/Config.in
> @@ -5,6 +5,8 @@ config BR2_PACKAGE_SNGREP
>  	bool "sngrep"
>  	depends on BR2_TOOLCHAIN_HAS_THREADS
>  	select BR2_PACKAGE_NCURSES
> +	select BR2_PACKAGE_NCURSES_TARGET_PANEL
> +	select BR2_PACKAGE_NCURSES_TARGET_FORM
>  	select BR2_PACKAGE_LIBPCAP

While I agree that this fixes the build, I don't think it's the right
fix. Indeed, the ncurses package is badly broken, as it installs some
libraries in staging, but not in target.

I have therefore sent a patch fixing ncurses instead:

  http://patchwork.ozlabs.org/patch/730793/

Let me know what you think about it.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

end of thread, other threads:[~2017-02-21 21:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-18 15:43 [Buildroot] [PATCH] package/sngrep: add missing ncurses dependencies Romain Naour
2017-02-18 15:49 ` Thomas Petazzoni
2017-02-18 16:03   ` Romain Naour
2017-02-18 17:23     ` Thomas Petazzoni
2017-02-18 18:21   ` Bernd Kuhls
2017-02-18 19:09     ` Romain Naour
2017-02-19  9:01     ` Thomas Petazzoni
2017-02-21 21:41 ` Thomas Petazzoni

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.