capnproto / node-capnp

Cap'n Proto bindings for Node.js
BSD 2-Clause "Simplified" License
258 stars 35 forks source link

canot install capnp by meteor npm install capnp #46

Closed SiJinmin closed 5 years ago

SiJinmin commented 5 years ago

my os is Manjaro Linux kde , and i cannot install it by meteor npm install --save capnp, here is my error message :

[jianyin@jianyinkde Rocket.Chat]$ meteor npm install --save capnp npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it!

capnp@0.3.1 install /home/jianyin/Documents/Rocket.Chat/node_modules/capnp node ./build.js

(node:23773) [DEP0006] DeprecationWarning: child_process: options.customFds option is deprecated. Use options.stdio instead. make: Entering directory '/home/jianyin/Documents/Rocket.Chat/node_modules/capnp/build' CXX(target) Release/obj.target/capnp/src/node-capnp/capnp.o In file included from /usr/include/kj/memory.h:28, from /usr/include/kj/array.h:28, from /usr/include/kj/string.h:29, from /usr/include/capnp/common.h:33, from /usr/include/capnp/raw-schema.h:28, from /usr/include/capnp/generated-header-support.h:30, from /usr/include/capnp/schema.capnp.h:6, from /usr/include/capnp/schema.h:32, from /usr/include/capnp/dynamic.h:39, from ../src/node-capnp/capnp.cc:31: /usr/include/kj/common.h:36:4: error: #error "This code requires C++14. Either your compiler does not support it or it is not enabled."

error "This code requires C++14. Either your compiler does not support it or it is not enabled."

^~~~~

/usr/include/kj/common.h:39:6: error: #error "Pass -std=c++14 on the compiler command line to enable C++14."

error "Pass -std=c++14 on the compiler command line to enable C++14."

how can i fix it ? thanks.

kentonv commented 5 years ago

Options:

  1. Build node-capnp from source (this has been fixed at master).
  2. Install Cap'n Proto 0.6 rather than 0.7 (since the C++14 requirement was introduced in 0.7).
  3. Help me figure out why when I try to publish a new version of the package, it breaks: https://github.com/capnproto/node-capnp/issues/41 (last comment) Unfortunately I don't have time to debug this myself, which has prevented me from pushing an update that solves this problem... :(
SiJinmin commented 5 years ago

thank you, i solved it by using proto 0.6