-
Notifications
You must be signed in to change notification settings - Fork 231
Fix build issues on Mac #12
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
Comments
Executing |
Thank you for the report. Could this be a variant of rusterlium/erlang_nif-sys#3? I am not at a computer at the moment, so I can't give an exact command to run, but could you try the command listed in the issue to see if compilation works? |
Adding this to my #![feature(link_args)]
#[link_args = "-flat_namespace -undefined suppress"]
extern {} Now I'm getting:
Seems like it's looking for |
That's strange, demo.exs uses a wildcard to find the file. Is there a .so in the |
OSX uses the |
I am fairly certain :erlang.load_nif supports loading .dylibs as well. Could you try changing these three lines in your
Edit: yeah, this won't do anything. |
Trying to do some googling to see how to link to dylibs with erlang, but not coming up with anything... rust-lang/cargo#1970 looks related... |
For reference, here is a library that loads a NIF. It seems to be supported on Mac. |
Ah, if that issue is related, the comeonin guys might be changing the extension? |
By the way, here is my
|
You could try copying |
Wooo!
|
I wonder if we could create a build script to do that... |
In the longer term, it would be nice to make :erlang.load_nif support loading .dylibs on macs This file seems to handle library loading on unix systems. It seems to just append |
FWIW, I've been trying for a few hours now to get Rustler working with Rust 1.12 and have been running into the same issue ( The fix seems to be to use the |
You should be able to build it on stable using the following command:
Could you try it out and see if it works? |
I implemented a fix for rustler_codegen in 64351d4. Because I do not have a Mac available, the fix is untested. If anyone with a mac could test it by running |
I think that did the trick, @hansihe! Where does the |
@turboladen Did I understand the question correctly? |
I think so, as that seems to have fixed my compile problem. I asked about the flag just because I hadn't come across it before and wanted to learn about it. |
I cloned the repo (I'm at git ref
Let me know if there's anything else I can do to rerun it for you, @hansihe. |
See #24 |
Please see #27 for the latest on building |
- nproc does not work on OSX - also link errors on OSX, see rusterlium/rustler#12 (comment)
Fix clippy warnings
Not sure if this is a OS X-specific issue:
Cargo.toml
src/nif.rs
The text was updated successfully, but these errors were encountered: