Skip to content

fix: declare missing RPC build dependencies - #90

Open
ZedingZhang wants to merge 1 commit into
bytedance:masterfrom
ZedingZhang:fix/package-libtirpc-build-deps
Open

fix: declare missing RPC build dependencies#90
ZedingZhang wants to merge 1 commit into
bytedance:masterfrom
ZedingZhang:fix/package-libtirpc-build-deps

Conversation

@ZedingZhang

Copy link
Copy Markdown

Fixes #89.

Why

configure.ac unconditionally requires the libtirpc headers and library, but neither package recipe declared the corresponding development package. A clean build root created from those recipes therefore cannot satisfy the configure checks.

While validating the RPM change in a clean Rocky 8 container, configure advanced past libtirpc and exposed the same metadata drift for the required libnsl check. volcinstall.sh already installs libnsl2-devel on Rocky, but the RPM spec did not declare it.

What changed

  • Add libtirpc-dev to Debian Build-Depends.
  • Add libtirpc-devel to RPM BuildRequires.
  • Add libnsl2-devel for RHEL-family version 8 and newer, while keeping the existing CentOS 6/7 dependency set intact.

Validation

Clean-container validation passed in both jobs:

  • Ubuntu 20.04: parsed and installed debian/control build dependencies, ran dpkg-checkbuilddeps, ./bootstrap.sh, make -j2, and make check.
  • Rocky 8: parsed and installed the spec's BuildRequires, then ran ./bootstrap.sh, make -j2, and make check.

The validation commit used the exact final contents of debian/control and spec/volclava.spec; its temporary workflow is intentionally excluded from this PR.

@CLAassistant

CLAassistant commented Aug 31, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@qinan-cn
qinan-cn requested a review from limingze-ste August 31, 2026 02:49
Comment thread debian/control
Priority: optional
Maintainer: Mingze Li <limingze.jiayou@bytedance.com>; Guangbo Shu <shuguangbo@bytedance.com>; Nan Qi <qinan.cn@bytedance.com>
Build-Depends: autoconf, automake, tcl-dev, libncurses-dev
Build-Depends: autoconf, automake, tcl-dev, libncurses-dev, libtirpc-dev

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Starting from version 2.32, glibc removed the built-in Sun RPC, which is now provided by the standalone libtirpc library. For Ubuntu:
Ubuntu | Version | glibc Version | xdr.h SourcePath
———————————————————————————————————————
20.04 and earlier |≤ 2.31 |libc6-dev |/usr/include/rpc/xdr.h
———————————————————————————————————————
21.10 / 22.04 / 24.04|≥ 2.34 |libtirpc-dev |/usr/include/tirpc/rpc/xdr.h

I think we need to consider compatibility both in low version and high Ubuntu version for libtirpc-dev. e.g. adding dependency checking in volcinstall.sh instead of here. Please let Mingze give more reviewing.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks, this is a good catch. I ran a clean Ubuntu 20.04/22.04/24.04 matrix to verify the boundary rather than assuming one dependency set works everywhere: https://github.com/ZedingZhang/volclava/actions/runs/33379130227

  • 20.04 / glibc 2.31: libc6-dev owns /usr/include/rpc/xdr.h; configure, build, and tests pass without libtirpc-dev.
  • 22.04 / glibc 2.35: the base toolchain currently pulls libnsl-dev and libtirpc-dev through libc6-dev, so the build also passes without a direct addition here.
  • 24.04 / glibc 2.39: the base toolchain no longer provides either RPC header. Configure first fails on rpc/xdr.h; adding only libtirpc-dev then fails on the required libnsl check; adding libnsl-dev as well completes configure, make, and make check.

So I agree that an unconditional libtirpc-dev in debian/control is redundant for the supported 20.04 environment and incomplete for 24.04.

If DEB package builds remain 20.04-only, my proposed revision is to remove this Debian metadata change and update volcinstall.sh after installing the base Ubuntu development packages: when /usr/include/rpc/xdr.h is absent, install both libtirpc-dev and libnsl-dev. I would also limit both standalone RPM development packages to RHEL-family 8+ so CentOS 6/7 keep using their built-in interfaces.

If newer Ubuntu DEB build roots are intended to be supported too, the package recipe instead needs version-aware alternatives for both libtirpc and libnsl. I will wait for @limingze-ste's preference before changing the PR direction.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I also prepared the installer-based revision on a separate validation branch and tested it before touching this PR: https://github.com/ZedingZhang/volclava/actions/runs/33379779430

All four jobs pass: Ubuntu 20.04 keeps the built-in RPC path without installing the standalone packages; 22.04 and 24.04 install/retain both required development packages and complete the build/tests; the RPM job verifies the dependencies are absent when the spec is evaluated as EL7, present on EL8, and completes the Rocky 8 build. The revision is ready to apply once the intended DEB support scope is confirmed.

@qinan-cn qinan-cn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

see comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package metadata omits the required libtirpc development dependency

3 participants