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

It doses not work with stable 1.30 ? #251

Closed
toplinuxsir opened this issue Oct 26, 2018 · 4 comments
Closed

It doses not work with stable 1.30 ? #251

toplinuxsir opened this issue Oct 26, 2018 · 4 comments

Comments

@toplinuxsir
Copy link

🐛 Bug Reports

#![cfg_attr(feature = "const_fn", feature(const_fn))]                                                                                                      
  |                                   ^^^^^^^^^^^^^^^^^^                                                                                                       
                                                                                                                                                              
error: aborting due to previous error                                                                                                                          
        

For more information about this error, try rustc --explain E0554.
error: Could not compile spin.
warning: build failed, waiting for other jobs to finish...
error: build failed
When reporting a bug, please provide the following information. If this is not a bug report you can just discard this template.

🌍 Environment

  • Your operating system and version:
  • Your python version:
  • How did you install python (e.g. apt or pyenv)? Did you use a virtualenv?:
  • Your rust version (rustc --version):
  • Are you using the latest pyo3 version? Have you tried using latest master (replace version = "0.x.y" with git = "https://github.com/PyO3/pyo3")?

💥 Reproducing

Please provide a minimal working example. This means both the rust code and the python.

Please also write what exact flags are required to reproduce your results.

@kngwyu
Copy link
Member

kngwyu commented Oct 26, 2018

As I said in this comment, PyO3 requires nightly rust.
For example, you can use nighyly compiler by

rustup toolchain add nightly
cargo +nightly build

@kngwyu kngwyu closed this as completed Oct 26, 2018
@toplinuxsir
Copy link
Author

I use nightly 1.31 , but error as below:

error: internal compiler error: librustc/traits/specialize/mod.rs:104: When translating substitutions for specialization, the expected specialization failed to hold

@kngwyu
Copy link
Member

kngwyu commented Oct 26, 2018

As @konstin reported, it looks a compiler bug 😭
Now you have to use a bit old compiler, by

rustup toolchain add 
rustup default nightly-2018-10-18

Sorry for taking your time.

@toplinuxsir
Copy link
Author

I user python3 when import the error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dynamic module does not define module export function (PyInit_pytest1)

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

2 participants