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

sys-info can't be installed on termux #116

Open
Kreijstal opened this issue Dec 27, 2023 · 1 comment
Open

sys-info can't be installed on termux #116

Kreijstal opened this issue Dec 27, 2023 · 1 comment

Comments

@Kreijstal
Copy link

Describe the bug
try cargo install sys-info

To Reproduce
I tried running cargo install bat, since sys-info is a dependency.

error: failed to run custom build command for `sys-info v0.9.1`

Caused by:
  process didn't exit successfully: `/data/data/com.termux/files/usr/tmp/cargo-installKZRXcQ/release/build/sys-info-26f569e1e06f06ef/build-script-build` (exit status: 1)
  --- stdout
  TARGET = Some("aarch64-linux-android")
  OPT_LEVEL = Some("3")
  HOST = Some("aarch64-linux-android")
  cargo:rerun-if-env-changed=CC_aarch64-linux-android
  CC_aarch64-linux-android = None
  cargo:rerun-if-env-changed=CC_aarch64_linux_android
  CC_aarch64_linux_android = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("neon")
  cargo:rerun-if-env-changed=CFLAGS_aarch64-linux-android
  CFLAGS_aarch64-linux-android = None
  cargo:rerun-if-env-changed=CFLAGS_aarch64_linux_android
  CFLAGS_aarch64_linux_android = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  running: "aarch64-linux-android-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-Wall" "-Wextra" "-o" "/data/data/com.termux/files/usr/tmp/cargo-installKZRXcQ/release/build/sys-info-51d975ed4f6238fe/out/c/linux.o" "-c" "c/linux.c"
  cargo:warning=c/linux.c:96:11: error: call to undeclared library function 'index' with type 'char *(const char *, int)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

  cargo:warning=   96 |                 mount = index(procline, ' ');

  cargo:warning=      |                         ^

  cargo:warning=c/linux.c:96:11: note: include the header <strings.h> or explicitly provide a declaration for 'index'

  cargo:warning=1 error generated.

  exit status: 1

  --- stderr


  error occurred: Command "aarch64-linux-android-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-Wall" "-Wextra" "-o" "/data/data/com.termux/files/usr/tmp/cargo-installKZRXcQ/release/build/sys-info-51d975ed4f6238fe/out/c/linux.o" "-c" "c/linux.c" with args "aarch64-linux-android-gcc" did not execute successfully (status code exit status: 1).


warning: build failed, waiting for other jobs to finish...
error: failed to compile `bat v0.24.0`, intermediate artifacts can be found at `/data/data/com.termux/files/usr/tmp/cargo-installKZRXcQ`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
@Biswa96
Copy link

Biswa96 commented Aug 23, 2024

You can patch the sys-info crate like this
termux/termux-packages@f4b20cc

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