問題
現時点(mac os 10.12.3)で、Hyperledger FabricのGetStartedで下記のようなエラーが出る
CXX(target) Release/obj.target/native/src/hashtable.o
In file included from ../src/hashtable.cpp:1:
../src/hashtable.h:7:10: fatal error: 'tr1/unordered_map' file not found
#include <tr1/unordered_map>
^
1 error generated.
make: *** [Release/obj.target/native/src/hashtable.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/keech/.nodebrew/node/v7.5.0/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:192:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.4.0
gyp ERR! command "/Users/keech/.nodebrew/node/v7.5.0/bin/node" "/Users/keech/.nodebrew/node/v7.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /Users/keech/Dropbox/08_Depelopment/_study/hyperledger-fabric/hackfest/node_modules/hashtable
gyp ERR! node -v v7.5.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
解決法
cd ~
npm install "https://github.com/fabrice102/node-hashtable.git"
mv -R ~/node_modules/hashtable [path to hackfest directory]/node_modules/
cd [path to hackfest directory]
npm install
原因
mac、OS X 10.12になってからtr1フォルダを無くしたようです。