Skip to content

Commit

Permalink
package/dhcp: fix cross build
Browse files Browse the repository at this point in the history
Fixes build error

Building dns library in /home/bernd/buildroot/br4/output/build/dhcp-4.4.3-
P1/bind/bind-9.11.36/lib/dns
./gen: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found
(required by ./gen)
make[4]: *** [Makefile:601: include/dns/enumtype.h] Error 1
make[3]: *** [Makefile:595: include] Error 2

with this defconfig

BR2_x86_64=y
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
BR2_PACKAGE_DHCP=y

Please note that this build error only occurs when the target and the
host system have the same arch. For example this defconfig builds fine:

BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
BR2_PACKAGE_DHCP=y

on a Debian 12 x86_64 host using glibc-2.36:

$ /lib/ld-linux.so.2  --version
ld.so (Debian GLIBC 2.36-9+deb12u1) stable release version 2.36.

The error occurs since buildroot commit 34f8d87 which bumped glibc
from 2.37 to 2.38.

This patch is inspired by the Yocto Project:
https://patchwork.yoctoproject.org/project/oe/patch/[email protected]/

Signed-off-by: Bernd Kuhls <[email protected]>
Signed-off-by: Thomas Petazzoni <[email protected]>
  • Loading branch information
bkuhls authored and tpetazzoni committed Nov 4, 2023
1 parent 5a0f41e commit e1dc10b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions package/dhcp/dhcp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ DHCP_CONF_ENV = \
CFLAGS='$(TARGET_CFLAGS) -DISC_CHECK_NONE=1'

DHCP_BIND_EXTRA_CONFIG = \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_TARGET_NAME) \
--target=$(GNU_TARGET_NAME) \
BUILD_CC='$(HOSTCC)' \
BUILD_CFLAGS='$(HOST_CFLAGS)' \
BUILD_CPPFLAGS='$(HOST_CPPFLAGS)' \
Expand Down

0 comments on commit e1dc10b

Please sign in to comment.