cuda: remove bogus libxml2 dep for 12+#4563
Merged
Merged
Conversation
alecbcs
approved these changes
Apr 29, 2026
Member
There was a problem hiding this comment.
Looks good to me. Thanks for digging into this @sethrj
Will give it a couple days for @ax3l @pauleonix @Rombur to have a chance to review
Member
|
Merging without hearing back from @ax3l @pauleonix @Rombur after > 1 week. |
kshea21
pushed a commit
that referenced
this pull request
May 14, 2026
msimberg
pushed a commit
that referenced
this pull request
May 28, 2026
…cy (#4911) - Glibc in version 2.41 added some C23 functions that conflict with headers in cuda prior to version 13.1. This results in errors like ``` /usr/include/bits/mathcalls.h(83): error: exception specification is incompatible with that of previous function "cospi" (declared at line 5554 of <redacted>/spack/var/spack/environments/cuda_rqrt_testing/.spack-env/view/bin/../targets/x86_64-linux/include/crt/math_functions.h) extern double cospi (double __x) noexcept (true); extern double __cospi (double __x) noexcept (true); ^ /usr/include/bits/mathcalls.h(85): error: exception specification is incompatible with that of previous function "sinpi" (declared at line 5442 of <redacted>/spack/var/spack/environments/cuda_rqrt_testing/.spack-env/view/bin/../targets/x86_64-linux/include/crt/math_functions.h) extern double sinpi (double __x) noexcept (true); extern double __sinpi (double __x) noexcept (true); ^ /usr/include/bits/mathcalls.h(206): error: exception specification is incompatible with that of previous function "rsqrt" (declared at line 777 of <redacted>/spack/var/spack/environments/cuda_rqrt_testing/.spack-env/view/bin/../targets/x86_64-linux/include/crt/math_functions.h) extern double rsqrt (double __x) noexcept (true); extern double __rsqrt (double __x) noexcept (true); ^ /usr/include/bits/mathcalls.h(83): error: exception specification is incompatible with that of previous function "cospif" (declared at line 5606 of <redacted>/spack/var/spack/environments/cuda_rqrt_testing/.spack-env/view/bin/../targets/x86_64-linux/include/crt/math_functions.h) extern float cospif (float __x) noexcept (true); extern float __cospif (float __x) noexcept (true); ^ /usr/include/bits/mathcalls.h(85): error: exception specification is incompatible with that of previous function "sinpif" (declared at line 5502 of <redacted>/spack/var/spack/environments/cuda_rqrt_testing/.spack-env/view/bin/../targets/x86_64-linux/include/crt/math_functions.h) extern float sinpif (float __x) noexcept (true); extern float __sinpif (float __x) noexcept (true); ^ /usr/include/bits/mathcalls.h(206): error: exception specification is incompatible with that of previous function "rsqrtf" (declared at line 847 of <redacted>/spack/var/spack/environments/cuda_rqrt_testing/.spack-env/view/bin/../targets/x86_64-linux/include/crt/math_functions.h) extern float rsqrtf (float __x) noexcept (true); extern float __rsqrtf (float __x) noexcept (true); ``` To avoid this a conflict maker was added. Initially I had a patch of the cuda headers, but while I only needed `rsqrtf` to get cuda 13.0 to work a small test with 12.4 failed with more functions. Since the patch would need to work for many glibc & cuda versions, I went for the simpler, but less user friendly route. - The cuda installer needs libxml2.so which was erroneously removed as a dependency in #4563. On many systems libxml2 is just installed so one easily misses this dependency. Contrary to what is stated in the PR one needs to check for the libxml dependency on the extracted installer, not the run script. Running `./cuda_12.0.0_525.60.13_linux.run --noexec --target /tmp/cuda_files` and then `cat /tmp/cuda_files/cuda-installer | grep libxml` shows that this is still a build time dependency (also confirmed on systems without libxml2 instaled).
thomas-bouvier
pushed a commit
to thomas-bouvier/spack-packages
that referenced
this pull request
May 30, 2026
…cy (spack#4911) - Glibc in version 2.41 added some C23 functions that conflict with headers in cuda prior to version 13.1. This results in errors like ``` /usr/include/bits/mathcalls.h(83): error: exception specification is incompatible with that of previous function "cospi" (declared at line 5554 of <redacted>/spack/var/spack/environments/cuda_rqrt_testing/.spack-env/view/bin/../targets/x86_64-linux/include/crt/math_functions.h) extern double cospi (double __x) noexcept (true); extern double __cospi (double __x) noexcept (true); ^ /usr/include/bits/mathcalls.h(85): error: exception specification is incompatible with that of previous function "sinpi" (declared at line 5442 of <redacted>/spack/var/spack/environments/cuda_rqrt_testing/.spack-env/view/bin/../targets/x86_64-linux/include/crt/math_functions.h) extern double sinpi (double __x) noexcept (true); extern double __sinpi (double __x) noexcept (true); ^ /usr/include/bits/mathcalls.h(206): error: exception specification is incompatible with that of previous function "rsqrt" (declared at line 777 of <redacted>/spack/var/spack/environments/cuda_rqrt_testing/.spack-env/view/bin/../targets/x86_64-linux/include/crt/math_functions.h) extern double rsqrt (double __x) noexcept (true); extern double __rsqrt (double __x) noexcept (true); ^ /usr/include/bits/mathcalls.h(83): error: exception specification is incompatible with that of previous function "cospif" (declared at line 5606 of <redacted>/spack/var/spack/environments/cuda_rqrt_testing/.spack-env/view/bin/../targets/x86_64-linux/include/crt/math_functions.h) extern float cospif (float __x) noexcept (true); extern float __cospif (float __x) noexcept (true); ^ /usr/include/bits/mathcalls.h(85): error: exception specification is incompatible with that of previous function "sinpif" (declared at line 5502 of <redacted>/spack/var/spack/environments/cuda_rqrt_testing/.spack-env/view/bin/../targets/x86_64-linux/include/crt/math_functions.h) extern float sinpif (float __x) noexcept (true); extern float __sinpif (float __x) noexcept (true); ^ /usr/include/bits/mathcalls.h(206): error: exception specification is incompatible with that of previous function "rsqrtf" (declared at line 847 of <redacted>/spack/var/spack/environments/cuda_rqrt_testing/.spack-env/view/bin/../targets/x86_64-linux/include/crt/math_functions.h) extern float rsqrtf (float __x) noexcept (true); extern float __rsqrtf (float __x) noexcept (true); ``` To avoid this a conflict maker was added. Initially I had a patch of the cuda headers, but while I only needed `rsqrtf` to get cuda 13.0 to work a small test with 12.4 failed with more functions. Since the patch would need to work for many glibc & cuda versions, I went for the simpler, but less user friendly route. - The cuda installer needs libxml2.so which was erroneously removed as a dependency in spack#4563. On many systems libxml2 is just installed so one easily misses this dependency. Contrary to what is stated in the PR one needs to check for the libxml dependency on the extracted installer, not the run script. Running `./cuda_12.0.0_525.60.13_linux.run --noexec --target /tmp/cuda_files` and then `cat /tmp/cuda_files/cuda-installer | grep libxml` shows that this is still a build time dependency (also confirmed on systems without libxml2 instaled).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
At some point cuda apparently needed libxml2, but now it does not. Verified installation of this updated recipe with
cuda@13.1.1on linux-ubuntu24.04-x86_64_v3 . I also usedstrings/grepwith the binary installer for 12.9 to check for any references to XML andlibtree/lddon the installed libraries and binaries. I can't find any use of it nor reference to the requirement in the CUDA installation guide.