Bug#951988: libplacebo: FTBFS: (.text+0x8ee): undefined reference to `spvContextCreate'
tags -1 + patch
On Mon, 18 Jan 2021 at 10:54:30 +0000, Simon McVittie wrote:
> Unfortunately, unlike #980369, I was not able to find a combination of
> libraries that I could add to spirv.pc to fix this bug.
I think the attached might do it? As before, I don't know this library,
so please review carefully.
I have deliberately not used SPIRV-Tools-Shared here to avoid being
affected by #980370.
smcv
>From e0724824147f624563de94d2d1b497f1c36aff5e Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Mon, 18 Jan 2021 11:24:30 +0000
Subject: [PATCH 7/7] Add missing dependencies to spirv.pc
Some code accessed via spirv.pc requires SPIRV-Tools and/or glslang.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Closes: #951988
---
debian/control | 3 +-
debian/patches/series | 1 +
...endencies-on-SPIRV-Tools-and-glslang.patch | 38 +++++++++++++++++++
3 files changed, 41 insertions(+), 1 deletion(-)
create mode 100644 debian/patches/spirv.pc-Add-dependencies-on-SPIRV-Tools-and-glslang.patch
diff --git a/debian/control b/debian/control
index 594ac5a8..6eacf228 100644
--- a/debian/control
+++ b/debian/control
@@ -28,7 +28,8 @@ Description: OpenGL and OpenGL ES shader front end and validator -- tools
Package: glslang-dev
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends},
+ spirv-tools,
Suggests: glslang-tools
Multi-Arch: same
Description: OpenGL and OpenGL ES shader front end and validator -- development files
diff --git a/debian/patches/series b/debian/patches/series
index 7d0b1f9a..e66d681a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
glslang-default-resource-limits_staticlib.patch
0001-pkg-config-compatibility.patch
glslang.pc-Add-missing-libraries.patch
+spirv.pc-Add-dependencies-on-SPIRV-Tools-and-glslang.patch
diff --git a/debian/patches/spirv.pc-Add-dependencies-on-SPIRV-Tools-and-glslang.patch b/debian/patches/spirv.pc-Add-dependencies-on-SPIRV-Tools-and-glslang.patch
new file mode 100644
index 00000000..f88f3a32
--- /dev/null
+++ b/debian/patches/spirv.pc-Add-dependencies-on-SPIRV-Tools-and-glslang.patch
@@ -0,0 +1,38 @@
+From: Simon McVittie <smcv@collabora.com>
+Date: Mon, 18 Jan 2021 11:22:34 +0000
+Subject: spirv.pc: Add dependencies on SPIRV-Tools and glslang
+
+Otherwise, a simple program like this will fail to link:
+
+#undef NDEBUG
+#include <cassert>
+
+#include <glslang/SPIRV/GlslangToSpv.h>
+
+int main (void)
+{
+ std::string s;
+ glslang::GetSpirvVersion(s);
+ return 0;
+}
+
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=951988
+Signed-off-by: Simon McVittie <smcv@collabora.com>
+---
+ SPIRV/spirv.pc.cmake.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/SPIRV/spirv.pc.cmake.in b/SPIRV/spirv.pc.cmake.in
+index dfcad94..d47d427 100644
+--- a/SPIRV/spirv.pc.cmake.in
++++ b/SPIRV/spirv.pc.cmake.in
+@@ -5,7 +5,7 @@
+
+ Name: @SPIRV_NAME@
+ Description: SPIR-V is a binary intermediate language for representing graphical-shader stages and compute kernels for multiple Khronos APIs, including OpenCL, OpenGL, and Vulkan
+- Requires:
++ Requires: SPIRV-Tools, glslang
+ Version: @SPIRV_VERSION@
+ Libs: -L${libdir} -lSPIRV
+ Cflags: -I${includedir}
+\ No newline at end of file
--
2.30.0
Reply to: