-
Notifications
You must be signed in to change notification settings - Fork 105
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
Support BUILD gen for rust-libloading #38
Comments
Hi! Would it help you if I ended up implementing a configuration switch in the library which would allow you to "pick" the old It would still need you to figure out how to emit the necessary For reference, nagisa/rust_libloading#32 is the bug that the weakly linked mutex is fixing. |
Hello @nagisa! I appreciate your input here! It would not likely be the best use of your time to add back support for I'm actually personally interested in rust-lang/rust#29603 and action items for me:
notes: Override procedure https://gist.github.com/acmcarther/8473901b5b45ae338776b9c66731c116 |
What's the current recommended way of supporting libloading with raze in a cross-platform supporting way, since those env vars are not set? Is it still to follow the procedure you've got in that gist? I ask since that procedure doesn't presently appear to support anything other than Linux, but could conceivably with some helpfully places Alternatively, could this be achieved in a similar way with |
As of bazelbuild/rules_rust@e64700d this now appears to just work with |
This is probably no longer a relevant issue as |
libloading recently made a change to bundle C file to have a weak mutex:
nagisa/rust_libloading#32
This is a corner case of raze -- its not really possible to either
OR
Furthermore, the build script itself depends on some flags that I wasn't aware of:
For now, I'm overriding the whole crate. This exposes an ergonomic painpoint: It should be possible to workspace-wide replace one target with another.
As a side note, I would benefit from this particular attr being stabilized, but it doesn't seem like that will happen any time soon:
rust-lang/rust#29603
That is to say, the small-ish missing stable feature of specifying weak linkage led to rust-libloading bringing in C code to replace it, which is hard to automatically detect and build on my end. What they had before (lazy_static) worked in 99.9% of circumstances, until some other random feature required them to up their major version, dramatically increasing the chances of the crate being linked twice (which would potentially lead to bad behavior when using lazy_static).
Yikes.
The text was updated successfully, but these errors were encountered: