Message ID | 1418395681-40434-2-git-send-email-Vincent.Riera@imgtec.com |
---|---|
State | Changes Requested |
Headers | show |
Vicente, All, On 2014-12-12 14:48 +0000, Vicente Olivert Riera spake thusly: > 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' > > Also reorder the ncurses libs because the order is very important when > doing static builds. Otherwise we will see errors like this one: > > /br/output/host/usr/mipsel-buildroot-linux-uclibc/sysroot/usr/lib/libpanel.a(p_delete.o): > In function `del_panel': > p_delete.c:(.text+0x68): undefined reference to `_nc_panelhook' > > Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> > --- > package/kismet/kismet.mk | 8 ++++++++ > 1 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/package/kismet/kismet.mk b/package/kismet/kismet.mk > index f177fea..6aeafe2 100644 > --- a/package/kismet/kismet.mk > +++ b/package/kismet/kismet.mk > @@ -12,6 +12,14 @@ KISMET_CONF_OPTS += --with-netlink-version=3 > KISMET_LICENSE = GPLv2+ > KISMET_LICENSE_FILES = debian/copyright > > +define KISMET_REORDER_NCURSES_LIBS > + $(SED) 's/-lncurses -lpanel/-lpanel -lncurses/' $(@D)/Makefile.inc I think it is better to patch configure.in instead of this post-patch hook. I have a patch to this effect that I'll submit soon. > +endef > +ifeq ($(BR2_PREFER_STATIC_LIB),y) > +KISMET_CONF_ENV = LIBS="-lpcap $(shell $(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs)" I'll incorporate your libpcap in my series when I resubmit. In the meantime, I have marked this patch as "Changes Requested" in Patchwork. Regards, Yann E. MORIN. > +KISMET_POST_CONFIGURE_HOOKS += KISMET_REORDER_NCURSES_LIBS > +endif > + > ifeq ($(BR2_PACKAGE_PCRE),y) > KISMET_DEPENDENCIES += pcre > endif > -- > 1.7.1 > > _______________________________________________ > buildroot mailing list > buildroot@busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot
diff --git a/package/kismet/kismet.mk b/package/kismet/kismet.mk index f177fea..6aeafe2 100644 --- a/package/kismet/kismet.mk +++ b/package/kismet/kismet.mk @@ -12,6 +12,14 @@ KISMET_CONF_OPTS += --with-netlink-version=3 KISMET_LICENSE = GPLv2+ KISMET_LICENSE_FILES = debian/copyright +define KISMET_REORDER_NCURSES_LIBS + $(SED) 's/-lncurses -lpanel/-lpanel -lncurses/' $(@D)/Makefile.inc +endef +ifeq ($(BR2_PREFER_STATIC_LIB),y) +KISMET_CONF_ENV = LIBS="-lpcap $(shell $(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs)" +KISMET_POST_CONFIGURE_HOOKS += KISMET_REORDER_NCURSES_LIBS +endif + ifeq ($(BR2_PACKAGE_PCRE),y) KISMET_DEPENDENCIES += pcre endif
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' Also reorder the ncurses libs because the order is very important when doing static builds. Otherwise we will see errors like this one: /br/output/host/usr/mipsel-buildroot-linux-uclibc/sysroot/usr/lib/libpanel.a(p_delete.o): In function `del_panel': p_delete.c:(.text+0x68): undefined reference to `_nc_panelhook' Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> --- package/kismet/kismet.mk | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)