Skip to contentSkip to conversation

package/dhcp: always disable zlib in bind library

PATCH New Fabrice Fontaine 2 participants 5 messages Apr 21, 2019 – Apr 23, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/dhcp: always disable zlib in bind library

Fixes:
- http://autobuild.buildroot.org/results/62df959193b7737d436162f93af6b89ea542f8f2

---
 package/dhcp/dhcp.mk | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
package/dhcp/dhcp.mk +4 -6
index 812e4870b9..aa8f66345e 100644
@@ -40,16 +40,14 @@ DHCP_MAKE_ENV = \
 	BUILD_CPPFLAGS="$(HOST_CPPFLAGS)" \
 	BUILD_LDFLAGS="$(HOST_LDFLAGS)"
 
+#?Always disable zlib in bind library (like all other dependencies, see
+#?bind/Makefile.in)
+DHCP_BIND_CONF_OPTS = --without-zlib
+
 ifeq ($(BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK),y)
 DHCP_CONF_OPTS += --enable-delayed-ack
 endif
 
-ifeq ($(BR2_PACKAGE_ZLIB),y)
-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
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 package/dhcp: always disable zlib in bind library

Hello Fabrice,

package/dhcp/dhcp.mk DHCP_MAKE_ENV = \ · line 44

Quoted 2 lines · On Sun, 21 Apr 2019 19:10:39 +0200 Fabrice Fontaine…
package/dhcp/dhcp.mk +2 -0
+#?Always disable zlib in bind library (like all other dependencies, see
+#?bind/Makefile.in)

This reason looked suspicious to me, so I investigated, and indeed, I think it's not the right fix.

package/dhcp/dhcp.mk DHCP_MAKE_ENV = \ · line 47

Quoted 7 lines
package/dhcp/dhcp.mk +2 -1
+DHCP_BIND_CONF_OPTS = --without-zlib
+
 ifeq ($(BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK),y)
 DHCP_CONF_OPTS += --enable-delayed-ack
 endif
 
-ifeq ($(BR2_PACKAGE_ZLIB),y)

The right fix is:

DHCP_DEPENDENCIES += zlib

package/dhcp/dhcp.mk DHCP_MAKE_ENV = \ · line 51

Quoted 4 lines
package/dhcp/dhcp.mk +0 -4
-DHCP_BIND_CONF_OPTS += --with-zlib
-else
-DHCP_BIND_CONF_OPTS += --without-zlib
-endif

Thanks to this, zlib is properly built before dhcp, and everything works fine.

I committed a fix that does this.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 package/dhcp: always disable zlib in bind library

Hello Thomas,

Le lun. 22 avr. 2019 ? 22:39, Thomas Petazzoni
<[email protected]> a ?crit :

Quoted 24 lines

Hello Fabrice,

Review

Quoted 2 lines · On Sun, 21 Apr 2019 19:10:39 +0200 Fabrice Fontaine…
(quoted diff) +2 -0
+# Always disable zlib in bind library (like all other dependencies, see
+# bind/Makefile.in)

This reason looked suspicious to me, so I investigated, and indeed, I think it's not the right fix.

package/dhcp/dhcp.mk DHCP_MAKE_ENV = \ · line 47

Quoted 7 lines
package/dhcp/dhcp.mk +2 -1
+DHCP_BIND_CONF_OPTS = --without-zlib
+
 ifeq ($(BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK),y)
 DHCP_CONF_OPTS += --enable-delayed-ack
 endif
 
-ifeq ($(BR2_PACKAGE_ZLIB),y)

The right fix is:

DHCP_DEPENDENCIES += zlib

Quoted 7 lines

package/dhcp/dhcp.mk DHCP_MAKE_ENV = \ · line 51

Quoted 4 lines
package/dhcp/dhcp.mk +0 -4
-DHCP_BIND_CONF_OPTS += --with-zlib
-else
-DHCP_BIND_CONF_OPTS += --without-zlib
-endif

Thanks to this, zlib is properly built before dhcp, and everything works fine.

