[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#980369: marked as done (glslang: autopkgtest regression: undefined reference to `ShConstructUniformMap')



Your message dated Thu, 11 Feb 2021 12:48:23 +0000
with message-id <E1lABOR-000BVu-Vd@fasolo.debian.org>
and subject line Bug#980369: fixed in glslang 11.1.0-2
has caused the Debian Bug report #980369,
regarding glslang: autopkgtest regression: undefined reference to `ShConstructUniformMap'
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
980369: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=980369
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: glslang
Version: 11.1.0-1
Severity: serious
Justification: release team policy
X-Debbugs-Cc: debian-ci@lists.debian.org
User: debian-ci@lists.debian.org
Usertags: regression
Tags: patch

Thanks for adding an autopkgtest (#940488) and pkg-config metadata
(#940487). However, since version 11.1.0-1, glslang fails the autopkgtest,
for example in
https://ci.debian.net/data/autopkgtest/testing/amd64/g/glslang/9766376/log.gz:

autopkgtest [13:18:41]: test glslang-dev: [-----------------------
+ mktemp -d
+ tempdir=/tmp/tmp.UEoTRS3LSr
+ cd /tmp/tmp.UEoTRS3LSr
+ cat
+ c++ -std=c++11 -o trivial trivial.cpp -lglslang -lHLSL -lOGLCompiler -lOSDependent -lSPIRV -lpthread
/usr/bin/ld: /tmp/ccZLSVyX.o: in function `main':
trivial.cpp:(.text+0x9): undefined reference to `ShConstructUniformMap'
/usr/bin/ld: trivial.cpp:(.text+0x19): undefined reference to `ShDestruct'
collect2: error: ld returned 1 exit status
autopkgtest [13:18:42]: test glslang-dev: -----------------------]

This indicates that the compile-time interface has changed: it is now
necessary for client code to link to -lMachineIndependent and
-lGenericCodeGen in addition to the libraries that were previously
required. This will presumably mean that some packages dependent on
glslang will now FTBFS.

Linking with the new glslang.pc seems to have the same bug: glslang.pc
needs updating for the new compile-time interface.

I attach an attempt to fix this, together with improvements to the
autopkgtest.

(I should warn you that I don't really know how this library works,
so I'm guessing at what the intended compile-time interface is; please
review accordingly.)

    smcv
>From fa64521cbd0bab95e1b5b4d935988e9e3c6be494 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Mon, 18 Jan 2021 10:41:45 +0000
Subject: [PATCH 1/5] d/tests: Recode into UTF-8

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 debian/tests/glslang-dev   | 2 +-
 debian/tests/glslang-tools | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/tests/glslang-dev b/debian/tests/glslang-dev
index 84463a9b..9cb42d7e 100755
--- a/debian/tests/glslang-dev
+++ b/debian/tests/glslang-dev
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright � 2019 Collabora Ltd.
+# Copyright © 2019 Collabora Ltd.
 # SPDX-License-Identifier: MIT
 # (see debian/copyright)
 
diff --git a/debian/tests/glslang-tools b/debian/tests/glslang-tools
index 1511c07a..2445c3ca 100755
--- a/debian/tests/glslang-tools
+++ b/debian/tests/glslang-tools
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright � 2019 Collabora Ltd.
+# Copyright © 2019 Collabora Ltd.
 # SPDX-License-Identifier: MIT
 # (see debian/copyright)
 
-- 
2.30.0

>From cd19f2103a94377a7acefb57420f212c5280457a Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Mon, 18 Jan 2021 09:32:34 +0000
Subject: [PATCH 2/5] d/tests/glslang-dev: Use proposed interface for
 cross-testing

This allows testing glslang-dev:i386 on an amd64 system (see
<https://salsa.debian.org/ci-team/autopkgtest/-/merge_requests/69>).

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 debian/tests/glslang-dev | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/debian/tests/glslang-dev b/debian/tests/glslang-dev
index 9cb42d7e..6bf09482 100755
--- a/debian/tests/glslang-dev
+++ b/debian/tests/glslang-dev
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright © 2019 Collabora Ltd.
+# Copyright © 2019-2021 Collabora Ltd.
 # SPDX-License-Identifier: MIT
 # (see debian/copyright)
 
@@ -9,6 +9,14 @@ set -e
 set -u
 set -x
 
+if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
+    CROSS_COMPILE="$DEB_HOST_GNU_TYPE-"
+else
+    CROSS_COMPILE=
+fi
+CXX="${CROSS_COMPILE}g++"
+PKG_CONFIG="${CROSS_COMPILE}pkg-config"
+
 tempdir="$(mktemp -d)"
 cd "$tempdir"
 
@@ -27,9 +35,9 @@ int main (void)
 }
 EOF
 
