Tried reproducing the issue of ciborium build failure on ppc64el. On
checking the logs minutely, got to know that the issue is in one of the
source file /cdata.go/. There is a function declared with no definition:
f/unc Addrs() (uintptr, uintptr)./
This patch fixes a build failure of the Ciborium package on the ppc64el
architecture. The /qml.v1/cdata/cdata.go/ file defines the /Addrs()
/function, which appears to rely on architecture-specific logic that is
not supported on ppc64el. Attempting to compile on ppc64el results in an
error due to this missing implementation.
To resolve this, I have:
*
Added a Go build tag to |cdata.go| to exclude it from |ppc64el| builds.
*
Created a new file |cdata_stub.go|, which is only built on
|ppc64el|, and provides a stub |Addrs()| function returning default
zero values.
This allows the package to compile successfully on |ppc64el|, while
retaining the original behavior for other platforms.
The stub ensures compatibility without introducing functional changes or
affecting other architectures. I have attached the patch in this mail.
From 8c9ae7c21b49aa85c33547d4e65e82445396b84c Mon Sep 17 00:00:00 2001
From: Tanushree <ts...@linux.ibm.com>
Date: Thu, 10 Jul 2025 10:09:50 +0000
Subject: [PATCH] Ciborium build issue fix
---
qml.v1/cdata/cdata.go | 3 +++
qml.v1/cdata/cdata_stub.go | 11 +++++++++++
2 files changed, 14 insertions(+)
create mode 100644 qml.v1/cdata/cdata_stub.go
diff --git a/qml.v1/cdata/cdata.go b/qml.v1/cdata/cdata.go
index f66d0d3..93b2997 100644
--- a/qml.v1/cdata/cdata.go
+++ b/qml.v1/cdata/cdata.go
@@ -1,4 +1,7 @@
// Package cdata supports the implementation of the qml package.
+
+//go:build !ppc64le
+// +build !ppc64le
package cdata
func Addrs() (uintptr, uintptr)
diff --git a/qml.v1/cdata/cdata_stub.go b/qml.v1/cdata/cdata_stub.go
new file mode 100644
index 0000000..8cd972f
--- /dev/null
+++ b/qml.v1/cdata/cdata_stub.go
@@ -0,0 +1,11 @@
+
+//go:build ppc64le
+// +build ppc64le
+
+package cdata
+
+// Addrs stub for ppc64le — satisfies the compiler, returning defaults.
+func Addrs() (uintptr, uintptr) {
+ return 0, 0
+}
+
--
2.47.2