Closed ibukanov closed 5 years ago
Hmm, the termbox-sys
crate just clones the repo and runs the termbox build under the hood. Is git installed on that machine? It could also be the termbox build failing, but we should see output that'd indicate that.
Yes, git is installed. cargo install -v gives:
error: Could not compile `termbox-sys`.
Caused by:
process didn't exit successfully: `rustc --crate-name termbox_sys /home/igor/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=eb4d5fa4c245464c -C extra-filename=-eb4d5fa4c245464c --out-dir /tmp/cargo-installwE5sNX/release/deps -L dependency=/tmp/cargo-installwE5sNX/release/deps --cap-lints allow -L /tmp/cargo-installwE5sNX/release/build/termbox-sys-26f724f97a589134/out/lib -l static=termbox` (exit code: 1)
When I looked into /tmp/cargo-installwE5sNX/release/build/termbox-sys-26f724f97a589134/
, I do not see out/lib there. But there is out/lib64 with a static library. So the build script passes the wrong location for termbox library on Fedora.
Yep, I ran into this in Void Linux while building for ppc64le
a while ago, so I patched it in: https://github.com/void-linux/void-packages/blob/master/srcpkgs/amp/patches/termbox-fix.patch
Seems like the issue is not specific to Void or ppc64le
but also happens in various other 64-bit environments, which makes sense.
For what it's worth, 0.6.0
will fix this, since it moves away from termbox entirely. If that patch lands in termbox-sys, I'll happily bring it into the current 0.5.2
.
As a workaround to compile I added to Cargo.toml in my local checkout of amp:
[patch.crates-io]
termbox-sys = { git = 'https://github.com/q66/termbox-sys.git' }
That repo contains the fix.
Hi @ibukanov, did you ran into any troubles after doing this?
I'm not being able to build amp on my machine with the error
error: linking with `cc` failed: exit code: 1
Something to do with openssl, perhaps?
This is fixed in master
, as I've moved away termbox
and am doing all of the rendering/screen buffering directly in amp, now. I'll be pushing out a 0.6.0
release over the next two weeks.
On Fedora 29 running
cargo install amp
with the latest stable Rust and Cargo gives:could not find native static library
termbox
, perhaps an -L flag is missing?I initially thought this is related #95, but on Fedora python still points to Python2, so this is something else. On Ubuntu 18.04
cargo install amp
works.