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

No available targets are compatible with triple "wasm32-unknown-unknown" #103

Open
samdenty opened this issue Jun 18, 2022 · 2 comments
Open

Comments

@samdenty
Copy link

I'm trying to compile an application using flate2 with features = ["zlib-ng-compat",], default-features = false and I'm getting an error:

Install a sysroot for the target platform and configure it via
  PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a
  cross-compiling wrapper for pkg-config and set it via
  PKG_CONFIG environment variable.
  TARGET = Some("wasm32-unknown-unknown")
  OPT_LEVEL = Some("3")
  HOST = Some("x86_64-apple-darwin")
  CC_wasm32-unknown-unknown = None
  CC_wasm32_unknown_unknown = None
  TARGET_CC = None
  CC = None
  CFLAGS_wasm32-unknown-unknown = None
  CFLAGS_wasm32_unknown_unknown = None
  TARGET_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  running: "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "src/zlib" "-fvisibility=hidden" "-DZ_SOLO" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-o" "/Users/samdenty/Projects/isomorphic-git/zlib-wasm/target/wasm32-unknown-unknown/release/build/libz-sys-7094e0907550e67a/out/lib/src/zlib/adler32.o" "-c" "src/zlib/adler32.c"
  cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
  cargo:warning=1 error generated
@gagbo
Copy link

gagbo commented Dec 6, 2022

I had the same issue (on a totally unrelated project, I just mean clang not having a wasm-unknown-unknown toolchain) and I solved it by installing llvw through brew and use that version of clang instead. Following sapio-lang/sapio#161 and then the local quickstart bit on https://learn.sapio-lang.org/ch01-01-installation.html

@romamik
Copy link

romamik commented Jun 19, 2023

I had the same issue. After installing llvm from brew and adding it to the path it still not compiles, but with another error: failed to build archive: ‘compress.o’: section too large

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

3 participants