Repository navigation
test: find c++filt with CMAKE_NM's target prefix - #130
Draft
ConnorBaker wants to merge 1 commit into
Draft
ConnorBaker wants to merge 1 commit into
ConnorBaker wants to merge 1 commit into
Conversation
The host ABI test pairs CMAKE_NM with c++filt, but finds c++filt by its unprefixed name. CMake finds nm with the compiler's target prefix, and cross toolchains may install only prefixed tools (for example aarch64-linux-gnu-c++filt), so configuration fails when cross-compiling. Look for the c++filt that shares CMAKE_NM's prefix and directory first, then fall back to the previous names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Connor Baker <connorb@nvidia.com>
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.
Problem
3.8.0's host ABI test (
test/host/abi) demangles the symbols that${CMAKE_NM}lists with${NVSHMEM_CXXFILT}. CMake findsCMAKE_NMwith the compiler's target prefix, for exampleaarch64-unknown-linux-gnu-nmforaarch64-unknown-linux-gnu-g++.NVSHMEM_CXXFILT, however, is found by its unprefixed names only:A cross toolchain that installs only prefixed binutils therefore fails to configure:
Change
Derive a
c++filtname fromCMAKE_NM's prefix and searchCMAKE_NM's directory first, then fall back to the previous names. The symbols are then demangled by the same binutils that listed them. A native build'sCMAKE_NMhas no prefix, so it still findsc++filtas before.Testing
Built in Nixpkgs from the 3.8.0 release with this patch, CUDA 13.4,
NVSHMEM_BUILD_TESTS=ONandNVSHMEM_BUILD_EXAMPLES=ON:The patch applies unchanged to
devel(2dca770), whosetest/host/abi/CMakeLists.txtis identical to 3.8.0's.🤖 Generated with Claude Code