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

compiling errors on Android/Termux #151

Closed
nerd190 opened this issue Feb 28, 2021 · 3 comments
Closed

compiling errors on Android/Termux #151

nerd190 opened this issue Feb 28, 2021 · 3 comments
Labels
dependencies Pull requests that update a dependency file

Comments

@nerd190
Copy link

nerd190 commented Feb 28, 2021

Hi! I've never had any problems compiling this on Android via Termux but I get this error now:

error[E0308]: mismatched types
   --> /data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/sys-info-0.7.0/lib.rs:618:22
    |
618 | pub fn boottime() -> Result<timeval, Error> {
    |        --------      ^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `()`
    |        |
    |        implicitly returns `()` as its body has no tail or `return` expression
    |
    = note:   expected enum `std::result::Result<timeval, Error>`
            found unit type `()`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.
The following warnings were emitted during compilation:

warning: c/linux.c:96:11: warning: implicitly declaring library function 'index' with type 'char *(const char *, int)' [-Wimplicit-function-declaration]
warning:                 mount = index(procline, ' ');
warning:                         ^
warning: c/linux.c:96:11: note: include the header <strings.h> or explicitly provide a declaration for 'index'
warning: 1 warning generated.

error: could not compile `sys-info`

Caused by:
  process didn't exit successfully: `rustc --crate-name sys_info /data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/sys-info-0.7.0/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=8e4c9c41fb88bb44 -C extra-filename=-8e4c9c41fb88bb44 --out-dir /data/data/com.termux/files/home/emplace/target/release/deps -L dependency=/data/data/com.termux/files/home/emplace/target/release/deps --extern libc=/data/data/com.termux/files/home/emplace/target/release/deps/liblibc-90acee28a3686a67.rmeta --cap-lints allow -L native=/data/data/com.termux/files/home/emplace/target/release/build/sys-info-955860057669091d/out -l static=info` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error: build failed

Not sure if sys-info is a new lib? or perhaps it a new version of it causing the issue?

@tversteeg
Copy link
Owner

tversteeg commented Feb 28, 2021

sys-info is a library that's a dependency of bugreport another library I've added in 0.4.1.

I've found the compilation error you're getting, and it seems to be fixed in version 0.8 of the crate: FillZpp/sys-info-rs#67

The only problem is that bugreport still uses the 0.8 version, so I've created a PR to fix that: sharkdp/bugreport#5

@tversteeg

This comment has been minimized.

@allcontributors

This comment has been minimized.

@tversteeg tversteeg added the dependencies Pull requests that update a dependency file label Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants