-
Notifications
You must be signed in to change notification settings - Fork 40
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
safer_ffi may randomly generate empty headers #131
Comments
Thanks for the very detailed, link-backed, and extended report 🙏 |
[Continuing from #132]
Yeah, maybe; although if we do that we'd need to really reduce the example, right now there is too much Until then, you could try to work around the limitation, in and of itself, by making more
|
It seems not working. However, the symbols exported from bin Although my Ubuntu machine also did not export them, maybe we can find some clues inside these symbol tables? (Note that I exported them with |
dtolnay/linkme#31 (comment) seems to suggest the inventory bug is still around 😬 |
@danielhenrymantilla I resolved it with a weird way – I switched my linker to mold (for macOS), and it seems work now…? 😂 I'll continue observing this issue, but at least it works at this moment 😄 |
Great news! Having a workaround for this ought to be quite useful, even if it's not an actual solution (e.g., somebody may need to use something different than mold for other reasons on their project 😅). Let's close this issue since safer-ffi (nor inventory) can't really fix it, it's up to Cargo/rustc to do it. |
Abstract
Sometimes
safer_ffi
generates an empty headers like the following screenshot on my Mac:After setting up the breakpoint and debugging, I found that
inventory::iter
ended up really fast – like nothing registered:As it works on my another Ubuntu machine, I guess it is related to dtolnay/inventory#9? I tried to upgrade
Inventory
to 3.0.1; however, the compilation failed:Not really sure how to fix it.
Expected Behavior (on my Ubuntu machine)
Metadata
The text was updated successfully, but these errors were encountered: