Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install fails on Node 7 #9

Open
dignifiedquire opened this issue Dec 23, 2016 · 2 comments
Open

Install fails on Node 7 #9

dignifiedquire opened this issue Dec 23, 2016 · 2 comments

Comments

@dignifiedquire
Copy link

  • OS: MacOS 10.12.2
  • Node: v7.2.1
  • npm: 4.0.1

Log:

> [email protected] install /Users/dignifiedquire/opensource/bench-lru/node_modules/lru-native
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
  CXX(target) Release/obj.target/native/src/native.o
In file included from ../src/native.cc:2:
../src/LRUCache.h:12:10: fatal error: 'tr1/unordered_map' file
      not found
#include <tr1/unordered_map>
         ^
1 error generated.
make: *** [Release/obj.target/native/src/native.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/dignifiedquire/.nvm/versions/node/v7.2.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.3.0
nickleefly added a commit to nickleefly/node-lru-native that referenced this issue Jan 23, 2017
* unordered_map is a form of map containter, use
unordered_map::find(KeyType key) instead, which returns
unordered_map::iterator, essentially pointer tostd::pair< KeyType,
ValueType >.

Or you can use unordered_map::operator[](KeyType key) to get access to
element pointed by the key variable. Note that it will create new
element in case it doesn't exist yet.

See http://en.cppreference.com/w/cpp/container/unordered_map for more info.

* Use newer GCC (at least 4.7) with -std=c++11 option, and you will get
standardized std::unordered_map instead of tr1::unordered_map

Fix adzerk#9
@ConAntonakos
Copy link

And also fails on Node 8.

@huan
Copy link

huan commented Jul 13, 2018

And also fails on Node 10.

In file included from /home/zixia/.node-gyp/10.5.0/include/node/node.h:63:0,
                 from ../../../../../node_modules/nan/nan.h:51,
                 from ../src/LRUCache.h:4,
                 from ../src/LRUCache.cc:1:
/home/zixia/.node-gyp/10.5.0/include/node/v8.h:3911:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^~~~~~~~~~~
/home/zixia/.node-gyp/10.5.0/include/node/v8.h:3911:44: note:   candidate expects 3 arguments, 2 provided
/home/zixia/.node-gyp/10.5.0/include/node/v8.h:3914:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^~~~~~~~~~~
/home/zixia/.node-gyp/10.5.0/include/node/v8.h:3914:44: note:   candidate expects 1 argument, 2 provided
native.target.mk:100: recipe for target 'Release/obj.target/native/src/LRUCache.o' failed
make: *** [Release/obj.target/native/src/LRUCache.o] Error 1
make: Leaving directory '/home/zixia/chatie/wechaty-puppet/node_modules/lru-native/build'

jcswart pushed a commit that referenced this issue Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants