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

Rust 1.0.0, erl 17.4, MacOS #4

Open
maxlapshin opened this issue May 25, 2015 · 1 comment
Open

Rust 1.0.0, erl 17.4, MacOS #4

maxlapshin opened this issue May 25, 2015 · 1 comment

Comments

@maxlapshin
Copy link

maxbook:erlang-rust-nif max$ ERLANG_SRC_DIR=/Users/max/Sites/otp make
cd rust_src && cargo build && cd target && ln -s liber-*.dylib liberrust.dylib
   Compiling er v0.0.1 (file:///Users/max/Sites/erlang-rust-nif/rust_src)
src/c.rs:44:31: 44:35 error: illegal suffix `us` for numeric literal
src/c.rs:44     pub _bindgen_data_: [u64; 16us],
                                          ^~~~
src/c.rs:44:31: 44:35 help: the suffix must be one of the integral types (`u32`, `isize`, etc)
src/c.rs:47:66: 47:71 error: illegal suffix `us` for numeric literal
src/c.rs:47     pub unsafe fn __mbstate8(&mut self) -> *mut [::libc::c_char; 128us] {
                                                                             ^~~~~
....

Seems that 128us is not what this version of rust likes.

Also there is no build_macos.sh script

@erszcz
Copy link
Owner

erszcz commented May 25, 2015

The example was a bit outdated.
Please try current master. With Erlang 17.1 and Rust 1.0.0 it should just work.

You might run into a few glitches with version numbers here and there if you use some slightly different versions. (I wouldn't count on the example working with major version differences.) Specifically in these lines of the Makefile:

# Please override these to match your environment!
ERLANG_SRC_DIR ?= ${HOME}/.kerl/builds/17.1/otp_src_17.1
ERLANG_EI_LIB_DIR ?= ${HOME}/apps/erlang/17.1/lib/erl_interface-3.7.17/lib
RUST_DIR ?= ${HOME}/apps/rust/1.0.0
...
    ${RUST_DIR}/lib/rustlib/${RUST_PLATFORM}/lib/liballoc-4e7c5e5c.rlib \

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