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

Windows: failing unit tests in libstd\unstable\dynamic_lib.rs #8818

Closed
vadimcn opened this issue Aug 28, 2013 · 4 comments
Closed

Windows: failing unit tests in libstd\unstable\dynamic_lib.rs #8818

vadimcn opened this issue Aug 28, 2013 · 4 comments
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc O-windows Operating system: Windows

Comments

@vadimcn
Copy link
Contributor

vadimcn commented Aug 28, 2013

test_loading_cosine
task <unnamed> failed at 'Could not load function cos: Error code 127u', C:\Rust\src\libstd\unstable\dynamic_lib.rs:106

@mstewartgallus
Copy link
Contributor

Does Windows export cos in its standard math libraries? Otherwise, the problem would be that we didn't link in the math libraries. Regardless, the test should use it's own self contained function for this. I'll fix this quickly.

@emberian
Copy link
Member

Triage update: still needs fixing. Should be easy, though. Just pick a random windows lib to load and check, rather than libm.

@brson brson mentioned this issue Aug 12, 2014
33 tasks
@brson
Copy link
Contributor

brson commented Aug 26, 2014

The fix here is seemingly not so simple. Functions in the exe appear to need DllExport to be loaded, and we don't apply that attribute (except to main, for odd reasons).

@vadimcn
Copy link
Contributor Author

vadimcn commented Feb 20, 2015

This test attempts to get the address of cos function using handle of the current executable module, (even though cos is defined in libm.so,- because dlsym() also searches in all dependencies of the module).

This doesn't work the same way on Windows, where GetProcAddress() searches only the module it was given.

It would be hard to emulate dlsym's behavior on Windows, and besides it's unclear under which circumstances this is useful. Closing.

@vadimcn vadimcn closed this as completed Feb 20, 2015
xFrednet pushed a commit to xFrednet/rust that referenced this issue May 21, 2022
Use the traits added to the Rust 2021 Edition prelude

Follow up rust-lang#96861.

This PR uses the traits added to the Rust 2021 Edition prelude.

> The `TryInto`, `TryFrom` and `FromIterator` traits are now part of the prelude.

https://doc.rust-lang.org/edition-guide/rust-2021/prelude.html

---

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc O-windows Operating system: Windows
Projects
None yet
Development

No branches or pull requests

4 participants