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

[rust/python] Building pairing lib fails #400

Closed
2 tasks done
sbellem opened this issue Nov 26, 2019 · 1 comment
Closed
2 tasks done

[rust/python] Building pairing lib fails #400

sbellem opened this issue Nov 26, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@sbellem
Copy link
Collaborator

sbellem commented Nov 26, 2019

pip install pairing/ currently fails. See below for the error output. The current quickest solution is to "pin" the nightly build to a recent working version such as nightly-2019-11-15. But it would be useful to figure out a better solution for the near future.

Some observations

It may be useful to try to stay up-to-date with pyo3 as they are fixing issues arising from changes to rust (e.g.: PyO3/pyo3#615).

  • Current pyo3 version in pairing: 0.4 (Aug 20, 2018)

[dependencies.pyo3]
version = "0.4"

  • Latest pyo3 release version: 0.8.3 (Nov 22, 2019)

Error ouput

   error[E0277]: the trait bound `(): err::PyErrArguments` is not satisfied
       --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.4.1/src/err.rs:521:64
        |                                       
    521 |                 PyErr::from_value::<$pyexc>(PyErrValue::ToArgs(Box::new(err)))
        |                                                                ^^^^^^^^^^^^^ the trait `err::PyErrArguments` is not implemented for `()`
    ...
    590 | impl_to_pyerr!(std::string::ParseError, exc::ValueError);
        | --------------------------------------------------------- in this macro invocation
        |
        = note: required for the cast to the object type `dyn err::PyErrArguments`
    
    error: aborting due to previous error
    
    For more information about this error, try `rustc --explain E0277`.
    error: could not compile `pyo3`.
    
    Caused by:
      process didn't exit successfully: `rustc --crate-name pyo3 /root/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.4.1/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib -$
emit=dep-info,metadata,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="extension-module"' --cfg 'feature="python3"' -C metadata=b089b812af986789 -C extra-filename=-b089b812af986789 --out-dir /tmp/p$
p-req-build-yo95jaug/target/release/deps -L dependency=/tmp/pip-req-build-yo95jaug/target/release/deps --extern libc=/tmp/pip-req-build-yo95jaug/target/release/deps/liblibc-ece9f5f930b9fd9d.rmeta --extern mashup$
/tmp/pip-req-build-yo95jaug/target/release/deps/libmashup-48758ebfb5c58490.rmeta --extern num_traits=/tmp/pip-req-build-yo95jaug/target/release/deps/libnum_traits-b0dd93ee395f6cf5.rmeta --extern pyo3cls=/tmp/pip$
req-build-yo95jaug/target/release/deps/libpyo3cls-6df868f4459d33ee.so --extern spin=/tmp/pip-req-build-yo95jaug/target/release/deps/libspin-d13fc50bbaccbbf3.rmeta --cap-lints allow --cfg Py_3_5 --cfg Py_3_6 --cf$
 Py_3_7 --cfg Py_3 --cfg 'py_sys_config="WITH_THREAD"'` (exit code: 1)
    warning: build failed, waiting for other jobs to finish...
    error: build failed
    error: cargo failed with code: 101

TODO

  • Quick fix: pin down the nightly build to a working version.
  • Create separate issue to look into upgrading to a recent pyo3 and see whether it can work with a more recent nightly build.
@sbellem
Copy link
Collaborator Author

sbellem commented Dec 4, 2019

Closing as PR #401 pins down rust to a nightly build that works and issue #404 will be used to work on upgrading to a more recent version of PyO3.

@sbellem sbellem closed this as completed Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant