Skip to content

Instantly share code, notes, and snippets.

@rickycodes
Created March 29, 2020 05:16
Show Gist options
  • Save rickycodes/012282bf68ce16055fb76f7c2e5f5aa2 to your computer and use it in GitHub Desktop.
Save rickycodes/012282bf68ce16055fb76f7c2e5f5aa2 to your computer and use it in GitHub Desktop.
--target=wasm32-unknown-emscripten doesn't work with external crate :/
$ cargo build --target=wasm32-unknown-emscripten
Compiling ncurses v5.99.0
error: failed to run custom build command for `ncurses v5.99.0`
Caused by:
process didn't exit successfully: `/home/ricky/projects/card/target/debug/build/ncurses-d2e3d48f734a75d8/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rustc-link-lib=ncurses
OPT_LEVEL = Some("0")
TARGET = Some("wasm32-unknown-emscripten")
HOST = Some("x86_64-unknown-linux-gnu")
CC_wasm32-unknown-emscripten = None
CC_wasm32_unknown_emscripten = None
TARGET_CC = None
CC = None
CFLAGS_wasm32-unknown-emscripten = None
CFLAGS_wasm32_unknown_emscripten = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
CARGO_CFG_TARGET_FEATURE = None
--- stderr
shared:WARNING: Assuming object file output in the absence of `-c`, based on output filename. Please add with `-c` or `-r` to avoid this warning
/home/ricky/projects/card/target/wasm32-unknown-emscripten/debug/build/ncurses-7b1166def6324c59/out/chtype_size.c:6:10: fatal error: 'ncurses.h' file not found
#include <ncurses.h>
^~~~~~~~~~~
1 error generated.
shared:ERROR: '/home/ricky/projects/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=11 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/home/ricky/projects/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/home/ricky/projects/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/home/ricky/projects/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/home/ricky/projects/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/home/ricky/projects/emsdk/upstream/emscripten/system/include -Xclang -isystem/home/ricky/projects/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/home/ricky/projects/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/home/ricky/projects/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/home/ricky/.emscripten_cache/wasm/include -O0 -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -Wall -Wextra -DEMSCRIPTEN -fignore-exceptions /home/ricky/projects/card/target/wasm32-unknown-emscripten/debug/build/ncurses-7b1166def6324c59/out/chtype_size.c -Xclang -isystem/home/ricky/projects/emsdk/upstream/emscripten/system/include/SDL -c -o /tmp/emscripten_temp_tbGvSi/chtype_size_0.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr' failed (1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment