Stream: git-wasmtime

Topic: wasmtime / issue #3877 Compile android arm64 encountered ...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2022 at 09:03):

LukiYLS opened issue #3877:

error[E0599]: no associated item named FIXED found for struct MapFlags in the current scope
--> crates/runtime/src/cow.rs:451:79
|
451 | rustix::io::MapFlags::PRIVATE | rustix::io::MapFlags::FIXED,
| ^^^^^ associated item not found in MapFlags

error[E0599]: no associated item named FIXED found for struct MapFlags in the current scope
--> crates/runtime/src/cow.rs:539:71
|
539 | rustix::io::MapFlags::PRIVATE | rustix::io::MapFlags::FIXED,
| ^^^^^ associated item not found in MapFlags

error[E0599]: no associated item named FIXED found for struct MapFlags in the current scope
--> crates/runtime/src/instance/allocator/pooling/unix.rs:21:67
|
21 | rustix::io::MapFlags::PRIVATE | rustix::io::MapFlags::FIXED,
| ^^^^^ associated item not found in MapFlags

For more information about this error, try rustc --explain E0599.
error: could not compile wasmtime-runtime due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2022 at 09:08):

LukiYLS commented on issue #3877:

checkout release-0.34.x compile error

error[E0425]: cannot find value ENV_LIBRARY_PATH in this scope
--> /Users/lukiyang/.cargo/registry/src/github.com-1ecc6299db9ec823/openvino-finder-0.3.1/src/lib.rs:44:37
|
44 | if let Some(path) = env::var_os(ENV_LIBRARY_PATH) {
| ^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value DEFAULT_INSTALLATION_DIRECTORIES in this scope
--> /Users/lukiyang/.cargo/registry/src/github.com-1ecc6299db9ec823/openvino-finder-0.3.1/src/lib.rs:54:24
|
54 | for default_dir in DEFAULT_INSTALLATION_DIRECTORIES
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: KNOWN_INSTALLATION_SUBDIRECTORIES
...
90 | / const KNOWN_INSTALLATION_SUBDIRECTORIES: &'static [&'static str] = &[
91 | | "deployment_tools/ngraph/lib",
92 | | "deployment_tools/inference_engine/lib/intel64",
93 | | "deployment_tools/inference_engine/external/hddl/lib",
94 | | "deployment_tools/inference_engine/external/gna/lib",
95 | | "deployment_tools/inference_engine/external/tbb/lib",
96 | | ];
| |__- similarly named constant KNOWN_INSTALLATION_SUBDIRECTORIES defined here

For more information about this error, try rustc --explain E0425.
error: could not compile openvino-finder due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2022 at 09:32):

LukiYLS commented on issue #3877:

compile release another compile error

wasmtime % cargo build --target=aarch64-linux-android --release --manifest-path crates/c-api/Cargo.toml
Compiling wasmtime-c-api v0.19.0 (/Users/lukiyang/Work/wasm/wasmtime/crates/c-api)
error: linking with cc failed: exit status: 1

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2022 at 09:35):

LukiYLS commented on issue #3877:

t/aarch64-linux-android/release/deps/libwasmtime.so" "-Wl,--gc-sections" "-shared" "-Wl,-zrelro,-znow" "-Wl,-O1" "-nodefaultlibs"
= note: ld: unknown option: --version-script=/var/folders/7v/_4xm9kxj0370_0nsbhcvg5kw0000gn/T/rustczLVPde/list
clang: error: linker command failed with exit code 1 (use -v to see invocation)

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2022 at 09:50):

LukiYLS commented on issue #3877:

How do I disable --version-script when cross compiling clang/LLVM on a Mac

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2022 at 10:05):

LukiYLS edited a comment on issue #3877:

How do I disable --version-script when cross compiling android on a Mac ?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2022 at 10:44):

bjorn3 commented on issue #3877:

You can't disable the version script. It is necessary to determine which symbols to export. Even if you would disable it, macOS's ld can't be used for compiling non-macOS executable. It only supports Mach-O object files, while pretty much all other UNIX systems use ELF. You need to use the linker part of the NDK if you want to crosscompile to android.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2022 at 12:19):

LukiYLS commented on issue #3877:

