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?
https://github.com/openwrt/packages/blob/master/libs/libtirpc/Makefile

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?

Thanks.

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

The dissent1 patch as a pull request:
https://github.com/lede-project/source/pull/1269/commits/b87b4734c6e56fa45ec612350e2aa480ed2d8dd6

(and the patch itself can be downloaded as https://github.com/lede-project/source/pull/1269/commits/b87b4734c6e56fa45ec612350e2aa480ed2d8dd6.patch )

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 daggs@gmx.com
Date: Fri, 9 Feb 2018 17:33:19 +0200
Subject: [PATCH] librpc: add host install support for nfs-utils

Signed-off-by: Dagg Stompler <daggs@gmx.com>
---
 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
 PKG_MIRROR_HASH:=22c8dc55e1c4e8e31635a37708a3ce622a6ca33ebd918a4321b0be6ffce89b21
 CMAKE_INSTALL:=1
 PKG_USE_MIPS16:=0
+PKG_BUILD_DEPENDS:=librpc/host
 
 PKG_LICENSE:=LGPL-2.1
 PKG_LICENSE_FILES:=
@@ -17,6 +18,7 @@ PKG_LICENSE_FILES:=
 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/cmake.mk
 
 define Package/librpc
@@ -30,4 +32,11 @@ define Package/librpc/install
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/librpc.so $(1)/lib/
 endef
 
+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
+endef
+
+$(eval $(call HostBuild))
 $(eval $(call BuildPackage,librpc))
-- 
2.16.1

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.