diff mbox series

[wrynose,39/55] quota: use native rpcgen and a single-word RPCGEN_CPP

Message ID 1cb22db0d3a1cee6579449822b0fc7c36f8b9c99.1783289522.git.yoann.congal@smile.fr
State New
Headers show
Series [wrynose,01/55] bluez5: fix set volume failure | expand

Commit Message

Yoann Congal July 5, 2026, 10:41 p.m. UTC
From: Otavio Salvador <otavio@ossystems.com.br>

The rpc PACKAGECONFIG regenerates rquota.{c,h} and rquota_clnt.c from
rquota.x with rpcgen at build time, as the tarball ships no
pre-generated copies. Two problems made this fail:

- rpcgen was picked up from the host via HOSTTOOLS rather than from the
  build, which is non-deterministic and breaks on hosts that have no
  rpcgen at all.

- rpcgen execs its C preprocessor as a single program name, but OE
  exports $CPP as a multi-word "gcc -E --sysroot=... <flags>" string,
  so rpcgen reports "cannot find C preprocessor" and aborts.

Depend on rpcsvc-proto-native so rpcgen comes from the build, and set
RPCGEN_CPP to the single-word cross cpp so the preprocessor can be
exec'd.

Tested with bitbake quota (configure/compile/install/package) on
qemuarm.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 97a93dc468bdd172fe7eadca86bad9e149891eeb)
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
---
 meta/recipes-extended/quota/quota_4.11.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-extended/quota/quota_4.11.bb b/meta/recipes-extended/quota/quota_4.11.bb
index b3860719611..811056f1f75 100644
--- a/meta/recipes-extended/quota/quota_4.11.bb
+++ b/meta/recipes-extended/quota/quota_4.11.bb
@@ -26,6 +26,10 @@  ASNEEDED = ""
 PACKAGECONFIG ??= "rpc bsd"
 PACKAGECONFIG:libc-musl = "rpc"
 
-PACKAGECONFIG[rpc] = "--enable-rpc,--disable-rpc,libtirpc"
+# rpcgen execs its preprocessor as a single program; OE's multi-word $CPP fails,
+# so point it at the cross cpp instead.
+export RPCGEN_CPP = "${TARGET_PREFIX}cpp"
+
+PACKAGECONFIG[rpc] = "--enable-rpc,--disable-rpc,libtirpc rpcsvc-proto-native"
 PACKAGECONFIG[bsd] = "--enable-bsd_behaviour=yes,--enable-bsd_behaviour=no,"
 PACKAGECONFIG[ldapmail] = "--enable-ldapmail,--disable-ldapmail,openldap"