* [Buildroot] [PATCH 0/2] kismet: fix static builds (branch yem/fixes)
@ 2014-12-26 17:33 Yann E. MORIN
2014-12-26 17:33 ` [Buildroot] [PATCH 1/2] package/kismet: fix ncurses static build Yann E. MORIN
2014-12-26 17:33 ` [Buildroot] [PATCH 2/2] kismet: Fix " Yann E. MORIN
0 siblings, 2 replies; 5+ messages in thread
From: Yann E. MORIN @ 2014-12-26 17:33 UTC (permalink / raw)
To: buildroot
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
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread* [Buildroot] [PATCH 1/2] package/kismet: fix ncurses static build 2014-12-26 17:33 [Buildroot] [PATCH 0/2] kismet: fix static builds (branch yem/fixes) Yann E. MORIN @ 2014-12-26 17:33 ` Yann E. MORIN 2014-12-26 20:01 ` Thomas Petazzoni 2014-12-26 17:33 ` [Buildroot] [PATCH 2/2] kismet: Fix " Yann E. MORIN 1 sibling, 1 reply; 5+ messages in thread From: Yann E. MORIN @ 2014-12-26 17:33 UTC (permalink / raw) To: buildroot 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 <Vincent.Riera@imgtec.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com> --- 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 diff --git a/package/kismet/0003-fix-curses-libs-ordering.patch b/package/kismet/0003-fix-curses-libs-ordering.patch new file mode 100644 index 0000000..c5e7eff --- /dev/null +++ b/package/kismet/0003-fix-curses-libs-ordering.patch @@ -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 <Vincent.Riera@imgtec.com> +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> +Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com> + +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) diff --git a/package/kismet/kismet.mk b/package/kismet/kismet.mk index f177fea..a71414e 100644 --- a/package/kismet/kismet.mk +++ b/package/kismet/kismet.mk @@ -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 -- 1.9.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] package/kismet: fix ncurses static build 2014-12-26 17:33 ` [Buildroot] [PATCH 1/2] package/kismet: fix ncurses static build Yann E. MORIN @ 2014-12-26 20:01 ` Thomas Petazzoni 2014-12-26 20:53 ` Yann E. MORIN 0 siblings, 1 reply; 5+ messages in thread From: Thomas Petazzoni @ 2014-12-26 20:01 UTC (permalink / raw) To: buildroot Dear Yann E. MORIN, On Fri, 26 Dec 2014 18:33:08 +0100, Yann E. MORIN wrote: > diff --git a/package/kismet/0003-fix-curses-libs-ordering.patch b/package/kismet/0003-fix-curses-libs-ordering.patch > new file mode 100644 > index 0000000..c5e7eff > --- /dev/null > +++ b/package/kismet/0003-fix-curses-libs-ordering.patch > @@ -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. So this is only talking about library ordering. > +-# 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 -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] package/kismet: fix ncurses static build 2014-12-26 20:01 ` Thomas Petazzoni @ 2014-12-26 20:53 ` Yann E. MORIN 0 siblings, 0 replies; 5+ messages in thread From: Yann E. MORIN @ 2014-12-26 20:53 UTC (permalink / raw) To: buildroot Thomas, All, On 2014-12-26 21:01 +0100, Thomas Petazzoni spake thusly: > On Fri, 26 Dec 2014 18:33:08 +0100, Yann E. MORIN wrote: > > > diff --git a/package/kismet/0003-fix-curses-libs-ordering.patch b/package/kismet/0003-fix-curses-libs-ordering.patch > > new file mode 100644 > > index 0000000..c5e7eff > > --- /dev/null > > +++ b/package/kismet/0003-fix-curses-libs-ordering.patch > > @@ -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. > > So this is only talking about library ordering. > > > +-# 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. -- .-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] kismet: Fix static build 2014-12-26 17:33 [Buildroot] [PATCH 0/2] kismet: fix static builds (branch yem/fixes) Yann E. MORIN 2014-12-26 17:33 ` [Buildroot] [PATCH 1/2] package/kismet: fix ncurses static build Yann E. MORIN @ 2014-12-26 17:33 ` Yann E. MORIN 1 sibling, 0 replies; 5+ messages in thread From: Yann E. MORIN @ 2014-12-26 17:33 UTC (permalink / raw) To: buildroot From: Vicente Olivert Riera <Vincent.Riera@imgtec.com> 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' Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> [yann.morin.1998 at free.fr: remove the ncurses bits (done differently in another patch), fix BR2_PREFER_STATIC_LIB -> BR2_STATIC_LIBS] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> --- package/kismet/kismet.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/kismet/kismet.mk b/package/kismet/kismet.mk index a71414e..117d182 100644 --- a/package/kismet/kismet.mk +++ b/package/kismet/kismet.mk @@ -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 -- 1.9.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-12-26 20:53 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-12-26 17:33 [Buildroot] [PATCH 0/2] kismet: fix static builds (branch yem/fixes) Yann E. MORIN 2014-12-26 17:33 ` [Buildroot] [PATCH 1/2] package/kismet: fix ncurses static build Yann E. MORIN 2014-12-26 20:01 ` Thomas Petazzoni 2014-12-26 20:53 ` Yann E. MORIN 2014-12-26 17:33 ` [Buildroot] [PATCH 2/2] kismet: Fix " Yann E. MORIN
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox