Symbols protection

This commit is contained in:
Guilhem Lavaux 2021-01-25 09:50:48 +01:00
parent 793c649a8d
commit 041cfc0630
3 changed files with 18 additions and 6 deletions

View File

@ -8,7 +8,7 @@ export CC CXX
# Install a system package required by our library
#yum install -y atlas-devel
yum install -y cmake3 gsl-devel zlib-devel
yum install -y cmake3 gsl-devel zlib-devel fftw3-devel
ln -fs /usr/bin/cmake3 /usr/bin/cmake
@ -19,17 +19,18 @@ ALL_PYTHON="cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39"
for pkg in $ALL_PYTHON; do
PYBIN=/opt/python/${pkg}/bin
# "${PYBIN}/pip" install -r /io/dev-requirements.txt
"${PYBIN}/pip" install setuptools wheel Cython
"${PYBIN}/pip" install -r /io/requirements.txt
"${PYBIN}/pip" wheel -vvv /io/ -w wheelhouse/
done
# Bundle external shared libraries into the wheels
for whl in wheelhouse/*.whl; do
for whl in wheelhouse/cosmotool*.whl; do
auditwheel repair "$whl" --plat $PLAT -w /io/wheelhouse/
done
# Install packages and test
for pkg in $ALL_PYTHON; do
PYBIN=/opt/python/${pkg}/bin
"${PYBIN}/pip" install cosmotool --no-index -f /io/wheelhouse
done
#for pkg in $ALL_PYTHON; do
# PYBIN=/opt/python/${pkg}/bin
# "${PYBIN}/pip" install cosmotool --no-index -f /io/wheelhouse
#done

View File

@ -54,6 +54,10 @@ SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Bsymbolic-functions
if(APPLE)
set(CMAKE_MODULE_LINKER_FLAGS "-undefined dynamic_lookup")
endif()
IF(NOT APPLE)
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/cosmotool.version")
ENDIF()
target_link_libraries(_cosmotool PRIVATE ${CosmoTool_local} ${GSL_LIBRARIES})
target_link_libraries(_cosmo_power PRIVATE ${CosmoTool_local} ${GSL_LIBRARIES})

7
python/cosmotool.version Normal file
View File

@ -0,0 +1,7 @@
CODEABI_1.0 {
global:
PyInit_*;
_init;
_fini;
local: *;
};