pykeio / ort

Fast ML inference & training for Rust with ONNX Runtime
https://ort.pyke.io/
Apache License 2.0
859 stars 100 forks source link

RC4 failed on i686 build #245

Closed ycclnn closed 3 months ago

ycclnn commented 3 months ago

I am new to Rust lang and ort and follow the dynamic loading onnxruntime tutorial. But I got this problem when building my project with Config.toml: ` [package] publish = false name = "embed" version = "0.0.1" edition = "2021" [[bin]] name = "embed" path = "src/embedding.rs"

[dependencies] ort = { version = "2.0.0-rc.2", features = ["load-dynamic"] } ndarray = "0.15" tokenizers = { version = ">=0.13.4", default-features = false, features = [ "onig" ] } tracing-subscriber = { version = "0.3", default-features = false, features = [ "env-filter", "fmt" ] } warp = "0.3" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" tokio = { version = "1", features = ["full"] } clap = { version = "4.0", features = ["derive"] }

#

[features]

load-dynamic = [ "ort/load-dynamic" ]

`

cargo build --release --target i686-pc-windows-msvc Compiling mime_guess v2.0.5 Compiling ort-sys v2.0.0-rc.4 Compiling num-integer v0.1.46 Compiling num-complex v0.4.6 Compiling itertools v0.11.0 Compiling http-body v0.4.6 Compiling headers-core v0.2.0 Compiling futures-channel v0.3.30 Compiling pin-project-internal v1.1.5 Compiling monostate-impl v0.1.13 Compiling encoding_rs v0.8.34 Compiling bitflags v1.3.2 error: failed to run custom build command forort-sys v2.0.0-rc.4`

Caused by: process didn't exit successfully: C:\Users\47026\Documents\onnx\target\release\build\ort-sys-7a5b486d0463237f\build-script-build (exit code: 101) --- stdout cargo:rerun-if-env-changed=LIBONNXRUNTIME_NO_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_i686-pc-windows-msvc cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_i686_pc_windows_msvc cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS cargo:rerun-if-env-changed=PKG_CONFIG_i686-pc-windows-msvc cargo:rerun-if-env-changed=PKG_CONFIG_i686_pc_windows_msvc cargo:rerun-if-env-changed=TARGET_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_i686-pc-windows-msvc cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_i686_pc_windows_msvc cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR onnxruntime not found using pkg-config, falling back to manual setup. cargo:rerun-if-env-changed=ORT_LIB_LOCATION cargo:rerun-if-env-changed=ORT_LIB_PROFILE selected feature set: none

--- stderr thread 'main' panicked at C:\Users\47026.cargo\registry\src\index.crates.io-6f17d22bba15001f\ort-sys-2.0.0-rc.4\build.rs:381:17: downloaded binaries not available for target i686-pc-windows-msvc you may have to compile ONNX Runtime from source note: run with RUST_BACKTRACE=1 environment variable to display a backtrace warning: build failed, waiting for other jobs to finish...

`

decahedron1 commented 3 months ago

downloaded binaries not available for target i686-pc-windows-msvc you may have to compile ONNX Runtime from source

https://ort.pyke.io/setup/linking

ycclnn commented 3 months ago

you may have to compile ONNX Runtime from source

Yeah I read this page very carefully. I would like to build the project for win/mac/linux and provide embedding service. Since I configure it to be "load-dynamic", why the build process mention I need to compile it from source? I assume I'd be able to use ORT_LIB_DYLIB at the same time I start the service.

Since my scenario is really simple: employing all-mini-v2 embedding with cpu only across different platform. I expect the building process wouldn't be too complex...I was wrong. Would you provide some suggestions? Appreciate it

decahedron1 commented 3 months ago

Since I configure it to be "load-dynamic", why the build process mention I need to compile it from source?

The download-binaries feature is enabled by default, and it will attempt to download binaries even if load-dynamic is also enabled. The build should succeed without issue if you set default-features = false for the ort dependency.

ycclnn commented 3 months ago

Since I configure it to be "load-dynamic", why the build process mention I need to compile it from source?

The download-binaries feature is enabled by default, and it will attempt to download binaries even if load-dynamic is also enabled. The build should succeed without issue if you set default-features = false for the ort dependency.

Thanks. I will try it.

ycclnn commented 3 months ago

Hi, sorry to bother again. @decahedron1 I am really unexperienced with Rust and cross build...and I know this is kinda unrelated to ort: so far I managed to build mac and win. But couldn't successfully build linux-musl series. Tried several strategies mentioned in your doc.

  1. static linking the static onnxruntime: https://github.com/csukuangfj/onnxruntime-libs/releases with docker image messense/rust-musl-cross:x86_64-musl and removed the load-dynamic feature. Output be like:
cargo build --release --target x86_64-unknown-linux-musl
warning: `/root/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
   Compiling proc-macro2 v1.0.86
   Compiling unicode-ident v1.0.12
   Compiling autocfg v1.3.0
   Compiling version_check v0.9.5
   ...............
   Compiling unicode_categories v0.1.1
   Compiling warp v0.3.7
   Compiling tokenizers v0.19.1
   Compiling ort v2.0.0-rc.4
   Compiling clap v4.5.11
   Compiling tracing-subscriber v0.3.18
   Compiling embed v0.0.1 (/home/rust/src)
warning: unused import: `Axis`
  --> src/embedding.rs:10:23
   |
10 | use ndarray::{Array2, Axis, Ix2};
   |                       ^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

error: linking with `x86_64-unknown-linux-musl-gcc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/bin:/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/bin/self-contained:/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/bin:/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/bin/self-contained:/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/bin:/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/bin/self-contained:/root/.cargo/bin:/usr/local/musl/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" VSLANG="1033" "x86_64-unknown-linux-musl-gcc" "-m64" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/rcrt1.o" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/crti.o" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/crtbeginS.o" "/tmp/rustcpuYWqe/symbols.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/embed-f6921cf64c61b421.embed.91072ef679c1fe80-cgu.00.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/embed-f6921cf64c61b421.embed.91072ef679c1fe80-cgu.01.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/embed-f6921cf64c61b421.embed.91072ef679c1fe80-cgu.02.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/embed-f6921cf64c61b421.embed.91072ef679c1fe80-cgu.03.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/embed-f6921cf64c61b421.embed.91072ef679c1fe80-cgu.04.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/embed-f6921cf64c61b421.embed.91072ef679c1fe80-cgu.05.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/embed-f6921cf64c61b421.embed.91072ef679c1fe80-cgu.06.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/embed-f6921cf64c61b421.embed.91072ef679c1fe80-cgu.07.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/embed-f6921cf64c61b421.embed.91072ef679c1fe80-cgu.08.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/embed-f6921cf64c61b421.embed.91072ef679c1fe80-cgu.09.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/embed-f6921cf64c61b421.embed.91072ef679c1fe80-cgu.10.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/embed-f6921cf64c61b421.embed.91072ef679c1fe80-cgu.11.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/embed-f6921cf64c61b421.embed.91072ef679c1fe80-cgu.12.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/embed-f6921cf64c61b421.embed.91072ef679c1fe80-cgu.13.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/embed-f6921cf64c61b421.embed.91072ef679c1fe80-cgu.14.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/embed-f6921cf64c61b421.embed.91072ef679c1fe80-cgu.15.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/embed-f6921cf64c61b421.8grll2e2362dqndlrzg9ipo8p.rcgu.o" "-Wl,--as-needed" "-L" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps" "-L" "/home/rust/src/target/release/deps" "-L" "/home/rust/src/lib2/lib/" "-L" "/home/rust/src/target/x86_64-unknown-linux-musl/release/build/onig_sys-6946dabbda0e6939/out" "-L" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib" "-Wl,-Bstatic" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtracing_subscriber-1b1afdce1c933001.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libsharded_slab-b1c0949c41582c96.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libmatchers-1429cf1eaa889713.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libregex_automata-93e3f63907fa06ed.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libregex_syntax-2b3725e34c77e798.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libthread_local-59580905d735f1ee.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtokenizers-5be46dad315e9709.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libesaxx_rs-a41b336699262df8.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libregex-e66762ab46249c82.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libregex_automata-71b29ec80b92343b.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libaho_corasick-a5888a3ec4a23829.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libregex_syntax-fa8fd838006c64c9.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libunicode_normalization_alignments-97f7162956b46cde.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libspm_precompiled-efbb17257e086756.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libbase64-5d9d2b33296f4f21.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libunicode_segmentation-4a5c1ea48faf2703.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libnom-ddb3c5c515bba8ed.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libunicode_categories-9e2f5df32191d360.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libitertools-eb96aa17f047b507.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libmonostate-6ad57abb646d861f.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libmacro_rules_attribute-d9015653cce89908.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librayon_cond-bad06a6fe5fe9d39.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libitertools-3c98e9735bc3c923.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librayon-67603d005a363120.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librayon_core-f721f3393488c092.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libcrossbeam_deque-bc246e645f76f375.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libcrossbeam_epoch-280a4471f72d7049.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libcrossbeam_utils-1655408d714ad514.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libeither-d4dff279006245a3.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libonig-0c9c995b8e501894.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libbitflags-3d9ae9ebc4834b3b.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libonig_sys-10c30dfc12ecb0d7.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libderive_builder-27a584440e7e3ec0.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/liblazy_static-411d0a9adc55a4bd.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort-b0dca6e72a639125.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libhalf-201ca89fa851b3f0.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib" "-lstdc++" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libndarray-0badf7b9e321c3c7.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libmatrixmultiply-b74634efed02906f.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libnum_complex-5383a1e9b6c38a2d.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libnum_integer-8a30765de29ad89f.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libnum_traits-569d29465984f2b1.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librawpointer-75f851ba16ff2d95.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libclap-4af68503bf3d2688.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libclap_builder-ee562533cc329006.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libstrsim-d71e61254bd83f95.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libanstream-f68e0cd0b359d370.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libanstyle_query-526ba492bef60118.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libis_terminal_polyfill-c6b78f5417ea4b63.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libcolorchoice-2b5633d85c0ccc41.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libanstyle_parse-023db1fc9f0125a0.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libutf8parse-b2cb2333e3159dc2.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libclap_lex-ac9c5c573a639045.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libanstyle-36c6d81416e6c65c.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libwarp-20ad28f347987c72.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libmime_guess-dbd15d71061aa902.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libunicase-350b8adbf1674351.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libserde_urlencoded-8b7de043ded1f81f.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libscoped_tls-def7e14a4d6620a5.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtokio_tungstenite-ea4cbc13b42fbf0c.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtungstenite-9093d0c9cbfab383.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libdata_encoding-a30e47212a653666.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librand-c8094fdc7a8857c7.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librand_chacha-e9e487f1e5f095b8.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libppv_lite86-662cdfc1ef52846e.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librand_core-db088f5360dc7336.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libgetrandom-05ef3009e904084a.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libutf8-d224e1701a18cfd4.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libbyteorder-d35ca683311c0a91.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libthiserror-e341c557ce6672b3.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/liburl-7901c2a106b65938.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libidna-fe4973d6ca815974.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libunicode_normalization-309540e776044ba7.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtinyvec-095af2de41e13bf6.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtinyvec_macros-c13eeb3299b2c5ee.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libunicode_bidi-5fddeac36c115ef3.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libform_urlencoded-a79e1e94cecb2bd0.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libhttp-b28ef038d37dcdba.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libserde_json-625ff0a09d61f021.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libryu-c62e0070e11b2082.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libmulter-279d434e295d0692.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libmemchr-29e0032cb1800ab6.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libspin-55b7fed0ab76b771.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libencoding_rs-61c1c6b08ecc0c77.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libpercent_encoding-cac687ae1a1000f9.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libheaders-1055aeda958f8907.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libsha1-acad6cf6dd0c82bf.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libcpufeatures-8c92ee40cc45e2f8.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libdigest-afb7c42f3b9dd7da.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libblock_buffer-00437188eeb988e7.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libcrypto_common-7a5c8718586a7f55.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libgeneric_array-42d849b141cf41e8.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtypenum-c2c68937e5ce077f.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libmime-9c490c36d28f993e.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libheaders_core-0eb0eaf03cd9f6a4.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libbase64-2c4ced37985bde94.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libhyper-62794798b52d54bc.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libwant-e24358ef00c87327.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtry_lock-732f6d6aff66d377.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libhttparse-57fc2496fb3bf871.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libh2-4e5542d966421353.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libindexmap-5fc9ed88395c8d21.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libequivalent-21b8fe4e8eee7e1a.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libhashbrown-dae94546692d6440.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtokio_util-2a5078ee81d0dc20.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtower_service-a2cb1ebcd77dc2f3.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtracing-c1fcc6603e547209.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/liblog-2589c6f7348a1e17.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtracing_core-0194be3991163455.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libonce_cell-55367ed0f5991b97.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libfutures_channel-6b8fd7811e2f3cc0.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libhttp_body-af86c37efbb6902e.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtokio-51daa6a5e69d8a3d.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libsignal_hook_registry-261cca3ebbd4fe15.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libsocket2-e8c1894d082d7364.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libmio-3bb50855e1f2bc18.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libparking_lot-08720ecedab44ed2.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libparking_lot_core-e0f7f4bda26eb03b.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/liblibc-3ee18075fca80f48.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libcfg_if-92b18ad76c391118.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libsmallvec-f15eefa1e69dd926.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/liblock_api-dec661da8984ae09.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libscopeguard-7243b76b4d831c25.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libhttpdate-e84b0f270d3ddd39.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libhttp-166b6ad1216982d5.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libitoa-b995bdc1eb44bf20.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libbytes-f87b62f2c134fa1f.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libfnv-a55aea51a4c8b429.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libpin_project-436420b8b808abe9.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libfutures_util-d1bd3a563f3a48d2.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libslab-453e05800759a903.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libpin_project_lite-06c5d971fba96d3b.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libfutures_sink-500f2edd770305a3.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libfutures_task-5bb99f88a4208fa6.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libpin_utils-0b53ed1bde2b77b5.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libfutures_core-9062d1f078fb777d.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libserde-7b4179b3f73f6539.rlib" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd-9e3271737799979c.rlib" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libpanic_unwind-4c1c7ab118cc5f35.rlib" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libobject-31059d048fd8f114.rlib" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libmemchr-4dc3b7f53f3b402f.rlib" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libaddr2line-556b787942975b60.rlib" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libgimli-3e999cbd821f19d5.rlib" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_demangle-21822f0e6b7cdefb.rlib" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd_detect-09a07f71e37263e3.rlib" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libhashbrown-823a6eadc824d6ac.rlib" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_alloc-5077514a6e44d5f0.rlib" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libminiz_oxide-a9cd1f496dec3a1a.rlib" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libadler-4eab1af5faf407c1.rlib" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libunwind-c1f62009d3a71342.rlib" "-lunwind" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libcfg_if-275322ea4ac54ad7.rlib" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/liblibc-6b2db73c8e3b6556.rlib" "-lc" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/liballoc-2b62658611d149ab.rlib" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_core-9f33ce63021d8f8a.rlib" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libcore-e789b40e8b60ba8e.rlib" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libcompiler_builtins-325d535ae4004bc5.rlib" "-Wl,-Bdynamic" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-nostartfiles" "-L" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib" "-L" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained" "-o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/embed-f6921cf64c61b421" "-Wl,--gc-sections" "-static-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wl,--strip-debug" "-nodefaultlibs" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/crtendS.o" "/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/crtn.o"
  = note: /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(onnxruntime_c_api.cc.o): in function `OrtApis::GetApi(unsigned int)':
          onnxruntime_c_api.cc:(.text._ZN7OrtApis6GetApiEj+0x44): undefined reference to `__fprintf_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(message_lite.cc.o): in function `bool google::protobuf::internal::MergeFromImpl<false>(google::protobuf::stringpiece_internal::StringPiece, google::protobuf::MessageLite*, google::protobuf::MessageLite::ParseFlags)':
          message_lite.cc:(.text._ZN6google8protobuf8internal13MergeFromImplILb0EEEbNS0_20stringpiece_internal11StringPieceEPNS0_11MessageLiteENS5_10ParseFlagsE[_ZN6google8protobuf8internal13MergeFromImplILb0EEEbNS0_20stringpiece_internal11StringPieceEPNS0_11MessageLiteENS5_10ParseFlagsE]+0x129): undefined reference to `__memcpy_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(message_lite.cc.o): in function `google::protobuf::MessageLite::SerializePartialToZeroCopyStream(google::protobuf::io::ZeroCopyOutputStream*) const':
          message_lite.cc:(.text._ZNK6google8protobuf11MessageLite32SerializePartialToZeroCopyStreamEPNS0_2io20ZeroCopyOutputStreamE+0xc8): undefined reference to `__memcpy_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(allocation_planner.cc.o): in function `nlohmann::detail::lexer<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > >, nlohmann::detail::input_stream_adapter>::get_token_string() const':
          allocation_planner.cc:(.text._ZNK8nlohmann6detail5lexerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS_14adl_serializerES4_IhSaIhEEEENS0_20input_stream_adapterEE16get_token_stringEv[_ZNK8nlohmann6detail5lexerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS_14adl_serializerES4_IhSaIhEEEENS0_20input_stream_adapterEE16get_token_stringEv]+0x83): undefined reference to `__snprintf_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(allocation_planner.cc.o): in function `nlohmann::detail::serializer<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > > >::dump_escaped(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)':
          allocation_planner.cc:(.text._ZN8nlohmann6detail10serializerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS_14adl_serializerES4_IhSaIhEEEEE12dump_escapedERKSA_b[_ZN8nlohmann6detail10serializerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS_14adl_serializerES4_IhSaIhEEEEE12dump_escapedERKSA_b]+0x893): undefined reference to `__snprintf_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: allocation_planner.cc:(.text._ZN8nlohmann6detail10serializerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS_14adl_serializerES4_IhSaIhEEEEE12dump_escapedERKSA_b[_ZN8nlohmann6detail10serializerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS_14adl_serializerES4_IhSaIhEEEEE12dump_escapedERKSA_b]+0x8e6): undefined reference to `__snprintf_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(inference_session_utils.cc.o): in function `nlohmann::detail::lexer<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > >, nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::get_token_string() const':
          inference_session_utils.cc:(.text._ZNK8nlohmann6detail5lexerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS_14adl_serializerES4_IhSaIhEEEENS0_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSA_EEEEE16get_token_stringEv[_ZNK8nlohmann6detail5lexerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS_14adl_serializerES4_IhSaIhEEEENS0_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSA_EEEEE16get_token_stringEv]+0x83): undefined reference to `__snprintf_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(common.cc.o): in function `google::protobuf::internal::DefaultLogHandler(google::protobuf::LogLevel, char const*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
          common.cc:(.text._ZN6google8protobuf8internal17DefaultLogHandlerENS0_8LogLevelEPKciRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x3f): undefined reference to `__fprintf_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(assertions.cc.o): in function `onnx::barf[abi:cxx11](char const*, ...)':
          assertions.cc:(.text._ZN4onnx4barfB5cxx11EPKcz+0xe7): undefined reference to `__vsnprintf_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(cast_op.cc.o): in function `std::enable_if<std::is_floating_point<double>::value, void>::type onnxruntime::(anonymous namespace)::CastToString<double>(double const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) [clone .isra.0]':
          cast_op.cc:(.text._ZN11onnxruntime12_GLOBAL__N_112CastToStringIdEENSt9enable_ifIXsrSt17is_floating_pointIT_E5valueEvE4typeERKS4_RNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.isra.0[_ZNK11onnxruntime5utils20MLTypeCallDispatcherIJbilfdmjstahNS_9MLFloat16ENS_8BFloat16ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_12Float8E4M3FNENS_14Float8E4M3FNUZENS_10Float8E5M2ENS_14Float8E5M2FNUZEEE29InvokeWithLeadingTemplateArgsINS_12_GLOBAL__N_113SrcDispatcherENS_8TypeListIJEEEJRKN4onnx20TensorProto_DataTypeERNS_15OpKernelContextERKNS_11TensorShapeERKNS_6TensorERST_EEEvDpOT1_]+0xe4): undefined reference to `__snprintf_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(cast_op.cc.o): in function `std::enable_if<std::is_floating_point<float>::value, void>::type onnxruntime::(anonymous namespace)::CastToString<float>(float const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) [clone .isra.0]':
          cast_op.cc:(.text._ZN11onnxruntime12_GLOBAL__N_112CastToStringIfEENSt9enable_ifIXsrSt17is_floating_pointIT_E5valueEvE4typeERKS4_RNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.isra.0[_ZNK11onnxruntime5utils20MLTypeCallDispatcherIJbilfdmjstahNS_9MLFloat16ENS_8BFloat16ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_12Float8E4M3FNENS_14Float8E4M3FNUZENS_10Float8E5M2ENS_14Float8E5M2FNUZEEE29InvokeWithLeadingTemplateArgsINS_12_GLOBAL__N_113SrcDispatcherENS_8TypeListIJEEEJRKN4onnx20TensorProto_DataTypeERNS_15OpKernelContextERKNS_11TensorShapeERKNS_6TensorERST_EEEvDpOT1_]+0xd8): undefined reference to `__snprintf_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(cast_map.cc.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
          cast_map.cc:(.text._ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z.constprop.0[_ZNK11onnxruntime2ml7CastMap11ComputeImplIfNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_6common6StatusERNS_15OpKernelContextET0_]+0xd9): undefined reference to `__vsnprintf_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(generation_device_helper.cc.o): in function `onnxruntime::common::Status onnxruntime::contrib::GenerationCpuDeviceHelper::ExpandBuffer<int>(onnxruntime::Stream*, OrtValue const&, int, std::shared_ptr<onnxruntime::IAllocator>, OrtValue&, bool, int)':
          generation_device_helper.cc:(.text._ZN11onnxruntime7contrib25GenerationCpuDeviceHelper12ExpandBufferIiEENS_6common6StatusEPNS_6StreamERK8OrtValueiSt10shared_ptrINS_10IAllocatorEERS7_bi[_ZN11onnxruntime7contrib25GenerationCpuDeviceHelper12ExpandBufferIiEENS_6common6StatusEPNS_6StreamERK8OrtValueiSt10shared_ptrINS_10IAllocatorEERS7_bi]+0x97): undefined reference to `__memcpy_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(generation_device_helper.cc.o): in function `onnxruntime::common::Status onnxruntime::contrib::GenerationCpuDeviceHelper::ExpandBuffer<float>(onnxruntime::Stream*, OrtValue const&, int, std::shared_ptr<onnxruntime::IAllocator>, OrtValue&, bool, int)':
          generation_device_helper.cc:(.text._ZN11onnxruntime7contrib25GenerationCpuDeviceHelper12ExpandBufferIfEENS_6common6StatusEPNS_6StreamERK8OrtValueiSt10shared_ptrINS_10IAllocatorEERS7_bi[_ZN11onnxruntime7contrib25GenerationCpuDeviceHelper12ExpandBufferIfEENS_6common6StatusEPNS_6StreamERK8OrtValueiSt10shared_ptrINS_10IAllocatorEERS7_bi]+0x97): undefined reference to `__memcpy_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(generation_device_helper.cc.o): in function `onnxruntime::common::Status onnxruntime::contrib::GenerationCpuDeviceHelper::ExpandBuffer<onnxruntime::MLFloat16>(onnxruntime::Stream*, OrtValue const&, int, std::shared_ptr<onnxruntime::IAllocator>, OrtValue&, bool, int)':
          generation_device_helper.cc:(.text._ZN11onnxruntime7contrib25GenerationCpuDeviceHelper12ExpandBufferINS_9MLFloat16EEENS_6common6StatusEPNS_6StreamERK8OrtValueiSt10shared_ptrINS_10IAllocatorEERS8_bi[_ZN11onnxruntime7contrib25GenerationCpuDeviceHelper12ExpandBufferINS_9MLFloat16EEENS_6common6StatusEPNS_6StreamERK8OrtValueiSt10shared_ptrINS_10IAllocatorEERS8_bi]+0x98): undefined reference to `__memcpy_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(strutil.cc.o): in function `re2::StringAppendV(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, char const*, __va_list_tag*)':
          strutil.cc:(.text._ZN3re2L13StringAppendVEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcP13__va_list_tag+0x69): undefined reference to `__vsnprintf_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: strutil.cc:(.text._ZN3re2L13StringAppendVEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcP13__va_list_tag+0xcd): undefined reference to `__vsnprintf_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(qlgavgpool.cpp.o): in function `void MlasQLinearGlobalAveragePoolNchw<signed char>(signed char const*, float, int, signed char*, float, int, unsigned long, unsigned long, int*)':
          qlgavgpool.cpp:(.text._Z32MlasQLinearGlobalAveragePoolNchwIaEvPKT_fiPS0_fimmPi[_Z32MlasQLinearGlobalAveragePoolNchwIaEvPKT_fiPS0_fimmPi]+0x321): undefined reference to `__memcpy_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(qlgavgpool.cpp.o): in function `void MlasQLinearGlobalAveragePoolNchw<unsigned char>(unsigned char const*, float, int, unsigned char*, float, int, unsigned long, unsigned long, int*)':
          qlgavgpool.cpp:(.text._Z32MlasQLinearGlobalAveragePoolNchwIhEvPKT_fiPS0_fimmPi[_Z32MlasQLinearGlobalAveragePoolNchwIhEvPKT_fiPS0_fimmPi]+0x2a1): undefined reference to `__memcpy_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(qlgavgpool.cpp.o): in function `void MlasQLinearGlobalAveragePoolNhwc<signed char>(signed char const*, float, int, signed char*, float, int, unsigned long, unsigned long, unsigned long, unsigned long, int*, signed char const*)':
          qlgavgpool.cpp:(.text._Z32MlasQLinearGlobalAveragePoolNhwcIaEvPKT_fiPS0_fimmmmPiS2_[_Z32MlasQLinearGlobalAveragePoolNhwcIaEvPKT_fiPS0_fimmmmPiS2_]+0x836): undefined reference to `__memcpy_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: qlgavgpool.cpp:(.text._Z32MlasQLinearGlobalAveragePoolNhwcIaEvPKT_fiPS0_fimmmmPiS2_[_Z32MlasQLinearGlobalAveragePoolNhwcIaEvPKT_fiPS0_fimmmmPiS2_]+0x87a): undefined reference to `__memcpy_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: qlgavgpool.cpp:(.text._Z32MlasQLinearGlobalAveragePoolNhwcIaEvPKT_fiPS0_fimmmmPiS2_[_Z32MlasQLinearGlobalAveragePoolNhwcIaEvPKT_fiPS0_fimmmmPiS2_]+0x8b9): undefined reference to `__memcpy_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(qlgavgpool.cpp.o):qlgavgpool.cpp:(.text._Z32MlasQLinearGlobalAveragePoolNhwcIaEvPKT_fiPS0_fimmmmPiS2_[_Z32MlasQLinearGlobalAveragePoolNhwcIaEvPKT_fiPS0_fimmmmPiS2_]+0x8fb): more undefined references to `__memcpy_chk' follow
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(name.c.o): in function `cpuinfo_x86_format_package_name':
          name.c:(.text.cpuinfo_x86_format_package_name+0x4a): undefined reference to `__snprintf_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(log.c.o): in function `cpuinfo_vlog.constprop.0':
          log.c:(.text.cpuinfo_vlog.constprop.0+0x56): undefined reference to `__memcpy_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: log.c:(.text.cpuinfo_vlog.constprop.0+0x7a): undefined reference to `__vsnprintf_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: log.c:(.text.cpuinfo_vlog.constprop.0+0x149): undefined reference to `__vsnprintf_chk'
          /usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libort_sys-69a4774ffa7db9fc.rlib(cpulist.c.o): in function `cpuinfo_linux_parse_cpulist':
          cpulist.c:(.text.cpuinfo_linux_parse_cpulist+0x28d): undefined reference to `__memmove_chk'
          collect2: error: ld returned 1 exit status

  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib)

warning: `embed` (bin "embed") generated 1 warning
error: could not compile `embed` (bin "embed") due to 1 previous error; 1 warning emitted
root@ed30792249a3:/home/rust/src# 
  1. use dynamic loading with load-dynamic feature turned on. Build can be finished but when I ran the binary, output be like:
    
    root@ed30792249a3:/home/rust/src# ORT_DYLIB_PATH=/home/rust/src/libonnxruntime.so.1.18.1 target/x86_64-unknown-linux-musl/release/embed --model ./all-MiniLM-L6-v2.onnx  --tokenizer ./tokenizer.json --dylib doesntmatter
    thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ort-2.0.0-rc.4/src/lib.rs:139:33:
    An error occurred while attempting to load the ONNX Runtime binary at `/home/rust/src/libonnxruntime.so.1.18.1`: Dynamic loading not supported
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

3. build onnxruntime from source:
`
./build.sh (without --build-shared stuff) but failed some tests.
`

Could you please point to the right direction? 
ycclnn commented 3 months ago

Source code published here: https://gist.github.com/ycclnn/bd912617b5ad3d46f0f66273d201cf30