您不能禁用版本脚本。有必要确定要导出哪些符号。即使您禁用它,macOS 的 ld 也不能用于编译非 macOS 可执行文件。它只支持 Mach-O 目标文件,而几乎所有其他 UNIX 系统都使用 ELF。如果要交叉编译到 android,则需要使用 NDK 的链接器部分。

How can I replace it with the android linker ?
like this?
export CC="${TOOLCHAIN}/bin/aarch64-linux-android29-clang"

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2022 at 12:20):

LukiYLS deleted a comment on issue #3877:

您不能禁用版本脚本。有必要确定要导出哪些符号。即使您禁用它,macOS 的 ld 也不能用于编译非 macOS 可执行文件。它只支持 Mach-O 目标文件,而几乎所有其他 UNIX 系统都使用 ELF。如果要交叉编译到 android,则需要使用 NDK 的链接器部分。

How can I replace it with the android linker ?
like this?
export CC="${TOOLCHAIN}/bin/aarch64-linux-android29-clang"

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2022 at 12:20):

LukiYLS commented on issue #3877:

You can't disable the version script. It is necessary to determine which symbols to export. Even if you would disable it, macOS's ld can't be used for compiling non-macOS executable. It only supports Mach-O object files, while pretty much all other UNIX systems use ELF. You need to use the linker part of the NDK if you want to crosscompile to android.

How can I replace it with the android linker ?
like this?
export CC="${TOOLCHAIN}/bin/aarch64-linux-android29-clang"

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2022 at 12:41):

LukiYLS commented on issue #3877:

t/aarch64-linux-android/release/deps/libwasmtime.so" "-Wl,--gc-sections" "-shared" "-Wl,-zrelro,-znow" "-Wl,-O1" "-nodefaultlibs" = note: ld: unknown option: --version-script=/var/folders/7v/_4xm9kxj0370_0nsbhcvg5kw0000gn/T/rustczLVPde/list clang: error: linker command failed with exit code 1 (use -v to see invocation)

@bjorn3 Can you help me How to fix this problem ?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2022 at 12:51):

bjorn3 commented on issue #3877:

You can create a .cargo/config.toml file with the following contents:

[target."aarch64-linux-android"]
linker = "${TOOLCHAIN}/bin/aarch64-linux-android29-clang"

(replacing ${TOOLCHAIN} with the actual path to the toolchain)

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2022 at 13:00):

LukiYLS commented on issue #3877:

>

error: could not exec the linker Users/lukiyang/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2022 at 13:02):

bjorn3 commented on issue #3877:

You are missing the / at the begin of the path and /bin/aarch64-linux-android29-clang at the end I think.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2022 at 13:02):

LukiYLS deleted a comment on issue #3877:

>

error: could not exec the linker Users/lukiyang/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2023 at 04:00):

alexcrichton added the wasmtime:platform-support label to Issue #3877.

view this post on Zulip Wasmtime GitHub notifications bot (May 11 2024 at 23:09):

alexcrichton closed issue #3877:

error[E0599]: no associated item named FIXED found for struct MapFlags in the current scope
--> crates/runtime/src/cow.rs:451:79
|
451 | rustix::io::MapFlags::PRIVATE | rustix::io::MapFlags::FIXED,
| ^^^^^ associated item not found in MapFlags

error[E0599]: no associated item named FIXED found for struct MapFlags in the current scope
--> crates/runtime/src/cow.rs:539:71
|
539 | rustix::io::MapFlags::PRIVATE | rustix::io::MapFlags::FIXED,
| ^^^^^ associated item not found in MapFlags

error[E0599]: no associated item named FIXED found for struct MapFlags in the current scope
--> crates/runtime/src/instance/allocator/pooling/unix.rs:21:67
|
21 | rustix::io::MapFlags::PRIVATE | rustix::io::MapFlags::FIXED,
| ^^^^^ associated item not found in MapFlags

For more information about this error, try rustc --explain E0599.
error: could not compile wasmtime-runtime due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed

view this post on Zulip Wasmtime GitHub notifications bot (May 11 2024 at 23:09):

alexcrichton commented on issue #3877:

Wasmtime currently verifies that android support builds on CI, so I think this issue is now dated so I'll close it.


Last updated: Dec 23 2024 at 12:05 UTC