New comment by manneorama on void-packages repository https://github.com/void-linux/void-packages/pull/26000#issuecomment-751984525 Comment: Currently trying to test this rebased on top of the current void-packages master (on top of `f66d93e241420fbb17f8c1fffadf897bba676382` to be specific). Kernel package builds fine but during building of base-system I run into a strange error while building `elfutils`. ``` Making all in debuginfod CXXLD debuginfod /usr/bin/ld: ../libelf/libelf.so: undefined reference to symbol 'inflateEnd' /usr/bin/ld: /lib64/libz.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: *** [Makefile:581: debuginfod] Error 1 make[1]: *** [Makefile:502: all-recursive] Error 1 make: *** [Makefile:418: all] Error 2 => ERROR: elfutils-0.182_4: do_build: '${make_cmd} ${makejobs} ${make_build_args} ${make_build_target}' exited with 2 => ERROR: in do_build() at common/build-style/gnu-configure.sh:13 ``` I'm not exactly sure where to start digging, but I will do my best. Any help is appreciated. **UPDATE:** Building `libelf` from master at `f66d93e241420fbb17f8c1fffadf897bba676382` works fine. ~~So there may be something in these two commits causing the issue.~~ **UPDATE 2:** Building `libelf` standalone (`./xbps-src -a aarch64 pkg libelf`) works fine even from the rebased branch so I'm guessing this is because, as opposed to using `-N pkg base-system`, the standalone build will use upstream packages for dependency resolution instead of local ones? **UPDATE 3:** Manually adding `-lz` to `masterdir/builddir/elfutils-0.182/debuginfod/Makefile +475` hacks around the missing symbol above. But then new errors, related to `zstd` instead, appears. ``` Making all in debuginfod CXXLD debuginfod /usr/bin/ld: ../libdw/libdw.so: undefined reference to symbol 'ZSTD_decompressStream' /usr/bin/ld: /lib64/libzstd.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: *** [Makefile:581: debuginfod] Error 1 make[1]: *** [Makefile:502: all-recursive] Error 1 make: *** [Makefile:418: all] Error 2 => ERROR: elfutils-0.182_4: do_build: '${make_cmd} ${makejobs} ${make_build_args} ${make_build_target}' exited with 2 => ERROR: in do_build() at common/build-style/gnu-configure.sh:19 ``` I can't quickly hack around this because adding `-lzstd` the linker is unable to find the lib. Currently stuck. As far as I can determine, all packages relevant to this issue define the correct dependencies. But I’m unsure how transitive deps are handled and where/how link flags and options are defined/inherited.