File tree Expand file tree Collapse file tree 5 files changed +48
-6
lines changed
conda/recipes/rapids-logger Expand file tree Collapse file tree 5 files changed +48
-6
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ if(RAPIDS_LOGGER_HIDE_ALL_SPDLOG_SYMBOLS)
8484 FMT_OPTION ${RAPIDS_LOGGER_FMT_OPTION} CPM_ARGS OPTIONS "BUILD_SHARED_LIBS OFF"
8585 "SPDLOG_BUILD_SHARED OFF"
8686 )
87- set_target_properties (spdlog PROPERTIES CXX_VISIBILITY_PRESET hidden POSITION_INDEPENDENT_CODE ON )
87+ set_target_properties (spdlog PROPERTIES POSITION_INDEPENDENT_CODE ON )
8888 target_link_options (rapids_logger PRIVATE "LINKER:--exclude-libs,libspdlog" )
8989else ()
9090 rapids_cpm_spdlog(
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ source rapids-date-string
77
88rapids-logger " Static cpp build"
99
10+ # Make sure we have an updated CMake
11+ python -m pip install -U cmake
12+ pyenv rehash
13+
1014cmake -S . -B build -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=ON
1115cmake --build build
1216ctest --test-dir build --output-on-failure
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ set -euo pipefail
55
66package_name=" rapids_logger"
77package_dir=" python/rapids-logger"
8+ dist_dir=" ${package_dir} /dist"
9+ final_dir=" ${package_dir} /final_dist"
810
911source rapids-configure-sccache
1012
@@ -13,16 +15,22 @@ rapids-generate-version > ./VERSION
1315rapids-logger " Building '${package_name} ' wheel"
1416sccache --zero-stats
1517python -m pip wheel \
16- -w " ${package_dir} /dist " \
18+ -w " ${dist_dir} " \
1719 -v \
1820 --no-deps \
1921 --disable-pip-version-check \
2022 " ${package_dir} "
2123sccache --show-adv-stats
2224
23- mkdir -p " ${package_dir} /final_dist "
25+ mkdir -p " ${final_dir} "
2426python -m auditwheel repair \
25- -w " ${package_dir} /final_dist " \
26- ${package_dir} /dist/ *
27+ -w " ${final_dir} " \
28+ " ${dist_dir} / " *
2729
28- RAPIDS_PY_WHEEL_NAME=" ${package_name} " rapids-upload-wheels-to-s3 cpp " ${package_dir} /final_dist"
30+ # Check that no undefined symbols are present in the shared library
31+ WHEEL_EXPORT_DIR=" $( mktemp -d) "
32+ unzip -d " ${WHEEL_EXPORT_DIR} " " ${final_dir} /*"
33+ LOGGER_LIBRARY=$( find " ${WHEEL_EXPORT_DIR} " -type f -name ' librapids_logger.so' )
34+ ./ci/check_symbols.sh " ${LOGGER_LIBRARY} "
35+
36+ RAPIDS_PY_WHEEL_NAME=" ${package_name} " rapids-upload-wheels-to-s3 cpp " ${final_dir} "
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Copyright (c) 2025, NVIDIA CORPORATION.
3+
4+ set -eEuo pipefail
5+
6+ echo " checking for symbol visibility issues"
7+
8+ LIBRARY=" ${1} "
9+
10+ echo " "
11+ echo " Checking exported symbols in '${LIBRARY} '"
12+ symbol_file=" ./symbols.txt"
13+ readelf --dyn-syms --wide " ${LIBRARY} " \
14+ | c++filt \
15+ > " ${symbol_file} "
16+
17+ for lib in fmt spdlog; do
18+ echo " Checking for '${lib} ' symbols..."
19+ if grep -E " ${lib} \:\:" " ${symbol_file} " ; then
20+ echo " ERROR: Found some exported symbols in ${LIBRARY} matching the pattern ${lib} ::."
21+ exit 1
22+ fi
23+ done
24+
25+ echo " No symbol visibility issues found in ${LIBRARY} "
Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ build:
1818 # Run tests from the build directory since they're cheap.
1919 ctest --test-dir build/ --output-on-failure
2020 cmake --install build/
21+ # Check that no undefined symbols are present in the shared library
22+ LIB="build/librapids_logger.so"
23+ test -f "${LIB}"
24+ ./ci/check_symbols.sh "${LIB}"
25+
2126
2227requirements :
2328 build :
You can’t perform that action at this time.
0 commit comments