Skip to contentSkip to conversation

package/sngrep: add missing ncurses dependencies

PATCH New Romain Naour 3 participants 8 messages Feb 18, 2017 – Feb 21, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/sngrep: add missing ncurses dependencies

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

---
 package/sngrep/Config.in | 2 ++
 1 file changed, 2 insertions(+)
package/sngrep/Config.in +2 -0
index 4d0d80c..70d2354 100644
@@ -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
Signature · 1 line
2.9.3
#1 lore raw

PATCH 1/1 package/sngrep: add missing ncurses dependencies

Hello,

Quoted 20 lines · Romain Naour

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.

Quoted 5 lines

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

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

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 package/sngrep: add missing ncurses dependencies

Hi Thomas, All,

Le 18/02/2017 ? 16:49, Thomas Petazzoni a ?crit :

Quoted 40 lines

Hello,

Quoted 20 lines · Romain Naour

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.

Quoted 5 lines

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

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.

Quoted 2 lines

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...

Quoted 3 lines

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

Quoted 5 lines

Thanks,

Thomas

#3 lore raw

PATCH 1/1 package/sngrep: add missing ncurses dependencies

Hello,

Quoted 5 lines · Romain Naour
Quoted 2 lines

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

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#4 lore raw

PATCH 1/1 package/sngrep: add missing ncurses dependencies

In reply to Thomas Petazzoni

Hi Thomas,

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

Quoted 1 line

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

#5 lore raw

PATCH 1/1 package/sngrep: add missing ncurses dependencies

Hi Bernd, Thomas, All,

Le 18/02/2017 ? 19:21, Bernd Kuhls a ?crit :

Quoted 9 lines

Hi Thomas,

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

Quoted 1 line

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

Quoted 8 lines

Regards, Bernd

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#6 lore raw

PATCH 1/1 package/sngrep: add missing ncurses dependencies

In reply to Bernd Kuhls

Hello,

Quoted 4 lines · Bernd Kuhls
Quoted 1 line

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

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#7 lore raw

PATCH 1/1 package/sngrep: add missing ncurses dependencies

In reply to Romain Naour

Hello,

package/sngrep/Config.in config BR2_PACKAGE_SNGREP · line 10

Quoted 11 lines · Romain Naour
package/sngrep/Config.in +2 -0
index 4d0d80c..70d2354 100644
@@ -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

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