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

Dep unixlib does not compile on RaspberryPi #12

Open
BennyLi opened this issue Nov 25, 2014 · 4 comments
Open

Dep unixlib does not compile on RaspberryPi #12

BennyLi opened this issue Nov 25, 2014 · 4 comments

Comments

@BennyLi
Copy link

BennyLi commented Nov 25, 2014

I tried some more but currently I'm stuck. So here is what I did:

$ make bindings
[BINDINGS] auth
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | arm
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/pi/rs-serve/auth/bindings/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/pi/.node-gyp/0.10.29/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/pi/.node-gyp/0.10.29',
gyp info spawn args   '-Dmodule_root_dir=/home/pi/rs-serve/auth/bindings',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | arm
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make[1]: Entering directory '/home/pi/rs-serve/auth/bindings/build'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/pi/rs-serve/auth/bindings/build'
gyp info ok
[DEPS] unixlib
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | arm
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/pi/rs-serve/auth/backend/deps/unixlib/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/pi/.node-gyp/0.10.29/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/pi/.node-gyp/0.10.29',
gyp info spawn args   '-Dmodule_root_dir=/home/pi/rs-serve/auth/backend/deps/unixlib',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | arm
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make[1]: Entering directory '/home/pi/rs-serve/auth/backend/deps/unixlib/build'
  CXX(target) Release/obj.target/unixlib/unixlib.o
../unixlib.cc:20:21: error: variable or field ‘Mkstemp’ declared void
../unixlib.cc:20:21: error: ‘eio_req’ was not declared in this scope
../unixlib.cc:20:30: error: expected primary-expression before ‘)’ token
../unixlib.cc:21:25: error: ‘eio_req’ was not declared in this scope
../unixlib.cc:21:34: error: expected primary-expression before ‘)’ token
../unixlib.cc:23:19: error: variable or field ‘Flock’ declared void
../unixlib.cc:23:19: error: ‘eio_req’ was not declared in this scope
../unixlib.cc:23:28: error: expected primary-expression before ‘)’ token
../unixlib.cc:24:24: error: ‘eio_req’ was not declared in this scope
../unixlib.cc:24:33: error: expected primary-expression before ‘)’ token
../unixlib.cc:26:21: error: variable or field ‘PAMAuth’ declared void
../unixlib.cc:26:21: error: ‘eio_req’ was not declared in this scope
../unixlib.cc:26:30: error: expected primary-expression before ‘)’ token
../unixlib.cc:27:25: error: ‘eio_req’ was not declared in this scope
../unixlib.cc:27:34: error: expected primary-expression before ‘)’ token
../unixlib.cc: In function ‘v8::Handle<v8::Value> MkstempAsync(const v8::Arguments&)’:
../unixlib.cc:109:13: error: ‘Mkstemp’ was not declared in this scope
../unixlib.cc:109:22: error: ‘EIO_PRI_DEFAULT’ was not declared in this scope
../unixlib.cc:109:58: error: ‘eio_custom’ was not declared in this scope
../unixlib.cc:110:9: error: ‘EV_DEFAULT_UC’ was not declared in this scope
../unixlib.cc:110:22: error: ‘ev_ref’ was not declared in this scope
../unixlib.cc: In function ‘v8::Handle<v8::Value> FlockAsync(const v8::Arguments&)’:
../unixlib.cc:134:13: error: ‘Flock’ was not declared in this scope
../unixlib.cc:134:20: error: ‘EIO_PRI_DEFAULT’ was not declared in this scope
../unixlib.cc:134:54: error: ‘eio_custom’ was not declared in this scope
../unixlib.cc:135:9: error: ‘EV_DEFAULT_UC’ was not declared in this scope
../unixlib.cc:135:22: error: ‘ev_ref’ was not declared in this scope
../unixlib.cc: In function ‘v8::Handle<v8::Value> PAMAuthAsync(const v8::Arguments&)’:
../unixlib.cc:162:13: error: ‘PAMAuth’ was not declared in this scope
../unixlib.cc:162:22: error: ‘EIO_PRI_DEFAULT’ was not declared in this scope
../unixlib.cc:162:58: error: ‘eio_custom’ was not declared in this scope
../unixlib.cc:163:9: error: ‘EV_DEFAULT_UC’ was not declared in this scope
../unixlib.cc:163:22: error: ‘ev_ref’ was not declared in this scope
../unixlib.cc: At global scope:
../unixlib.cc:168:21: error: variable or field ‘Mkstemp’ declared void
../unixlib.cc:168:21: error: ‘eio_req’ was not declared in this scope
../unixlib.cc:168:30: error: ‘req’ was not declared in this scope
../unixlib.cc:89:22: warning: ‘v8::Handle<v8::Value> MkstempAsync(const v8::Arguments&)’ defined but not used [-Wunused-function]
../unixlib.cc:115:22: warning: ‘v8::Handle<v8::Value> FlockAsync(const v8::Arguments&)’ defined but not used [-Wunused-function]
../unixlib.cc:140:22: warning: ‘v8::Handle<v8::Value> PAMAuthAsync(const v8::Arguments&)’ defined but not used [-Wunused-function]
unixlib.target.mk:90: recipe for target 'Release/obj.target/unixlib/unixlib.o' failed
make[1]: *** [Release/obj.target/unixlib/unixlib.o] Error 1
make[1]: Leaving directory '/home/pi/rs-serve/auth/backend/deps/unixlib/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 3.12.22+
gyp ERR! command "node" "/usr/local/bin/node-gyp" "build"
gyp ERR! cwd /home/pi/rs-serve/auth/backend/deps/unixlib
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
Makefile:129: recipe for target 'bindings' failed
make: *** [bindings] Error 1