-# This is hard-coded because there's no pkg-config, but that matches
-# what renderdoc does...
-c++ -std=c++11 -o trivial trivial.cpp -lglslang -lHLSL -lOGLCompiler -lOSDependent -lSPIRV -lpthread
+# This is hard-coded because there used to be no pkg-config, but matches
+# what renderdoc does.
+"${CXX}" -std=c++11 -o trivial trivial.cpp -lglslang -lHLSL -lOGLCompiler -lOSDependent -lSPIRV -lpthread
 test -x trivial
 ./trivial
 
-- 
2.30.0

>From 65ca014d535af865479a64577f8b092fa60310d6 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Mon, 18 Jan 2021 09:41:58 +0000
Subject: [PATCH 3/5] d/tests/glslang-dev: Add missing libraries to linker line

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 debian/tests/glslang-dev | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/tests/glslang-dev b/debian/tests/glslang-dev
index 6bf09482..1804c26a 100755
--- a/debian/tests/glslang-dev
+++ b/debian/tests/glslang-dev
@@ -37,7 +37,7 @@ EOF
 
 # This is hard-coded because there used to be no pkg-config, but matches
 # what renderdoc does.
-"${CXX}" -std=c++11 -o trivial trivial.cpp -lglslang -lHLSL -lOGLCompiler -lOSDependent -lSPIRV -lpthread
+"${CXX}" -std=c++11 -o trivial trivial.cpp -lglslang -lMachineIndependent -lGenericCodeGen -lHLSL -lOGLCompiler -lOSDependent -lSPIRV -lpthread
 test -x trivial
 ./trivial
 
-- 
2.30.0

>From c49cfcb5e949a4fd6fa31d0fa0bb8fca5d1d8ee0 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Mon, 18 Jan 2021 10:23:53 +0000
Subject: [PATCH 4/5] Add missing -lMachineIndependent and -lGenericCodeGen to
 pkg-config file

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 .../glslang.pc-Add-missing-libraries.patch    | 25 +++++++++++++++++++
 debian/patches/series                         |  1 +
 2 files changed, 26 insertions(+)
 create mode 100644 debian/patches/glslang.pc-Add-missing-libraries.patch

diff --git a/debian/patches/glslang.pc-Add-missing-libraries.patch b/debian/patches/glslang.pc-Add-missing-libraries.patch
new file mode 100644
index 00000000..9fd25c83
--- /dev/null
+++ b/debian/patches/glslang.pc-Add-missing-libraries.patch
@@ -0,0 +1,25 @@
+From: Simon McVittie <smcv@collabora.com>
+Date: Mon, 18 Jan 2021 09:57:55 +0000
+Subject: glslang.pc: Add missing libraries
+
+-lglslang depends on -lMachineIndependent, and -lOGLCompiler depends on
+-lGenericCodeGen.
+
+Signed-off-by: Simon McVittie <smcv@collabora.com>
+---
+ glslang/glslang.pc.cmake.in | 4 ++--
+ 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
+--- a/glslang/glslang.pc.cmake.in
++++ b/glslang/glslang.pc.cmake.in
+@@ -7,5 +7,5 @@
+     Description: OpenGL and OpenGL ES shader front end and validator
+     Requires:
+     Version: @VERSION@
+-    Libs: -L${libdir} -lglslang -lOSDependent -lHLSL -lOGLCompiler -lSPVRemapper
+-    Cflags: -I${includedir}
+\ No newline at end of file
++    Libs: -L${libdir} -lglslang -lMachineIndependent -lOSDependent -lHLSL -lOGLCompiler -lGenericCodeGen -lSPVRemapper
++    Cflags: -I${includedir}
diff --git a/debian/patches/series b/debian/patches/series
index 1779d53c..7d0b1f9a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 glslang-default-resource-limits_staticlib.patch
 0001-pkg-config-compatibility.patch
+glslang.pc-Add-missing-libraries.patch
-- 
2.30.0

>From 0e266741f9a2d14828b647ca7be3b040cdd7f6cb Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Mon, 18 Jan 2021 09:34:43 +0000
Subject: [PATCH 5/5] d/tests/glslang-dev: Check that glslang.pc is sufficient

