google / jsonnet

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

jsonnet install error on Mac Mojave #927

Open kgarg8 opened 3 years ago

kgarg8 commented 3 years ago

I am running into the following error on my system (description below):

Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Building wheels for collected packages: jsonnet
Building wheel for jsonnet (setup.py) ... error

ERROR: Command errored out with exit status 1:
   command: /Users/krishna/opt/anaconda3/envs/diverseKP_coling/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/tl/z_wgpn0178dfksgdr5qs4skm0000gn/T/pip-install-7jbllsdt/jsonnet_4a0455483bfe465cb0779133512b6c93/setup.py'"'"'; __file__='"'"'/private/var/folders/tl/z_wgpn0178dfksgdr5qs4skm0000gn/T/pip-install-7jbllsdt/jsonnet_4a0455483bfe465cb0779133512b6c93/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/tl/z_wgpn0178dfksgdr5qs4skm0000gn/T/pip-wheel-zsivufg4
       cwd: /private/var/folders/tl/z_wgpn0178dfksgdr5qs4skm0000gn/T/pip-install-7jbllsdt/jsonnet_4a0455483bfe465cb0779133512b6c93/
  Complete output (108 lines):
  running bdist_wheel
  running build
  running build_ext
  c++ -c -g -O3 -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC -Iinclude -Ithird_party/md5 -Ithird_party/json core/desugarer.cpp -o core/desugarer.o
  c++ -c -g -O3 -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC -Iinclude -Ithird_party/md5 -Ithird_party/json core/formatter.cpp -o core/formatter.o
  c++ -c -g -O3 -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC -Iinclude -Ithird_party/md5 -Ithird_party/json core/libjsonnet.cpp -o core/libjsonnet.o
  c++ -c -g -O3 -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC -Iinclude -Ithird_party/md5 -Ithird_party/json core/lexer.cpp -o core/lexer.o
  c++ -c -g -O3 -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC -Iinclude -Ithird_party/md5 -Ithird_party/json core/parser.cpp -o core/parser.o
  c++ -c -g -O3 -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC -Iinclude -Ithird_party/md5 -Ithird_party/json core/pass.cpp -o core/pass.o
  c++ -c -g -O3 -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC -Iinclude -Ithird_party/md5 -Ithird_party/json core/static_analysis.cpp -o core/static_analysis.o
  c++ -c -g -O3 -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC -Iinclude -Ithird_party/md5 -Ithird_party/json core/string_utils.cpp -o core/string_utils.o
  c++ -c -g -O3 -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC -Iinclude -Ithird_party/md5 -Ithird_party/json core/vm.cpp -o core/vm.o
  In file included from core/vm.cpp:26:
  third_party/json/json.hpp:13087:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-extensions]
      JSON_NODISCARD
      ^
  third_party/json/json.hpp:496:34: note: expanded from macro 'JSON_NODISCARD'
          #define JSON_NODISCARD [[nodiscard]]
                                   ^
  third_party/json/json.hpp:14262:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-extensions]
      JSON_NODISCARD
      ^
  third_party/json/json.hpp:496:34: note: expanded from macro 'JSON_NODISCARD'
          #define JSON_NODISCARD [[nodiscard]]
                                   ^
  third_party/json/json.hpp:14306:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-extensions]
      JSON_NODISCARD
      ^
  third_party/json/json.hpp:496:34: note: expanded from macro 'JSON_NODISCARD'
          #define JSON_NODISCARD [[nodiscard]]
                                   ^
  third_party/json/json.hpp:18858:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-extensions]
      JSON_NODISCARD
      ^
  third_party/json/json.hpp:496:34: note: expanded from macro 'JSON_NODISCARD'
          #define JSON_NODISCARD [[nodiscard]]
                                   ^
  third_party/json/json.hpp:19627:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-extensions]
      JSON_NODISCARD
      ^
  third_party/json/json.hpp:496:34: note: expanded from macro 'JSON_NODISCARD'
          #define JSON_NODISCARD [[nodiscard]]
                                   ^
  third_party/json/json.hpp:19643:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-extensions]
      JSON_NODISCARD
      ^
  third_party/json/json.hpp:496:34: note: expanded from macro 'JSON_NODISCARD'
          #define JSON_NODISCARD [[nodiscard]]
                                   ^
  third_party/json/json.hpp:19736:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-extensions]
      JSON_NODISCARD
      ^
  third_party/json/json.hpp:496:34: note: expanded from macro 'JSON_NODISCARD'
          #define JSON_NODISCARD [[nodiscard]]
                                   ^
  third_party/json/json.hpp:19752:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-extensions]
      JSON_NODISCARD
      ^
  third_party/json/json.hpp:496:34: note: expanded from macro 'JSON_NODISCARD'
          #define JSON_NODISCARD [[nodiscard]]
                                   ^
  third_party/json/json.hpp:19824:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-extensions]
      JSON_NODISCARD
      ^
  third_party/json/json.hpp:496:34: note: expanded from macro 'JSON_NODISCARD'
          #define JSON_NODISCARD [[nodiscard]]
                                   ^
  third_party/json/json.hpp:19840:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-extensions]
      JSON_NODISCARD
      ^
  third_party/json/json.hpp:496:34: note: expanded from macro 'JSON_NODISCARD'
          #define JSON_NODISCARD [[nodiscard]]
                                   ^
  third_party/json/json.hpp:19911:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-extensions]
      JSON_NODISCARD
      ^
  third_party/json/json.hpp:496:34: note: expanded from macro 'JSON_NODISCARD'
          #define JSON_NODISCARD [[nodiscard]]
                                   ^
  third_party/json/json.hpp:19927:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-extensions]
      JSON_NODISCARD
      ^
  third_party/json/json.hpp:496:34: note: expanded from macro 'JSON_NODISCARD'
          #define JSON_NODISCARD [[nodiscard]]
                                   ^
  third_party/json/json.hpp:20516:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-extensions]
      JSON_NODISCARD
      ^
  third_party/json/json.hpp:496:34: note: expanded from macro 'JSON_NODISCARD'
          #define JSON_NODISCARD [[nodiscard]]
                                   ^
  13 warnings generated.
  c++ -c -g -O3 -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC -Iinclude -Ithird_party/md5 -Ithird_party/json third_party/md5/md5.cpp -o third_party/md5/md5.o
  building '_jsonnet' extension
  creating build
  creating build/temp.macosx-10.7-x86_64-3.7
  creating build/temp.macosx-10.7-x86_64-3.7/python
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/krishna/opt/anaconda3/envs/diverseKP_coling/include -arch x86_64 -I/Users/krishna/opt/anaconda3/envs/diverseKP_coling/include -arch x86_64 -Iinclude -Ithird_party/md5 -Ithird_party/json -I/Users/krishna/opt/anaconda3/envs/diverseKP_coling/include/python3.7m -c python/_jsonnet.c -o build/temp.macosx-10.7-x86_64-3.7/python/_jsonnet.o
  python/_jsonnet.c:150:19: warning: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long') [-Wsign-compare]
      for (i = 0; i < ctx->argc; ++i) {
                  ~ ^ ~~~~~~~~~
  1 warning generated.
  creating build/lib.macosx-10.7-x86_64-3.7
  g++ -bundle -undefined dynamic_lookup -L/Users/krishna/opt/anaconda3/envs/diverseKP_coling/lib -arch x86_64 -L/Users/krishna/opt/anaconda3/envs/diverseKP_coling/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-3.7/python/_jsonnet.o core/desugarer.o core/formatter.o core/libjsonnet.o core/lexer.o core/parser.o core/pass.o core/static_analysis.o core/string_utils.o core/vm.o third_party/md5/md5.o -o build/lib.macosx-10.7-x86_64-3.7/_jsonnet.cpython-37m-darwin.so
  clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
  ld: library not found for -lstdc++
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  error: command 'g++' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for jsonnet
  Running setup.py clean for jsonnet
Failed to build jsonnet
Installing collected packages: jsonnet, h5py, gevent, ftfy, flask-cors, flaky, editdistance, conllu, allennlp
    Running setup.py install for jsonnet ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/krishna/opt/anaconda3/envs/diverseKP_coling/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/tl/z_wgpn0178dfksgdr5qs4skm0000gn/T/pip-install-7jbllsdt/jsonnet_4a0455483bfe465cb0779133512b6c93/setup.py'"'"'; __file__='"'"'/private/var/folders/tl/z_wgpn0178dfksgdr5qs4skm0000gn/T/pip-install-7jbllsdt/jsonnet_4a0455483bfe465cb0779133512b6c93/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/tl/z_wgpn0178dfksgdr5qs4skm0000gn/T/pip-record-2q8gok5b/install-record.txt --single-version-externally-managed --compile --install-headers /Users/krishna/opt/anaconda3/envs/diverseKP_coling/include/python3.7m/jsonnet
         cwd: /private/var/folders/tl/z_wgpn0178dfksgdr5qs4skm0000gn/T/pip-install-7jbllsdt/jsonnet_4a0455483bfe465cb0779133512b6c93/
    Complete output (28 lines):
    running install
    running build
    running build_ext
    make: `core/desugarer.o' is up to date.
    make: `core/formatter.o' is up to date.
    make: `core/libjsonnet.o' is up to date.
    make: `core/lexer.o' is up to date.
    make: `core/parser.o' is up to date.
    make: `core/pass.o' is up to date.
    make: `core/static_analysis.o' is up to date.
    make: `core/string_utils.o' is up to date.
    make: `core/vm.o' is up to date.
    make: `third_party/md5/md5.o' is up to date.
    building '_jsonnet' extension
    creating build
    creating build/temp.macosx-10.7-x86_64-3.7
    creating build/temp.macosx-10.7-x86_64-3.7/python
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/krishna/opt/anaconda3/envs/diverseKP_coling/include -arch x86_64 -I/Users/krishna/opt/anaconda3/envs/diverseKP_coling/include -arch x86_64 -Iinclude -Ithird_party/md5 -Ithird_party/json -I/Users/krishna/opt/anaconda3/envs/diverseKP_coling/include/python3.7m -c python/_jsonnet.c -o build/temp.macosx-10.7-x86_64-3.7/python/_jsonnet.o
    python/_jsonnet.c:150:19: warning: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long') [-Wsign-compare]
        for (i = 0; i < ctx->argc; ++i) {
                    ~ ^ ~~~~~~~~~
    1 warning generated.
    creating build/lib.macosx-10.7-x86_64-3.7
    g++ -bundle -undefined dynamic_lookup -L/Users/krishna/opt/anaconda3/envs/diverseKP_coling/lib -arch x86_64 -L/Users/krishna/opt/anaconda3/envs/diverseKP_coling/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-3.7/python/_jsonnet.o core/desugarer.o core/formatter.o core/libjsonnet.o core/lexer.o core/parser.o core/pass.o core/static_analysis.o core/string_utils.o core/vm.o third_party/md5/md5.o -o build/lib.macosx-10.7-x86_64-3.7/_jsonnet.cpython-37m-darwin.so
    clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
    ld: library not found for -lstdc++
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command 'g++' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/krishna/opt/anaconda3/envs/diverseKP_coling/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/tl/z_wgpn0178dfksgdr5qs4skm0000gn/T/pip-install-7jbllsdt/jsonnet_4a0455483bfe465cb0779133512b6c93/setup.py'"'"'; __file__='"'"'/private/var/folders/tl/z_wgpn0178dfksgdr5qs4skm0000gn/T/pip-install-7jbllsdt/jsonnet_4a0455483bfe465cb0779133512b6c93/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/tl/z_wgpn0178dfksgdr5qs4skm0000gn/T/pip-record-2q8gok5b/install-record.txt --single-version-externally-managed --compile --install-headers /Users/krishna/opt/anaconda3/envs/diverseKP_coling/include/python3.7m/jsonnet Check the logs for full command output.
wtsong commented 3 years ago

I have a potentially similar problem for MacOS Big Sur when installing the Python binding.

System set up is:

MacOS Big Sur version 11.5.2
Python 3.7.11
$ c++ --version
Apple clang version 12.0.5 (clang-1205.0.22.11)
$ gcc --version
gcc (Homebrew GCC 11.1.0) 11.1.0

Full error message:

$ pip install jsonnet
Collecting jsonnet
  Using cached jsonnet-0.17.0.tar.gz (259 kB)
Building wheels for collected packages: jsonnet
  Building wheel for jsonnet (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/myusername/opt/anaconda3/envs/relatio_env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-install-s7_7k4be/jsonnet_d73318ab13364642920bb6a98a7f50be/setup.py'"'"'; __file__='"'"'/private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-install-s7_7k4be/jsonnet_d73318ab13364642920bb6a98a7f50be/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-wheel-e00faior
       cwd: /private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-install-s7_7k4be/jsonnet_d73318ab13364642920bb6a98a7f50be/
  Complete output (100 lines):
  running bdist_wheel
  running build
  running build_ext
  c++ -c -g -O3 -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC -Iinclude -Ithird_party/md5 -Ithird_party/json core/desugarer.cpp -o core/desugarer.o
  c++ -c -g -O3 -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC -Iinclude -Ithird_party/md5 -Ithird_party/json core/formatter.cpp -o core/formatter.o
  c++ -c -g -O3 -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC -Iinclude -Ithird_party/md5 -Ithird_party/json core/libjsonnet.cpp -o core/libjsonnet.o
  c++ -c -g -O3 -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC -Iinclude -Ithird_party/md5 -Ithird_party/json core/lexer.cpp -o core/lexer.o
  c++ -c -g -O3 -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC -Iinclude -Ithird_party/md5 -Ithird_party/json core/parser.cpp -o core/parser.o
  In file included from core/parser.cpp:18:
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:321:9: error: no member named 'signbit' in the global namespace
  using ::signbit;
        ~~^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:322:9: error: no member named 'fpclassify' in the global namespace
  using ::fpclassify;
        ~~^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:323:9: error: no member named 'isfinite' in the global namespace; did you mean 'finite'?
  using ::isfinite;
        ~~^
  /usr/local/include/math.h:752:12: note: 'finite' declared here
  extern int finite(double)
             ^
  In file included from core/parser.cpp:18:
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:324:9: error: no member named 'isinf' in the global namespace
  using ::isinf;
        ~~^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:325:9: error: no member named 'isnan' in the global namespace
  using ::isnan;
        ~~^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:326:9: error: no member named 'isnormal' in the global namespace
  using ::isnormal;
        ~~^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:327:9: error: no member named 'isgreater' in the global namespace
  using ::isgreater;
        ~~^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:328:9: error: no member named 'isgreaterequal' in the global namespace
  using ::isgreaterequal;
        ~~^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:329:9: error: no member named 'isless' in the global namespace
  using ::isless;
        ~~^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:330:9: error: no member named 'islessequal' in the global namespace
  using ::islessequal;
        ~~^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:331:9: error: no member named 'islessgreater' in the global namespace
  using ::islessgreater;
        ~~^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:332:9: error: no member named 'isunordered' in the global namespace
  using ::isunordered;
        ~~^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:333:9: error: no member named 'isunordered' in the global namespace
  using ::isunordered;
        ~~^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:644:26: error: no template named 'numeric_limits'
      bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
                           ^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:644:60: error: no template named 'numeric_limits'
      bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
                                                             ^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:645:18: error: no template named 'numeric_limits'
      int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
                   ^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:645:50: error: no template named 'numeric_limits'
      int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
                                                   ^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:650:17: error: no template named 'numeric_limits'
    static_assert(numeric_limits<_FloatT>::radix == 2, "FloatT has incorrect radix");
                  ^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:653:25: error: no template named 'numeric_limits'
    return _FloatBigger ? numeric_limits<_IntT>::max() :  (numeric_limits<_IntT>::max() >> _Bits << _Bits);
                          ^
  fatal error: too many errors emitted, stopping now [-ferror-limit=]
  20 errors generated.
  make: *** [core/parser.o] Error 1
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-install-s7_7k4be/jsonnet_d73318ab13364642920bb6a98a7f50be/setup.py", line 75, in <module>
      test_suite="python._jsonnet_test",
    File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-install-s7_7k4be/jsonnet_d73318ab13364642920bb6a98a7f50be/setup.py", line 54, in run
      raise Exception('Could not build %s' % (', '.join(LIB_OBJECTS)))
  Exception: Could not build core/desugarer.o, core/formatter.o, core/libjsonnet.o, core/lexer.o, core/parser.o, core/pass.o, core/static_analysis.o, core/string_utils.o, core/vm.o, third_party/md5/md5.o
  ----------------------------------------
  ERROR: Failed building wheel for jsonnet
  Running setup.py clean for jsonnet
Failed to build jsonnet
Installing collected packages: jsonnet
    Running setup.py install for jsonnet ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/myusername/opt/anaconda3/envs/relatio_env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-install-s7_7k4be/jsonnet_d73318ab13364642920bb6a98a7f50be/setup.py'"'"'; __file__='"'"'/private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-install-s7_7k4be/jsonnet_d73318ab13364642920bb6a98a7f50be/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-record-3_vbz6iw/install-record.txt --single-version-externally-managed --compile --install-headers /Users/myusername/opt/anaconda3/envs/relatio_env/include/python3.7m/jsonnet
         cwd: /private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-install-s7_7k4be/jsonnet_d73318ab13364642920bb6a98a7f50be/
    Complete output (102 lines):
    running install
    running build
    running build_ext
    make: `core/desugarer.o' is up to date.
    make: `core/formatter.o' is up to date.
    make: `core/libjsonnet.o' is up to date.
    make: `core/lexer.o' is up to date.
    c++ -c -g -O3 -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC -Iinclude -Ithird_party/md5 -Ithird_party/json core/parser.cpp -o core/parser.o
    In file included from core/parser.cpp:18:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:321:9: error: no member named 'signbit' in the global namespace
    using ::signbit;
          ~~^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:322:9: error: no member named 'fpclassify' in the global namespace
    using ::fpclassify;
          ~~^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:323:9: error: no member named 'isfinite' in the global namespace; did you mean 'finite'?
    using ::isfinite;
          ~~^
    /usr/local/include/math.h:752:12: note: 'finite' declared here
    extern int finite(double)
               ^
    In file included from core/parser.cpp:18:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:324:9: error: no member named 'isinf' in the global namespace
    using ::isinf;
          ~~^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:325:9: error: no member named 'isnan' in the global namespace
    using ::isnan;
          ~~^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:326:9: error: no member named 'isnormal' in the global namespace
    using ::isnormal;
          ~~^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:327:9: error: no member named 'isgreater' in the global namespace
    using ::isgreater;
          ~~^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:328:9: error: no member named 'isgreaterequal' in the global namespace
    using ::isgreaterequal;
          ~~^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:329:9: error: no member named 'isless' in the global namespace
    using ::isless;
          ~~^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:330:9: error: no member named 'islessequal' in the global namespace
    using ::islessequal;
          ~~^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:331:9: error: no member named 'islessgreater' in the global namespace
    using ::islessgreater;
          ~~^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:332:9: error: no member named 'isunordered' in the global namespace
    using ::isunordered;
          ~~^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:333:9: error: no member named 'isunordered' in the global namespace
    using ::isunordered;
          ~~^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:644:26: error: no template named 'numeric_limits'
        bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
                             ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:644:60: error: no template named 'numeric_limits'
        bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
                                                               ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:645:18: error: no template named 'numeric_limits'
        int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
                     ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:645:50: error: no template named 'numeric_limits'
        int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
                                                     ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:650:17: error: no template named 'numeric_limits'
      static_assert(numeric_limits<_FloatT>::radix == 2, "FloatT has incorrect radix");
                    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:653:25: error: no template named 'numeric_limits'
      return _FloatBigger ? numeric_limits<_IntT>::max() :  (numeric_limits<_IntT>::max() >> _Bits << _Bits);
                            ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    make: *** [core/parser.o] Error 1
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-install-s7_7k4be/jsonnet_d73318ab13364642920bb6a98a7f50be/setup.py", line 75, in <module>
        test_suite="python._jsonnet_test",
      File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/command/install.py", line 545, in run
        self.run_command('build')
      File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Users/myusername/opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-install-s7_7k4be/jsonnet_d73318ab13364642920bb6a98a7f50be/setup.py", line 54, in run
        raise Exception('Could not build %s' % (', '.join(LIB_OBJECTS)))
    Exception: Could not build core/desugarer.o, core/formatter.o, core/libjsonnet.o, core/lexer.o, core/parser.o, core/pass.o, core/static_analysis.o, core/string_utils.o, core/vm.o, third_party/md5/md5.o
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/myusername/opt/anaconda3/envs/relatio_env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-install-s7_7k4be/jsonnet_d73318ab13364642920bb6a98a7f50be/setup.py'"'"'; __file__='"'"'/private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-install-s7_7k4be/jsonnet_d73318ab13364642920bb6a98a7f50be/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-record-3_vbz6iw/install-record.txt --single-version-externally-managed --compile --install-headers /Users/myusername/opt/anaconda3/envs/relatio_env/include/python3.7m/jsonnet Check the logs for full command output.
cybniv commented 2 years ago

I had the same problem with CFLAGS set to

-march=native -mtune=native -O3 -pipe

Resolved by unsetting these (via unset) before installing package.