Bug#951988: libplacebo: FTBFS: (.text+0x8ee): undefined reference to `spvContextCreate'
Hello Timo, * Paul Gevers : > On Thu, 18 Feb 2021 10:26:44 + Simon McVittie wrote: > > On Mon, 18 Jan 2021 at 11:27:35 +, Simon McVittie wrote: > > https://salsa.debian.org/xorg-team/vulkan/glslang/-/merge_requests/4 > > > > (Updated patches attached, if you prefer the BTS.) > > Can we move this issue forward somehow? What are the risks of the > proposed patch? Without having knowledge of how pkg-config works, the > patch looks rather harmless to me if it fixes the issue at stake. You have merged the mentioned MR on salsa. Do you plan on uploading a package with this change (soon)? Chris
Bug#951988: libplacebo: FTBFS: (.text+0x8ee): undefined reference to `spvContextCreate'
Hi Simon, all, On Thu, 18 Feb 2021 10:26:44 + Simon McVittie wrote: > On Mon, 18 Jan 2021 at 11:27:35 +, Simon McVittie wrote: > > On Mon, 18 Jan 2021 at 10:54:30 +, 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. > > https://salsa.debian.org/xorg-team/vulkan/glslang/-/merge_requests/4 > > (Updated patches attached, if you prefer the BTS.) Can we move this issue forward somehow? What are the risks of the proposed patch? Without having knowledge of how pkg-config works, the patch looks rather harmless to me if it fixes the issue at stake. Paul OpenPGP_signature Description: OpenPGP digital signature
Bug#951988: libplacebo: FTBFS: (.text+0x8ee): undefined reference to `spvContextCreate'
On Mon, 18 Jan 2021 at 11:27:35 +, Simon McVittie wrote: > On Mon, 18 Jan 2021 at 10:54:30 +, 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. https://salsa.debian.org/xorg-team/vulkan/glslang/-/merge_requests/4 (Updated patches attached, if you prefer the BTS.) smcv >From af942e4bc20bdb9fab9f187f497e7fe6c80cf12d Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 18 Jan 2021 11:24:30 + Subject: [PATCH 1/2] Add missing dependencies to spirv.pc Some code accessed via spirv.pc requires SPIRV-Tools and/or glslang. Signed-off-by: Simon McVittie 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 ..160832d6 --- /dev/null +++ b/debian/patches/spirv.pc-Add-dependencies-on-SPIRV-Tools-and-glslang.patch @@ -0,0 +1,38 @@ +From: Simon McVittie +Date: Mon, 18 Jan 2021 11:22:34 + +Subject: spirv.pc: Add dependencies on SPIRV-Tools and glslang + +Otherwise, a simple program like this will fail to link: + +#include +int main (void) +{ + std::string s; + glslang::GetSpirvVersion(s); + return 0; +} + +when compiled with the obvious parameters from pkg-config: + +g++ -ospirv spirv.cpp $(pkg-config --cflags --libs spirv) + +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=951988 +Signed-off-by: Simon McVittie +--- + 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.1 >From ff5bf4e4301419d16f68a5ca673dc1c88c3f3c1f Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 18 Jan 2021 10:16:45 + Subject: [PATCH 2/2] d/tests/glslang-dev: Add a test for spirv.pc Signed-off-by: Simon McVittie Reproduces: #951988 --- .../glslang.pc-Add-missing-libraries.patch | 2 +- debian/tests/glslang-dev | 16 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/debian/patches/glslang.pc-Add-missing-libraries.patch b/debian/patches/glslang.pc-Add-missing-libraries.patch index f8029af4..b3fa7b4f 100644 --- a/debian/patches/glslang.pc-Add-missing-libraries.patch +++ b/debian/patches/glslang.pc-Add-missing-libraries.patch @@ -11,7 +11,7 @@ Signed-off-by: Simon McVittie 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glslang/glslang.pc.cmake.in b/glslang/glslang.pc.cmake.in -index 921497e..fd92606 100644 +index 921497e..8c49e0c 100644 --- a/glslang/glslang.pc.cmake.in +++ b/glslang/glslang.pc.cmake.in @@ -7,5 +7,5 @@ diff --git a/debian/tests/glslang-dev b/debian/tests/glslang-dev index 3f6af04a..bf103ca0 100755 --- a/debian/tests/glslang-dev +++ b/debian/tests/glslang-dev @@ -35,6 +35,17 @@ int main (void) } EOF +cat > spirv.cpp <<'EOF' +#include + +int main (void) +{ + std::string s; + glslang::GetSpirvVersion(s); + return 0; +} +EOF + # This is hard-coded because
Bug#951988: libplacebo: FTBFS: (.text+0x8ee): undefined reference to `spvContextCreate'
tags -1 + patch On Mon, 18 Jan 2021 at 10:54:30 +, 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 Date: Mon, 18 Jan 2021 11:24:30 + 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 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 ..f88f3a32 --- /dev/null +++ b/debian/patches/spirv.pc-Add-dependencies-on-SPIRV-Tools-and-glslang.patch @@ -0,0 +1,38 @@ +From: Simon McVittie +Date: Mon, 18 Jan 2021 11:22:34 + +Subject: spirv.pc: Add dependencies on SPIRV-Tools and glslang + +Otherwise, a simple program like this will fail to link: + +#undef NDEBUG +#include + +#include + +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 +--- + 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
Bug#951988: libplacebo: FTBFS: (.text+0x8ee): undefined reference to `spvContextCreate'
On Sun, 23 Feb 2020 at 11:17:31 +0100, Sebastian Ramacher wrote: > On 2020-02-23 08:27:30, Lucas Nussbaum wrote: > > Source: libplacebo ... > > During a rebuild of all packages in sid, your package failed to build > > on amd64. > > > > Relevant part (hopefully): > > > /usr/bin/ld: > > > /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libSPIRV.a(SpvTools.cpp.o): > > > in function `glslang::SpirvToolsValidate(glslang::TIntermediate const&, > > > std::vector >&, > > > spv::SpvBuildLogger*, bool)': > > > (.text+0x8ee): undefined reference to `spvContextCreate' > > > /usr/bin/ld: (.text+0x918): undefined reference to > > > `spvValidatorOptionsCreate' > > > /usr/bin/ld: (.text+0x92b): undefined reference to > > > `spvValidatorOptionsSetRelaxBlockLayout' > > > /usr/bin/ld: (.text+0x936): undefined reference to > > > `spvValidatorOptionsSetBeforeHlslLegalization' > > > /usr/bin/ld: (.text+0x94b): undefined reference to > > > `spvValidateWithOptions' > > > /usr/bin/ld: (.text+0xafc): undefined reference to > > > `spvValidatorOptionsDestroy' > > > /usr/bin/ld: (.text+0xb06): undefined reference to `spvDiagnosticDestroy' > > > /usr/bin/ld: (.text+0xb0e): undefined reference to `spvContextDestroy' > > > collect2: error: ld returned 1 exit status > > This static library is from glslang-dev. spirv.pc fails to mention the > libraries from spirv-tools in its Libs, but would require as it can be > seen from this build failure. Hence I'm reassigning this bug to > glslang-dev. Here is a reproducer: cat > use-spirv.cpp <<'EOF' #undef NDEBUG #include #include int main (void) { std::string s; glslang::GetSpirvVersion(s); return 0; } EOF c++ -std=c++11 -o use-spirv use-spirv.cpp $("$PKG_CONFIG" --cflags --libs spirv) I attach a patch that extends the autopkgtest to do this, which requires the patches from #980369. As with the previous autopkgtests, it can be run with sadt(1) from devscripts, or with autopkgtest(1), and I would suggest doing so before uploads (at least for new upstream releases). Unfortunately, unlike #980369, I was not able to find a combination of libraries that I could add to spirv.pc to fix this bug. smcv
Bug#951988: libplacebo: FTBFS: (.text+0x8ee): undefined reference to `spvContextCreate'
Control: reassign -1 glslang-dev 8.13.3559-2 Control: affects -1 libplacebo On 2020-02-23 08:27:30, Lucas Nussbaum wrote: > Source: libplacebo > Version: 1.7.0-2 > Severity: serious > Justification: FTBFS on amd64 > Tags: buster sid > Usertags: ftbfs-20200222 ftbfs-buster > > Hi, > > During a rebuild of all packages in sid, your package failed to build > on amd64. > > Relevant part (hopefully): > > /usr/bin/ld: > > /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libSPIRV.a(SpvTools.cpp.o): > > in function `glslang::SpirvToolsValidate(glslang::TIntermediate const&, > > std::vector >&, > > spv::SpvBuildLogger*, bool)': > > (.text+0x8ee): undefined reference to `spvContextCreate' > > /usr/bin/ld: (.text+0x918): undefined reference to > > `spvValidatorOptionsCreate' > > /usr/bin/ld: (.text+0x92b): undefined reference to > > `spvValidatorOptionsSetRelaxBlockLayout' > > /usr/bin/ld: (.text+0x936): undefined reference to > > `spvValidatorOptionsSetBeforeHlslLegalization' > > /usr/bin/ld: (.text+0x94b): undefined reference to `spvValidateWithOptions' > > /usr/bin/ld: (.text+0xafc): undefined reference to > > `spvValidatorOptionsDestroy' > > /usr/bin/ld: (.text+0xb06): undefined reference to `spvDiagnosticDestroy' > > /usr/bin/ld: (.text+0xb0e): undefined reference to `spvContextDestroy' > > collect2: error: ld returned 1 exit status This static library is from glslang-dev. spirv.pc fails to mention the libraries from spirv-tools in its Libs, but would require as it can be seen from this build failure. Hence I'm reassigning this bug to glslang-dev. Best > > The full build log is available from: >http://qa-logs.debian.net/2020/02/22/libplacebo_1.7.0-2_unstable.log > > A list of current common problems and possible solutions is available at > http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute! > > About the archive rebuild: The rebuild was done on EC2 VM instances from > Amazon Web Services, using a clean, minimal and up-to-date chroot. Every > failed build was retried once to eliminate random failures. > -- Sebastian Ramacher signature.asc Description: PGP signature
Bug#951988: libplacebo: FTBFS: (.text+0x8ee): undefined reference to `spvContextCreate'
Source: libplacebo Version: 1.7.0-2 Severity: serious Justification: FTBFS on amd64 Tags: buster sid Usertags: ftbfs-20200222 ftbfs-buster Hi, During a rebuild of all packages in sid, your package failed to build on amd64. Relevant part (hopefully): > /usr/bin/ld: > /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libSPIRV.a(SpvTools.cpp.o): > in function `glslang::SpirvToolsValidate(glslang::TIntermediate const&, > std::vector >&, > spv::SpvBuildLogger*, bool)': > (.text+0x8ee): undefined reference to `spvContextCreate' > /usr/bin/ld: (.text+0x918): undefined reference to `spvValidatorOptionsCreate' > /usr/bin/ld: (.text+0x92b): undefined reference to > `spvValidatorOptionsSetRelaxBlockLayout' > /usr/bin/ld: (.text+0x936): undefined reference to > `spvValidatorOptionsSetBeforeHlslLegalization' > /usr/bin/ld: (.text+0x94b): undefined reference to `spvValidateWithOptions' > /usr/bin/ld: (.text+0xafc): undefined reference to > `spvValidatorOptionsDestroy' > /usr/bin/ld: (.text+0xb06): undefined reference to `spvDiagnosticDestroy' > /usr/bin/ld: (.text+0xb0e): undefined reference to `spvContextDestroy' > collect2: error: ld returned 1 exit status The full build log is available from: http://qa-logs.debian.net/2020/02/22/libplacebo_1.7.0-2_unstable.log A list of current common problems and possible solutions is available at http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute! About the archive rebuild: The rebuild was done on EC2 VM instances from Amazon Web Services, using a clean, minimal and up-to-date chroot. Every failed build was retried once to eliminate random failures.