Repository navigation
fix: select RPC and NIS build dependencies by platform - #90
ZedingZhang wants to merge 1 commit into
Conversation
| 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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-devowns/usr/include/rpc/xdr.h; configure, build, and tests pass withoutlibtirpc-dev. - 22.04 / glibc 2.35: the base toolchain currently pulls
libnsl-devandlibtirpc-devthroughlibc6-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 onlylibtirpc-devthen fails on the requiredlibnslcheck; addinglibnsl-devas well completes configure,make, andmake 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.
There was a problem hiding this comment.
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.
04a0bd8 to
e736970
Compare
Problem
The build accepts either native libc RPC or standalone libtirpc, and separately checks for libnsl. Ubuntu 20.04 supplies native RPC through its base development packages, so adding libtirpc-dev unconditionally to Debian Build-Depends is redundant there. On newer Ubuntu installations without native RPC headers, libtirpc-dev alone is insufficient: the libnsl development library is required too.
The README currently lists Ubuntu 20.04. This change fixes Ubuntu installer preparation and the EL8+ RPM recipe; it does not extend the declared DEB support scope.
Related to #89.
Change
/usr/include/rpc/xdr.h. If absent, install bothlibtirpc-devandlibnsl-dev. Ubuntu 20.04 retains its native RPC path.libtirpc-develandlibnsl2-develtogether in RPM BuildRequires only when0%{?rhel} >= 8. EL6/EL7 keep their existing dependency set.Based on master
35fd1684bf7222ea679013f662697884ff6ebffb; candidatee736970c2c52f6c1d856d1ab42cfbb587a900833. The upstream diff is two files, seven added lines:volcinstall.shandspec/volclava.spec.Verification
Fresh clean-container validation passes all four jobs. Its validation head
740d0e28contains production files identical to candidatee736970c; the workflow and validation record are kept on a separate fork branch and are excluded from this PR.make checkpass.make checkpass.rpc/xdr.h; installing only libtirpc-dev reproduces missing libnsl. Revised preparation installs the pair, followed by successful configure, full build andmake check.make checkto pass. EL6/EL7 macro expansion excludes both packages.Ubuntu 22.04/24.04 are installer/build compatibility checks. EL6/EL7 were checked by RPM macro expansion on Rocky 8; no native CentOS 6/7 build is claimed.
Local
bash -n volcinstall.sh libinstall.shandgit diff --checkalso pass. The validation workflow and record document the exact source and checks. The earlier August matrix informed the direction; the linked fresh run verifies this revision on current master.Revised and validated with Codex assistance.