diff mbox series

[meta-oe,1/3] rrdtool: Fix do_configure by exporting ABS_TOP_BUILDDIR for perl bindings

Message ID 20260805212612.1351211-1-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-oe,1/3] rrdtool: Fix do_configure by exporting ABS_TOP_BUILDDIR for perl bindings | expand

Commit Message

Khem Raj Aug. 5, 2026, 9:26 p.m. UTC
1.10.3 grew a third branch in bindings/perl-shared/Makefile.PL: when
ABS_TOP_BUILDDIR is unset it assumes a standalone build, pkg-config
probes for an installed librrd and dies.

| pkg-config could not find librrd. Is rrdtool installed?
| Try: brew install rrdtool (macOS) or apt install librrd-dev (Debian/Ubuntu)

bindings/Makefile.am always passes ABS_TOP_SRCDIR, ABS_TOP_BUILDDIR and
ABS_SRCDIR when it runs Makefile.PL, but do_configure re-runs it by hand
to redo the perl bindings and did not. Export them there too so the
in-tree branch is taken and RRDs links against -L${B}/src/.libs -lrrd.

Verified on aarch64 for qemuarm64: do_configure fails before the change
with the error above, and do_compile and do_package succeed after.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 meta-oe/recipes-extended/rrdtool/rrdtool_1.10.3.bb | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/rrdtool/rrdtool_1.10.3.bb b/meta-oe/recipes-extended/rrdtool/rrdtool_1.10.3.bb
index a434927b23..656cee7ffa 100644
--- a/meta-oe/recipes-extended/rrdtool/rrdtool_1.10.3.bb
+++ b/meta-oe/recipes-extended/rrdtool/rrdtool_1.10.3.bb
@@ -97,9 +97,14 @@  do_configure() {
         ${B}/bindings/Makefile

     #redo the perl bindings
+    # perl-shared/Makefile.PL only links against the in-tree librrd when
+    # ABS_TOP_BUILDDIR is set, which is what bindings/Makefile.am does. Without
+    # it the standalone branch pkg-config probes for an installed librrd and
+    # dies with "pkg-config could not find librrd", so export them here too.
     (
     cd ${S}/bindings/perl-shared;
-    perl Makefile.PL INSTALLDIRS="vendor" INSTALLPRIVLIB="abc";
+    ABS_TOP_SRCDIR="${S}" ABS_TOP_BUILDDIR="${B}" ABS_SRCDIR="${S}/bindings/perl-shared" \
+        perl Makefile.PL INSTALLDIRS="vendor" INSTALLPRIVLIB="abc";

     cd ../../bindings/perl-piped;
     perl Makefile.PL INSTALLDIRS="vendor";