Skip to content

Unable to build backward-stacktrace on MacOS #616

@onelxj

Description

@onelxj

Building backward-stacktrace fails on MacOS arm64 with:

In file included from external/com_github_3rdparty_bazel_rules_backward_cpp_stacktrace/backward-stacktrace.h:3:
external/com_github_backward_cpp/backward.hpp:1013:27: error: expected ';' after expression
      unw_getcontext(&ctx)
                          ^
                          ;
external/com_github_backward_cpp/backward.hpp:1016:19: error: no member named 'uc_mcontext' in 'unw_context_t'
          if (ctx.uc_mcontext->__ss.__eip ==
              ~~~ ^
external/com_github_backward_cpp/backward.hpp:1017:32: error: unknown type name 'greg_t'
              reinterpret_cast<greg_t>(error_addr())) {
                               ^
external/com_github_backward_cpp/backward.hpp:1018:13: error: no member named 'uc_mcontext' in 'unw_context_t'
        ctx.uc_mcontext->__ss.__eip = ctx.uc_mcontext->__ss.__esp;
        ~~~ ^
external/com_github_backward_cpp/backward.hpp:1018:43: error: no member named 'uc_mcontext' in 'unw_context_t'
        ctx.uc_mcontext->__ss.__eip = ctx.uc_mcontext->__ss.__esp;
                                      ~~~ ^
external/com_github_backward_cpp/backward.hpp:1021:40: error: no member named 'uc_mcontext' in 'unw_context_t'
          reinterpret_cast<void *>(ctx.uc_mcontext->__ss.__eip);

Consider updating backward library (seems the version of backward-cpp we are using doesn't support MacOS arm).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions