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

> ref@1.2.0 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'

> ffi@2.0.0 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'

> ref@1.2.0 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'
embed@1.0.0 /opt/test2/rust-in-node
`-- ffi@2.0.0 
  +-- nan@2.1.0 
  +-- ref@1.2.0 
  | `-- nan@2.1.0 
  `-- ref-struct@1.0.2 

npm WARN EPACKAGEJSON embed@1.0.0 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 node@4.2.1 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 node@4.2.1
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