Closed ghempi closed 7 years ago
Hi, what's you cargo
version? Could you run cargo --version
and paste the output? Thanks!
System: Xubuntu 16.04-1 LTS (32 bit) Packages: rustc 1.7.0+dsfg1-1 Cargo 0.8.0-1
marcipan@aspirium:~$ rustc -V rustc 1.7.0 marcipan@aspirium:~$ cargo -V cargo 0.8.0 (built 2016-03-22)
Hi @ghempi,
I think this may be caused by really old rust
/cargo
on your machine (probably installed from Xubuntu repositories). Could you try installing rust
using rustup
and then try compiling it using newer cargo
? Rustup's website: https://www.rustup.rs/
Thanks!
Hi, thanks a lot. First all looked well, until…
marcipan@aspirium:~$ curl https://sh.rustup.rs -sSf | sh info: downloading installer
Welcome to Rust!
This will download and install the official compiler for the Rust programming language, and its package manager, Cargo.
It will add the cargo, rustc, rustup and other commands to Cargo's bin directory, located at:
/home/marcipan/.cargo/bin
This path will then be added to your PATH environment variable by modifying the profile file located at:
/home/marcipan/.profile
You can uninstall at any time with rustup self uninstall and these changes will be reverted.
Current installation options:
default host triple: i686-unknown-linux-gnu default toolchain: stable modify PATH variable: yes
1) Proceed with installation (default) 2) Customize installation 3) Cancel installation 1
info: syncing channel updates for 'stable-i686-unknown-linux-gnu'
info: downloading component 'rustc'
37.5 MiB / 37.5 MiB (100 %) 240.0 KiB/s ETA: 0 s
info: downloading component 'rust-std'
50.3 MiB / 50.3 MiB (100 %) 246.4 KiB/s ETA: 0 s
info: downloading component 'cargo'
4.3 MiB / 4.3 MiB (100 %) 243.2 KiB/s ETA: 0 s
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'
info: default toolchain set to 'stable'
stable installed - rustc 1.15.0 (10893a9a3 2017-01-19)
Rust is installed now. Great!
To get started you need Cargo's bin directory in your PATH environment variable. Next time you log in this will be done automatically.
To configure your current shell run source $HOME/.cargo/env marcipan@aspirium:~$ source $HOME/.cargo/env marcipan@aspirium:~$ cargo -V cargo 0.16.0-nightly (6e0c18c 2017-01-27) marcipan@aspirium:~$ rustc -V rustc 1.15.0 (10893a9a3 2017-01-19)
marcipan@aspirium:~$ cd microbrust-master
marcipan@aspirium:~/microbrust-master$ cargo run
Updating registry https://github.com/rust-lang/crates.io-index
Downloading midir v0.2.0
Downloading rustbox v0.9.0
Downloading memalloc v0.1.0
Downloading bitflags v0.3.3
Downloading termbox-sys v0.2.9
Downloading gag v0.1.9
Downloading bitflags v0.2.1
Downloading num v0.1.35
Downloading tempfile v2.1.4
Downloading libc v0.2.15
Downloading rand v0.3.14
Downloading kernel32-sys v0.2.2
Downloading winapi v0.2.8
Downloading winapi-build v0.1.1
Downloading rustc_version v0.1.7
Downloading semver v0.1.20
Downloading num-traits v0.1.35
Downloading num-iter v0.1.32
Downloading num-rational v0.1.35
Downloading num-integer v0.1.32
Downloading num-bigint v0.1.35
Downloading num-complex v0.1.35
Downloading rustc-serialize v0.3.19
Downloading alsa-sys v0.0.8
Downloading pkg-config v0.3.8
Compiling num-traits v0.1.35
Compiling bitflags v0.3.3
Compiling termbox-sys v0.2.9
Compiling pkg-config v0.3.8
Compiling bitflags v0.2.1
Compiling semver v0.1.20
Compiling winapi-build v0.1.1
Compiling kernel32-sys v0.2.2
Compiling rustc-serialize v0.3.19
Compiling alsa-sys v0.0.8
Compiling num-integer v0.1.32
Compiling num-iter v0.1.32
Compiling libc v0.2.15
Compiling rand v0.3.14
Compiling winapi v0.2.8
Compiling rustc_version v0.1.7
Compiling tempfile v2.1.4
Compiling num-complex v0.1.35
Compiling num-bigint v0.1.35
Build failed, waiting for other jobs to finish...
error: failed to run custom build command for termbox-sys v0.2.9
process didn't exit successfully: /home/marcipan/microbrust-master/target/debug/build/termbox-sys-0210724f65b564b0/build-script-build
(exit code: 101)
--- stdout
running: "git" "clone" "https://github.com/nsf/termbox" ".termbox"
--- stderr
thread 'main' panicked at 'called Result::unwrap()
on an Err
value: Error { repr: Os { code: 2, message: "No such file or directory" } }', /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libcore/result.rs:837
note: Run with RUST_BACKTRACE=1
for a backtrace.
Hi @ghempi,
could you run RUST_BACKTRACE=1 cargo run
and paste the output?
marcipan@aspirium:~/microbrust-master$ source $HOME/.cargo/env
marcipan@aspirium:~/microbrust-master$ RUST_BACKTRACE=1 cargo run
Compiling memalloc v0.1.0
Compiling num-rational v0.1.35
Compiling alsa-sys v0.0.8
Build failed, waiting for other jobs to finish...
error: failed to run custom build command for alsa-sys v0.0.8
process didn't exit successfully: /home/marcipan/microbrust-master/target/debug/build/alsa-sys-acd81fdf2143e95e/build-script-build
(exit code: 101)
--- stderr
thread 'main' panicked at 'called Result::unwrap()
on an Err
value: "Failed to run \"pkg-config\" \"--libs\" \"--cflags\" \"alsa\"
: No such file or directory (os error 2)"', /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libcore/result.rs:837
stack backtrace:
1: 0x800ca325 - std::sys::imp::backtrace::tracing::imp::write::h3188f035833a2635
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
2: 0x800ceb2b - std::panicking::default_hook::{{closure}}::h6385b6959a2dd25b
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:349
3: 0x800ce700 - std::panicking::default_hook::he4f3b61755d7fa95
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:365
4: 0x800cef29 - std::panicking::rust_panic_with_hook::hf00b8130f73095ec
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:553
5: 0x800ced7c - std::panicking::begin_panic::h6227f62cb2cdaeb4
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:515
6: 0x800cecf3 - std::panicking::begin_panic_fmt::h173eadd80ae64bec
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:499
7: 0x800cec66 - rust_begin_unwind
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:475
8: 0x800f761f - core::panicking::panic_fmt::h3b2d1e30090844ff
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libcore/panicking.rs:69
9: 0x800a77d7 - core::result::unwrap_failed::h3f6b090e162eb5e3
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libcore/macros.rs:29
10: 0x800a7117 - <core::result::Result<T, E>>::unwrap::hcb52d951cddb56dc
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libcore/result.rs:737
11: 0x800a85cd - build_script_build::main::he6e18f37c558ef79
at /home/marcipan/.cargo/registry/src/github.com-1ecc6299db9ec823/alsa-sys-0.0.8/build.rs:4
12: 0x800cec15 - std::panicking::try::do_call::hc921c510463b0da0
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:458
13: 0x800d6952 - __rust_maybe_catch_panic
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libpanic_unwind/lib.rs:98
14: 0x800cf5ca - std::rt::lang_start::h65647f6e36cffdae
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:434
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panic.rs:351
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/rt.rs:57
15: 0x800a865a - main
16: 0xb7539636 - __libc_start_main
17: 0x800a6c70 -
marcipan@aspirium:~/microbrust-master$
Hi @ghempi,
It looks like a different error this time (related to alsa-sys
crate instead of termbox-sys
), but it seems that you do not have alsa
installed. Could you run pkg-config --libs --cflags alsa
and paste the output, so we can check that? Thanks.
Hi, I think the run stopped at a different place because the remains of the run before were still in the project directory. sorry.
marcipan@aspirium:~$ pkg-config --libs --cflags alsa Package alsa was not found in the pkg-config search path. Perhaps you should add the directory containing `alsa.pc' to the PKG_CONFIG_PATH environment variable No package 'alsa' found
BUT these packages a r e installed and working: alsa-base alsa-utils libasound2 libasound2-plugins libasound2-data linux-sound-base
I'll simply give up now. Just one suspicion: rustup installed an 'i686 unknown linux' automatic – this should have be an 'i386 linux', (first generation of intel atom processors have no 64bit code set. ) and this is maybe a bug in rustup's autodetection. But I'm afraid there is no rustup platform for this old machinery…
Hi @ghempi, AFAIK Intel Atom are i686 (i686 is not 64-bit, x86_64 is). Sorry I could not help resolve your problem.
If you are not afraid to run a pre-compiled binary then I could compile a version that is static linked with musl
so you should be able to tun it without building it yourself.
Hi Jakub, all the packages on my system are i386 architecture because I got a Silverthorne CPU in my netbook which differs from later Atom models. Thank you very much for your kind advice and help, a pity it didn't work out. I'll wait until the proper versions of cargo and rust pop up in the next versions of Xubuntu – or I'll get me a decent machine.
marcipan@aspirium:~/mbc/microbrust-master$ ls Cargo.lock Cargo.toml CHANGELOG.md img LICENSE README.md src marcipan@aspirium:~/mbc/microbrust-master$ cargo run Updating registry
https://github.com/rust-lang/crates.io-index
Downloading num-integer v0.1.32 Downloading num-iter v0.1.32 Downloading rand v0.3.14 Downloading bitflags v0.2.1 Downloading semver v0.1.20 Downloading memalloc v0.1.0 Downloading winapi v0.2.8 Downloading tempfile v2.1.4 Downloading pkg-config v0.3.8 Downloading num-traits v0.1.35 Downloading rustbox v0.9.0 Downloading rustc_version v0.1.7 Downloading midir v0.2.0 unable to get packages from sourceCaused by: failed to parse manifest at
/home/marcipan/.cargo/registry/src/github.com-48ad6e4054423464/midir-0.2.0/Cargo.toml
Caused by: could not parse input as TOML /home/marcipan/.cargo/registry/src/github.com-48ad6e4054423464/midir-0.2.0/Cargo.toml:20:28 expected a key but found an empty string /home/marcipan/.cargo/registry/src/github.com-48ad6e4054423464/midir-0.2.0/Cargo.toml:20:28-20:29 expected
.
, but found'