> With ld.elf_so compiled with DEBUG and LD_DEBUG set in the > environment, attempts at executing dig out of the build directory > is met with > > _rtld_error: /usr/local/src/bind-9.21.12/build-dir/.//libdns-9.21.12.so: > wrong number of segments (4 != 2) > > Applying the change from > > https://mail-index.netbsd.org/source-changes/2023/01/06/msg142652.html > > to ld.elf_so and rebuild & re-install fixes both issues [...]
It looks like the use of "-Wl,-z,separate-code" is the one which is responsible for bumping the number of LOAD segments in the shared libraries from 2 to 4. There are several paths out of that situation: 1) On NetBSD, insist on NetBSD >= 11.0_BETA. The fix above is part of what's in 11.0_BETA. I've not verified this myself yet. 2) On NetBSD, and on NetBSD < 11.0_BETA, drop the usage of that linker option. Requires meson magic above my current abilities. 2b) Or ... insist that users otherwise matching #2 manually edit out that option from meson.build. Obviously that's a less desireable "solution". 3) Apply the above patch to netbsd-10, and wait for the next 10.x release for the fix availability. There's a non-zero chance that this change interacts badly with other features (TLS on arm, e.g.) that it's not a straight-forward solution to apply this fix without "more engineering". The focus in the NetBSD camp is more on netbsd-11 and getting that into a release-able form, and getting the next 10.x release out the door may take quite a while if it ever happens. 4) Move the build setup for BIND 9.21.x to e.g. pkgsrc-wip and eventually to pkgsrc proper where local patches can be applied, effectuating e.g. #2b above, and indicate that's where the NetBSD build setup for BIND 9.21.x is to be maintained. Help with #2 would be appreciated, but as you see, there are other options. Regards, - Håvard -- Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list.