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

Linking error on Linux #740

Closed
BurnySc2 opened this issue Jan 18, 2020 · 3 comments
Closed

Linking error on Linux #740

BurnySc2 opened this issue Jan 18, 2020 · 3 comments

Comments

@BurnySc2
Copy link

BurnySc2 commented Jan 18, 2020

I am developing from Linux Mint 19 using cargo 1.40.0-nightly (5da4b4d47 2019-10-28)
and running into the following issue:

I copied the simple example code from https://pyo3.rs/v0.8.5/class.html#constructor
to an example repository:

https://github.com/BurnySc2/PyO3-error/blob/f5d68bd119b509a9aad2ad0a091d7abe08330d41/src/lib.rs#L13-L16

However, as soon as I enable the new() function with #[new] I get the following linking error on linux:

https://github.com/BurnySc2/PyO3-error/commit/f5d68bd119b509a9aad2ad0a091d7abe08330d41/checks?check_suite_id=408095792#step:9:67

On windows, it compiles without a problem.

I also tested upgrading from 0.8.5 to the 0.9.0-alpha.1 version while changing the syntax properly

https://github.com/BurnySc2/PyO3-error/blob/1c559d55332f7e6bf074f7cd771b24eb034db38a/src/lib.rs#L13-L16

The error is the same:

https://github.com/BurnySc2/PyO3-error/runs/397018311#step:9:126

The error can be reproduced using the following github actions workflow:

https://github.com/BurnySc2/PyO3-error/blob/master/.github/workflows/rust_build.yml

In summary:
cargo test and cargo bench do not work on linux, but cargo build --release does.
All three of the above commands work on windows.

@danielvschoor
Copy link

Just like to mention that I'm experiencing this exact issue as well on WSL Ubuntu, whereas I can successfully compile on Windows

@davidhewitt
Copy link
Member

This is a duplicate of #341 - see the note on testing here

cc @kngwyu to please close (I don't have permissions!)

@BurnySc2
Copy link
Author

Thanks for pointing me in the right direction!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants