dhcp issueshttps://gitlab.isc.org/isc-projects/dhcp/-/issues2022-01-20T10:30:13Zhttps://gitlab.isc.org/isc-projects/dhcp/-/issues/100Building with bind 9.162022-01-20T10:30:13ZTomek MrugalskiBuilding with bind 9.16[Ubuntu 20.04 release notes](https://wiki.ubuntu.com/FocalFossa/ReleaseNotes#Bind_9.16) mention a problem with building isc-dhcp with bind 9.16. Depending on how complex the fix is, this may be something we could possibly fix.[Ubuntu 20.04 release notes](https://wiki.ubuntu.com/FocalFossa/ReleaseNotes#Bind_9.16) mention a problem with building isc-dhcp with bind 9.16. Depending on how complex the fix is, this may be something we could possibly fix.4.4.3-beta1https://gitlab.isc.org/isc-projects/dhcp/-/issues/114Update BIND9 to current 9.11.192022-01-12T14:06:54ZThomas MarkwalderUpdate BIND9 to current 9.11.19We currently build against 9.11.14, see if we can update.We currently build against 9.11.14, see if we can update.4.4.3-beta1Thomas MarkwalderThomas Markwalderhttps://gitlab.isc.org/isc-projects/dhcp/-/issues/171Issue in bind tarball2022-01-20T10:30:53ZMaloy GhoshIssue in bind tarballThe binary tarball of bind-9.11.14 contains this code (`bind-9.11.14/lib/isc/stats.c:300`)
```
static inline void
setcounter(isc_stats_t *stats,
const isc_statscounter_t counter,
const uint64_t value)
{
#if ISC_PLA...The binary tarball of bind-9.11.14 contains this code (`bind-9.11.14/lib/isc/stats.c:300`)
```
static inline void
setcounter(isc_stats_t *stats,
const isc_statscounter_t counter,
const uint64_t value)
{
#if ISC_PLATFORM_HAVESTDATOMIC
atomic_store_explicit(&stats->counters[counter], value,
memory_order_relaxed);
#elif ISC_STATS_HAVEATOMICQ
isc_atomic_storeq((int64_t *)&stats->counters[counter], value);
#else
# if ISC_STATS_USEMULTIFIELDS
isc_atomic_store((int32_t *)&stats->counters[counter].hi,
(uint32_t)((value >> 32) & 0xffffffff));
isc_atomic_store((int32_t *)&stats->counters[counter].lo,
(uint32_t)(value & 0xffffffff));
# else
stats->counters[counter] = val;
# endif
#endif
}
```
It is the `stats->counters[counter] = val` line, results in error during cross-compilation using arm toolchains. It should be `stats->counters[counter] = value`4.4.3-beta1https://gitlab.isc.org/isc-projects/dhcp/-/issues/192Failure to build stats.c in bind library's libisc2022-01-20T10:32:12ZPhilip PrindevilleFailure to build stats.c in bind library's libisc**Describe the bug**
Failure to compile the bind library 9.11.14 when building on OpenWRT.
**To Reproduce**
Steps to reproduce the behavior:
1. Create a build environment for OpenWRT
2. Select `CONFIG_TARGET_x86`, `CONFIG_TARGET_x86_64`...**Describe the bug**
Failure to compile the bind library 9.11.14 when building on OpenWRT.
**To Reproduce**
Steps to reproduce the behavior:
1. Create a build environment for OpenWRT
2. Select `CONFIG_TARGET_x86`, `CONFIG_TARGET_x86_64`, `CONFIG_PACKAGE_isc-dhcp-server-ipv6`.
3. Run `make defconfig oldconfig && make world`
4. See error
**Expected behavior**
Should build with no errors.
**Environment:**
- ISC DHCP 4.4.2-P1
- OS: Ubuntu 20.04.2 LTS (x86_64)
- Configure args: `--enable-paranoia --disable-dependency-tracking --with-randomdev=/dev/urandom ac_cv_file__dev_random=yes --enable-dhcpv6`
**Additional Information**
My `config.report` says:
```
ISC DHCP source configure results:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Package:
Name: DHCP
Version: 4.4.2-P1
C Compiler: x86_64-openwrt-linux-musl-gcc
Flags:
DEFS: -DHAVE_CONFIG_H
CFLAGS: -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fmacro-prefix-map=/home/philipp/lede/build_dir/target-x86_64_musl/isc-dhcp-ipv6/dhcp-4.4.2-P1=dhcp-4.4.2-P1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -fcommon -I$(top_srcdir)/includes -I/home/philipp/lede/build_dir/target-x86_64_musl/isc-dhcp-ipv6/dhcp-4.4.2-P1/bind/include
DHCP versions: DHCPv4 and DHCPv6
Features:
debug: no
failover: yes
execute: yes
binary-leases: no
dhcpv6: yes
delayed-ack: yes
dhcpv4o6: no
relay-port: no
Developer:
ATF unittests : no
```
Seeing the following build failure:
```
Building isc library in /home/philipp/lede/build_dir/target-x86_64_musl/isc-dhcp-ipv6/dhcp-4.4.2-P1/bind/bind-9.11.14/lib/isc
stats.c: In function 'setcounter':
stats.c:300:29: error: 'val' undeclared (first use in this function); did you mean 'value'?
stats->counters[counter] = val;
^~~
value
stats.c:300:29: note: each undeclared identifier is reported only once for each function it appears in
stats.c:286:20: warning: unused parameter 'value' [-Wunused-parameter]
const uint64_t value)
~~~~~~~~~~~~~~~^~~~~
make[5]: *** [Makefile:290: stats.o] Error 1
```
**Some initial questions**
- Since the file with the error comes from a tarball inside a tarball that gets unpacked during the pack, it's not easy to patch after the initial unpack...
**Is your feature request related to a problem? Please describe.**
N/a
**Describe the solution you'd like**
Sources should build out-of-the-box.
**Describe alternatives you've considered**
N/A
**Additional context**
Fix seems trivial:
```
--- a/dhcp-4.4.2-P1/bind/bind-9.11.14/lib/isc/stats.c
+++ b/dhcp-4.4.2-P1/bind/bind-9.11.14/lib/isc/stats.c
@@ -297,7 +297,7 @@ setcounter(isc_stats_t *stats,
isc_atomic_store((int32_t *)&stats->counters[counter].lo,
(uint32_t)(value & 0xffffffff));
# else
- stats->counters[counter] = val;
+ stats->counters[counter] = value;
# endif
#endif
}
```
**Funding its development**
Are you able and willing to participate financially in the development costs?
- No
**Participating in development**
Are you willing to participate in the feature development?
- Yes
Are you willing to take part in the design discussions?
- Yes
Are you willing to test an unreleased engineering code?
- Yes
**Contacting you**
How can ISC reach you to discuss this matter further?
`philipp@redfish-solutions.com`4.4.3-beta1https://gitlab.isc.org/isc-projects/dhcp/-/issues/218Updated bundled Bind9 to 9.11.362022-01-20T10:32:13ZPhilip PrindevilleUpdated bundled Bind9 to 9.11.36**Describe the bug**
DHCP won't build on OpenWRT due to bind/lib/isc/stats.c being broken in 9.11.14.
**To Reproduce**
Steps to reproduce the behavior:
1. Create an OpenWRT build environment (Ubuntu 20 preferred)
2. Tweak feeds/packages...**Describe the bug**
DHCP won't build on OpenWRT due to bind/lib/isc/stats.c being broken in 9.11.14.
**To Reproduce**
Steps to reproduce the behavior:
1. Create an OpenWRT build environment (Ubuntu 20 preferred)
2. Tweak feeds/packages/net/isc-dhcp/Makefile to use `PKG_VERSION:=4.4.2-P2`, `PKG_RELEASE:=1`, and the correct `PKG_HASH` for the tarball.
3. Enable `CONFIG_PACKAGE_isc-dhcp-server-ipv6=y` in your `.config` file.
4. Run `make world`
**Expected behavior**
Everything should build
**Environment:**
- ISC DHCP version: 4.4.2-P2
- OS: Ubuntu 20.04 cross-building OpenWRT `master`
- `CONFIG_PACKAGE_isc-dhcp-server-ipv6=y` enabled
**Additional Information**
Fixed with [fix variable name in conditional block](https://github.com/isc-projects/bind9/commit/261c84d91d1b4581df9f7f0ec031908299de7726) which hit v9_11_15.
**Some initial questions**
- This issue has been brought up on dhcp-workers previously but is unresolved.
**Is your feature request related to a problem? Please describe.**
Unable to build newer releases for OpenWRT (I'm the package owner on that distro).
**Describe the solution you'd like**
I'd like it to be buildable again.
**Describe alternatives you've considered**
None are applicable since they all involve applying patches to a file that gets extracted from a tarball, which isn't supported by the OpenWRT build machinery.
**Additional context**
See discussion on dhcp-workers mailing list.
**Funding its development**
I can contribute support through providing and testing the fix.
**Participating in development**
See previous.
**Contacting you**
See my gitlab account for an email address.
**UPDATE**: The original ticket was to update to 9.11.15, but the changes now update to 9.11.36.4.4.3-beta1Thomas MarkwalderThomas Markwalder