-
Notifications
You must be signed in to change notification settings - Fork 2
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
Mismatched types when trying to build project #1
Comments
@camba1 Could you please sync up the latest code first, then build again? Thanks! |
Hi @apepkuss, I deleted my old folder and started from scratch with a new cloned repo. I got a different error this time when trying to build: Compiling rand_os v0.1.3
The following warnings were emitted during compilation:
warning: [email protected]: error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-wasip1"'
warning: [email protected]: 1 error generated.
error: failed to run custom build command for `ring v0.17.8`
Caused by:
process didn't exit successfully: `/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/target/release/build/ring-ac9660d3565dbb3c/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=RING_PREGENERATE_ASM
cargo:rustc-env=RING_CORE_PREFIX=ring_core_0_17_8_
OPT_LEVEL = Some(3)
TARGET = Some(wasm32-wasip1)
OUT_DIR = Some(/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/target/wasm32-wasip1/release/build/ring-4698f91054c397ba/out)
HOST = Some(aarch64-apple-darwin)
cargo:rerun-if-env-changed=CC_wasm32-wasip1
CC_wasm32-wasip1 = None
cargo:rerun-if-env-changed=CC_wasm32_wasip1
CC_wasm32_wasip1 = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
RUSTC_WRAPPER = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
cargo:rerun-if-env-changed=WASI_SYSROOT
WASI_SYSROOT = None
DEBUG = Some(false)
cargo:rerun-if-env-changed=CFLAGS_wasm32-wasip1
CFLAGS_wasm32-wasip1 = None
cargo:rerun-if-env-changed=CFLAGS_wasm32_wasip1
CFLAGS_wasm32_wasip1 = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-wasip1"'
cargo:warning=1 error generated.
--- stderr
error occurred: Command "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-exceptions" "--target=wasm32-wasip1" "-I" "include" "-I" "/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/target/wasm32-wasip1/release/build/ring-4698f91054c397ba/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-nostdlibinc" "-DNDEBUG" "-DRING_CORE_NOSTDLIBINC=1" "-o" "/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/target/wasm32-wasip1/release/build/ring-4698f91054c397ba/out/fad98b632b8ce3cc-curve25519.o" "-c" "crypto/curve25519/curve25519.c" with args clang did not execute successfully (status code exit status: 1).
warning: build failed, waiting for other jobs to finish... I tried to install wasm32-unknown-wasip1 since it is displayed in the warning, but that does not appear to be a valid target $ rustup target add wasm32-unknown-wasip1
error: toolchain 'stable-aarch64-apple-darwin' does not support target 'wasm32-unknown-wasip1'
My environment: $ wasmedge --version
wasmedge version 0.14.1-rc.4
(plugin "wasi_logging") version 0.1.0.0
/Users/jperedo/.wasmedge/lib/../plugin/libwasmedgePluginWasmEdgeStableDiffusion.dylib (plugin "wasmedge_stablediffusion") version 0.1.0.0
rustup target list --installed
aarch64-apple-darwin
wasm32-wasip1
I am running on a Mac M3 Pro - Sonoma |
On the plus side, I was able to generate an image following the new Flux tutorial and using the pre-compiled sd-api-server.wasm. It did take 16 minutes, but it completed. Looks like it is using a single performance core on my machine and no gpu, so it takes a little while :) |
@camba1 Thanks for your quick feedback!
|
@apepkuss, [...]
Compiling aho-corasick v1.1.3
The following warnings were emitted during compilation:
warning: [email protected]: error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-wasip1"'
warning: [email protected]: 1 error generated.
error: failed to run custom build command for `ring v0.17.8`
Caused by:
process didn't exit successfully: `/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/target/release/build/ring-ee2bcfab7926566b/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=RING_PREGENERATE_ASM
cargo:rustc-env=RING_CORE_PREFIX=ring_core_0_17_8_
OPT_LEVEL = Some(3)
TARGET = Some(wasm32-wasip1)
OUT_DIR = Some(/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/target/wasm32-wasip1/release/build/ring-e2b38227786e849a/out)
HOST = Some(aarch64-apple-darwin)
cargo:rerun-if-env-changed=CC_wasm32-wasip1
CC_wasm32-wasip1 = None
cargo:rerun-if-env-changed=CC_wasm32_wasip1
CC_wasm32_wasip1 = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
RUSTC_WRAPPER = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
cargo:rerun-if-env-changed=WASI_SYSROOT
WASI_SYSROOT = None
DEBUG = Some(false)
cargo:rerun-if-env-changed=CFLAGS_wasm32-wasip1
CFLAGS_wasm32-wasip1 = None
cargo:rerun-if-env-changed=CFLAGS_wasm32_wasip1
CFLAGS_wasm32_wasip1 = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-wasip1"'
cargo:warning=1 error generated.
--- stderr
error occurred: Command "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-exceptions" "--target=wasm32-wasip1" "-I" "include" "-I" "/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/target/wasm32-wasip1/release/build/ring-e2b38227786e849a/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-nostdlibinc" "-DNDEBUG" "-DRING_CORE_NOSTDLIBINC=1" "-o" "/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/target/wasm32-wasip1/release/build/ring-e2b38227786e849a/out/fad98b632b8ce3cc-curve25519.o" "-c" "crypto/curve25519/curve25519.c" with args clang did not execute successfully (status code exit status: 1).
Downloaded wasi-sdk-24.0-arm64-macos.tar and extracted contents to: /Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/wasi-sdk/ $ echo $WASI_SDK_PATH
/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/wasi-sdk/wasi-sdk-24.0-arm64-macos
echo $CC
/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/wasi-sdk/wasi-sdk-24.0-arm64-macos/bin/clang --sysroot=/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/wasi-sdk/wasi-sdk-24.0-arm64-macos/share/wasi-sysroot My environment: $ wasmedge --version
wasmedge version 0.14.1-rc.5
(plugin "wasi_logging") version 0.1.0.0
/Users/jperedo/.wasmedge/lib/../plugin/libwasmedgePluginWasmEdgeStableDiffusion.dylib (plugin "wasmedge_stablediffusion") version 0.1.0.0
$ rustup target list --installed
aarch64-apple-darwin
wasm32-wasip1
On the plus side, I can still play around with the pre-compiled version. :) |
@camba1 Did you run the following two commands before building the source? # clean the cached deps
cargo clean
# update to the latest deps
cargo update After the two commands above, you can try to build the source: cargo build --target wasm32-wasip1 --release |
@apepkuss , Compiling thiserror v1.0.63
The following warnings were emitted during compilation:
warning: [email protected]: error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-wasip1"'
warning: [email protected]: 1 error generated.
error: failed to run custom build command for `ring v0.17.8`
Caused by:
process didn't exit successfully: `/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/target/release/build/ring-8c7d0943a5c8b381/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=RING_PREGENERATE_ASM
cargo:rustc-env=RING_CORE_PREFIX=ring_core_0_17_8_
OPT_LEVEL = Some(3)
TARGET = Some(wasm32-wasip1)
OUT_DIR = Some(/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/target/wasm32-wasip1/release/build/ring-19d51caecaf91834/out)
HOST = Some(aarch64-apple-darwin)
cargo:rerun-if-env-changed=CC_wasm32-wasip1
CC_wasm32-wasip1 = None
cargo:rerun-if-env-changed=CC_wasm32_wasip1
CC_wasm32_wasip1 = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
RUSTC_WRAPPER = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
cargo:rerun-if-env-changed=WASI_SYSROOT
WASI_SYSROOT = None
DEBUG = Some(false)
cargo:rerun-if-env-changed=CFLAGS_wasm32-wasip1
CFLAGS_wasm32-wasip1 = None
cargo:rerun-if-env-changed=CFLAGS_wasm32_wasip1
CFLAGS_wasm32_wasip1 = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-wasip1"'
cargo:warning=1 error generated.
--- stderr
error occurred: Command "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-exceptions" "--target=wasm32-wasip1" "-I" "include" "-I" "/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/target/wasm32-wasip1/release/build/ring-19d51caecaf91834/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-nostdlibinc" "-DNDEBUG" "-DRING_CORE_NOSTDLIBINC=1" "-o" "/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/target/wasm32-wasip1/release/build/ring-19d51caecaf91834/out/fad98b632b8ce3cc-curve25519.o" "-c" "crypto/curve25519/curve25519.c" with args clang did not execute successfully (status code exit status: 1). Here are the commands I am running after downloading wasi-sdk-24.0-arm64-macos.tar and placing the file in the folder : /Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/wasi-sdk/ $ tar -xvf wasi-sdk-24.0-arm64-macos.tar .
$ export WASI_SDK_PATH=/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/wasi-sdk/wasi-sdk-24.0-arm64-macos
$ export CC="${WASI_SDK_PATH}/bin/clang --sysroot=${WASI_SDK_PATH}/share/wasi-sysroot"
$ echo $CC
/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/wasi-sdk/wasi-sdk-24.0-arm64-macos/bin/clang --sysroot=/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/wasi-sdk/wasi-sdk-24.0-arm64-macos/share/wasi-sysroot
$ cd ../..
$ ls
Cargo.lock
Cargo.toml
README.md
WasmEdge-plugin-wasmedge_stablediffusion-0.14.1-rc.5-darwin_arm64.tar.gz
examples
image
src
tests
wasi-sdk
$ cargo clean
Removed 0 files
$ cargo clean
Removed 0 files
$ cargo update
Updating git repository `https://github.com/second-state/wasi_hyper.git`
Updating git repository `https://github.com/second-state/wasi_reqwest.git`
Updating git repository `https://github.com/second-state/socket2.git`
Updating git repository `https://github.com/second-state/wasi_tokio.git`
Updating crates.io index
Updating git repository `https://github.com/second-state/wasi_mio.git`
Locking 14 packages to latest compatible versions
Updating anyhow v1.0.88 -> v1.0.89
Updating cc v1.1.18 -> v1.1.20
Updating chat-prompts v0.14.0 -> v0.14.1
Updating iana-time-zone v0.1.60 -> v0.1.61
Updating sval v2.13.0 -> v2.13.1
Updating sval_buffer v2.13.0 -> v2.13.1
Updating sval_dynamic v2.13.0 -> v2.13.1
Updating sval_fmt v2.13.0 -> v2.13.1
Updating sval_json v2.13.0 -> v2.13.1
Updating sval_nested v2.13.0 -> v2.13.1
Updating sval_ref v2.13.0 -> v2.13.1
Updating sval_serde v2.13.0 -> v2.13.1
Updating toml_edit v0.22.20 -> v0.22.21
Updating unicode-segmentation v1.11.0 -> v1.12.0
note: pass `--verbose` to see 93 unchanged dependencies behind latest
$ sudo cargo build --target wasm32-wasip1 --release
Password:
Compiling proc-macro2 v1.0.86
Compiling unicode-ident v1.0.13
Compiling autocfg v1.3.0
Compiling cfg-if v1.0.0
Compiling serde v1.0.210
Compiling typeid v1.0.2
Compiling libc v0.2.158
Compiling memchr v2.7.4
Compiling byteorder v1.5.0
Compiling wasi v0.11.0+wasi-snapshot-preview1
Compiling anyhow v1.0.89
Compiling scopeguard v1.2.0
Compiling version_check v0.1.5
Compiling serde_json v1.0.128
Compiling getrandom v0.2.15
Compiling autocfg v0.1.8
Compiling unicase v1.4.2
Compiling tinyvec_macros v0.1.1
Compiling lock_api v0.4.12
Compiling rand_core v0.4.2
Compiling smallvec v1.13.2
Compiling tinyvec v1.8.0
Compiling rand_core v0.6.4
Compiling num-traits v0.2.19
Compiling bytes v1.7.1
Compiling once_cell v1.19.0
Compiling unicode-bidi v0.3.15
Compiling itoa v1.0.11
Compiling quick-error v1.2.3
Compiling parking_lot_core v0.9.10
Compiling pin-project-lite v0.2.14
Compiling shlex v1.3.0
Compiling cc v1.1.20
Compiling dns-parser v0.8.0
Compiling unicode-normalization v0.1.23
Compiling rand_core v0.3.1
Compiling quote v1.0.37
Compiling syn v2.0.77
Compiling num_cpus v1.16.0
Compiling version_check v0.9.5
Compiling semver v1.0.23
Compiling equivalent v1.0.1
Compiling httparse v1.9.4
Compiling hashbrown v0.14.5
Compiling unicase v2.7.0
Compiling rand_chacha v0.1.1
Compiling parking_lot v0.12.3
Compiling rand_pcg v0.1.2
Compiling slab v0.4.9
Compiling ring v0.17.8
Compiling ryu v1.0.18
Compiling bitflags v2.6.0
Compiling futures-sink v0.3.30
Compiling futures-core v0.3.30
Compiling crossbeam-utils v0.8.20
Compiling aho-corasick v1.1.3
Compiling rand v0.6.5
Compiling untrusted v0.9.0
Compiling siphasher v0.2.3
Compiling thiserror v1.0.63
The following warnings were emitted during compilation:
warning: [email protected]: error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-wasip1"'
warning: [email protected]: 1 error generated.
error: failed to run custom build command for `ring v0.17.8`
Caused by:
process didn't exit successfully: `/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/target/release/build/ring-8c7d0943a5c8b381/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=RING_PREGENERATE_ASM
cargo:rustc-env=RING_CORE_PREFIX=ring_core_0_17_8_
OPT_LEVEL = Some(3)
TARGET = Some(wasm32-wasip1)
OUT_DIR = Some(/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/target/wasm32-wasip1/release/build/ring-19d51caecaf91834/out)
HOST = Some(aarch64-apple-darwin)
cargo:rerun-if-env-changed=CC_wasm32-wasip1
CC_wasm32-wasip1 = None
cargo:rerun-if-env-changed=CC_wasm32_wasip1
CC_wasm32_wasip1 = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
RUSTC_WRAPPER = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
cargo:rerun-if-env-changed=WASI_SYSROOT
WASI_SYSROOT = None
DEBUG = Some(false)
cargo:rerun-if-env-changed=CFLAGS_wasm32-wasip1
CFLAGS_wasm32-wasip1 = None
cargo:rerun-if-env-changed=CFLAGS_wasm32_wasip1
CFLAGS_wasm32_wasip1 = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-wasip1"'
cargo:warning=1 error generated.
--- stderr
error occurred: Command "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-exceptions" "--target=wasm32-wasip1" "-I" "include" "-I" "/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/target/wasm32-wasip1/release/build/ring-19d51caecaf91834/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-nostdlibinc" "-DNDEBUG" "-DRING_CORE_NOSTDLIBINC=1" "-o" "/Users/jperedo/Documents/MyFiles/Projects/bookLearning/thirdParty/sd-api-server/target/wasm32-wasip1/release/build/ring-19d51caecaf91834/out/fad98b632b8ce3cc-curve25519.o" "-c" "crypto/curve25519/curve25519.c" with args clang did not execute successfully (status code exit status: 1).
warning: build failed, waiting for other jobs to finish...
Note that I have to run cargo build as sudo otherwise it will error out saying that cargo-18 cannot be opened because the developer cannot be verified and it does not let me continue. |
Howdy,
I am trying to build the project, but I run into a couple of issues:
The first one, which is probably causing the second one: In the cargo.toml file, build fails on llama-core and endpoints. Those items have paths to files that do not appear to be part of the project. I removed the path and ran the build again.
The second time around, it once again fails, this time while compiling. the error is:
Any idea how I can get around this?
Here is my version of the cargo.toml file after removing the path properties:
Thanks!
The text was updated successfully, but these errors were encountered: