* [Buildroot] [PATCH 1/4] package/bind: enable static build
@ 2019-04-23 21:24 Fabrice Fontaine
2019-04-23 21:24 ` [Buildroot] [PATCH 2/4] package/bind: remove threads dependency Fabrice Fontaine
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Fabrice Fontaine @ 2019-04-23 21:24 UTC (permalink / raw)
To: buildroot
Static build has been disabled in 2014 with commit
6045904752b06a8b8e52ba8fc2e49a8548964e8d however bind can be built
statically thanks to --without-dlopen so enable it back
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...n_driver.c-fix-build-without-dlfcn.h.patch | 28 +++++++++++++++++++
package/bind/Config.in | 5 ++--
package/bind/bind.mk | 4 ++-
3 files changed, 33 insertions(+), 4 deletions(-)
create mode 100644 package/bind/0002-dlz_open_driver.c-fix-build-without-dlfcn.h.patch
diff --git a/package/bind/0002-dlz_open_driver.c-fix-build-without-dlfcn.h.patch b/package/bind/0002-dlz_open_driver.c-fix-build-without-dlfcn.h.patch
new file mode 100644
index 0000000000..8b73e746e4
--- /dev/null
+++ b/package/bind/0002-dlz_open_driver.c-fix-build-without-dlfcn.h.patch
@@ -0,0 +1,28 @@
+From 92b738a0fe8a7d65346de9e6dd7a8f135ee29765 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Tue, 23 Apr 2019 22:45:25 +0200
+Subject: [PATCH] dlz_open_driver.c: fix build without dlfcn.h
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://gitlab.isc.org/isc-projects/bind9/issues/995]
+---
+ bin/named/unix/dlz_dlopen_driver.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/bin/named/unix/dlz_dlopen_driver.c b/bin/named/unix/dlz_dlopen_driver.c
+index 74d29ffa09..ab8a5c9493 100644
+--- a/bin/named/unix/dlz_dlopen_driver.c
++++ b/bin/named/unix/dlz_dlopen_driver.c
+@@ -14,7 +14,9 @@
+ #include <inttypes.h>
+ #include <stdlib.h>
+ #include <string.h>
++#if HAVE_DLFCN_H
+ #include <dlfcn.h>
++#endif
+
+ #include <dns/log.h>
+ #include <dns/result.h>
+--
+2.20.1
+
diff --git a/package/bind/Config.in b/package/bind/Config.in
index 049a90cbaf..5b34b66f7a 100644
--- a/package/bind/Config.in
+++ b/package/bind/Config.in
@@ -2,7 +2,6 @@ config BR2_PACKAGE_BIND
bool "bind"
depends on BR2_USE_MMU # fork()
depends on BR2_TOOLCHAIN_HAS_THREADS
- depends on !BR2_STATIC_LIBS
help
BIND (Berkeley Internet Name Domain) is an
implementation of the Domain Name System (DNS) protocols
@@ -41,6 +40,6 @@ config BR2_PACKAGE_BIND_TOOLS
endif
-comment "bind needs a toolchain w/ threads, dynamic library"
+comment "bind needs a toolchain w/ threads"
depends on BR2_USE_MMU
- depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
+ depends on !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/bind/bind.mk b/package/bind/bind.mk
index b2bbafab20..30a4482db5 100644
--- a/package/bind/bind.mk
+++ b/package/bind/bind.mk
@@ -24,6 +24,7 @@ BIND_CONF_ENV = \
BUILD_CC="$(TARGET_CC)" \
BUILD_CFLAGS="$(TARGET_CFLAGS)"
BIND_CONF_OPTS = \
+ $(if $(BR2_STATIC_LIBS),--with-dlopen,--without-dlopen) \
--without-lmdb \
--with-libjson=no \
--with-randomdev=/dev/urandom \
@@ -54,12 +55,13 @@ BIND_CONF_OPTS += --with-libxml2=no
endif
ifeq ($(BR2_PACKAGE_OPENSSL),y)
-BIND_DEPENDENCIES += openssl
+BIND_DEPENDENCIES += host-pkgconf openssl
BIND_CONF_OPTS += \
--with-openssl=$(STAGING_DIR)/usr \
--with-ecdsa=yes \
--with-eddsa=no \
--with-aes=yes
+BIND_CONF_ENV += LIBS=`$(PKG_CONFIG_HOST_BINARY) --libs openssl`
# GOST cipher support requires openssl extra engines
ifeq ($(BR2_PACKAGE_OPENSSL_ENGINES),y)
BIND_CONF_OPTS += --with-gost=yes
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [Buildroot] [PATCH 2/4] package/bind: remove threads dependency 2019-04-23 21:24 [Buildroot] [PATCH 1/4] package/bind: enable static build Fabrice Fontaine @ 2019-04-23 21:24 ` Fabrice Fontaine 2019-04-23 21:24 ` [Buildroot] [PATCH 3/4] package/bind: don't enable server by default Fabrice Fontaine ` (2 subsequent siblings) 3 siblings, 0 replies; 9+ messages in thread From: Fabrice Fontaine @ 2019-04-23 21:24 UTC (permalink / raw) To: buildroot Threads dependency has been added in 2015 with commit 07c1ad4647b6a8e60338fc01ddcb2d629de0ad14 however bind can be built without threads thanks to --disable-threads Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> --- package/bind/Config.in | 5 ----- package/bind/bind.mk | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/package/bind/Config.in b/package/bind/Config.in index 5b34b66f7a..60546f691b 100644 --- a/package/bind/Config.in +++ b/package/bind/Config.in @@ -1,7 +1,6 @@ config BR2_PACKAGE_BIND bool "bind" depends on BR2_USE_MMU # fork() - depends on BR2_TOOLCHAIN_HAS_THREADS help BIND (Berkeley Internet Name Domain) is an implementation of the Domain Name System (DNS) protocols @@ -39,7 +38,3 @@ config BR2_PACKAGE_BIND_TOOLS Install tools (dig, host, nslookup, nsupdate) endif - -comment "bind needs a toolchain w/ threads" - depends on BR2_USE_MMU - depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/bind/bind.mk b/package/bind/bind.mk index 30a4482db5..372c1cb7e3 100644 --- a/package/bind/bind.mk +++ b/package/bind/bind.mk @@ -24,6 +24,7 @@ BIND_CONF_ENV = \ BUILD_CC="$(TARGET_CC)" \ BUILD_CFLAGS="$(TARGET_CFLAGS)" BIND_CONF_OPTS = \ + $(if $(BR2_TOOLCHAIN_HAS_THREADS),--enable-threads,--disable-threads) \ $(if $(BR2_STATIC_LIBS),--with-dlopen,--without-dlopen) \ --without-lmdb \ --with-libjson=no \ -- 2.20.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH 3/4] package/bind: don't enable server by default 2019-04-23 21:24 [Buildroot] [PATCH 1/4] package/bind: enable static build Fabrice Fontaine 2019-04-23 21:24 ` [Buildroot] [PATCH 2/4] package/bind: remove threads dependency Fabrice Fontaine @ 2019-04-23 21:24 ` Fabrice Fontaine 2019-04-24 20:36 ` Thomas Petazzoni 2019-04-23 21:24 ` [Buildroot] [PATCH 4/4] package/dhcp: use system bind Fabrice Fontaine 2019-04-24 20:34 ` [Buildroot] [PATCH 1/4] package/bind: enable static build Thomas Petazzoni 3 siblings, 1 reply; 9+ messages in thread From: Fabrice Fontaine @ 2019-04-23 21:24 UTC (permalink / raw) To: buildroot Don't enable server by default as dhcp will now select bind to use the bind libraries Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> --- package/bind/Config.in | 1 - 1 file changed, 1 deletion(-) diff --git a/package/bind/Config.in b/package/bind/Config.in index 60546f691b..6d4ee2e6d7 100644 --- a/package/bind/Config.in +++ b/package/bind/Config.in @@ -28,7 +28,6 @@ if BR2_PACKAGE_BIND config BR2_PACKAGE_BIND_SERVER bool "Install server components" - default y help Install server components (named, lwresd) -- 2.20.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH 3/4] package/bind: don't enable server by default 2019-04-23 21:24 ` [Buildroot] [PATCH 3/4] package/bind: don't enable server by default Fabrice Fontaine @ 2019-04-24 20:36 ` Thomas Petazzoni 2019-04-24 20:56 ` Arnout Vandecappelle 0 siblings, 1 reply; 9+ messages in thread From: Thomas Petazzoni @ 2019-04-24 20:36 UTC (permalink / raw) To: buildroot Hello, On Tue, 23 Apr 2019 23:24:05 +0200 Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote: > Don't enable server by default as dhcp will now select bind to use the > bind libraries > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> > --- > package/bind/Config.in | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/package/bind/Config.in b/package/bind/Config.in > index 60546f691b..6d4ee2e6d7 100644 > --- a/package/bind/Config.in > +++ b/package/bind/Config.in > @@ -28,7 +28,6 @@ if BR2_PACKAGE_BIND > > config BR2_PACKAGE_BIND_SERVER > bool "Install server components" > - default y This will break existing defconfigs which did not explicitly enable BR2_PACKAGE_BIND_SERVER because it was implicitly enabled when BR2_PACKAGE_BIND=y. But I don't see a good solution to avoid that. We certainly don't want BR2_PACKAGE_DHCP=y to install the full BIND server. So to me, it's an acceptable trade-off. I've Cc'ed Arnout, Peter and Yann to see what they think. Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH 3/4] package/bind: don't enable server by default 2019-04-24 20:36 ` Thomas Petazzoni @ 2019-04-24 20:56 ` Arnout Vandecappelle 2019-04-25 15:56 ` Yann E. MORIN 0 siblings, 1 reply; 9+ messages in thread From: Arnout Vandecappelle @ 2019-04-24 20:56 UTC (permalink / raw) To: buildroot On 24/04/2019 22:36, Thomas Petazzoni wrote: > Hello, > > On Tue, 23 Apr 2019 23:24:05 +0200 > Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote: > >> Don't enable server by default as dhcp will now select bind to use the >> bind libraries >> >> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> >> --- >> package/bind/Config.in | 1 - >> 1 file changed, 1 deletion(-) >> >> diff --git a/package/bind/Config.in b/package/bind/Config.in >> index 60546f691b..6d4ee2e6d7 100644 >> --- a/package/bind/Config.in >> +++ b/package/bind/Config.in >> @@ -28,7 +28,6 @@ if BR2_PACKAGE_BIND >> >> config BR2_PACKAGE_BIND_SERVER >> bool "Install server components" >> - default y > > This will break existing defconfigs which did not explicitly enable > BR2_PACKAGE_BIND_SERVER because it was implicitly enabled when > BR2_PACKAGE_BIND=y. But I don't see a good solution to avoid that. We > certainly don't want BR2_PACKAGE_DHCP=y to install the full BIND server. > > So to me, it's an acceptable trade-off. I've Cc'ed Arnout, Peter and > Yann to see what they think. Although not documented anywhere, in my opinion a defconfig is not supposed to be stable over upgrades. When upgrading, you should use a full config. I do the same for the kernel as well. I also always do a diffconfig between old and new and try to understand the differences. Regards, Arnout ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH 3/4] package/bind: don't enable server by default 2019-04-24 20:56 ` Arnout Vandecappelle @ 2019-04-25 15:56 ` Yann E. MORIN 0 siblings, 0 replies; 9+ messages in thread From: Yann E. MORIN @ 2019-04-25 15:56 UTC (permalink / raw) To: buildroot Arnout, All, On 2019-04-24 22:56 +0200, Arnout Vandecappelle spake thusly: > On 24/04/2019 22:36, Thomas Petazzoni wrote: > > On Tue, 23 Apr 2019 23:24:05 +0200 > > Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote: > > > >> Don't enable server by default as dhcp will now select bind to use the > >> bind libraries > >> > >> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> > >> --- > >> package/bind/Config.in | 1 - > >> 1 file changed, 1 deletion(-) > >> > >> diff --git a/package/bind/Config.in b/package/bind/Config.in > >> index 60546f691b..6d4ee2e6d7 100644 > >> --- a/package/bind/Config.in > >> +++ b/package/bind/Config.in > >> @@ -28,7 +28,6 @@ if BR2_PACKAGE_BIND > >> > >> config BR2_PACKAGE_BIND_SERVER > >> bool "Install server components" > >> - default y > > > > This will break existing defconfigs which did not explicitly enable > > BR2_PACKAGE_BIND_SERVER because it was implicitly enabled when > > BR2_PACKAGE_BIND=y. But I don't see a good solution to avoid that. We > > certainly don't want BR2_PACKAGE_DHCP=y to install the full BIND server. > > > > So to me, it's an acceptable trade-off. I've Cc'ed Arnout, Peter and > > Yann to see what they think. > > Although not documented anywhere, in my opinion a defconfig is not supposed to > be stable over upgrades. When upgrading, you should use a full config. Agreed. The process I follow to upgrade buildroot if (roughly): $ make my_foo_defconfig $ git pull $ make olddefconfig $ diff -du .config.old .config $ make savedefconfig $ git diff # shows delta in my_foo_defconfig > I also always do a diffconfig between old and new and try to understand the > differences. This sounds all too familiar, too. ;-) Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH 4/4] package/dhcp: use system bind 2019-04-23 21:24 [Buildroot] [PATCH 1/4] package/bind: enable static build Fabrice Fontaine 2019-04-23 21:24 ` [Buildroot] [PATCH 2/4] package/bind: remove threads dependency Fabrice Fontaine 2019-04-23 21:24 ` [Buildroot] [PATCH 3/4] package/bind: don't enable server by default Fabrice Fontaine @ 2019-04-23 21:24 ` Fabrice Fontaine 2019-04-24 20:34 ` [Buildroot] [PATCH 1/4] package/bind: enable static build Thomas Petazzoni 3 siblings, 0 replies; 9+ messages in thread From: Fabrice Fontaine @ 2019-04-23 21:24 UTC (permalink / raw) To: buildroot Select bind instead of using the embedded bind libraries. This will help managing correctly all the bind dependencies such as zlib Fixes: - http://autobuild.buildroot.org/results/a61f24e9f117c81893c58befb20d21179e61b85b Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> --- ...ibility-headers-updated-util-bind-sh.patch | 87 +++++++++++++++++++ package/dhcp/Config.in | 1 + package/dhcp/dhcp.mk | 17 +--- 3 files changed, 92 insertions(+), 13 deletions(-) create mode 100644 package/dhcp/0001-master-Added-includes-of-new-BIND9-compatibility-headers-updated-util-bind-sh.patch diff --git a/package/dhcp/0001-master-Added-includes-of-new-BIND9-compatibility-headers-updated-util-bind-sh.patch b/package/dhcp/0001-master-Added-includes-of-new-BIND9-compatibility-headers-updated-util-bind-sh.patch new file mode 100644 index 0000000000..b8b187f17b --- /dev/null +++ b/package/dhcp/0001-master-Added-includes-of-new-BIND9-compatibility-headers-updated-util-bind-sh.patch @@ -0,0 +1,87 @@ +From 8194daabfd590f17825f0c61e9534bee5c99cc86 Mon Sep 17 00:00:00 2001 +From: Thomas Markwalder <tmark@isc.org> +Date: Fri, 14 Sep 2018 13:41:41 -0400 +Subject: [PATCH] [master] Added includes of new BIND9 compatibility headers, + updated util/bind.sh + + Merges in rt48072. +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> +[Retrieved (and updated to remvove bind.sh update) from: +https://gitlab.isc.org/isc-projects/dhcp/commit/8194daabfd590f17825f0c61e9534bee5c99cc86] +--- + includes/omapip/isclib.h | 3 +++ + includes/omapip/result.h | 1 + + server/dhcpv6.c | 13 +++++++++---- + 3 files changed, 39 insertions(+), 12 deletions(-) + +diff --git a/includes/omapip/isclib.h b/includes/omapip/isclib.h +index 75a87ff6..538b927f 100644 +--- a/includes/omapip/isclib.h ++++ b/includes/omapip/isclib.h +@@ -48,6 +48,9 @@ + #include <string.h> + #include <netdb.h> + ++#include <isc/boolean.h> ++#include <isc/int.h> ++ + #include <isc/buffer.h> + #include <isc/lex.h> + #include <isc/lib.h> +diff --git a/includes/omapip/result.h b/includes/omapip/result.h +index 91243e1b..860298f6 100644 +--- a/includes/omapip/result.h ++++ b/includes/omapip/result.h +@@ -26,6 +26,7 @@ + #ifndef DHCP_RESULT_H + #define DHCP_RESULT_H 1 + ++#include <isc/boolean.h> + #include <isc/lang.h> + #include <isc/resultclass.h> + #include <isc/types.h> +diff --git a/server/dhcpv6.c b/server/dhcpv6.c +index a7110f98..cde4f617 100644 +--- a/server/dhcpv6.c ++++ b/server/dhcpv6.c +@@ -1034,7 +1034,8 @@ void check_pool6_threshold(struct reply_state *reply, + shared_name, + inet_ntop(AF_INET6, &lease->addr, + tmp_addr, sizeof(tmp_addr)), +- used, count); ++ (long long unsigned)(used), ++ (long long unsigned)(count)); + } + return; + } +@@ -1066,7 +1067,8 @@ void check_pool6_threshold(struct reply_state *reply, + "address: %s; high threshold %d%% %llu/%llu.", + shared_name, + inet_ntop(AF_INET6, &lease->addr, tmp_addr, sizeof(tmp_addr)), +- poolhigh, used, count); ++ poolhigh, (long long unsigned)(used), ++ (long long unsigned)(count)); + + /* handle the low threshold now, if we don't + * have one we default to 0. */ +@@ -1436,12 +1438,15 @@ pick_v6_address(struct reply_state *reply) + log_debug("Unable to pick client address: " + "no addresses available - shared network %s: " + " 2^64-1 < total, %llu active, %llu abandoned", +- shared_name, active - abandoned, abandoned); ++ shared_name, (long long unsigned)(active - abandoned), ++ (long long unsigned)(abandoned)); + } else { + log_debug("Unable to pick client address: " + "no addresses available - shared network %s: " + "%llu total, %llu active, %llu abandoned", +- shared_name, total, active - abandoned, abandoned); ++ shared_name, (long long unsigned)(total), ++ (long long unsigned)(active - abandoned), ++ (long long unsigned)(abandoned)); + } + + return ISC_R_NORESOURCES; +-- +2.18.1 + diff --git a/package/dhcp/Config.in b/package/dhcp/Config.in index 5340830902..a4930e53ba 100644 --- a/package/dhcp/Config.in +++ b/package/dhcp/Config.in @@ -3,6 +3,7 @@ config BR2_PACKAGE_DHCP # fork() depends on BR2_USE_MMU depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + select BR2_PACKAGE_BIND help DHCP relay agent from the ISC DHCP distribution. diff --git a/package/dhcp/dhcp.mk b/package/dhcp/dhcp.mk index 9e7444eea6..45511421be 100644 --- a/package/dhcp/dhcp.mk +++ b/package/dhcp/dhcp.mk @@ -9,13 +9,15 @@ DHCP_SITE = http://ftp.isc.org/isc/dhcp/$(DHCP_VERSION) DHCP_INSTALL_STAGING = YES DHCP_LICENSE = MPL-2.0 DHCP_LICENSE_FILES = LICENSE +DHCP_DEPENDENCIES = bind DHCP_CONF_ENV = \ CPPFLAGS='-D_PATH_DHCPD_CONF=\"/etc/dhcp/dhcpd.conf\" \ -D_PATH_DHCLIENT_CONF=\"/etc/dhcp/dhclient.conf\"' \ - CFLAGS='$(TARGET_CFLAGS) -DISC_CHECK_NONE=1' + CFLAGS='$(TARGET_CFLAGS) -DISC_CHECK_NONE=1' \ + LIBS="`$(STAGING_DIR)/usr/bin/bind9-config --libs bind9`" DHCP_CONF_OPTS = \ - --with-bind-extra-config="$(DHCP_BIND_CONF_OPTS)" \ + --with-libbind=$(STAGING_DIR)/usr \ --with-randomdev=/dev/random \ --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \ --with-srv6-lease-file=/var/lib/dhcp/dhcpd6.leases \ @@ -44,17 +46,6 @@ ifeq ($(BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK),y) DHCP_CONF_OPTS += --enable-delayed-ack endif -ifeq ($(BR2_PACKAGE_ZLIB),y) -DHCP_DEPENDENCIES += zlib -DHCP_BIND_CONF_OPTS += --with-zlib -else -DHCP_BIND_CONF_OPTS += --without-zlib -endif - -ifeq ($(BR2_STATIC_LIBS),y) -DHCP_BIND_CONF_OPTS += --without-dlopen -endif - ifeq ($(BR2_PACKAGE_DHCP_SERVER),y) define DHCP_INSTALL_SERVER mkdir -p $(TARGET_DIR)/var/lib -- 2.20.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH 1/4] package/bind: enable static build 2019-04-23 21:24 [Buildroot] [PATCH 1/4] package/bind: enable static build Fabrice Fontaine ` (2 preceding siblings ...) 2019-04-23 21:24 ` [Buildroot] [PATCH 4/4] package/dhcp: use system bind Fabrice Fontaine @ 2019-04-24 20:34 ` Thomas Petazzoni 2019-04-24 20:46 ` Fabrice Fontaine 3 siblings, 1 reply; 9+ messages in thread From: Thomas Petazzoni @ 2019-04-24 20:34 UTC (permalink / raw) To: buildroot Hello Fabrice, On Tue, 23 Apr 2019 23:24:03 +0200 Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote: > Static build has been disabled in 2014 with commit > 6045904752b06a8b8e52ba8fc2e49a8548964e8d however bind can be built > statically thanks to --without-dlopen so enable it back > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> > --- > ...n_driver.c-fix-build-without-dlfcn.h.patch | 28 +++++++++++++++++++ > package/bind/Config.in | 5 ++-- > package/bind/bind.mk | 4 ++- > 3 files changed, 33 insertions(+), 4 deletions(-) > create mode 100644 package/bind/0002-dlz_open_driver.c-fix-build-without-dlfcn.h.patch The series looks good in principle, but sadly the following defconfig: BR2_arm=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2019.02-rc1.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y BR2_TOOLCHAIN_EXTERNAL_LOCALE=y # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set BR2_TOOLCHAIN_EXTERNAL_CXX=y BR2_INIT_NONE=y BR2_SYSTEM_BIN_SH_NONE=y # BR2_PACKAGE_BUSYBOX is not set BR2_PACKAGE_DHCP=y # BR2_TARGET_ROOTFS_TAR is not set fails to build with: configure: error: Cannot find static libraries at /home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib make[1]: *** [package/pkg-generic.mk:231: /home/thomas/projets/buildroot/output/build/dhcp-4.4.1/.stamp_configured] Error 1 Looking at configure.ac sheds some light: AC_ARG_ENABLE(libtool, AS_HELP_STRING([--enable-libtool], [use GNU libtool for dynamic shared libraries (default is no).]), want_libtool="$enableval") if test "$use_libbind" != "no"; then if test "$want_libtool" = "yes" -a \ ! -f "$use_libbind/lib/libisc.la" then AC_MSG_ERROR([Cannot find dynamic libraries at $use_libbind/lib]) fi if test "$want_libtool" = "no" -a \ ! -f "$use_libbind/lib/libisc.a" then AC_MSG_ERROR([Cannot find static libraries at $use_libbind/lib]) fi fi We are not passing --enable-libtool, so the code checks is libisc.a exists, and it doesn't because a default build is BR2_SHARED_LIBS=y, and therefore bind doesn't build/install any static library. I suppose passing --enable-libtool would work, but I haven't tested. Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH 1/4] package/bind: enable static build 2019-04-24 20:34 ` [Buildroot] [PATCH 1/4] package/bind: enable static build Thomas Petazzoni @ 2019-04-24 20:46 ` Fabrice Fontaine 0 siblings, 0 replies; 9+ messages in thread From: Fabrice Fontaine @ 2019-04-24 20:46 UTC (permalink / raw) To: buildroot Hello Thomas, Le mer. 24 avr. 2019 ? 22:34, Thomas Petazzoni <thomas.petazzoni@bootlin.com> a ?crit : > > Hello Fabrice, > > On Tue, 23 Apr 2019 23:24:03 +0200 > Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote: > > > Static build has been disabled in 2014 with commit > > 6045904752b06a8b8e52ba8fc2e49a8548964e8d however bind can be built > > statically thanks to --without-dlopen so enable it back > > > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> > > --- > > ...n_driver.c-fix-build-without-dlfcn.h.patch | 28 +++++++++++++++++++ > > package/bind/Config.in | 5 ++-- > > package/bind/bind.mk | 4 ++- > > 3 files changed, 33 insertions(+), 4 deletions(-) > > create mode 100644 package/bind/0002-dlz_open_driver.c-fix-build-without-dlfcn.h.patch > > The series looks good in principle, but sadly the following defconfig: > > BR2_arm=y > BR2_TOOLCHAIN_EXTERNAL=y > BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y > BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y > BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2019.02-rc1.tar.bz2" > BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y > BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y > BR2_TOOLCHAIN_EXTERNAL_LOCALE=y > # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set > BR2_TOOLCHAIN_EXTERNAL_CXX=y > BR2_INIT_NONE=y > BR2_SYSTEM_BIN_SH_NONE=y > # BR2_PACKAGE_BUSYBOX is not set > BR2_PACKAGE_DHCP=y > # BR2_TARGET_ROOTFS_TAR is not set > > fails to build with: > > configure: error: Cannot find static libraries at /home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib > make[1]: *** [package/pkg-generic.mk:231: /home/thomas/projets/buildroot/output/build/dhcp-4.4.1/.stamp_configured] Error 1 > > Looking at configure.ac sheds some light: > > AC_ARG_ENABLE(libtool, > AS_HELP_STRING([--enable-libtool], > [use GNU libtool for dynamic shared libraries (default is no).]), > want_libtool="$enableval") > > if test "$use_libbind" != "no"; then > if test "$want_libtool" = "yes" -a \ > ! -f "$use_libbind/lib/libisc.la" > then > AC_MSG_ERROR([Cannot find dynamic libraries at $use_libbind/lib]) > fi > if test "$want_libtool" = "no" -a \ > ! -f "$use_libbind/lib/libisc.a" > then > AC_MSG_ERROR([Cannot find static libraries at $use_libbind/lib]) > fi > fi > > We are not passing --enable-libtool, so the code checks is libisc.a > exists, and it doesn't because a default build is BR2_SHARED_LIBS=y, > and therefore bind doesn't build/install any static library. > > I suppose passing --enable-libtool would work, but I haven't tested. OK, I'll test it and send a v2. > > Best regards, > > Thomas > -- > Thomas Petazzoni, CTO, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com Fabrice ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-04-25 15:56 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-04-23 21:24 [Buildroot] [PATCH 1/4] package/bind: enable static build Fabrice Fontaine 2019-04-23 21:24 ` [Buildroot] [PATCH 2/4] package/bind: remove threads dependency Fabrice Fontaine 2019-04-23 21:24 ` [Buildroot] [PATCH 3/4] package/bind: don't enable server by default Fabrice Fontaine 2019-04-24 20:36 ` Thomas Petazzoni 2019-04-24 20:56 ` Arnout Vandecappelle 2019-04-25 15:56 ` Yann E. MORIN 2019-04-23 21:24 ` [Buildroot] [PATCH 4/4] package/dhcp: use system bind Fabrice Fontaine 2019-04-24 20:34 ` [Buildroot] [PATCH 1/4] package/bind: enable static build Thomas Petazzoni 2019-04-24 20:46 ` Fabrice Fontaine
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox