Ubuntu 18.04
gcc 9.4.0
ldd 2.27
Python 3.11
I am attempting to build PyTorch 2.5.1 so that the resulting shared libraries are “hardened”, such that when we run hardening-check
from Debian’s devscripts
against them, it reports that stack protection is enabled.
I’ve added “-fstack-protector-strong” to the extra_compile_args
in setup.py, and all but two libraries (libtorch.so and libtorch_global_deps.so) are successfully hardened.
Nothing I have tried so far has had any effect on these two libraries. Does anyone know what I’m doing wrong?
I notice that these libraries are very small compared to the others that get produced during the build. Are these libraries special somehow?