After this I tried to install the unixlib package via npm. After some issues I found out that I need these packages:

sudo apt-get install libpam0g-dev nodejs-dev

After this the npm package can be installed:

$ sudo npm install -g unixlib

> [email protected] preuninstall /usr/local/lib/node_modules/unixlib
> rm -r build/*


> [email protected] preinstall /usr/local/lib/node_modules/unixlib
> node-waf configure && node-waf build

Checking for program g++ or c++          : /usr/bin/g++
hecking for program cpp                 : /usr/bin/cpp
Checking for program ar                  : /usr/bin/ar
Checking for program ranlib              : /usr/bin/ranlib
Checking for g++                         : ok
Checking for node path                   : not found
Checking for node prefix                 : ok /usr
yes cking for header security/pam_appl.h  : |
'configure' finished successfully (1.465s)
Waf: Entering directory `/usr/local/lib/node_modules/unixlib/build'
[1/2] cxx: unixlib.cc -> build/Release/unixlib_1.o
[2/2] cxx_link: build/Release/unixlib_1.o -> build/Release/unixlib.node
Waf: Leaving directory `/usr/local/lib/node_modules/unixlib/build'
'build' finished successfully (4.931s)
[email protected] /usr/local/lib/node_modules/unixlib

But doing make bindings still fails with the above mentioned error. Do you have any idea how to solve this?

@BennyLi
Copy link
Author

BennyLi commented Nov 25, 2014

I have a new guess: My nodejs version is > 0.6 and therefor does not support the old libeio library. As that the node-unixlib only support nodejs up to version 0.6.0 this has to be updated. Unfortunately I don't like to wait for that I'll try an older nodejs version soon.

(Maybe I'll try to update the node-unixlib package myself and prepare a Pull Request, but this needs even more time!)

@raucao
Copy link
Member

raucao commented Nov 25, 2014

Another issue is, that as @nilclass is not maintaining this program anymore, it's using an outdated version of the RemoteStorage specification. It's already deprecated, and from the release of -04, this coming December, support for -01 is not required anymore. Here's some more info on that:

http://remotestorage.io/provide/

It'd be great if someone with C chops would come forward and take over as new maintainer for this program. Until then, it's kind of a zombie, I'm afraid. :/

@BennyLi
Copy link
Author

BennyLi commented Nov 25, 2014

Hey @skddc ! Thanks for response. I'm not that much into it right now. Could you explain what does use an outdated version of the RemoteStorage? Do you mean the unixlib package? Could you point me to the parts of the spec it does use?

@raucao
Copy link
Member

raucao commented Nov 25, 2014

Could you explain what does use an outdated version of the RemoteStorage?

I haven't looked into the source code of this at all, so I can't tell you what part is implementing the protocol. It'd probably be easy to upgrade, though, and the RS core team will gadly help by providing information about what exactly needs to change and answer any questions that might pop up along the way.

We're in #remotestorage on Freenode, as well as on the forums. Not to mention having eyes on all GitHub issues in the org's namespace, of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants