Skip to content

Conversation

@matjon
Copy link

@matjon matjon commented Jun 20, 2025

When upgrading packages manually, like:

    opkg install bind-dig

the bind-libs package is not upgraded, which results in problems when running the program, for example:

    root@OpenWrt:~# dig
    Error loading shared library libisc-9.20.10.so: No such file or directory (needed by /usr/bin/dig)
    Error loading shared library libdns-9.20.10.so: No such file or directory (needed by /usr/bin/dig)
    Error loading shared library libisccfg-9.20.10.so: No such file or directory (needed by /usr/bin/dig)
    Error relocating /usr/bin/dig: cfg_map_getname: symbol not found
    Error relocating /usr/bin/dig: irs_resconf_getndots: symbol not found
    Error relocating /usr/bin/dig: isc_managers_destroy: symbol not found
    Error relocating /usr/bin/dig: dns_fixedname_init: symbol not found
    Error relocating /usr/bin/dig: isc_nm_read: symbol not found
    Error relocating /usr/bin/dig: dns_rdata_init: symbol not found
    Error relocating /usr/bin/dig: isc_random_uniform: symbol not found
    [...]

This has happened to me twice on 24.10.

To fix this, enforce that the version of bind-libs matches the version of any dependent packages. Use the same approach as in net/knot/Makefile: make the dependency be present twice, once in DEPENDS, the other one in EXTRA_DEPENDS.


📦 Package Details

Maintainer: @nmeyerhans

Description:
bind: prevent mismatch of bind-libs version


🧪 Run Testing Details

  • OpenWrt Version: SNAPSHOT (r30114-9b777547be)
  • OpenWrt Target/Subtarget: x86/64
  • OpenWrt Device: Generic x86/64

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

SECTION:=net
CATEGORY:=Network
DEPENDS:=+bind-libs +@OPENSSL_WITH_EC
EXTRA_DEPENDS:=bind-libs (=$(PKG_VERSION)-r$(PKG_RELEASE))
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need to be in EXTRA_DEPENDS, or can the version constraint be added in DEPENDS?

Copy link
Author

Choose a reason for hiding this comment

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

https://openwrt.org/docs/guide-developer/packages#dependency_types suggests that EXTRA_DEPENDS is necessary.

When I try to use something like

  DEPENDS:=+bind-libs(=$(PKG_VERSION)-r$(PKG_RELEASE)) +@OPENSSL_WITH_EC

or

  DEPENDS:=+bind-libs (=$(PKG_VERSION)-r$(PKG_RELEASE)) +@OPENSSL_WITH_EC

I get immediately errors similar to:

WARNING: Makefile 'package/feeds/packages/bind/Makefile' has a dependency on 'bind-libs(=9.20.9-r4)', which does not exist

@matjon matjon force-pushed the bind_enforce_dependencies branch from 16d2d4e to 0dfcc8c Compare August 29, 2025 22:50
@matjon
Copy link
Author

matjon commented Aug 29, 2025

Hello,

I have updated and rebased the MR. I have realized that other internal bind dependencies also need matching package versions. So, in the newer MR, I have added the EXTRA_DEPENDS variables to defines for bind-server-filter-aaaa and bind-tools.

Also, I have retested on latest snapshot (r30900-dcf6e9b0ed).

@Neustradamus
Copy link

@matjon: Do you know why it has not been merged?

@nmeyerhans
Copy link
Contributor

@matjon: Do you know why it has not been merged?

There was other work going on in the bind package. This change should be rebased, then we can look at merging it.

@matjon matjon force-pushed the bind_enforce_dependencies branch from 0dfcc8c to a99aff7 Compare December 27, 2025 14:46
@matjon
Copy link
Author

matjon commented Dec 27, 2025

Hello,

I have rebased, updated and retested this change (on snapshot r32406-00e6c18a93). I would like to ask you to look at it and see if it can now be merged.

Cc: @nmeyerhans @pprindeville

By the way: merry Christmas and happy new year!

When upgrading packages manually, like:

        apk add bind-dig

the bind-libs package is not upgraded automatically, which results in problems when
running the program, for example:

        root@OpenWrt:~# dig
        Error loading shared library libisc-9.20.10.so: No such file or directory (needed by /usr/bin/dig)
        Error loading shared library libdns-9.20.10.so: No such file or directory (needed by /usr/bin/dig)
        Error loading shared library libisccfg-9.20.10.so: No such file or directory (needed by /usr/bin/dig)
        Error relocating /usr/bin/dig: cfg_map_getname: symbol not found
        Error relocating /usr/bin/dig: irs_resconf_getndots: symbol not found
        Error relocating /usr/bin/dig: isc_managers_destroy: symbol not found
        Error relocating /usr/bin/dig: dns_fixedname_init: symbol not found
        Error relocating /usr/bin/dig: isc_nm_read: symbol not found
        Error relocating /usr/bin/dig: dns_rdata_init: symbol not found
        Error relocating /usr/bin/dig: isc_random_uniform: symbol not found
        [...]

This has happened to me twice on OpenWRT 24.10.

To fix this, enforce that the version of bind-libs matches the version
of any dependent packages. Use the same approach as in
net/knot/Makefile: make the dependency be present twice, once in the
DEPENDS variable, the other one in the EXTRA_DEPENDS variable.

Also, add an explicit EXTRA_DEPENDS variable to other internal
dependencies. For example, versions of the bind-server-filter-aaaa and
bind-server packages must match.

Tested on snapshot, on x86/64.

Signed-off-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
@BKPepe BKPepe force-pushed the bind_enforce_dependencies branch from a99aff7 to edd9c13 Compare December 29, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants