Open
Description
When i run pip install jsonnet
I got this error:
Collecting jsonnet
Using cached https://files.pythonhosted.org/packages/60/dc/3abd3971869a741d7acdba166d71d4f9366b6b53028dfd56f95de356af0f/jsonnet-0.12.1.tar.gz
Building wheels for collected packages: jsonnet
Running setup.py bdist_wheel for jsonnet ... error
Complete output from command /anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/2t/mwfz47ts25b4w7hmv_lr2jjh0000gn/T/pip-install-kyupa_v9/jsonnet/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/2t/mwfz47ts25b4w7hmv_lr2jjh0000gn/T/pip-wheel-cz87ljal --python-tag cp36:
running bdist_wheel
running build
running build_ext
clang++ -c -mmacosx-version-min=10.9 -stdlib=libc++ -fPIC core/desugarer.cpp -o core/desugarer.o
In file included from core/desugarer.cpp:21:
In file included from core/ast.h:29:
In file included from core/lexer.h:30:
core/unicode.h:126:22: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (char32_t cp : s)
^
core/unicode.h:172:21: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (char c : ss.str())
^
In file included from core/desugarer.cpp:21:
In file included from core/ast.h:29:
core/lexer.h:145:15: error: no member named 'emplace_back' in 'std::__1::vector<FodderElement, std::__1::allocator<FodderElement> >'
a.emplace_back(FodderElement::PARAGRAPH, elem.blanks, elem.indent, elem.comment);
~ ^
core/lexer.h:153:15: error: no member named 'emplace_back' in 'std::__1::vector<FodderElement, std::__1::allocator<FodderElement> >'
a.emplace_back(FodderElement::LINE_END, 0, elem.indent, std::vector<std::string>());
~ ^
core/lexer.h:196:63: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
fodder_push_back(fodder, FodderElement(FodderElement::Kind::LINE_END, 0, 0, {}));
^
core/lexer.h:196:85: error: expected expression
fodder_push_back(fodder, FodderElement(FodderElement::Kind::LINE_END, 0, 0, {}));
^
core/lexer.h:214:16: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
for (const auto &elem : fodder) {
^
core/lexer.h:214:27: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (const auto &elem : fodder) {
^
core/lexer.h:223:16: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
for (const auto &f : fodder) {
^
core/lexer.h:223:24: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (const auto &f : fodder) {
^
In file included from core/desugarer.cpp:21:
core/ast.h:375:47: error: expected '(' for function-style cast or type construction
: AST(lr, AST_BUILTIN_FUNCTION, Fodder{}), name(name), params(params)
~~~~~~^
core/ast.h:706:34: error: expected '(' for function-style cast or type construction
Fodder{},
~~~~~~^
core/ast.h:707:34: error: expected '(' for function-style cast or type construction
Fodder{},
~~~~~~^
core/ast.h:713:37: error: expected '(' for function-style cast or type construction
ArgParams{},
~~~~~~~~~^
core/ast.h:748:34: error: expected '(' for function-style cast or type construction
Fodder{},
~~~~~~^
core/ast.h:749:34: error: expected '(' for function-style cast or type construction
Fodder{},
~~~~~~^
core/ast.h:750:34: error: expected '(' for function-style cast or type construction
Fodder{},
~~~~~~^
core/ast.h:756:37: error: expected '(' for function-style cast or type construction
ArgParams{},
~~~~~~~~~^
core/ast.h:806:47: error: expected '(' for function-style cast or type construction
: AST(lr, AST_DESUGARED_OBJECT, Fodder{}), asserts(asserts), fields(fields)
~~~~~~^
core/ast.h:838:58: error: expected '(' for function-style cast or type construction
: AST(lr, AST_OBJECT_COMPREHENSION_SIMPLE, Fodder{}),
~~~~~~^
core/ast.h:942:29: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <class T, class... Args>
^
core/ast.h:943:18: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
T *make(Args &&... args)
^
core/ast.h:945:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto r = new T(std::forward<Args>(args)...);
^
core/ast.h:953:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto r = new T(*ast);
^
core/ast.h:963:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto it = internedIdentifiers.find(name);
^
core/ast.h:967:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto r = new Identifier(name);
^
core/ast.h:973:14: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
for (auto x : allocated) {
^
core/ast.h:973:21: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (auto x : allocated) {
^
core/ast.h:977:14: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
for (auto x : internedIdentifiers) {
^
core/ast.h:977:21: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (auto x : internedIdentifiers) {
^
core/ast.h:1072:1: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto precedence_map = build_precedence_map();
^
core/ast.h:1073:1: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto unary_map = build_unary_map();
^
core/ast.h:1074:1: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto binary_map = build_binary_map();
^
In file included from core/desugarer.cpp:22:
In file included from core/desugarer.h:24:
core/vm.h:20:10: fatal error: 'libjsonnet.h' file not found
#include <libjsonnet.h>
^~~~~~~~~~~~~~
20 warnings and 14 errors generated.
make: *** [core/desugarer.o] Error 1
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/2t/mwfz47ts25b4w7hmv_lr2jjh0000gn/T/pip-install-kyupa_v9/jsonnet/setup.py", line 75, in <module>
test_suite="python._jsonnet_test",
File "/anaconda3/lib/python3.6/site-packages/setuptools/__init__.py", line 143, in setup
return distutils.core.setup(**attrs)
File "/anaconda3/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/anaconda3/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/anaconda3/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 188, in run
self.run_command('build')
File "/anaconda3/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/anaconda3/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/anaconda3/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/private/var/folders/2t/mwfz47ts25b4w7hmv_lr2jjh0000gn/T/pip-install-kyupa_v9/jsonnet/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
----------------------------------------
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
Complete output from command /anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/2t/mwfz47ts25b4w7hmv_lr2jjh0000gn/T/pip-install-kyupa_v9/jsonnet/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/2t/mwfz47ts25b4w7hmv_lr2jjh0000gn/T/pip-record-qenah9sl/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
clang++ -c -mmacosx-version-min=10.9 -stdlib=libc++ -fPIC core/desugarer.cpp -o core/desugarer.o
In file included from core/desugarer.cpp:21:
In file included from core/ast.h:29:
In file included from core/lexer.h:30:
core/unicode.h:126:22: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (char32_t cp : s)
^
core/unicode.h:172:21: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (char c : ss.str())
^
In file included from core/desugarer.cpp:21:
In file included from core/ast.h:29:
core/lexer.h:145:15: error: no member named 'emplace_back' in 'std::__1::vector<FodderElement, std::__1::allocator<FodderElement> >'
a.emplace_back(FodderElement::PARAGRAPH, elem.blanks, elem.indent, elem.comment);
~ ^
core/lexer.h:153:15: error: no member named 'emplace_back' in 'std::__1::vector<FodderElement, std::__1::allocator<FodderElement> >'
a.emplace_back(FodderElement::LINE_END, 0, elem.indent, std::vector<std::string>());
~ ^
core/lexer.h:196:63: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
fodder_push_back(fodder, FodderElement(FodderElement::Kind::LINE_END, 0, 0, {}));
^
core/lexer.h:196:85: error: expected expression
fodder_push_back(fodder, FodderElement(FodderElement::Kind::LINE_END, 0, 0, {}));
^
core/lexer.h:214:16: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
for (const auto &elem : fodder) {
^
core/lexer.h:214:27: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (const auto &elem : fodder) {
^
core/lexer.h:223:16: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
for (const auto &f : fodder) {
^
core/lexer.h:223:24: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (const auto &f : fodder) {
^
In file included from core/desugarer.cpp:21:
core/ast.h:375:47: error: expected '(' for function-style cast or type construction
: AST(lr, AST_BUILTIN_FUNCTION, Fodder{}), name(name), params(params)
~~~~~~^
core/ast.h:706:34: error: expected '(' for function-style cast or type construction
Fodder{},
~~~~~~^
core/ast.h:707:34: error: expected '(' for function-style cast or type construction
Fodder{},
~~~~~~^
core/ast.h:713:37: error: expected '(' for function-style cast or type construction
ArgParams{},
~~~~~~~~~^
core/ast.h:748:34: error: expected '(' for function-style cast or type construction
Fodder{},
~~~~~~^
core/ast.h:749:34: error: expected '(' for function-style cast or type construction
Fodder{},
~~~~~~^
core/ast.h:750:34: error: expected '(' for function-style cast or type construction
Fodder{},
~~~~~~^
core/ast.h:756:37: error: expected '(' for function-style cast or type construction
ArgParams{},
~~~~~~~~~^
core/ast.h:806:47: error: expected '(' for function-style cast or type construction
: AST(lr, AST_DESUGARED_OBJECT, Fodder{}), asserts(asserts), fields(fields)
~~~~~~^
core/ast.h:838:58: error: expected '(' for function-style cast or type construction
: AST(lr, AST_OBJECT_COMPREHENSION_SIMPLE, Fodder{}),
~~~~~~^
core/ast.h:942:29: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <class T, class... Args>
^
core/ast.h:943:18: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
T *make(Args &&... args)
^
core/ast.h:945:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto r = new T(std::forward<Args>(args)...);
^
core/ast.h:953:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto r = new T(*ast);
^
core/ast.h:963:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto it = internedIdentifiers.find(name);
^
core/ast.h:967:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto r = new Identifier(name);
^
core/ast.h:973:14: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
for (auto x : allocated) {
^
core/ast.h:973:21: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (auto x : allocated) {
^
core/ast.h:977:14: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
for (auto x : internedIdentifiers) {
^
core/ast.h:977:21: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (auto x : internedIdentifiers) {
^
core/ast.h:1072:1: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto precedence_map = build_precedence_map();
^
core/ast.h:1073:1: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto unary_map = build_unary_map();
^
core/ast.h:1074:1: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto binary_map = build_binary_map();
^
In file included from core/desugarer.cpp:22:
In file included from core/desugarer.h:24:
core/vm.h:20:10: fatal error: 'libjsonnet.h' file not found
#include <libjsonnet.h>
^~~~~~~~~~~~~~
20 warnings and 14 errors generated.
make: *** [core/desugarer.o] Error 1
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/2t/mwfz47ts25b4w7hmv_lr2jjh0000gn/T/pip-install-kyupa_v9/jsonnet/setup.py", line 75, in <module>
test_suite="python._jsonnet_test",
File "/anaconda3/lib/python3.6/site-packages/setuptools/__init__.py", line 143, in setup
return distutils.core.setup(**attrs)
File "/anaconda3/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/anaconda3/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/anaconda3/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/anaconda3/lib/python3.6/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/anaconda3/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/anaconda3/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/anaconda3/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/private/var/folders/2t/mwfz47ts25b4w7hmv_lr2jjh0000gn/T/pip-install-kyupa_v9/jsonnet/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
----------------------------------------
Command "/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/2t/mwfz47ts25b4w7hmv_lr2jjh0000gn/T/pip-install-kyupa_v9/jsonnet/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/2t/mwfz47ts25b4w7hmv_lr2jjh0000gn/T/pip-record-qenah9sl/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/2t/mwfz47ts25b4w7hmv_lr2jjh0000gn/T/pip-install-kyupa_v9/jsonnet/
Output of gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Output of which c++
is /usr/bin/c++
Output of c++ --version
is
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
/usr/include is present but there is no c++ file in it. Is it the source of problem?
Any help would be greatly appreciated