Reproduces: #951988
Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 debian/tests/glslang-dev | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/debian/tests/glslang-dev b/debian/tests/glslang-dev
index 1804c26a..6a45a048 100755
--- a/debian/tests/glslang-dev
+++ b/debian/tests/glslang-dev
@@ -41,5 +41,12 @@ EOF
 test -x trivial
 ./trivial
 
+# Or with the pkg-config metadata.
+# Deliberately word-splitting the output of pkg-config:
+# shellcheck disable=SC2046
+"${CXX}" -std=c++11 -o trivial trivial.cpp $("$PKG_CONFIG" --cflags --libs glslang)
+test -x trivial
+./trivial
+
 cd /
 rm -fr "$tempdir"
-- 
2.30.0


--- End Message ---
--- Begin Message ---
Source: glslang
Source-Version: 11.1.0-2
Done: Timo Aaltonen <tjaalton@debian.org>

We believe that the bug you reported is fixed in the latest version of
glslang, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 980369@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Timo Aaltonen <tjaalton@debian.org> (supplier of updated glslang package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 11 Feb 2021 14:35:56 +0200
Source: glslang
Architecture: source
Version: 11.1.0-2
Distribution: unstable
Urgency: medium
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Changed-By: Timo Aaltonen <tjaalton@debian.org>
Closes: 980369
Changes:
 glslang (11.1.0-2) unstable; urgency=medium
 .
   [ Simon McVittie ]
   * Add more libraries to link to in the pkg-config file and autopkgtest.
     (Closes: #980369)
Checksums-Sha1:
 4b396ac489a2031ff354e5c998c8e9a2084116d0 2092 glslang_11.1.0-2.dsc
 36053f22c1065c62908825ebf230338ea394a2f7 13328 glslang_11.1.0-2.diff.gz
 048603c7859198731a6d67d7bb1b776688870830 7699 glslang_11.1.0-2_source.buildinfo
Checksums-Sha256:
 95ceb5ca18fa315a6890955098002702b652820a912355c564f5c3ff6d35835c 2092 glslang_11.1.0-2.dsc
 b2e7645d136c9be42b6066486aa0a8a314e7e886db119fba844d4614c3214f60 13328 glslang_11.1.0-2.diff.gz
 a79e5af8e0fdb13b497d1e5613e7baab45bfe36d5ba0064bd52c2ce3f02bdf14 7699 glslang_11.1.0-2_source.buildinfo
Files:
 9bf79b02542ae5820286a1bda2a272f3 2092 libdevel optional glslang_11.1.0-2.dsc
 af7511b8d994b1bc4c86b3dbec13ca81 13328 libdevel optional glslang_11.1.0-2.diff.gz
 d706960c77d68d8a96d425af615fd3d0 7699 libdevel optional glslang_11.1.0-2_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEdS3ifE3rFwGbS2Yjy3AxZaiJhNwFAmAlJMcACgkQy3AxZaiJ
hNxTFQ//Xif8McYeuw4kKi9VqF5bH3H3ABwiiEuIlgFZbVOuPgnj88/jA+IVxoLn
qprBjkCSb6O00eErNwXArf5npEKq74G7lo+hSPrrhCvhMZl+ufvD1uj5DgL4tIxJ
DwlpehS5Ka9pFSggmH2ACgt5iYOFZ2wxTQMi+ZFu5Z27JuQtRPyp2saUR2c98dlJ
E5xSQ4zdH4LE4yO4OqRHJAHUd+vRPBNDyxDXYWI7kkSixjGQUuLDze3tkoINym36
SwnQAuHUIsH/4ajnwUtmPBtrAKX33Ve0cDBP/OIAksWEM3I+StMQeLFfebx7AwbI
cWUH3vakBU2ycmVtTPaw5UHcGInUM+6np6lrIrBxTxb/7A6r63tTRWBdc9WiUzDq
8MZnrbRtuDx0o6rqNp6VOXRq3X7AVwHPmTtJ1WEfDoddCOYTdFQ7gotAYe9wfcXe
Z44+ReHDwhXiu1SU0VC5I/fMltNX1jPQUzlP/0FWsavjJbYJWXp9EOOGnSkdGmZo
SpmEw2MWGdYWTtUKIDbHd1ClQzoGKZxZm0NAoi7DtE15CuT1TId7H8Q8RKpipCAd
IdiRPqf47n1aI+n+3qMMFEj8cYe3MqN2SMilfZED8/tB5rg+9FmMJbd1EuYSWUfB
rV7/U+BRrmJTOgNxQtFT/Lbl090d3HPKGTwA3NI6UJHcK21F72I=
=SZl7
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: