tikv/grpc-rs

Unable to build for x86_64-unknown-linux-musl

dertin opened this issue · 2 comments

Hi I can't build for x86_64-unknown-linux-musl
I get a fatal error: "sys/cdefs.h: No such file or directory compilation terminated."

This can be a solution? see: https://wiki.musl-libc.org/faq.html#Q:-When-compiling-something-against-musl,-I-get-error-messages-about-%3Ccode%3Esys/cdefs.h%3C/code%3E

To Reproduce
rustup target add x86_64-unknown-linux-musl
cargo build --target x86_64-unknown-linux-musl --release

System information

  • grpcio-sys v0.10.3+1.44.0-patched
  • Docker rust:1.63.0-slim
  • Architecture: x86_64-unknown-linux-musl

Rust Backtrace

error: failed to run custom build command for `grpcio-sys v0.10.3+1.44.0-patched`

Caused by:
  process didn't exit successfully: `/opt/agent/workspace/target/release/build/grpcio-sys-ebdd04758f50f234/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=grpc_wrap.cc
  cargo:rerun-if-changed=grpc
  cargo:rerun-if-env-changed=CARGO_CFG_TARGET_OS
  cargo:rerun-if-env-changed=GRPCIO_SYS_USE_PKG_CONFIG
  cargo:rerun-if-env-changed=CARGO_CFG_TARGET_OS
  cargo:rerun-if-env-changed=CARGO_CFG_TARGET_OS
  cargo:rerun-if-env-changed=CARGO_CFG_TARGET_OS
  cargo:rerun-if-env-changed=CXX
  cargo:rustc-link-search=native=/opt/agent/workspace/target/x86_64-unknown-linux-musl/release/build/libz-sys-067e180c5965d885/out/build
  cargo:rustc-link-search=native=/opt/agent/workspace/target/x86_64-unknown-linux-musl/release/build/libz-sys-067e180c5965d885/out/lib
  CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-musl = None
  CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_musl = None
  TARGET_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-unknown-linux-musl = None
  CMAKE_GENERATOR_x86_64_unknown_linux_musl = None
  TARGET_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-unknown-linux-musl = None
  CMAKE_PREFIX_PATH_x86_64_unknown_linux_musl = None
  TARGET_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = Some("/opt/agent/workspace/target/x86_64-unknown-linux-musl/release/build/libz-sys-067e180c5965d885/out/build")
  CMAKE_x86_64-unknown-linux-musl = None
  CMAKE_x86_64_unknown_linux_musl = None
  TARGET_CMAKE = None
  CMAKE = None
  running: "cmake" "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.10.3+1.44.0-patched/grpc" "-DCMAKE_CXX_COMPILER=g++" "-DgRPC_INSTALL=false" "-DgRPC_BUILD_CSHARP_EXT=false" "-DgRPC_BUILD_CODEGEN=false" "-DgRPC_BENCHMARK_PROVIDER=none" "-DgRPC_SSL_PROVIDER=package" "-DgRPC_ZLIB_PROVIDER=package" "-DCMAKE_INSTALL_PREFIX=/opt/agent/workspace/target/x86_64-unknown-linux-musl/release/build/grpcio-sys-2dd6fedb6b6a74b5/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/musl-gcc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/musl-gcc" "-DCMAKE_BUILD_TYPE=Release"
  -- The C compiler identification is GNU 10.2.1
  -- The CXX compiler identification is GNU 10.2.1
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/musl-gcc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/g++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Looking for pthread.h
  -- Looking for pthread.h - found
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
  -- Found Threads: TRUE  
  -- Looking for res_servicename in resolv
  -- Looking for res_servicename in resolv - not found
  -- Looking for gethostbyname in nsl
  -- Looking for gethostbyname in nsl - not found
  -- Looking for gethostbyname in socket
  -- Looking for gethostbyname in socket - not found
  -- Looking for socket in socket
  -- Looking for socket in socket - not found
  -- Looking for clock_gettime in rt
  -- Looking for clock_gettime in rt - found
  -- Looking for include file sys/types.h
  -- Looking for include file sys/types.h - found
  -- Looking for include file sys/socket.h
  -- Looking for include file sys/socket.h - found
  -- Looking for include file arpa/inet.h
  -- Looking for include file arpa/inet.h - found
  -- Looking for include file arpa/nameser_compat.h
  -- Looking for include file arpa/nameser_compat.h - found
  -- Looking for include file arpa/nameser.h
  -- Looking for include file arpa/nameser.h - found
  -- Looking for include file assert.h
  -- Looking for include file assert.h - found
  -- Looking for include file errno.h
  -- Looking for include file errno.h - found
  -- Looking for include file fcntl.h
  -- Looking for include file fcntl.h - found
  -- Looking for include file inttypes.h
  -- Looking for include file inttypes.h - found
  -- Looking for include file limits.h
  -- Looking for include file limits.h - found
  -- Looking for include file malloc.h
  -- Looking for include file malloc.h - found
  -- Looking for include file memory.h
  -- Looking for include file memory.h - found
  -- Looking for include file netdb.h
  -- Looking for include file netdb.h - found
  -- Looking for include file netinet/in.h
  -- Looking for include file netinet/in.h - found
  -- Looking for include file netinet/tcp.h
  -- Looking for include file netinet/tcp.h - found
  -- Looking for include file net/if.h
  -- Looking for include file net/if.h - found
  -- Looking for include file signal.h
  -- Looking for include file signal.h - found
  -- Looking for include file socket.h
  -- Looking for include file socket.h - not found
  -- Looking for include file stdbool.h
  -- Looking for include file stdbool.h - found
  -- Looking for include file stdint.h
  -- Looking for include file stdint.h - found
  -- Looking for include file stdlib.h
  -- Looking for include file stdlib.h - found
  -- Looking for include file strings.h
  -- Looking for include file strings.h - found
  -- Looking for include file string.h
  -- Looking for include file string.h - found
  -- Looking for include file stropts.h
  -- Looking for include file stropts.h - found
  -- Looking for include file sys/ioctl.h
  -- Looking for include file sys/ioctl.h - found
  -- Looking for include file sys/param.h
  -- Looking for include file sys/param.h - found
  -- Looking for include file sys/select.h
  -- Looking for include file sys/select.h - found
  -- Looking for include file sys/stat.h
  -- Looking for include file sys/stat.h - found
  -- Looking for include file sys/time.h
  -- Looking for include file sys/time.h - found
  -- Looking for include file sys/uio.h
  -- Looking for include file sys/uio.h - found
  -- Looking for include file time.h
  -- Looking for include file time.h - found
  -- Looking for include file dlfcn.h
  -- Looking for include file dlfcn.h - found
  -- Looking for include file unistd.h
  -- Looking for include file unistd.h - found
  -- Looking for include files winsock2.h, windows.h
  -- Looking for include files winsock2.h, windows.h - not found
  -- Looking for 3 include files winsock2.h, ..., windows.h
  -- Looking for 3 include files winsock2.h, ..., windows.h - not found
  -- Looking for include files winsock.h, windows.h
  -- Looking for include files winsock.h, windows.h - not found
  -- Looking for include file windows.h
  -- Looking for include file windows.h - not found
  -- Performing Test HAVE_SOCKLEN_T
  -- Performing Test HAVE_SOCKLEN_T - Success
  -- Performing Test HAVE_TYPE_SOCKET
  -- Performing Test HAVE_TYPE_SOCKET - Failed
  -- Performing Test HAVE_BOOL_T
  -- Performing Test HAVE_BOOL_T - Success
  -- Performing Test HAVE_SSIZE_T
  -- Performing Test HAVE_SSIZE_T - Success
  -- Performing Test HAVE_LONGLONG
  -- Performing Test HAVE_LONGLONG - Success
  -- Performing Test HAVE_SIG_ATOMIC_T
  -- Performing Test HAVE_SIG_ATOMIC_T - Success
  -- Performing Test HAVE_STRUCT_ADDRINFO
  -- Performing Test HAVE_STRUCT_ADDRINFO - Success
  -- Performing Test HAVE_STRUCT_IN6_ADDR
  -- Performing Test HAVE_STRUCT_IN6_ADDR - Success
  -- Performing Test HAVE_STRUCT_SOCKADDR_IN6
  -- Performing Test HAVE_STRUCT_SOCKADDR_IN6 - Success
  -- Performing Test HAVE_STRUCT_SOCKADDR_STORAGE
  -- Performing Test HAVE_STRUCT_SOCKADDR_STORAGE - Success
  -- Performing Test HAVE_STRUCT_TIMEVAL
  -- Performing Test HAVE_STRUCT_TIMEVAL - Success
  -- Looking for AF_INET6
  -- Looking for AF_INET6 - found
  -- Looking for O_NONBLOCK
  -- Looking for O_NONBLOCK - found
  -- Looking for FIONBIO
  -- Looking for FIONBIO - found
  -- Looking for SIOCGIFADDR
  -- Looking for SIOCGIFADDR - found
  -- Looking for MSG_NOSIGNAL
  -- Looking for MSG_NOSIGNAL - found
  -- Looking for PF_INET6
  -- Looking for PF_INET6 - found
  -- Looking for SO_NONBLOCK
  -- Looking for SO_NONBLOCK - not found
  -- Looking for CLOCK_MONOTONIC
  -- Looking for CLOCK_MONOTONIC - found
  -- Performing Test HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
  -- Performing Test HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID - Success
  -- Performing Test HAVE_LL
  -- Performing Test HAVE_LL - Success
  -- Looking for bitncmp
  -- Looking for bitncmp - not found
  -- Looking for closesocket
  -- Looking for closesocket - not found
  -- Looking for CloseSocket
  -- Looking for CloseSocket - not found
  -- Looking for connect
  -- Looking for connect - found
  -- Looking for fcntl
  -- Looking for fcntl - found
  -- Looking for freeaddrinfo
  -- Looking for freeaddrinfo - found
  -- Looking for getaddrinfo
  -- Looking for getaddrinfo - found
  -- Looking for getenv
  -- Looking for getenv - found
  -- Looking for gethostbyaddr
  -- Looking for gethostbyaddr - found
  -- Looking for gethostbyname
  -- Looking for gethostbyname - found
  -- Looking for gethostname
  -- Looking for gethostname - found
  -- Looking for getnameinfo
  -- Looking for getnameinfo - found
  -- Looking for getservbyport_r
  -- Looking for getservbyport_r - found
  -- Looking for gettimeofday
  -- Looking for gettimeofday - found
  -- Looking for if_indextoname
  -- Looking for if_indextoname - found
  -- Looking for inet_net_pton
  -- Looking for inet_net_pton - not found
  -- Looking for inet_ntop
  -- Looking for inet_ntop - found
  -- Looking for inet_pton
  -- Looking for inet_pton - found
  -- Looking for ioctl
  -- Looking for ioctl - found
  -- Looking for ioctlsocket
  -- Looking for ioctlsocket - not found
  -- Looking for IoctlSocket
  -- Looking for IoctlSocket - not found
  -- Looking for recv
  -- Looking for recv - found
  -- Looking for recvfrom
  -- Looking for recvfrom - found
  -- Looking for send
  -- Looking for send - found
  -- Looking for setsockopt
  -- Looking for setsockopt - found
  -- Looking for socket
  -- Looking for socket - found
  -- Looking for strcasecmp
  -- Looking for strcasecmp - found
  -- Looking for strcmpi
  -- Looking for strcmpi - not found
  -- Looking for strdup
  -- Looking for strdup - found
  -- Looking for stricmp
  -- Looking for stricmp - not found
  -- Looking for strncasecmp
  -- Looking for strncasecmp - found
  -- Looking for strncmpi
  -- Looking for strncmpi - not found
  -- Looking for strnicmp
  -- Looking for strnicmp - not found
  -- Looking for writev
  -- Looking for writev - found
  -- Looking for __system_property_get
  -- Looking for __system_property_get - not found
  -- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1n")  
  -- Found ZLIB: /opt/agent/workspace/target/x86_64-unknown-linux-musl/release/build/libz-sys-067e180c5965d885/out/lib/libz.a (found version "1.2.11") 
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /opt/agent/workspace/target/x86_64-unknown-linux-musl/release/build/grpcio-sys-2dd6fedb6b6a74b5/out/build
  running: "cmake" "--build" "." "--target" "grpc" "--config" "Release" "--parallel" "8"
  Scanning dependencies of target address_sorting
  Scanning dependencies of target re2
  Scanning dependencies of target absl_log_severity
  Scanning dependencies of target absl_spinlock_wait
  [  0%] Building CXX object third_party/re2/CMakeFiles/re2.dir/re2/compile.cc.o
  Scanning dependencies of target absl_int128
  Scanning dependencies of target upb
  [  0%] Building C object CMakeFiles/address_sorting.dir/third_party/address_sorting/address_sorting.c.o
  [  0%] Building CXX object third_party/re2/CMakeFiles/re2.dir/re2/bitstate.cc.o
  [  0%] Building CXX object third_party/abseil-cpp/absl/numeric/CMakeFiles/absl_int128.dir/int128.cc.o
  [  0%] Building CXX object third_party/abseil-cpp/absl/base/CMakeFiles/absl_log_severity.dir/log_severity.cc.o
  [  0%] Building C object CMakeFiles/address_sorting.dir/third_party/address_sorting/address_sorting_posix.c.o
  [  0%] Building CXX object third_party/abseil-cpp/absl/base/CMakeFiles/absl_spinlock_wait.dir/internal/spinlock_wait.cc.o
  [  0%] Building C object CMakeFiles/upb.dir/third_party/upb/upb/decode_fast.c.o
  [  0%] Building CXX object third_party/re2/CMakeFiles/re2.dir/re2/dfa.cc.o
  [  0%] Building C object CMakeFiles/upb.dir/third_party/upb/upb/decode.c.o
  [  0%] Building CXX object third_party/re2/CMakeFiles/re2.dir/re2/filtered_re2.cc.o
  [  0%] Building CXX object third_party/re2/CMakeFiles/re2.dir/re2/mimics_pcre.cc.o
  [  0%] Linking CXX static library libabsl_spinlock_wait.a
  [  0%] Built target absl_spinlock_wait
  [  0%] Building CXX object third_party/re2/CMakeFiles/re2.dir/re2/nfa.cc.o
  [  0%] Linking CXX static library libabsl_log_severity.a
  [  0%] Built target absl_log_severity
  [  0%] Building CXX object third_party/re2/CMakeFiles/re2.dir/re2/onepass.cc.o
  [  0%] Linking CXX static library libabsl_int128.a
  [  0%] Built target absl_int128
  [  0%] Building CXX object third_party/re2/CMakeFiles/re2.dir/re2/parse.cc.o
  [  0%] Building CXX object third_party/re2/CMakeFiles/re2.dir/re2/perl_groups.cc.o
  [  0%] Building CXX object third_party/re2/CMakeFiles/re2.dir/re2/prefilter.cc.o
  [  0%] Building CXX object third_party/re2/CMakeFiles/re2.dir/re2/prefilter_tree.cc.o
  [  0%] Building CXX object third_party/re2/CMakeFiles/re2.dir/re2/prog.cc.o
  [  1%] Building CXX object third_party/re2/CMakeFiles/re2.dir/re2/re2.cc.o
  [  1%] Building CXX object third_party/re2/CMakeFiles/re2.dir/re2/regexp.cc.o
  [  1%] Building CXX object third_party/re2/CMakeFiles/re2.dir/re2/set.cc.o
  [  1%] Building CXX object third_party/re2/CMakeFiles/re2.dir/re2/simplify.cc.o
  [  1%] Building CXX object third_party/re2/CMakeFiles/re2.dir/re2/stringpiece.cc.o
  [  1%] Building CXX object third_party/re2/CMakeFiles/re2.dir/re2/tostring.cc.o
  [  1%] Building CXX object third_party/re2/CMakeFiles/re2.dir/re2/unicode_casefold.cc.o
  [  1%] Building CXX object third_party/re2/CMakeFiles/re2.dir/re2/unicode_groups.cc.o
  [  1%] Building CXX object third_party/re2/CMakeFiles/re2.dir/util/rune.cc.o
  [  1%] Building CXX object third_party/re2/CMakeFiles/re2.dir/util/strutil.cc.o
  [  1%] Linking CXX static library libre2.a
  [  1%] Built target re2

  --- stderr
  CMake Warning at third_party/abseil-cpp/CMakeLists.txt:74 (message):
    A future Abseil release will default ABSL_PROPAGATE_CXX_STD to ON for CMake
    3.8 and up.  We recommend enabling this option to ensure your project still
    builds correctly.


  CMake Warning at cmake/protobuf.cmake:51 (message):
    gRPC_PROTOBUF_PROVIDER is "module" but PROTOBUF_ROOT_DIR is wrong
  Call Stack (most recent call first):
    CMakeLists.txt:312 (include)


  CMake Warning:
    Manually-specified variables were not used by the project:

      CMAKE_ASM_COMPILER
      CMAKE_ASM_FLAGS


  gmake: warning: -j8 forced in submake: resetting jobserver mode.
  In file included from /usr/include/arpa/inet.h:21,
                   from /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.10.3+1.44.0-patched/grpc/third_party/address_sorting/address_sorting_internal.h:57,
                   from /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.10.3+1.44.0-patched/grpc/third_party/address_sorting/address_sorting.c:41:
  /usr/include/features.h:461:12: fatal error: sys/cdefs.h: No such file or directory
    461 | #  include <sys/cdefs.h>
        |            ^~~~~~~~~~~~~
  compilation terminated.
  gmake[3]: *** [CMakeFiles/address_sorting.dir/build.make:82: CMakeFiles/address_sorting.dir/third_party/address_sorting/address_sorting.c.o] Error 1
  gmake[3]: *** Waiting for unfinished jobs....
  In file included from /usr/include/arpa/inet.h:21,
                   from /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.10.3+1.44.0-patched/grpc/third_party/address_sorting/address_sorting_internal.h:57,
                   from /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.10.3+1.44.0-patched/grpc/third_party/address_sorting/address_sorting_posix.c:41:
  /usr/include/features.h:461:12: fatal error: sys/cdefs.h: No such file or directory
    461 | #  include <sys/cdefs.h>
        |            ^~~~~~~~~~~~~
  compilation terminated.
  gmake[3]: *** [CMakeFiles/address_sorting.dir/build.make:95: CMakeFiles/address_sorting.dir/third_party/address_sorting/address_sorting_posix.c.o] Error 1
  gmake[2]: *** [CMakeFiles/Makefile2:1138: CMakeFiles/address_sorting.dir/all] Error 2
  gmake[2]: *** Waiting for unfinished jobs....
  In file included from /usr/include/assert.h:35,
                   from /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.10.3+1.44.0-patched/grpc/third_party/upb/upb/upb.h:35,
                   from /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.10.3+1.44.0-patched/grpc/third_party/upb/upb/msg.h:41,
                   from /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.10.3+1.44.0-patched/grpc/third_party/upb/upb/decode_fast.h:65,
                   from /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.10.3+1.44.0-patched/grpc/third_party/upb/upb/decode_fast.c:38:
  /usr/include/features.h:461:12: fatal error: sys/cdefs.h: No such file or directory
    461 | #  include <sys/cdefs.h>
        |            ^~~~~~~~~~~~~
  compilation terminated.
  gmake[3]: *** [CMakeFiles/upb.dir/build.make:82: CMakeFiles/upb.dir/third_party/upb/upb/decode_fast.c.o] Error 1
  gmake[3]: *** Waiting for unfinished jobs....
  In file included from /usr/include/assert.h:35,
                   from /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.10.3+1.44.0-patched/grpc/third_party/upb/upb/upb.h:35,
                   from /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.10.3+1.44.0-patched/grpc/third_party/upb/upb/msg.h:41,
                   from /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.10.3+1.44.0-patched/grpc/third_party/upb/upb/decode.h:35,
                   from /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.10.3+1.44.0-patched/grpc/third_party/upb/upb/decode.c:28:
  /usr/include/features.h:461:12: fatal error: sys/cdefs.h: No such file or directory
    461 | #  include <sys/cdefs.h>
        |            ^~~~~~~~~~~~~
  compilation terminated.
  gmake[3]: *** [CMakeFiles/upb.dir/build.make:95: CMakeFiles/upb.dir/third_party/upb/upb/decode.c.o] Error 1
  gmake[2]: *** [CMakeFiles/Makefile2:905: CMakeFiles/upb.dir/all] Error 2
  gmake[1]: *** [CMakeFiles/Makefile2:1090: CMakeFiles/grpc.dir/rule] Error 2
  gmake: *** [Makefile:248: grpc] Error 2
  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 2

  build script failed, must exit now', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:975:5
  stack backtrace:
     0:     0x55ca3ed8ad9d - std::backtrace_rs::backtrace::libunwind::trace::h8217d0a8f3fd2f41
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
     1:     0x55ca3ed8ad9d - std::backtrace_rs::backtrace::trace_unsynchronized::h308103876b3af410
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
     2:     0x55ca3ed8ad9d - std::sys_common::backtrace::_print_fmt::hc208018c6153605e
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:66:5
     3:     0x55ca3ed8ad9d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf89a7ed694dfb585
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:45:22
     4:     0x55ca3edabd7c - core::fmt::write::h21038c1382fe4264
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/fmt/mod.rs:1197:17
     5:     0x55ca3ed870a1 - std::io::Write::write_fmt::h7dbb1c9a3c254aef
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/io/mod.rs:1672:15
     6:     0x55ca3ed8c675 - std::sys_common::backtrace::_print::h4e8889719c9ddeb8
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:48:5
     7:     0x55ca3ed8c675 - std::sys_common::backtrace::print::h1506fe2cb3022667
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:35:9
     8:     0x55ca3ed8c675 - std::panicking::default_hook::{{closure}}::hd9d7ce2a8a782440
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:295:22
     9:     0x55ca3ed8c396 - std::panicking::default_hook::h5b16ec25444b1b5d
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:314:9
    10:     0x55ca3ed8cc06 - std::panicking::rust_panic_with_hook::hb0138cb6e6fea3e4
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:698:17
    11:     0x55ca3ed8caf7 - std::panicking::begin_panic_handler::{{closure}}::h4cb67095557cd1aa
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:588:13
    12:     0x55ca3ed8b254 - std::sys_common::backtrace::__rust_end_short_backtrace::h2bfcac279dcdc911
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:138:18
    13:     0x55ca3ed8c829 - rust_begin_unwind
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5
    14:     0x55ca3ecad973 - core::panicking::panic_fmt::h1de71520faaa17d3
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14
    15:     0x55ca3ed008fd - cmake::fail::hbbe72f407ac11ce7
    16:     0x55ca3ed00345 - cmake::run::hf33a6a7968ce97b7
    17:     0x55ca3ecfd6d5 - cmake::Config::build::h981620b5476cfa79
    18:     0x55ca3ecaf6e4 - build_script_build::build_grpc::h5034b3588fbda1a5
    19:     0x55ca3ecb1668 - build_script_build::main::he257a8c6144d089b
    20:     0x55ca3ecb3a33 - core::ops::function::FnOnce::call_once::h8981fccfc2b0da43
    21:     0x55ca3ecb6859 - std::sys_common::backtrace::__rust_begin_short_backtrace::hfe53cc5a9d07e40a
    22:     0x55ca3ecb5599 - std::rt::lang_start::{{closure}}::he6c0b755eb49c682
    23:     0x55ca3ed826de - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h4937aaa125c8d4b2
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/ops/function.rs:280:13
    24:     0x55ca3ed826de - std::panicking::try::do_call::h6f5c70e8b0a34f92
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:492:40
    25:     0x55ca3ed826de - std::panicking::try::h68766ba264ecf2e2
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:456:19
    26:     0x55ca3ed826de - std::panic::catch_unwind::hc36033d2f9cc04af
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panic.rs:137:14
    27:     0x55ca3ed826de - std::rt::lang_start_internal::{{closure}}::h78c037f4a1a28ded
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/rt.rs:128:48
    28:     0x55ca3ed826de - std::panicking::try::do_call::he6e1fffda4c750ee
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:492:40
    29:     0x55ca3ed826de - std::panicking::try::h48a77ddbb2f4c87a
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:456:19
    30:     0x55ca3ed826de - std::panic::catch_unwind::hfa809b06a550a9e7
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panic.rs:137:14
    31:     0x55ca3ed826de - std::rt::lang_start_internal::h4db69ed48eaca005
                                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/rt.rs:128:20
    32:     0x55ca3ecb5581 - std::rt::lang_start::h78d8e174c82b3877
    33:     0x55ca3ecb1bc3 - main
    34:     0x7f6b9113cd0a - __libc_start_main
    35:     0x55ca3ecadbba - _start
    36:                0x0 - <unknown>
warning: build failed, waiting for other jobs to finish...

There are known issues when building with musl. Also check #327.

cdefs came from libc-dev on alpine. It needs to be installed manually somehow.