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

Unable to locate package capnproto-dev #25

Open
sirudog opened this issue Aug 20, 2015 · 8 comments
Open

Unable to locate package capnproto-dev #25

sirudog opened this issue Aug 20, 2015 · 8 comments

Comments

@sirudog
Copy link

sirudog commented Aug 20, 2015

I try to install the dev headers before installing node-capnp as the doc says:
sudo apt-get install nodejs-dev nodejs-legacy capnproto-dev

I get this error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package capnproto-dev

I use ubuntu 14.04.
So far I was not able to locate this package anywhere, did the installation steps change?

@kentonv
Copy link
Member

kentonv commented Aug 20, 2015

Hmm, I don't quite recall if Cap'n Proto was in Ubuntu 14.04 -- sounds like it wasn't. But note that Cap'n Proto is still pretty young and changing frequently. The current node-capnp code requires Cap'n Proto 0.5.x, which is available in Debian unstable/testing; I'm not sure if it has made it into Ubuntu at all yet.

@sirudog
Copy link
Author

sirudog commented Sep 17, 2015

Sorry for the delay, I had to put this aside for a while.

I have cloned the node-capnp repo and finally I could build it from source on Ubuntu, but I had to use the headers from capnp master branch. The problem is that in the project I work on we have a c++ backend with a nodejs front end, and we try to use the same version of the c++ capnp lib to avoid incompatibility issues and streamline our build process. So far in our c++ backend we used the latest release version (0.5.3), and according to your previous comment, the current node-capnp also requires 0.5.x. But if I use the headers from this release, I have errors during build like:

./src/node-capnp/capnp.cc: In member function ‘capnp::Orphancapnp::DynamicValue v8capnp::{anonymous}::FromJsConverter::orphanFromJs(capnp::StructSchema::Field, capnp::Orphanage, capnp::Type, v8::Handlev8::Value)’:
../src/node-capnp/capnp.cc:1283:18: error: ‘class capnp::Type’ has no member named ‘whichAnyPointerKind’
if (type.whichAnyPointerKind() == capnp::schema::Type::AnyPointer::Unconstrained::CAPABILITY) {
^
../src/node-capnp/capnp.cc:1283:76: error: ‘capnp::schema::Type::AnyPointer::Unconstrained’ has not been declared
if (type.whichAnyPointerKind() == capnp::schema::Type::AnyPointer::Unconstrained::CAPABILITY) {

Would it be possible to bind node-capnp to the latest release of capnp? The master branch is changing constantly and we cannot risk to use it in our project (even if we could just use it in our c++ backend easily, as right now node-capnp requires this version)

@sirudog
Copy link
Author

sirudog commented Sep 17, 2015

There is one more issue, unfortunately when I require the capnp module that I built myself, I get this error:
Error: /home/dev/Projects/Playground/NodejsWrapperCapnProto/node_modules/capnp/bin/linux-x64-v8-3.14/capnp.node: undefined symbol: _ZNK2kj9EventPort4wakeEv
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/dev/Projects/Playground/NodejsWrapperCapnProto/node_modules/capnp/src/node-capnp/capnp.js:47:15)

This is when I execute npm test, or when I just require it in my nodejs app. (var capnp = require("capnp");)
Do you maybe know what is wrong here?

@kentonv
Copy link
Member

kentonv commented Sep 18, 2015

Not sure about the undefined symbol error, but I agree in any case that you should stick to the release version of Cap'n Proto. It sounds like we've accidentally introduced some incompatibility between node-capnp master and Cap'n Proto 0.5.x. I believe, though, that the most recent version of node-capnp published to the npm repository should work with Cap'n Proto 0.5.x. Can you try installing node-capnp from npm, with Cap'n Proto 0.5.3 installed locally from source?

@sirudog
Copy link
Author

sirudog commented Sep 21, 2015

Thanks for your help, based on your reply I checked around and noticed that I had some capnp and kj headers of unknown origin in /usr/include folder. I have removed these, and as you suggested I installed Cap'n Proto 0.5.3 from source. All went fine, I also got the headers in /usr/local/include folder. Then finally I could install capnp-node from npm with 'npm install capnp' command. But when I try to use it in my app, or run 'npm test' in capnp module folder, I still get the undefined symbol error, same as before: undefined symbol: _ZNK2kj9EventPort4wakeEv
Looks like something is wrong with linking to kj lib, any idea what can go wrong there?

@kentonv
Copy link
Member

kentonv commented Sep 25, 2015

_ZNK2kj9EventPort4wakeEv should be in libkj-async.so. It should be in 0.5.x but may not have been present in previous versions. Is it possible there is a bogus copy of libkj-async.so hiding somewhere on your system?

@mitar
Copy link

mitar commented Apr 30, 2016

I have a similar problem. I am working on a Meteor package for capnproto and the capnproto-dev dependency is pretty heavy. Especially if one assumes that capnproto will be used only inside Sandstorm grains, when used as this Meteor package.

I also use Ubuntu 14.04 LTS.

@eemeli
Copy link

eemeli commented Dec 30, 2016

On Ubuntu 16.04 and later, the name of the required package appears to be libcapnp-dev rather than capnproto-dev.

orblivion added a commit to orblivion/node-capnp that referenced this issue Oct 5, 2021
capnproto#25

I don't see capnproto-dev in Debian Buster either.
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

4 participants