google / hrepl

Interactive development for Bazel/Haskell rules
Apache License 2.0
47 stars 10 forks source link

Linker errors building on macOS Catalina #21

Open patrickt opened 4 years ago

patrickt commented 4 years ago

Hey there 👋 I’m exploring the Bazel+Haskell space, and in attempting to install hrepl (via bazel build //hrepl), I ran into the following:

ERROR: /private/var/tmp/_bazel_patrickt/9b0f64af68d3bba2996d9fad8a733686/external/rules_haskell/rule_info/BUILD.bazel:4:1: HaskellProtoc external/rules_haskell/rule_info/Proto/RuleInfo.hs failed (Aborted): protoc failed: error executing command bazel-out/host/bin/external/com_google_protobuf/protoc '--plugin=protoc-gen-haskell=bazel-out/host/bin/external/proto-lens-protoc/_install/bin/proto-lens-protoc' ... (remaining 4 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox protoc failed: error executing command bazel-out/host/bin/external/com_google_protobuf/protoc '--plugin=protoc-gen-haskell=bazel-out/host/bin/external/proto-lens-protoc/_install/bin/proto-lens-protoc' ... (remaining 4 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
dyld: Symbol not found: __ZNK6google8protobuf8compiler3php9Generator11GenerateAllERKNSt3__16vectorIPKNS0_14FileDescriptorENS4_9allocatorIS8_EEEERKNS4_12basic_stringIcNS4_11char_traitsIcEENS9_IcEEEEPNS1_16GeneratorContextEPSI_
  Referenced from: /private/var/tmp/_bazel_patrickt/9b0f64af68d3bba2996d9fad8a733686/sandbox/darwin-sandbox/275/execroot/hrepl/bazel-out/host/bin/external/com_google_protobuf/protoc
  Expected in: flat namespace
 in /private/var/tmp/_bazel_patrickt/9b0f64af68d3bba2996d9fad8a733686/sandbox/darwin-sandbox/275/execroot/hrepl/bazel-out/host/bin/external/com_google_protobuf/protoc
Target //hrepl:hrepl failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /private/var/tmp/_bazel_patrickt/9b0f64af68d3bba2996d9fad8a733686/external/rules_haskell/rule_info/BUILD.bazel:4:1 HaskellProtoc external/rules_haskell/rule_info/Proto/RuleInfo.hs failed (Aborted): protoc failed: error executing command bazel-out/host/bin/external/com_google_protobuf/protoc '--plugin=protoc-gen-haskell=bazel-out/host/bin/external/proto-lens-protoc/_install/bin/proto-lens-protoc' ... (remaining 4 argument(s) skipped)

It’s possible I’m missing something really obvious here, but if anyone has pointers as to how to fix this, I’d deeply appreciate it!

judah commented 4 years ago

I'd suggest posting an issue to github.com/tweag/rules_haskell. The linking error doesn't sound like anything specific to what hrepl is doing, but maybe there's an edge case with haskell_proto_library?