This is strange because I think I also tried this fix and the build failure was not fixed because if no value is provided to zlib, the configure script will try to find zlib header on host (see dhcp/bind/bind-9.11.2-P1/configure.in):

    auto|yes)
        for d in /usr /usr/local /opt/local
        do
            if test -f "${d}/include/zlib.h"
            then
                if test ${d} != /usr
                then
                    zlib_cflags="-I ${d}/include"
                    LIBS="$LIBS -L${d}/lib"
                fi
                have_zlib="yes"
            fi
        done
        ;;

And obviously, build will fail if those headers are found on host. So I think, we should also set --with-zlib=$(STAGING_DIR)/usr but it was also failing.
I'll investigate a little more to find why if you think that disabling zlib is not a good solution.

Quoted 10 lines

I committed a fix that does this.

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Best Regards,

Fabrice

#3 lore raw

PATCH 1/1 package/dhcp: always disable zlib in bind library

Hello Fabrice,

Quoted 22 lines · On Mon, 22 Apr 2019 23:19:04 +0200 Fabrice Fontaine…
Quoted 2 lines

Thanks to this, zlib is properly built before dhcp, and everything works fine.

This is strange because I think I also tried this fix and the build failure was not fixed because if no value is provided to zlib, the configure script will try to find zlib header on host (see dhcp/bind/bind-9.11.2-P1/configure.in):

    auto|yes)
        for d in /usr /usr/local /opt/local
        do
            if test -f "${d}/include/zlib.h"
            then
                if test ${d} != /usr
                then
                    zlib_cflags="-I ${d}/include"
                    LIBS="$LIBS -L${d}/lib"
                fi
                have_zlib="yes"
            fi
        done
        ;;
Quoted 3 lines

And obviously, build will fail if those headers are found on host. So I think, we should also set --with-zlib=$(STAGING_DIR)/usr but it was also failing.

Hum, OK, I see. I do have the Zlib development files installed on my system though, and /usr/include/zlib.h exists.

Quoted 2 lines

I'll investigate a little more to find why if you think that disabling zlib is not a good solution.

OK. Actually, it was not really well explained in your commit log / comment what the problem was. It felt like "it doesn't work, so let's take the easy route". If indeed the zlib detection is too broken, I'm perfectly fine with disabling it. But the reason is not "let's disable it like other dependencies".

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH 1/1 package/dhcp: always disable zlib in bind library

Hello Thomas,

Le mar. 23 avr. 2019 ? 09:28, Thomas Petazzoni
<[email protected]> a ?crit :

Quoted 35 lines

Hello Fabrice,

Quoted 22 lines · On Mon, 22 Apr 2019 23:19:04 +0200 Fabrice Fontaine…
Quoted 2 lines

Thanks to this, zlib is properly built before dhcp, and everything works fine.

This is strange because I think I also tried this fix and the build failure was not fixed because if no value is provided to zlib, the configure script will try to find zlib header on host (see dhcp/bind/bind-9.11.2-P1/configure.in):

    auto|yes)
        for d in /usr /usr/local /opt/local
        do
            if test -f "${d}/include/zlib.h"
            then
                if test ${d} != /usr
                then
                    zlib_cflags="-I ${d}/include"
                    LIBS="$LIBS -L${d}/lib"
                fi
                have_zlib="yes"
            fi
        done
        ;;
Quoted 3 lines

And obviously, build will fail if those headers are found on host. So I think, we should also set --with-zlib=$(STAGING_DIR)/usr but it was also failing.

Hum, OK, I see. I do have the Zlib development files installed on my system though, and /usr/include/zlib.h exists.

Quoted 8 lines
Quoted 2 lines

I'll investigate a little more to find why if you think that disabling zlib is not a good solution.

OK. Actually, it was not really well explained in your commit log / comment what the problem was. It felt like "it doesn't work, so let's take the easy route". If indeed the zlib detection is too broken, I'm perfectly fine with disabling it. But the reason is not "let's disable it like other dependencies".

I'll send a v2 this evening to fix the zlib detection or to improve the commit message.

Quoted 8 lines

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Best Regards,

Fabrice