Skip to content

Android build is broken #424

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

Closed
kdy1 opened this issue May 7, 2021 · 1 comment · Fixed by #425
Closed

Android build is broken #424

kdy1 opened this issue May 7, 2021 · 1 comment · Fixed by #425

Comments

@kdy1
Copy link

kdy1 commented May 7, 2021

See: https://github.com/swc-project/swc/runs/2527098998?check_suite_focus=true

Run export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android24-clang"
yarn run v1.22.5
$ tsc -d && napi build --platform --release --cargo-name node --cargo-flags="-p node" --target aarch64-linux-android
2021-05-07T12:10:16.225Z napi:build Current triple is: aarch64-linux-android
2021-05-07T12:10:16.226Z napi:build Run cargo build --release --target aarch64-linux-android -p node
    Updating crates.io index
 Downloading crates ...
  Downloaded rustc-demangle v0.1.19
  Downloaded is-macro v0.1.9
  Downloaded radix_fmt v1.0.0
  Downloaded sct v0.6.1
  Downloaded scoped-tls v1.0.0
  Downloaded relative-path v1.4.0
  Downloaded base64 v0.11.0
  Downloaded either v1.6.1
  Downloaded strsim v0.9.3
  Downloaded rand_pcg v0.2.1
  Downloaded scopeguard v0.3.3
  Downloaded tiny-keccak v2.0.2
  Downloaded walkdir v2.3.2
  Downloaded rand_jitter v0.1.4
  Downloaded stable_deref_trait v1.2.0
  Downloaded rustls v0.19.1
  Downloaded indexmap v1.6.2
  Downloaded num-traits v0.2.14
  Downloaded url v2.2.1
  Downloaded rand v0.7.3
  Downloaded aho-corasick v0.7.18
  Downloaded regex v1.5.4
  Downloaded hashbrown v0.9.1
  Downloaded crossbeam-channel v0.5.1
  Downloaded untrusted v0.7.1
  Downloaded new_debug_unreachable v1.0.4
  Downloaded static-map-macro v0.2.1
  Downloaded version_check v0.9.3
  Downloaded lazy_static v1.4.0
  Downloaded regex-syntax v0.6.25
  Downloaded napi-derive v1.1.0
  Downloaded parking_lot v0.7.1
  Downloaded path-clean v0.1.0
  Downloaded smallvec v1.6.1
  Downloaded unicode-bidi v0.3.5
  Downloaded ureq v2.1.1
   Compiling path-clean v0.1.0
   Compiling num-traits v0.2.14
   Compiling num-integer v0.1.44
   Compiling num-bigint v0.2.6
   Compiling indexmap v1.6.2
   Compiling crossbeam-utils v0.8.4
   Compiling memoffset v0.6.3
   Compiling miniz_oxide v0.4.4
   Compiling rayon v1.5.0
   Compiling rand_core v0.3.1
   Compiling rand_jitter v0.1.4
   Compiling rand_pcg v0.1.2
   Compiling rand_chacha v0.1.1
   Compiling rand v0.6.5
   Compiling phf_shared v0.8.0
   Compiling unicode-bidi v0.3.5
   Compiling tinyvec v1.2.0
   Compiling owning_ref v0.4.1
   Compiling form_urlencoded v1.0.1
   Compiling fxhash v0.2.1
   Compiling generic-array v0.14.4
   Compiling ahash v0.7.2
   Compiling hashbrown v0.9.1
   Compiling ring v0.16.20
   Compiling backtrace v0.3.58
   Compiling crc v1.8.1
   Compiling walkdir v2.3.2
   Compiling addr2line v0.14.1
   Compiling rand_xorshift v0.1.1
   Compiling rand_hc v0.1.0
   Compiling rand_isaac v0.1.1
   Compiling unicode-normalization v0.1.17
   Compiling lock_api v0.1.5
   Compiling lru v0.6.5
error: failed to run custom build command for `backtrace v0.3.58`

Caused by:
  process didn't exit successfully: `/Users/runner/work/swc/swc/target/release/build/backtrace-668d52a5c70def45/build-script-build` (exit status: 1)
  --- stdout
  OPT_LEVEL = Some("3")
  TARGET = Some("aarch64-linux-android")
  HOST = Some("x86_64-apple-darwin")
  CC_aarch64-linux-android = None
  CC_aarch64_linux_android = None
  TARGET_CC = None
  CC = None
  CFLAGS_aarch64-linux-android = None
  CFLAGS_aarch64_linux_android = None
  TARGET_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  running: "aarch64-linux-android-clang" "-O3" "-DANDROID" "-ffunction-sections" "-fdata-sections" "-fPIC" "-Wall" "-Wextra" "-E" "src/android-api.c"
alexcrichton added a commit that referenced this issue May 7, 2021
A C compiler hasn't been required historically, so let's assume we don't
know the API version if the C compiler fails.

Closes #424
@alexcrichton
Copy link
Member

Thanks for the report! This should be fixed in #425

alexcrichton added a commit that referenced this issue May 7, 2021
A C compiler hasn't been required historically, so let's assume we don't
know the API version if the C compiler fails.

Closes #424
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

Successfully merging a pull request may close this issue.

2 participants