Skip to content

Linking error with Undefined symbols for architecture x86_64: _SCDynamicStoreCopyProxies on some macOS environment #892

@owent

Description

@owent

Describe your environment
OS: macOS 10.15
XCode: 12
Bazel: bazelisk 1.9.0

Steps to reproduce

bazel --output_user_root=$HOME/.cache/bazel build --copt=-DENABLE_METRICS_PREVIEW --copt=-DENABLE_LOGS_PREVIEW --copt -Wno-unused-function --copt -Wno-error=unused-command-line-argument --host_linkopt -lpthread --host_linkopt -liconv --host_linkopt -lresolv --host_linkopt -ldl --host_linkopt -lm //...

What is the expected behavior?
Sompiling success

What is the actual behavior?

Use --sandbox_debug to see verbose messages from the sandbox
Undefined symbols for architecture x86_64:
  "_SCDynamicStoreCopyProxies", referenced from:
      _Curl_resolv in libcurl.a(hostip.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error in child process '/usr/bin/xcrun'. 1

Additional context
Should link with -framework SystemConfiguration on macOS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions