CppCommon
CppCommon copied to clipboard
undefined reference to `backtrace' on Alpine Linux
Hi @chronoxor Thank you for providing us this library. But unfortunately got issue when compiling under alpine (using Docker):
nginx:stable_alpine https://hub.docker.com/layers/library/nginx/stable-alpine/images/sha256-5bc90c961f2ef45c7ed6057e5c55e09d5f6b700a9d2e7e824c5e3709f329a61d?context=explore
I have install libexecinfo-dev so it has execinfo.h
but:
in function CppCommon::StackTrace::StackTrace(int)': stack_trace.cpp:(.text+0x419): undefined reference to
backtrace'

is there any solution for building under alpine ? Thank You very much
It seems it is a known Alpine Linux issue - Backtrace not available within Alpine containers #1904. For this system StackTrace should be implemented using libunwind.
Due to lack of time not sure if this will be fixed soon, but properly implemented PR is welcome.