Skip to content

Commit

Permalink
package/dhcp: build internal bind tool gen for host (not target)
Browse files Browse the repository at this point in the history
Building gen tool of the internal (bundled) bind needs to be for host, not target
Switch to use internal build in commit 0c8dd6e
overlooked this.

Building dns library in /home/autobuild/autobuild/instance-13/output-1/build/dhcp-4.4.2-P1/bind/bind-9.11.14/lib/dns
/bin/sh: line 1: ./gen: cannot execute binary file: Exec format error

Thus, we need to set not just CC, but also CFLAGS etc. otherwise the
target CFLAGS etc. will be inherited from top-level configure.

Fixes:
 - http://autobuild.buildroot.org/results/da6fd904d1a6bae73b6ff89dd008de1f459bb7d7/

Signed-off-by: Tim Hammer <Tim.Hammer@orolia.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
  • Loading branch information
tdhammer authored and arnout committed Apr 12, 2022
1 parent 9e4b738 commit 7c814fe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion package/dhcp/dhcp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ 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'
DHCP_BIND_EXTRA_CONFIG = BUILD_CC='$(TARGET_CC)'

DHCP_BIND_EXTRA_CONFIG = \
BUILD_CC='$(HOSTCC)' \
BUILD_CFLAGS='$(HOST_CFLAGS)' \
BUILD_CPPFLAGS='$(HOST_CPPFLAGS)' \
BUILD_LDFLAGS='$(HOST_LDFLAGS)'

DHCP_CONF_ENV += ac_cv_prog_AWK=$(HOST_DIR)/bin/gawk

Expand Down

1 comment on commit 7c814fe

@joerg-ruegen
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compiling now successful , but now missing libirs.so.161
May 09 07:02:45 mcg-gw-3300000001 systemd[1]: Starting DHCP server...
May 09 07:02:45 mcg-gw-3300000001 dhcpd[2413]: /usr/sbin/dhcpd: error while loading shared libraries: libirs.so.161: cannot open shared object file: No such file or directory
the missing lib was built, but not deployed
hering@05-johe-pc:/home/Public/BuildRoot$ ls -l Machine/mdp-ls1046s510/build/dhcp-4.4.2-P1/bind/bind-9.11.14/lib/irs/.libs/
insgesamt 168
-rw-r--r-- 1 jhering jhering 6504 Mai 9 09:18 context.o
-rw-r--r-- 1 jhering jhering 6784 Mai 9 09:18 dnsconf.o
-rw-r--r-- 1 jhering jhering 2936 Mai 9 09:18 gai_strerror.o
-rw-r--r-- 1 jhering jhering 16768 Mai 9 09:18 getaddrinfo.o
-rw-r--r-- 1 jhering jhering 5304 Mai 9 09:18 getnameinfo.o
-rw-r--r-- 1 jhering jhering 49590 Mai 9 09:18 libirs.a
lrwxrwxrwx 1 jhering jhering 12 Mai 9 09:18 libirs.la -> ../libirs.la
-rw-r--r-- 1 jhering jhering 1032 Mai 9 09:18 libirs.lai
lrwxrwxrwx 1 jhering jhering 17 Mai 9 09:18 libirs.so -> libirs.so.161.0.0
lrwxrwxrwx 1 jhering jhering 17 Mai 9 09:18 libirs.so.161 -> libirs.so.161.0.0
-rwxr-xr-x 1 jhering jhering 45688 Mai 9 09:18 libirs.so.161.0.0
-rw-r--r-- 1 jhering jhering 8872 Mai 9 09:18 resconf.o
-rw-r--r-- 1 jhering jhering 1288 Mai 9 09:18 version.o

Please sign in to comment.