-
Notifications
You must be signed in to change notification settings - Fork 26
Lib only loaded once on Linux #11
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
Hi, Thanks for the report. I tested this on Linux before but maybe something has changed so it doesn't work anymore. Currently I'm a bit busy so I won't have time to look into the issue but I will try to get around doing it a bit later. Cheers! |
Fair enough, we all have lives. Just for anyone else who has problems I managed to get something working for my use case based on this article. |
(this is a follow on from this thread. Since the link I made in the post above has broken I figure I should add some context here. Specifically, Rust 1.20.0 broke my workaround above, I reported it in this issue) I now have a messy, but working proof-of-concept example that works (on my machine) here. The method comes from a suggestion in the Rust issue I reported and the basic idea is that separate versions of the library are compiled under distinct names. I haven't done extensive testing but it appears that the Unfortunately I haven't found a good way, (as opposed to my messy method) to do this from a cargo build script, so I'm pursuing other options. Specifically I'm looking for something that won't require me to specify dependencies of the reloaded crate in the build script as well as the |
I will try to investigate more on my side. What I'm doing is that I load the shared object from a separate location from where it was generated so it should work. I also make sure I can read the file correct after it's being generated but I will take a closer look here what may cause it. |
@Ryan1729 which OS are you on? I would like try to to repro it. |
Ubuntu 16.04
Since the behaviour might depend on the kernel version, I'll also mention I'm on 4.4.0-96-generic.
… On Oct 27, 2017, at 12:13 PM, Daniel Collin ***@***.***> wrote:
@Ryan1729 which OS are you on? I would like try to to repro it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Cool. Thanks! |
Would you consider releasing a new version to crates.io to include this update? |
Yes! I will fix this when I get back home today. |
Version 0.4.0 has now been released! |
When I try the example on my Linux (Ubuntu 16.04) machine, it works properly after the first change to
test_shared.rs
, but it does nothing if I change it a second time.if I add
println!("{:?}", file);
just above this line and then run the example, changing42
to24
I get the following output when I runcargo build
:But as mentioned before, if I try to change
24
to something else, the output just remainsValue 24
.I'm not sure if this is the cause of the problem but I found this in the latest version of the notify library's docs:
The text was updated successfully, but these errors were encountered: