Failed building nfs-utils with musl based lede

Greetings, I keep getting nfs-utils failure when I build an image which is based on musl with changes from the fastpath repo, the error is this:
rpc_clntout.c:39:10: fatal error: rpc/types.h: No such file or directory
#include <rpc/types.h>
buildroot has fixed it by making sure that libtirpc is built before but in lede and for musl I don't see anything similar, moreover, trying to use librpc like uclibc seems to fail with the same issue.

has anyone encountered this and was able to fix it?

Sounds dubious. if you mean the fastpath repo from gwlim, as that contains quite many changes unrelated to fastpath itself. You might get better results with the default master repo plus the cleaned-up fastpath changes for master from dissent1 (discussed in the fastpath forum thread).

Are you sure that you are building for the master, which includes libtirpc since a few days?

Duh, forgot to mention, I've tried to merge the changes from gwlim's 17.01.1 into 17.01.4
I've looked at the thread, didn't found an exact match for cleaned-up fastpath changes for master from dissent1, can you point me to it?


Cleaned-up discusion start roughly at message 263 Qualcomm Fast Path For LEDE
and continues e.g. until 420 Qualcomm Fast Path For LEDE

The dissent1 patch as a pull request:

(and the patch itself can be downloaded as )

But I haven't tested building it myself lately.

tried it, it applies ok on lede/openwrt master
but the issue still persists, I'm getting this error:
rpc_clntout.c:39:10: fatal error: rpc/types.h: No such file or directory
#include <rpc/types.h>
when compiling rpcgen from nfs-utils under hostpkg.
even hand selecting libtirpc didn't worked.
librpc is selected but I don't see it got built

ok, now I see that librpc is compiled and the correct header is at ./staging_dir/target-mips_24kc_musl/usr/include/rpc/types.h but it seems that feeds/packages/net/nfs-kernel-server host-compile still fails

found the issue, librpc/libtirpc aren't compiled for host.
the lede build system differs from buildroot's one (which I know quite well), I'll need to try understand how to make it compile in host mode.

the following patch fixes the issue:
From 8f34825958e00ab960d5326ea44c7f1124efb220 Mon Sep 17 00:00:00 2001
From: Dagg Stompler
Date: Fri, 9 Feb 2018 17:33:19 +0200
Subject: [PATCH] librpc: add host install support for nfs-utils

Signed-off-by: Dagg Stompler <>
 package/libs/librpc/Makefile | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/package/libs/librpc/Makefile b/package/libs/librpc/Makefile
index e8f51a23f1..d894dd3bdb 100644
--- a/package/libs/librpc/Makefile
+++ b/package/libs/librpc/Makefile
@@ -10,6 +10,7 @@ PKG_SOURCE_VERSION:=a921e3ded051746f9f7cd5e5a312fb6771716aac
@@ -17,6 +18,7 @@ PKG_LICENSE_FILES:=
 PKG_MAINTAINER:=Felix Fietkau <>
 include $(INCLUDE_DIR)/
+include $(INCLUDE_DIR)/
 include $(INCLUDE_DIR)/
 define Package/librpc
@@ -30,4 +32,11 @@ define Package/librpc/install
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/ $(1)/lib/
+define Host/Install
+       $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/include/rpc
+       $(INSTALL_DATA) $(HOST_BUILD_DIR)/rpc/types.h $(STAGING_DIR_HOSTPKG)/include/rpc
+       $(INSTALL_DATA) $(HOST_BUILD_DIR)/rpc/compat.h $(STAGING_DIR_HOSTPKG)/include/rpc
+$(eval $(call HostBuild))
 $(eval $(call BuildPackage,librpc))

Just had the same issue today, trying to compile nfs-kernel-server/host under Alpine. The problem is newer glibc/musl don't come with <rpc/types> anymore, so libtirpc seems to replace this for updated source.

I still wonder why there is no host dependency in nfs-kernel-server/host to librpc/host, since it will still fail this way.

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