Code Monkey home page Code Monkey logo

Comments (4)

Taoja avatar Taoja commented on August 27, 2024 1

@kornelski
i solution the problem about clang support.
but i got alots of unknown type name error like this:
error: failed to run custom build command for imagequant-sys v2.12.5`

Caused by:
process didn't exit successfully: /Users/huangwutao/work/wx/rust/compress/target/release/build/imagequant-sys-34adba6d4e6d8a33/build-script-build (exit code: 1)
--- stdout
OPT_LEVEL = Some("s")
TARGET = Some("wasm32-unknown-unknown")
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")
cargo:include=/Users/huangwutao/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/imagequant-sys-2.12.5
running: "clang" "-Os" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-std=c99" "-DNDEBUG=1" "-o" "/Users/huangwutao/work/wx/rust/compress/target/wasm32-unknown-unknown/release/build/imagequant-sys-bc036356db92ca34/out/libimagequant.o" "-c" "libimagequant.c"
cargo:warning=In file included from libimagequant.c:9:
cargo:warning=In file included from /usr/include/stdio.h:64:
cargo:warning=In file included from /usr/include/_stdio.h:68:
cargo:warning=/usr/include/sys/cdefs.h:784:2: error: Unsupported architecture
cargo:warning=#error Unsupported architecture
cargo:warning= ^
cargo:warning=In file included from libimagequant.c:9:
cargo:warning=In file included from /usr/include/stdio.h:64:
cargo:warning=In file included from /usr/include/_stdio.h:71:
cargo:warning=In file included from /usr/include/_types.h:27:
cargo:warning=In file included from /usr/include/sys/_types.h:33:
cargo:warning=/usr/include/machine/_types.h:34:2: error: architecture not supported
cargo:warning=#error architecture not supported
cargo:warning= ^
cargo:warning=In file included from libimagequant.c:9:
cargo:warning=In file included from /usr/include/stdio.h:64:
cargo:warning=In file included from /usr/include/_stdio.h:71:
cargo:warning=In file included from /usr/include/_types.h:27:
cargo:warning=/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'; did you mean '__int128_t'?
cargo:warning=typedef __int64_t __darwin_blkcnt_t; /* total blocks /
cargo:warning= ^
cargo:warning=note: '__int128_t' declared here
cargo:warning=/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
cargo:warning=typedef __int32_t __darwin_blksize_t; /
preferred block size /
cargo:warning= ^
cargo:warning=note: '__int128_t' declared here
cargo:warning=/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
cargo:warning=typedef __int32_t __darwin_dev_t; /
dev_t /
cargo:warning= ^
cargo:warning=note: '__int128_t' declared here
cargo:warning=/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint32_t __darwin_gid_t; /
[???] process and group IDs /
cargo:warning= ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint32_t __darwin_id_t; /
[XSI] pid_t, uid_t, or gid_t*/
cargo:warning= ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes /
cargo:warning= ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
cargo:warning=typedef __darwin_natural_t __darwin_mach_port_name_t; /
Used by mach /
cargo:warning= ^
cargo:warning=/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint16_t __darwin_mode_t; /
[???] Some file attributes /
cargo:warning= ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'; did you mean '__int128_t'?
cargo:warning=typedef __int64_t __darwin_off_t; /
[???] Used for file sizes /
cargo:warning= ^
cargo:warning=note: '__int128_t' declared here
cargo:warning=/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
cargo:warning=typedef __int32_t __darwin_pid_t; /
[???] process and group IDs /
cargo:warning= ^
cargo:warning=note: '__int128_t' declared here
cargo:warning=/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint32_t __darwin_sigset_t; /
[???] signal set /
cargo:warning= ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
cargo:warning=typedef __int32_t __darwin_suseconds_t; /
[???] microseconds /
cargo:warning= ^
cargo:warning=note: '__int128_t' declared here
cargo:warning=/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint32_t __darwin_uid_t; /
[???] user IDs /
cargo:warning= ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint32_t __darwin_useconds_t; /
[???] microseconds */
cargo:warning= ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=In file included from libimagequant.c:9:
cargo:warning=In file included from /usr/include/stdio.h:64:
cargo:warning=In file included from /usr/include/_stdio.h:75:
cargo:warning=In file included from /usr/include/sys/_types/_va_list.h:31:
cargo:warning=/usr/include/machine/types.h:37:2: error: architecture not supported
cargo:warning=#error architecture not supported
cargo:warning= ^
cargo:warning=In file included from libimagequant.c:9:
cargo:warning=In file included from /usr/include/stdio.h:64:
cargo:warning=In file included from /usr/include/_stdio.h:75:
cargo:warning=/usr/include/sys/_types/_va_list.h:32:9: error: unknown type name '__darwin_va_list'
cargo:warning=typedef __darwin_va_list va_list;
cargo:warning= ^
cargo:warning=In file included from libimagequant.c:9:
cargo:warning=In file included from /usr/include/stdio.h:64:
cargo:warning=In file included from /usr/include/_stdio.h:76:
cargo:warning=/usr/include/sys/_types/_size_t.h:31:9: error: unknown type name '__darwin_size_t'
cargo:warning=typedef __darwin_size_t size_t;
cargo:warning= ^
cargo:warning=fatal error: too many errors emitted, stopping now [-ferror-limit=]
cargo:warning=20 errors generated.
exit code: 1

--- stderr

error occurred: Command "clang" "-Os" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-std=c99" "-DNDEBUG=1" "-o" "/Users/huangwutao/work/wx/rust/compress/target/wasm32-unknown-unknown/release/build/imagequant-sys-bc036356db92ca34/out/libimagequant.o" "-c" "libimagequant.c" with args "clang" did not execute successfully (status code exit code: 1).`

from libimagequant.

kornelski avatar kornelski commented on August 27, 2024

await is a keyword in the 2018 edition

This means either your Rust is too old (run rustup update), or you haven't added edition = "2018" to all Cargo.toml files.

from libimagequant.

kornelski avatar kornelski commented on August 27, 2024

As for fatal error: 'stdio.h' file not found - maybe you need to install llvm or clang with WASM support? It may also be the case that you need newer versions.

from libimagequant.

Taoja avatar Taoja commented on August 27, 2024

As for fatal error: 'stdio.h' file not found - maybe you need to install llvm or clang with WASM support? It may also be the case that you need newer versions.

ok,i will update my rust first, thx

from libimagequant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.