Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Build fails, "error: ‘vector’ in namespace ‘std’ does not name a template type" etc #626

Closed
ghost opened this issue Sep 21, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 21, 2019

I tried to build node-chakracore how the README says:

apt-get install -y build-essential cmake clang libicu-dev
git clone https://github.com/nodejs/node-chakracore
cd node-chakracore
git checkout master
./configure
make

(commit hash is f0b74bf)

But it encountered some errors
image

In file included from ../src/util-inl.h:28:0,
                 from ../src/aliased_buffer.h:8,
                 from ../src/env-inl.h:27,
                 from ../src/bootstrapper.cc:2:
../src/util.h:477:55: error: ‘vector’ in namespace ‘std’ does not name a template type
                                            const std::vector<T>& vec);
                                                       ^~~~~~
../src/util.h:477:61: error: expected ‘,’ or ‘...’ before ‘<’ token
                                            const std::vector<T>& vec);
                                                             ^
In file included from ../src/aliased_buffer.h:8:0,
                 from ../src/env-inl.h:27,
                 from ../src/bootstrapper.cc:2:
../src/util-inl.h:396:48: error: ‘vector’ in namespace ‘std’ does not name a template type
                                     const std::vector<T>& vec) {
                                                ^~~~~~
../src/util-inl.h:396:54: error: expected ‘,’ or ‘...’ before ‘<’ token
                                     const std::vector<T>& vec) {
                                                      ^
../src/util-inl.h: In function ‘v8::MaybeLocal<v8::Value> node::ToV8Value(v8::Local<v8::Context>, int)’:
../src/util-inl.h:400:54: error: ‘vec’ was not declared in this scope
   v8::Local<v8::Array> arr = v8::Array::New(isolate, vec.size());
                                                      ^~~
../src/util-inl.h:400:54: note: suggested alternative: ‘getc’
   v8::Local<v8::Array> arr = v8::Array::New(isolate, vec.size());
                                                      ^~~
                                                      getc
node_lib.target.mk:332: recipe for target '/root/Desktop/node-chakracore/out/Release/obj.target/node_lib/src/bootstrapper.o' failed
make[1]: *** [/root/Desktop/node-chakracore/out/Release/obj.target/node_lib/src/bootstrapper.o] Error 1
rm de9574d848889dd7f2c1daede83104638734ed0f.intermediate
Makefile:99: recipe for target 'node' failed
make: *** [node] Error 2
@joaocgreis
Copy link
Member

@ledlamp the master branch is not in good shape at the moment. If you want to build from source, the release tags should work, for the latest one replace the checkout line with

git checkout node-chakracore-v10.13.0

@ghost
Copy link
Author

ghost commented Sep 24, 2019

Ok I cloned a new copy with git clone https://github.com/nodejs/node-chakracore -b node-chakracore-v10.13.0 --depth=1 and it compiled, thanks!
Unfortunately building from source didn't make it work on my CPU, but that's a separate issue.

@ghost ghost closed this as completed Sep 24, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant