Build Failure with Ubuntu 22.04

Continuing the discussion from CoreELEC 20.0-Nexus_alpha2 Discussion:

(Ubuntu 22.04) Persistent build failure at nfs-utils (201/354). Have tried clearing it out and restarting build with same result. No problems previously.

The check what is wrong with that package: you should see log file mention.

Yes, it’s looking for rpc.h. I have checked that this is in the tirpc folder of /usr/include, but maybe it is looking for it in /usr/include/rpc.

I can maybe skip the package or fudge it, but wondered if it was a current generic CE build issue. Or maybe it’s associated with Ubuntu 22.04, since CoreELEC recommend 20.04.
Log…
checking for pthread.h… yes
checking rpc/rpc.h usability… no
checking rpc/rpc.h presence… no
checking for rpc/rpc.h… no
configure: error: Header file rpc/rpc.h not found - maybe try building with --enable-tirpc
e[1;31mFAILURE: scripts/build nfs-utils:host during configure_host (default)e[0m

I think this patch is needed

diff --git a/packages/network/nfs-utils/package.mk b/packages/network/nfs-utils/package.mk
index 5b785d8ee6..7cf97a522c 100644
--- a/packages/network/nfs-utils/package.mk
+++ b/packages/network/nfs-utils/package.mk
@@ -43,6 +43,11 @@ pre_configure_host() {
     --disable-tirpc \
     --without-systemd \
     --without-tcp-wrappers"
+
+  # for Ubuntu 22 with libntirpc-dev package installed
+  if [ -d /usr/include/tirpc ]; then
+    CFLAGS+=" -I/usr/include/tirpc"
+  fi
 }
 
 pre_configure_target() {


2 Likes

Thanks! I edited the package.mk. With one more change to avahi (pre_configure_target to NCONFIGURE=0) to overcome autogen.sh error, I now have a successful compile with 22.04.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.

It should now build on Ubuntu 22.04 without making any extra changes to the packages.