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

node 5 compatibility #1

Closed
kapolos opened this issue Nov 5, 2015 · 3 comments
Closed

node 5 compatibility #1

kapolos opened this issue Nov 5, 2015 · 3 comments

Comments

@kapolos
Copy link

kapolos commented Nov 5, 2015

Changing the ffi dependency to 2.0.0 allows rust-in-node to build on node 5 👍

# npm install

> [email protected] install /opt/test2/rust-in-node/node_modules/ref
> node-gyp rebuild

make: Entering directory `/opt/test2/rust-in-node/node_modules/ref/build'
  CXX(target) Release/obj.target/binding/src/binding.o
  SOLINK_MODULE(target) Release/obj.target/binding.node
  COPY Release/binding.node
make: Leaving directory `/opt/test2/rust-in-node/node_modules/ref/build'

> [email protected] install /opt/test2/rust-in-node/node_modules/ffi
> node-gyp rebuild

make: Entering directory `/opt/test2/rust-in-node/node_modules/ffi/build'
  CC(target) Release/obj.target/ffi/deps/libffi/src/prep_cif.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/types.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/raw_api.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/java_raw_api.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/closures.o
../deps/libffi/src/closures.c: In function 'dlmmap_locked':
../deps/libffi/src/closures.c:421:17: warning: ignoring return value of 'ftruncate', declared with attribute warn_unused_result [-Wunused-result]
       ftruncate (execfd, offset);
                 ^
../deps/libffi/src/closures.c:433:17: warning: ignoring return value of 'ftruncate', declared with attribute warn_unused_result [-Wunused-result]
       ftruncate (execfd, offset);
                 ^
  CC(target) Release/obj.target/ffi/deps/libffi/src/x86/ffi.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/x86/ffi64.o
../deps/libffi/src/x86/ffi64.c: In function 'classify_argument':
../deps/libffi/src/x86/ffi64.c:181:18: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
    FFI_ASSERT (0);
                  ^
  CC(target) Release/obj.target/ffi/deps/libffi/src/x86/unix64.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/x86/sysv.o
  AR(target) Release/obj.target/deps/libffi/libffi.a
  COPY Release/libffi.a
  CXX(target) Release/obj.target/ffi_bindings/src/ffi.o
  CXX(target) Release/obj.target/ffi_bindings/src/callback_info.o
  CXX(target) Release/obj.target/ffi_bindings/src/threaded_callback_invokation.o
  SOLINK_MODULE(target) Release/obj.target/ffi_bindings.node
  COPY Release/ffi_bindings.node
make: Leaving directory `/opt/test2/rust-in-node/node_modules/ffi/build'

> [email protected] install /opt/test2/rust-in-node/node_modules/ref
> node-gyp rebuild

make: Entering directory `/opt/test2/rust-in-node/node_modules/ref/build'
  CXX(target) Release/obj.target/binding/src/binding.o
  SOLINK_MODULE(target) Release/obj.target/binding.node
  COPY Release/binding.node
make: Leaving directory `/opt/test2/rust-in-node/node_modules/ref/build'
[email protected] /opt/test2/rust-in-node
`-- [email protected] 
  +-- [email protected] 
  +-- [email protected] 
  | `-- [email protected] 
  `-- [email protected] 

npm WARN EPACKAGEJSON [email protected] No repository field.
@wtfil
Copy link
Owner

wtfil commented Nov 5, 2015

Hi! Thx for comment! Let me update this module:)

@wtfil
Copy link
Owner

wtfil commented Nov 5, 2015

@kapolos just updated ffi and everything works fine for [email protected] but there is an issue with node@5 (nodejs/node#3619)
Fix already in master so it will part of new minor update of node. Meanwhile, you can play with this repo and [email protected]
I am using this utility for quick navigation between versions https://www.npmjs.com/package/n

@kapolos
Copy link
Author

kapolos commented Nov 6, 2015

@wtfil Awesome! 👍

Also, thanks for mentioning n, I have been using nvm but n looks great. 🍻

@kapolos kapolos closed this as completed Nov 6, 2015
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

2 participants