google / google/go-jsonnet

Python binding: `pip install gojsonnet` fails

Open
#564 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.8k
Forks
263
PR merge metrics
No merged PRs in 30d

Description

Environments:
```
> go version
go version go1.17.1 darwin/amd64
> python --version
Python 3.7.1
```

I ran command
```
pip install gojsonnet
```

I got result:

```bash
Collecting gojsonnet
Downloading https://files.pythonhosted.org/packages/a2/56/6a06de30e29ef322320158573409c953ef9edb7fa68989449a02e1e8c962/gojsonnet-0.17.0.tar.gz (6.5MB)
|████████████████████████████████| 6.5MB 58kB/s
Building wheels for collected packages: gojsonnet
Building wheel for gojsonnet (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Users/zhijunliao/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c4/_r38rff12n119phlyknjt0y40000gn/T/pip-install-ni2qntp8/gojsonnet/setup.py'"'"'; __file__='"'"'/private/var/folders/c4/_r38rff12n119phlyknjt0y40000gn/T/pip-install-ni2qntp8/gojsonnet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/c4/_r38rff12n119phlyknjt0y40000gn/T/pip-wheel-ay5t19bo --python-tag cp37
cwd: /private/var/folders/c4/_r38rff12n119phlyknjt0y40000gn/T/pip-install-ni2qntp8/gojsonnet/
Complete output (30 lines):
running bdist_wheel
running build
running build_ext
building '_gojsonnet' 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/zhijunliao/anaconda3/include -arch x86_64 -I/Users/zhijunliao/anaconda3/include -arch x86_64 -Icpp-jsonnet/include -I/Users/zhijunliao/anaconda3/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) {
~ ^ ~~~~~~~~~
python/_jsonnet.c:504:23: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
jpath_str = PyUnicode_AsUTF8(jpathdir);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
python/_jsonnet.c:516:31: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
jpath_str = PyUnicode_AsUTF8(jpath);
^ ~~~~~~~~~~~~~~~~~~~~~~~
python/_jsonnet.c:593:23: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
jpath_str = PyUnicode_AsUTF8(jpathdir);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
python/_jsonnet.c:605:31: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
jpath_str = PyUnicode_AsUTF8(jpath);
^ ~~~~~~~~~~~~~~~~~~~~~~~
5 warnings generated.
creating build/lib.macosx-10.7-x86_64-3.7
g++ -bundle -undefined dynamic_lookup -L/Users/zhijunliao/anaconda3/lib -arch x86_64 -L/Users/zhijunliao/anaconda3/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-3.7/python/_jsonnet.o /private/var/folders/c4/_r38rff12n119phlyknjt0y40000gn/T/pip-install-ni2qntp8/gojsonnet/c-bindings/libgojsonnet.a -o build/lib.macosx-10.7-x86_64-3.7/_gojsonnet.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 gojsonnet
Running setup.py clean for gojsonnet
Failed to build gojsonnet
Installing collected packages: gojsonnet
Running setup.py install for gojsonnet ... error
ERROR: Command errored out with exit status 1:
command: /Users/zhijunliao/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c4/_r38rff12n119phlyknjt0y40000gn/T/pip-install-ni2qntp8/gojsonnet/setup.py'"'"'; __file__='"'"'/private/var/folders/c4/_r38rff12n119phlyknjt0y40000gn/T/pip-install-ni2qntp8/gojsonnet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/c4/_r38rff12n119phlyknjt0y40000gn/T/pip-record-jzk4zgr0/install-record.txt --single-version-externally-managed --compile
cwd: /private/var/folders/c4/_r38rff12n119phlyknjt0y40000gn/T/pip-install-ni2qntp8/gojsonnet/
Complete output (30 lines):
running install
running build
running build_ext
building '_gojsonnet' 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/zhijunliao/anaconda3/include -arch x86_64 -I/Users/zhijunliao/anaconda3/include -arch x86_64 -Icpp-jsonnet/include -I/Users/zhijunliao/anaconda3/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) {
~ ^ ~~~~~~~~~
python/_jsonnet.c:504:23: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
jpath_str = PyUnicode_AsUTF8(jpathdir);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
python/_jsonnet.c:516:31: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
jpath_str = PyUnicode_AsUTF8(jpath);
^ ~~~~~~~~~~~~~~~~~~~~~~~
python/_jsonnet.c:593:23: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
jpath_str = PyUnicode_AsUTF8(jpathdir);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
python/_jsonnet.c:605:31: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
jpath_str = PyUnicode_AsUTF8(jpath);
^ ~~~~~~~~~~~~~~~~~~~~~~~
5 warnings generated.
creating build/lib.macosx-10.7-x86_64-3.7
g++ -bundle -undefined dynamic_lookup -L/Users/zhijunliao/anaconda3/lib -arch x86_64 -L/Users/zhijunliao/anaconda3/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-3.7/python/_jsonnet.o /private/var/folders/c4/_r38rff12n119phlyknjt0y40000gn/T/pip-install-ni2qntp8/gojsonnet/c-bindings/libgojsonnet.a -o build/lib.macosx-10.7-x86_64-3.7/_gojsonnet.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/zhijunliao/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c4/_r38rff12n119phlyknjt0y40000gn/T/pip-install-ni2qntp8/gojsonnet/setup.py'"'"'; __file__='"'"'/private/var/folders/c4/_r38rff12n119phlyknjt0y40000gn/T/pip-install-ni2qntp8/gojsonnet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/c4/_r38rff12n119phlyknjt0y40000gn/T/pip-record-jzk4zgr0/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.