CppCommon icon indicating copy to clipboard operation
CppCommon copied to clipboard

undefined reference to `backtrace' on Alpine Linux

Open devararendy opened this issue 2 years ago • 1 comments

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'

image

is there any solution for building under alpine ? Thank You very much

devararendy avatar Oct 04 '22 03:10 devararendy

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.

chronoxor avatar Sep 26 '23 22:09 chronoxor