google / jsonnet

Jsonnet - The data templating language
http://jsonnet.org
Apache License 2.0
6.92k stars 436 forks source link

Pre-built OS X binaries don't work on OS X Mojave 10.14.6 #710

Open josephglanville opened 4 years ago

josephglanville commented 4 years ago

Appears to be renamed symbol in C++ stdlib:

dyld: lazy symbol binding failed: Symbol not found: __ZNSt8__detail15_List_node_base7_M_hookEPS0_
  Referenced from: jsonnet/0.14.0/jsonnet
  Expected in: /usr/lib/libstdc++.6.dylib

dyld: Symbol not found: __ZNSt8__detail15_List_node_base7_M_hookEPS0_
  Referenced from: jsonnet/0.14.0/jsonnet
  Expected in: /usr/lib/libstdc++.6.dylib

[1]    13328 abort      jsonnet

Building from source works around the problem. I'm unsure if a universal build that works on all Mac OS versions can be produced or if multiple pre-built versions are required.

sparkprime commented 4 years ago

Maybe it needs to be more statically linked.

josephglanville commented 4 years ago

Brew builds packages for Sierra, High Sierra and Mojave: https://bintray.com/homebrew/bottles/jsonnet/0.14.0#files

There is probably a way to make it work on all the OS versions when compiling with Clang but I don't actually know the OS X C/C++ toolchain very well.

josephglanville commented 4 years ago

So looks like adding --copt "-mmacosx-version-min=10.13.0" to the Bazel build works, will see if I can get similar working with CMake.

domgreen commented 4 years ago

Any update on this? Seeing the same issue :cry:

sbarzowski commented 4 years ago

It works on the only Mac machine I have at the moment (High Sierra). But it may be not as much about OS X version as about the available libraries.

The Mac build is much smaller than the Linux one, so I think @sparkprime is right about needing to link "more statically".

sbarzowski commented 4 years ago

@josephglanville Did you have any luck with --copt "-mmacosx-version-min=10.13.0" and CMake?

abh commented 4 years ago

FWIW, I get the same error on macOS Catalina (10.15.2).

$ jsonnetfmt -i environments/dev/main.jsonnet
dyld: lazy symbol binding failed: Symbol not found: __ZNSt8__detail15_List_node_base7_M_hookEPS0_
  Referenced from: /Users/ask/bin/jsonnetfmt
  Expected in: /usr/lib/libstdc++.6.dylib

dyld: Symbol not found: __ZNSt8__detail15_List_node_base7_M_hookEPS0_
  Referenced from: /Users/ask/bin/jsonnetfmt
  Expected in: /usr/lib/libstdc++.6.dylib
jordan-da commented 4 years ago

so is osx dead in the water now?

sbarzowski commented 4 years ago

Unfortunately it doesn't work now. I had trouble reproducing this before. Of course any tips for what may be wrong will be greatly appreciated (and PRs would be even better!).