DarkRTA / chronos

a terminal-based speedrun timer using https://github.com/livesplit/livesplit-core
MIT License
23 stars 4 forks source link

Failure to compile livesplit-core on a Raspberry Pi #7

Closed efirshik closed 4 years ago

efirshik commented 4 years ago
pi@testpi:~/darksplit $ make
HEAD is now at 0355b83 Merge pull request #307 from CryZe/title-abbrevs-in-component
   Compiling scopeguard v1.1.0
error: could not compile `scopeguard`.
 Caused by:
  process didn't exit successfully: `rustc --crate-name scopeguard /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/scopeguard-1.1.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C metadata=7ab59481cc59ada1 -C extra-filename=-7ab59481cc59ada1 --out-dir /home/pi/darksplit/livesplit-core/livesplit-core/target/release/deps -L dependency=/home/pi/darksplit/livesplit-core/livesplit-core/target/release/deps --cap-lints allow` (signal: 11, SIGSEGV: invalid memory reference)
cp: cannot stat 'target/release/liblivesplit_core.a': No such file or directory
make: *** [Makefile:39: livesplit-core/liblivesplit_core.a] Error 1
DarkRTA commented 4 years ago

Looks like livesplit-core is failing to compile on your machine. Can you give me more information about what you are trying to run this on (other than the fact that you are trying to run this on a Raspberry Pi)?

Specifically stuff like your OS and Rust toolchain version.

efirshik commented 4 years ago
pi@testpi:~ $ cat /proc/cpuinfo
processor       : 0
model name      : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS        : 697.95
Features        : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xb76
CPU revision    : 7
Hardware        : BCM2835
Revision        : 000e
Model           : Raspberry Pi Model B Rev 2

pi@testpi:~ $ lsb_release -a
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

pi@testpi:~ $ rustup show
Default host: arm-unknown-linux-gnueabihf                                                           stable-arm-unknown-linux-gnueabihf (default)
rustc 1.41.1 (f3e1a954d 2020-02-24)
DarkRTA commented 4 years ago

It looks like you ran out of memory when trying to build.

I cant help you much with that but you could try changing line 42 in the makefile to:

    cargo build --release -p staticlib -j 1; \
CryZe commented 4 years ago

In particular you probably want to modify the release profile of livesplit-core to something like this: https://github.com/rust-lang/cargo/issues/6489#issuecomment-546635180