-
Notifications
You must be signed in to change notification settings - Fork 562
Description
Search before asking
- I had searched in the issues and found no similar issues.
Motivation
Driven by my intellectual curiosity, I experimented with building Kvrocks on Alpine Linux, which uses musl libc
as its C library. During this process, I encountered several build errors, and I would like to share the solutions I discovered with the Kvrocks development team.
Version
- Kvrocks: v2.11.0
Specs
- OS: Alpine Linux 3.21.2
- Compiler: gcc (Alpine 14.2.0)
Error Details
- Backtrace unavailable.
Since libbacktrace
is an extension of glibc and not defined in musl libc
, the line find_package(Backtrace REQUIRED)
in CMakeLists.txt
should be removed. Additionally, the dependency cpptrace suggests using libdwarf
for symbol resolution, which should be set as the default option.
#include <execinfo.h>
unavailable in musl.
This header file is not available in musl libc
. Adding a guard as shown below can resolve the issue:
src/cli/signal_util.h
#ifdef __GLIBC__
#include <execinfo.h>
#endif
google/glog v0.7.x
causes build errors withmusl libc
.
This is an issue on the google/glog v0.7.x
side, not Kvrocks. We need to wait for bug fixes from the dependent library.
Best regards,
Solution
mentioned above
Are you willing to submit a PR?
- I'm willing to submit a PR!