relatio-nlp/relatio

Error installing on MacOS Big Sur

Closed this issue · 8 comments

The installation breaks when building wheel for jsonnet. Would you have suggestions to get around it? This is with:

  • MacOS Big Sur 11.5.2
  • Xcode 12.5.1
  • gcc 11.1.0
  • setuptools 58.0.4

Full error message is included below:

Building wheel for jsonnet (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Users//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-p_4plavj/jsonnet_c6060f3b530b4452b587087546ce28d3/setup.py'"'"'; file='"'"'/private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-install-p_4plavj/jsonnet_c6060f3b530b4452b587087546ce28d3/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-jjlhu9fk
cwd: /private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-install-p_4plavj/jsonnet_c6060f3b530b4452b587087546ce28d3/
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 "", line 1, in
File "/private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-install-p_4plavj/jsonnet_c6060f3b530b4452b587087546ce28d3/setup.py", line 75, in
test_suite="python._jsonnet_test",
File "/Users//opt/anaconda3/envs/relatio_env/lib/python3.7/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/Users//opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users//opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Users//opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users//opt/anaconda3/envs/relatio_env/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/Users//opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users//opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users//opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Users//opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users//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-p_4plavj/jsonnet_c6060f3b530b4452b587087546ce28d3/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
Successfully built relatio
Failed to build jsonnet
Installing collected packages: zipp, typing-extensions, traitlets, six, pyrsistent, importlib-metadata, attrs, wcwidth, tornado, pyzmq, python-dateutil, pyparsing, ptyprocess, parso, nest-asyncio, jupyter-core, jsonschema, ipython-genutils, entrypoints, webencodings, pygments, pycparser, prompt-toolkit, pickleshare, pexpect, packaging, nbformat, matplotlib-inline, MarkupSafe, jupyter-client, jedi, decorator, backcall, appnope, testpath, pandocfilters, nbclient, more-itertools, mistune, jupyterlab-pygments, jinja2, ipython, defusedxml, debugpy, cffi, bleach, argcomplete, terminado, Send2Trash, pytz, pyasn1, prometheus-client, nbconvert, jaraco.functools, ipykernel, argon2-cffi, urllib3, tempora, rsa, pyasn1-modules, protobuf, numpy, notebook, murmurhash, jaraco.text, jaraco.classes, idna, cymem, click, charset-normalizer, catalogue, cachetools, zc.lockfile, widgetsnbextension, wasabi, typer, tqdm, srsly, soupsieve, sortedcontainers, smmap, smart-open, sgmllib3k, requests, regex, qtpy, pydantic, preshed, portend, lxml, jupyterlab-widgets, joblib, jmespath, jaraco.collections, googleapis-common-protos, google-auth, filelock, cryptography, cheroot, chardet, blis, tokenizers, thinc, spacy-legacy, scipy, sacremoses, qtconsole, pyyaml, python-docx, pdfminer.six, pathy, oauthlib, nltk, jupyter-console, ipywidgets, huggingface-hub, google-crc32c, google-api-core, gitdb, future, feedparser, dill, cherrypy, botocore, beautifulsoup4, backports.csv, xxhash, transformers, torch, toml, threadpoolctl, subprocess32, spacy, shortuuid, sentry-sdk, s3transfer, requests-oauthlib, pyarrow, py, psutil, promise, pluggy, pillow, patternfork-nosql, pathtools, pandas, munch, multiprocess, jupyter, iso-639, iniconfig, google-resumable-media, google-cloud-core, GitPython, fsspec, docker-pycreds, configparser, cached-property, werkzeug, wandb, torchvision, termcolor, tensorboardX, tensorboard-plugin-wit, tensorboard-data-server, sqlitedict, sentencepiece, scikit-learn, pytest, overrides, markdown, lmdb, jsonnet, h5py, grpcio, google-cloud-storage, google-auth-oauthlib, fairscale, datasets, checklist, boto3, base58, absl-py, wrapt, word2number, tensorflow-estimator, tensorboard, py-rouge, opt-einsum, networkx, kiwisolver, keras-preprocessing, keras, jsonpickle, google-pasta, gast, ftfy, flatbuffers, cycler, conllu, clang, astunparse, allennlp, tensorflow-hub, tensorflow, pyvis, matplotlib, gensim, allennlp-models, relatio
Running setup.py install for jsonnet ... error
ERROR: Command errored out with exit status 1:
command: /Users//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-p_4plavj/jsonnet_c6060f3b530b4452b587087546ce28d3/setup.py'"'"'; file='"'"'/private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-install-p_4plavj/jsonnet_c6060f3b530b4452b587087546ce28d3/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-p6obmgna/install-record.txt --single-version-externally-managed --compile --install-headers /Users//opt/anaconda3/envs/relatio_env/include/python3.7m/jsonnet
cwd: /private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-install-p_4plavj/jsonnet_c6060f3b530b4452b587087546ce28d3/
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 "", line 1, in
File "/private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-install-p_4plavj/jsonnet_c6060f3b530b4452b587087546ce28d3/setup.py", line 75, in
test_suite="python._jsonnet_test",
File "/Users//opt/anaconda3/envs/relatio_env/lib/python3.7/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/Users//opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users//opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Users//opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users//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//opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/Users//opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users//opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users//opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Users//opt/anaconda3/envs/relatio_env/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users//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-p_4plavj/jsonnet_c6060f3b530b4452b587087546ce28d3/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//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-p_4plavj/jsonnet_c6060f3b530b4452b587087546ce28d3/setup.py'"'"'; file='"'"'/private/var/folders/y0/qbyqy5l536z1nlbmf82zldj00000gn/T/pip-install-p_4plavj/jsonnet_c6060f3b530b4452b587087546ce28d3/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-p6obmgna/install-record.txt --single-version-externally-managed --compile --install-headers /Users//opt/anaconda3/envs/relatio_env/include/python3.7m/jsonnet Check the logs for full command output.

@wtsong just to make sure:

  • do you have M1 mac?
  • which python version are you using?
  • did you first upgrade pip, wheel and setuptools via python -m pip install -U pip wheel setuptools?

Hi Andrei @aplamada:

  • No, I have the Intel Mac,
  • I created a clean conda environment with python 3.7.11
  • Yes, pip, wheel and setuptools are all up to date.

Great! I probably have a very similar system with yours. But you might have some changes in your config files. Make sure that you have a pretty clean .bash_profile and .profile files.

I suggest that you start with a new conda env, called next also relatio.
Please try the next commands:

$ conda activate
$ conda create -n relatio python=3.7.11
$ conda activate relatio
$ python -m pip install -U pip wheel setuptools
$ python -m pip install git+https://github.com/relatio-nlp/relatio

I checked my jsonnet

Collecting jsonnet>=0.10.0
  Using cached jsonnet-0.17.0-cp37-cp37m-macosx_10_9_x86_64.whl

Thanks! Followed all the steps. I am still having trouble at the jsonnet step though. Same error messages as before. If you have any suggestions let me know. I might try reinstalling Anaconda if it is working for you with a similar configuration.

This is my .bashrc:

export PATH="$PATH:$HOME/.rvm/bin"
export GEM_HOME=$HOME/gems
export PATH=$HOME/gems/bin:$PATH

And this is my .bash_profile:

[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile

export RBENV_ROOT=/usr/local/var/rbenv
export PATH=$PATH:/Users/myusername/bin
eval "$(rbenv init -)"

# added by Anaconda3 2019.07 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/Users/myusername/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
    \eval "$__conda_setup"
else
    if [ -f "/Users/myusername/anaconda3/etc/profile.d/conda.sh" ]; then
# . "/Users/myusername/anaconda3/etc/profile.d/conda.sh"  # commented out by conda initialize
        CONDA_CHANGEPS1=false conda activate base
    else
        \export PATH="/Users/myusername/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda init <<<

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/myusername/opt/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/Users/myusername/opt/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/Users/myusername/opt/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/Users/myusername/opt/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

# Source bashrc for customization
if [ -f ~/.bashrc ]; then
    source ~/.bashrc
fi

Please try to reinstall Anaconda (or you might try miniconda).
First remove Anaconda.
In case you use Homebrew , you can install miniconda directly https://formulae.brew.sh/cask/miniconda.

Please let us know.
In case you still experience issues please contact directly jsonnet team since your issue is related to this package.

@wtsong you mentioned that you have gcc 1.1.0 .
I guess there is an issue there. Please have a look bellow at my version

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.5 (clang-1205.0.22.11)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Great, thanks so much @aplamada! That was exactly the problem. My gcc/g++ compilers point to brew installations rather than xcode installations, which somehow caused problem for jsonnet.

What worked for me is to remove completely the /usr/local/ folder, particularly brew, as per this suggestion. I tried using aliases to point gcc/g++ to the latest version, but didn't seem to help.

The installation problem occured for:

$ gcc --version
gcc (Homebrew GCC 11.1.0) 11.1.0

After resetting /usr/local/ the compilers are the same as your version, and installation goes through:

$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.5 (clang-1205.0.22.11)

Thanks again. 👍

You are welcome!
If you simply install gcc with brew you should get only gcc-11.
I guess there was something else on top.

$ ls /usr/local/bin/gcc-*
/usr/local/bin/gcc-11        /usr/local/bin/gcc-ar-11     /usr/local/bin/gcc-nm-11     /usr/local/bin/gcc-ranlib-11

I am happy that your issue is solve.