File tree 5 files changed +48
-6
lines changed
conda/recipes/rapids-logger
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)
84
84
FMT_OPTION ${RAPIDS_LOGGER_FMT_OPTION} CPM_ARGS OPTIONS "BUILD_SHARED_LIBS OFF"
85
85
"SPDLOG_BUILD_SHARED OFF"
86
86
)
87
- set_target_properties (spdlog PROPERTIES CXX_VISIBILITY_PRESET hidden POSITION_INDEPENDENT_CODE ON )
87
+ set_target_properties (spdlog PROPERTIES POSITION_INDEPENDENT_CODE ON )
88
88
target_link_options (rapids_logger PRIVATE "LINKER:--exclude-libs,libspdlog" )
89
89
else ()
90
90
rapids_cpm_spdlog(
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ source rapids-date-string
7
7
8
8
rapids-logger " Static cpp build"
9
9
10
+ # Make sure we have an updated CMake
11
+ python -m pip install -U cmake
12
+ pyenv rehash
13
+
10
14
cmake -S . -B build -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=ON
11
15
cmake --build build
12
16
ctest --test-dir build --output-on-failure
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ set -euo pipefail
5
5
6
6
package_name=" rapids_logger"
7
7
package_dir=" python/rapids-logger"
8
+ dist_dir=" ${package_dir} /dist"
9
+ final_dir=" ${package_dir} /final_dist"
8
10
9
11
source rapids-configure-sccache
10
12
@@ -13,16 +15,22 @@ rapids-generate-version > ./VERSION
13
15
rapids-logger " Building '${package_name} ' wheel"
14
16
sccache --zero-stats
15
17
python -m pip wheel \
16
- -w " ${package_dir} /dist " \
18
+ -w " ${dist_dir} " \
17
19
-v \
18
20
--no-deps \
19
21
--disable-pip-version-check \
20
22
" ${package_dir} "
21
23
sccache --show-adv-stats
22
24
23
- mkdir -p " ${package_dir} /final_dist "
25
+ mkdir -p " ${final_dir} "
24
26
python -m auditwheel repair \
25
- -w " ${package_dir} /final_dist " \
26
- ${package_dir} /dist/ *
27
+ -w " ${final_dir} " \
28
+ " ${dist_dir} / " *
27
29
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:
18
18
# Run tests from the build directory since they're cheap.
19
19
ctest --test-dir build/ --output-on-failure
20
20
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
+
21
26
22
27
requirements :
23
28
build :
You can’t perform that action at this time.
0 commit comments