kismet: fix static builds (branch yem/fixes)
cover kismet: fix static builds (branch yem/fixes)
Hello All!
These two patches are fixes to kismet when doing a static-only build:
- first patch is the same as what Vicente proposed, but done in
configure.in instead of configure, and thus needs an autoreconf;
it fixes static linking against ncurses libs;- second patch is what Vicente provided, but with the ncurses bits removed since it is now handled differently in its own patch.
Regards,
Yann E. MORIN.
The following changes since commit 1696f254aa2c68a274956902cfac7b7e9a607b11:
libvncserver: bump version to 0.9.10 (2014-12-26 17:39:43 +0100)
are available in the git repository at:
git://git.busybox.net/~ymorin/git/buildroot yem/fixes
for you to fetch changes up to 6c3f1a6f597ba9282340782273af01cef607bfe1:
kismet: Fix static build (2014-12-26 18:28:26 +0100)
----------------------------------------------------------------
Vicente Olivert Riera (1):
kismet: Fix static build
Yann E. MORIN (1):
package/kismet: fix ncurses static build
package/kismet/0003-fix-curses-libs-ordering.patch | 52 ++++++++++++++++++++++ package/kismet/kismet.mk | 7 +++ 2 files changed, 59 insertions(+) create mode 100644 package/kismet/0003-fix-curses-libs-ordering.patch
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/2 package/kismet: fix ncurses static build
Says Vicente:
[T]he order is very important when doing static builds. Otherwise we will see errors like this one:
[...]/sysroot/usr/lib/libpanel.a(p_delete.o):
In function `del_panel':
p_delete.c:(.text+0x68): undefined reference to `_nc_panelhook'
Fix the order configure adds libraries: new libraries should be added at the *front* of the list, not at the end.
--- package/kismet/0003-fix-curses-libs-ordering.patch | 52 ++++++++++++++++++++++ package/kismet/kismet.mk | 3 ++ 2 files changed, 55 insertions(+) create mode 100644 package/kismet/0003-fix-curses-libs-ordering.patch
package/kismet/0003-fix-curses-libs-ordering.patch new file +52 -0
@@ -0,0 +1,52 @@ +configure: fix ordering of ncurses libraries + +Says Vicente: + [T]he order is very important when doing static builds. + Otherwise we will see errors like this one: + + [...]/sysroot/usr/lib/libpanel.a(p_delete.o): + In function `del_panel': + p_delete.c:(.text+0x68): undefined reference to `_nc_panelhook' + +Fix the order configure adds libraries: new libraries should be added +at the *front* of the list, not at the end. + +Reported-by: Vicente Olivert Riera <[email protected]> +Signed-off-by: "Yann E. MORIN" <[email protected]> +Cc: Vicente Olivert Riera <[email protected]> + +diff -durN kismet-Kismet-2014-02-R1.orig/configure.in kismet-Kismet-2014-02-R1/configure.in +--- kismet-Kismet-2014-02-R1.orig/configure.in 2014-02-19 05:37:43.000000000 +0100 ++++ kismet-Kismet-2014-02-R1/configure.in 2014-12-26 16:46:55.770692349 +0100 +@@ -406,9 +406,6 @@ + ) + AC_SUBST(wantclient) + +-# Add additional cflags since some distros bury panel.h +-CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses" +- + termcontrol="none"; + + if test "$wantclient" = "yes"; then +@@ -437,10 +434,10 @@ + AC_MSG_ERROR(Failed to find curses.h or ncurses.h. You probably need to install the curses-devel package from your distribution) + fi + +- LIBS="$LIBS $curseaux" ++ LIBS="$curseaux $LIBS" + AC_CHECK_LIB([panel], [new_panel], + AC_DEFINE(HAVE_LIBPANEL, 1, Panel terminal lib) +- curseaux="$curseaux -lpanel", ++ curseaux="-lpanel $curseaux", + AC_MSG_ERROR(Failed to find libpanel extension to curses/ncurses. Install it, or disable building the Kismet client with --disable-client. Disabling the client is probably not something you want to do normally.)) + + AC_CHECK_HEADER([panel.h], [foundhpanel=yes]) +@@ -450,7 +447,7 @@ + + LIBS="$OLIBS" + +- CLIENTCLIBS="$CLIENTCLIBS $curseaux" ++ CLIENTCLIBS="$curseaux $CLIENTCLIBS" + fi + + AC_SUBST(CLIBS)
package/kismet/kismet.mk +3 -0
@@ -12,6 +12,9 @@ KISMET_CONF_OPTS += --with-netlink-version=3 KISMET_LICENSE = GPLv2+ KISMET_LICENSE_FILES = debian/copyright +# We touch configure.in: +KISMET_AUTORECONF = YES + ifeq ($(BR2_PACKAGE_PCRE),y) KISMET_DEPENDENCIES += pcre endif
Signature · 1 line
1.9.1
PATCH 1/2 package/kismet: fix ncurses static build
Dear Yann E. MORIN,
Quoted 8 lines · Yann E. MORIN
package/kismet/0003-fix-curses-libs-ordering.patch new file +2
-0@@ -0,0 +1,52 @@ +configure: fix ordering of ncurses libraries +
package/kismet/0003-fix-curses-libs-ordering.patch line 12
Quoted 10 lines
package/kismet/0003-fix-curses-libs-ordering.patch new file +10
-0+Says Vicente: + [T]he order is very important when doing static builds. + Otherwise we will see errors like this one: + + [...]/sysroot/usr/lib/libpanel.a(p_delete.o): + In function `del_panel': + p_delete.c:(.text+0x68): undefined reference to `_nc_panelhook' + +Fix the order configure adds libraries: new libraries should be added +at the *front* of the list, not at the end.
So this is only talking about library ordering.
package/kismet/0003-fix-curses-libs-ordering.patch line 26
Quoted 2 lines
package/kismet/0003-fix-curses-libs-ordering.patch new file +2
-0+-# Add additional cflags since some distros bury panel.h +-CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses"
But the patch also removes some invalid -I path.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/2 package/kismet: fix ncurses static build
Thomas, All,
On 2014-12-26 21:01 +0100, Thomas Petazzoni spake thusly:
Quoted 23 lines · Yann E. MORIN
Quoted 9 lines
package/kismet/0003-fix-curses-libs-ordering.patch new file +2
-0@@ -0,0 +1,52 @@ +configure: fix ordering of ncurses libraries +package/kismet/0003-fix-curses-libs-ordering.patch line 12
Quoted 10 lines
package/kismet/0003-fix-curses-libs-ordering.patch new file +10
-0+Says Vicente: + [T]he order is very important when doing static builds. + Otherwise we will see errors like this one: + + [...]/sysroot/usr/lib/libpanel.a(p_delete.o): + In function `del_panel': + p_delete.c:(.text+0x68): undefined reference to `_nc_panelhook' + +Fix the order configure adds libraries: new libraries should be added +at the *front* of the list, not at the end.So this is only talking about library ordering.
Quoted 4 lines
package/kismet/0003-fix-curses-libs-ordering.patch line 26
Quoted 2 lines
package/kismet/0003-fix-curses-libs-ordering.patch new file +2
-0+-# Add additional cflags since some distros bury panel.h +-CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses"But the patch also removes some invalid -I path.
Damn, that was supposed to go in a separate patch.
I'll fix. Thanks for spotting.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 2/2 kismet: Fix static build
In reply to Yann E. MORINFrom: Vicente Olivert Riera <[email protected]>
Use pcap-config to list optional libpcap dependencies needed for static link. Otherwise we will see errors like this one:
/br/output/host/usr/mipsel-buildroot-linux-uclibc/sysroot/usr/lib/libpcap.a(pcap-canusb-linux.o):
In function `canusb_close':
pcap-canusb-linux.c:(.text+0xec): undefined reference to `libusb_close'
[yann.morin.1998 at free.fr: remove the ncurses bits (done differently in
another patch), fix BR2_PREFER_STATIC_LIB -> BR2_STATIC_LIBS]
--- package/kismet/kismet.mk | 4 ++++ 1 file changed, 4 insertions(+)
package/kismet/kismet.mk +4 -0
@@ -15,6 +15,10 @@ KISMET_LICENSE_FILES = debian/copyright # We touch configure.in: KISMET_AUTORECONF = YES +ifeq ($(BR2_STATIC_LIBS),y) +KISMET_CONF_ENV = LIBS="-lpcap $(shell $(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs)" +endif + ifeq ($(BR2_PACKAGE_PCRE),y) KISMET_DEPENDENCIES += pcre endif
Signature · 1 line
1.9.1