Skip to content

Failed compilation/installation on ARM (Ubuntu 20.10 + Raspberry PI 4) #71

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

Closed
maksymsur opened this issue May 17, 2021 · 6 comments
Closed

Comments

@maksymsur
Copy link

Did anybody make autopy to run on ARM?
I cannot install it neither with rust nightly tool-chain nor with make (see error bellow)

   Compiling autopy v0.1.0 (/home/maksym/autopy)
     Running `rustc --crate-name autopy src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type cdylib --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no --crate-type cdylib -C metadata=6a007b4497ff4c93 --out-dir /home/maksym/autopy/target/release/deps -L dependency=/home/maksym/autopy/target/release/deps --extern autopilot=/home/maksym/autopy/target/release/deps/libautopilot-a34a6e8730651ca8.rlib --extern either=/home/maksym/autopy/target/release/deps/libeither-435fb7913833de59.rlib --extern image=/home/maksym/autopy/target/release/deps/libimage-abe18081ad42b31d.rlib --extern libc=/home/maksym/autopy/target/release/deps/liblibc-70af58b462853a99.rlib --extern pyo3=/home/maksym/autopy/target/release/deps/libpyo3-f74c31b40390b3ff.rlib`
error[E0557]: feature has been removed
 --> src/lib.rs:8:28
  |
8 | #![feature(specialization, const_fn)]
  |                            ^^^^^^^^ feature has been removed
  |
  = note: split into finer-grained feature gates

warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
 --> src/lib.rs:8:12
  |
8 | #![feature(specialization, const_fn)]
  |            ^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
  = help: consider using `min_specialization` instead, which is more stable and complete

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0557`.
error: could not compile `autopy`

Caused by:
  process didn't exit successfully: `rustc --crate-name autopy src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type cdylib --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no --crate-type cdylib -C metadata=6a007b4497ff4c93 --out-dir /home/maksym/autopy/target/release/deps -L dependency=/home/maksym/autopy/target/release/deps --extern autopilot=/home/maksym/autopy/target/release/deps/libautopilot-a34a6e8730651ca8.rlib --extern either=/home/maksym/autopy/target/release/deps/libeither-435fb7913833de59.rlib --extern image=/home/maksym/autopy/target/release/deps/libimage-abe18081ad42b31d.rlib --extern libc=/home/maksym/autopy/target/release/deps/liblibc-70af58b462853a99.rlib --extern pyo3=/home/maksym/autopy/target/release/deps/libpyo3-f74c31b40390b3ff.rlib` (exit status: 1)
error: cargo failed with code: 101

make: *** [Makefile:5: build] Error 1

@Karobben
Copy link

I got exactly the same error codes

1 similar comment
@Karobben
Copy link

I got exactly the same error codes

@rimvislt
Copy link

got errors caused by
"""
...
error: could not compile pyo3

Caused by:
  process didn't exit successfully: `rustc --crate-name pyo3 --edition=2018

""""

@Karobben
Copy link

Thanks. I gave up on python==3.9.5 and switched back to 3.7.6 with no trouble.

@meflakcannon
Copy link

Make sure your rust toolchain is pointing to the nightly not the current. Or you will not have features needed. You will likley then experience an issue compiling for a feature not enabled. Which is where #64 discusses the failed feature.

@maksymsur
Copy link
Author

maksymsur commented Jun 7, 2021

While activating nightly toolchain I got the following error which could be resolved with 'rustup toolchain add nightly-2019-10-05 --profile minimal:

maksym@nex20:~/autopy$ rustup default nightly-2019-10-05
info: syncing channel updates for 'nightly-2019-10-05-aarch64-unknown-linux-gnu'
info: latest update on 2019-10-05, rust version 1.40.0-nightly (2e7244807 2019-10-04)
error: some components unavailable for download for channel 'nightly-2019-10-05': 'clippy' for target 'aarch64-unknown-linux-gnu', 'rustfmt' for target 'aarch64-unknown-linux-gnu'Sometimes not all components are available in any given nightly. If you don't need the components, you could try a minimal installation with:

    rustup toolchain add nightly-2019-10-05 --profile minimal

I managed to solve all the issues and compiled with Make.

The following problem:

     Running `rustc --crate-name autopy src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type cdylib --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no --crate-type cdylib -C metadata=6a007b4497ff4c93 --out-dir /home/maksym/autopy/target/release/deps -L dependency=/home/maksym/autopy/target/release/deps --extern autopilot=/home/maksym/autopy/target/release/deps/libautopilot-a34a6e8730651ca8.rlib --extern either=/home/maksym/autopy/target/release/deps/libeither-435fb7913833de59.rlib --extern image=/home/maksym/autopy/target/release/deps/libimage-abe18081ad42b31d.rlib --extern libc=/home/maksym/autopy/target/release/deps/liblibc-70af58b462853a99.rlib --extern pyo3=/home/maksym/autopy/target/release/deps/libpyo3-f74c31b40390b3ff.rlib`
error[E0557]: feature has been removed
 --> src/lib.rs:8:28
  |
8 | #![feature(specialization, const_fn)]
  |                            ^^^^^^^^ feature has been removed
  |
  = note: split into finer-grained feature gates

may be fixed with the suggested solution:

  • change const_fn in line 8 of lib.rs into const_fn_transmute
8+ | #![feature(specialization, const_fn_transmute)]

Also I had to rewrite lines 5 and 17 of Makefile to better reflect standard ARM OS env variables + fix tipos --> otherwise building fails:

5+ |      python3 setup.py build

17+ |     pip3 install .

Hope that helps. Closing the issue for now.

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

4 participants