Debian Bug report logs - #1105146
nvidia-toolkit-samples fails autopkg compile tests

version graph

Package: src:nvidia-toolkit-samples; Maintainer for src:nvidia-toolkit-samples is (unknown);

Reported by: Matthias Klose <[email protected]>

Date: Mon, 12 May 2025 08:54:01 UTC

Severity: serious

Tags: sid, trixie

Found in version nvidia-toolkit-samples/12.3~dfsg-1

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], [email protected]:
Bug#1105146; Package src:nvidia-toolkit-samples. (Mon, 12 May 2025 08:54:02 GMT) (full text, mbox, link).


Acknowledgement sent to Matthias Klose <[email protected]>:
New Bug report received and forwarded. Copy sent to [email protected]. (Mon, 12 May 2025 08:54:02 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Matthias Klose <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: nvidia-toolkit-samples fails autopkg compile tests
Date: Mon, 12 May 2025 10:51:13 +0200
Package: src:nvidia-toolkit-samples
Version: 12.3~dfsg-1
Severity: serious
Tags: sid trixie

seen with autopkg tests triggered by gcc-12:
https://ci.debian.net/packages/n/nvidia-cuda-samples/testing/amd64/60466757/

2003s compile-cuda-samples_cuda-g++ FAIL non-zero exit status 2
2003s compile-cuda-samples_g++-12 FAIL non-zero exit status 2

tests linking against -lfreeimage fail to link with
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libfreeimage.so: undefined 
reference to `std::ios_base_library_init()@GLIBCXX_3.4.32'
/usr/bin/ld: /lib/x86_64-linux-gnu/libIlmThread-3_1.so.30: undefined 
reference to `__cxa_call_terminate@CXXABI_1.3.15'

At least for the g++-12 specific test, this is because the libstdc++.so 
name in the internal gcc libdir

$ ls -l /usr/lib/gcc/x86_64-linux-gnu/12/libstdc++.*
-rw-r--r-- 1 root root 6026280  3. Mai 21:10 
/usr/lib/gcc/x86_64-linux-gnu/12/libstdc++.a
-rw-r--r-- 1 root root 2194624  3. Mai 21:10 
/usr/lib/gcc/x86_64-linux-gnu/12/libstdc++.so

is now a copy of the original gcc-12 libstdc++.so.6, which obviously 
doesn't have symbols provided by the system-wide libstdc++.so, built 
from the newest GCC version available.  This is intended to prevent a 
possible silent wrong-code issue when building packages with a legacy 
g++ version (link with the 12 version, run with the default version).

The work around is to link these samples with --allow-shlib-undefined. 
These are

$ fgrep -rl lfreeimage
Samples/4_CUDA_Libraries/boxFilterNPP/Makefile
Samples/4_CUDA_Libraries/cannyEdgeDetectorNPP/Makefile
Samples/4_CUDA_Libraries/freeImageInteropNPP/Makefile
Samples/4_CUDA_Libraries/histEqualizationNPP/Makefile
Samples/4_CUDA_Libraries/FilterBorderControlNPP/Makefile

The fix seems to be to add that flag to ALL_LDFLAGS

ALL_LDFLAGS += -Xlinker --allow-shlib-undefined

or add it to EXTRA_LDFLAGS before

EXTRA_LDFLAGS += --allow-shlib-undefined

however I don't see any use of EXTRA_LDFLAGS in these samples.


It looks like compile-cuda-samples_g++-12 and compile-cuda-samples_g++ 
run the same tests, both with g++-12, so failing both for the very same 
reason.




Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 15:59:18 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.