pykeio / ort

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

Bug Report: [Error] When Building Docker img: `ld returned 1 exit status` #309

Closed PierreLouisLetoquart closed 3 hours ago

PierreLouisLetoquart commented 3 hours ago

Bug Report: [Error] When Building Docker img: ld returned 1 exit status

Description

I encountered an error when attempting to build a Docker image for my Rust project using the ort dependency with version 2.0.0-rc.8, The script build a session with the ./model.onnx file.

Steps to Reproduce

  1. Set up the Cargo.toml file with the following dependencies:

    [package]
    name = "ort-test"
    version = "0.1.0"
    edition = "2021"
    
    [dependencies]
    ort = "=2.0.0-rc.8"
  2. Load a local onnx model with the following code in src/main.rs:

use ort::{Error, GraphOptimizationLevel, Session};

fn main() -> Result<(), Error> {
    Session::builder()?
        .with_optimization_level(GraphOptimizationLevel::Level3)?
        .with_intra_threads(4)?
        .commit_from_file("./model.onnx")?;

    Ok(())
}
  1. Use the following Dockerfile:

    FROM rust:1.82-slim-bullseye AS builder
    WORKDIR /code
    
    RUN USER=root cargo init
    COPY Cargo.toml Cargo.toml
    COPY model.onnx model.onnx
    RUN cargo fetch
    
    COPY src src
    
    RUN cargo build --release
    
    # run stage
    FROM bitnami/minideb:latest
    WORKDIR /app
    
    COPY --from=builder /code/target/release/ort-test ort-test
    
    USER 1001
    
    CMD [ "/app/ort-test" ]
  2. Run the Docker build command:

    docker build -t ort-test-img .

Expected Behavior

The Docker image should be built successfully with the ort-test executable included.

Actual Behavior

The build fails with the following error trace (collapsed for readability):

Build Error Trace ```bash [+] Building 12.9s (16/18) docker:desktop-linux => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 417B 0.0s => [internal] load metadata for docker.io/bitnami/minideb:latest 0.4s => [internal] load metadata for docker.io/library/rust:1.82-slim-bullseye 0.4s => [auth] library/rust:pull token for registry-1.docker.io 0.0s => [auth] bitnami/minideb:pull token for registry-1.docker.io 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 105B 0.0s => [builder 1/8] FROM docker.io/library/rust:1.82-slim-bullseye@sha256:36fa9bec836e763bb4456e7cdba6a2115e334c99ad4510db1cf205e49dc13e0e 0.0s => [stage-1 1/3] FROM docker.io/bitnami/minideb:latest@sha256:6bcaf017181f0b3f8196ace16df8176bf926bdcc08ff347793109f2547a841e8 0.0s => [internal] load build context 0.0s => => transferring context: 265B 0.0s => CACHED [builder 2/8] WORKDIR /code 0.0s => CACHED [builder 3/8] RUN USER=root cargo init 0.0s => CACHED [builder 4/8] COPY Cargo.toml Cargo.toml 0.0s => CACHED [builder 5/8] COPY model.onnx model.onnx 0.0s => CACHED [builder 6/8] RUN cargo fetch 0.0s => CACHED [builder 7/8] COPY src src 0.0s => ERROR [builder 8/8] RUN cargo build --release 12.5s ------ > [builder 8/8] RUN cargo build --release: 0.446 Compiling libc v0.2.161 0.446 Compiling cfg-if v1.0.0 0.446 Compiling shlex v1.3.0 0.446 Compiling typenum v1.17.0 0.446 Compiling version_check v0.9.5 0.447 Compiling autocfg v1.4.0 0.447 Compiling tinyvec_macros v0.1.1 0.447 Compiling rustls-pki-types v1.10.0 0.575 Compiling tinyvec v1.8.0 0.575 Compiling rustix v0.38.37 0.712 Compiling cc v1.1.31 0.764 Compiling generic-array v0.14.7 0.876 Compiling untrusted v0.9.0 0.896 Compiling spin v0.9.8 0.905 Compiling unicode-bidi v0.3.17 0.931 Compiling linux-raw-sys v0.4.14 0.939 Compiling percent-encoding v2.3.1 0.963 Compiling rustls v0.23.15 1.021 Compiling bitflags v2.6.0 1.053 Compiling form_urlencoded v1.2.1 1.138 Compiling num-traits v0.2.19 1.161 Compiling zeroize v1.8.1 1.244 Compiling adler2 v2.0.0 1.271 Compiling once_cell v1.20.2 1.304 Compiling unicode-normalization v0.1.24 1.329 Compiling log v0.4.22 1.329 Compiling subtle v2.6.1 1.381 Compiling byteorder v1.5.0 1.404 Compiling miniz_oxide v0.8.0 1.497 Compiling getrandom v0.2.15 1.522 Compiling socks v0.3.4 1.522 Compiling filetime v0.2.25 1.584 Compiling cpufeatures v0.2.14 1.620 Compiling webpki-roots v0.26.6 1.628 Compiling crc32fast v1.4.2 1.687 Compiling base64 v0.22.1 1.715 Compiling idna v0.5.0 1.768 Compiling flate2 v1.0.34 1.840 Compiling ring v0.17.8 1.871 Compiling crypto-common v0.1.6 1.910 Compiling block-buffer v0.10.4 1.929 Compiling matrixmultiply v0.3.9 1.946 Compiling pkg-config v0.3.31 1.973 Compiling digest v0.10.7 2.069 Compiling url v2.5.2 2.096 Compiling sha2 v0.10.8 2.221 Compiling rawpointer v0.2.1 2.278 Compiling tracing-core v0.1.32 2.335 Compiling num-integer v0.1.46 2.345 Compiling num-complex v0.4.6 2.489 Compiling pin-project-lite v0.2.14 2.529 Compiling half v2.4.1 2.658 Compiling tracing v0.1.40 2.738 Compiling xattr v1.3.1 2.778 Compiling ndarray v0.16.1 2.878 Compiling tar v0.4.42 3.816 Compiling rustls-webpki v0.102.8 6.250 Compiling ureq v2.10.1 6.781 Compiling ort-sys v2.0.0-rc.8 10.49 Compiling ort v2.0.0-rc.8 12.00 Compiling ort-test v0.1.0 (/code) 12.33 error: linking with `cc` failed: exit status: 1 12.33 | 12.33 = note: LC_ALL="C" PATH="/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/bin:/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/bin:/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/bin:/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" VSLANG="1033" "cc" "/tmp/rustcV4s3VK/symbols.o" "/code/target/release/deps/ort_test-c05537a8f0a8171b.ort_test.f793ec45b8c166e7-cgu.0.rcgu.o" "/code/target/release/deps/ort_test-c05537a8f0a8171b.ort_test.f793ec45b8c166e7-cgu.1.rcgu.o" "/code/target/release/deps/ort_test-c05537a8f0a8171b.ort_test.f793ec45b8c166e7-cgu.2.rcgu.o" "/code/target/release/deps/ort_test-c05537a8f0a8171b.ort_test.f793ec45b8c166e7-cgu.3.rcgu.o" "/code/target/release/deps/ort_test-c05537a8f0a8171b.ort_test.f793ec45b8c166e7-cgu.4.rcgu.o" "/code/target/release/deps/ort_test-c05537a8f0a8171b.2ct6k0b48srmn0n4p7irsxkcd.rcgu.o" "-Wl,--as-needed" "-Wl,-Bstatic" "/code/target/release/deps/libort-3d08ad875e8508ae.rlib" "/code/target/release/deps/libhalf-beb18ee1785c06d7.rlib" "/code/target/release/deps/libcfg_if-0026b015111e6727.rlib" "/code/target/release/deps/libndarray-5e72d2a0bf2f0ba0.rlib" "/code/target/release/deps/libmatrixmultiply-10aec57730c4ed56.rlib" "/code/target/release/deps/libnum_complex-ef1e2765bc91fc92.rlib" "/code/target/release/deps/libnum_integer-5354220c7654582a.rlib" "/code/target/release/deps/libnum_traits-73652e01c77e8fac.rlib" "/code/target/release/deps/librawpointer-8819c9b379461dac.rlib" "/code/target/release/deps/libtracing-510210d23f5dbd2c.rlib" "/code/target/release/deps/libpin_project_lite-43b02254a7e5d1bb.rlib" "/code/target/release/deps/libtracing_core-fa7fa346ba696018.rlib" "/code/target/release/deps/libonce_cell-07ee111a0d049f56.rlib" "/code/target/release/deps/libort_sys-199844376b12802e.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-6dd4704180e83658.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libpanic_unwind-4e6a2406b4d4238c.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libobject-14a05d7053312c41.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libmemchr-bc5d0c2c17f6efb5.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libaddr2line-d49284e733162194.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libgimli-399d6d9d480f795b.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_demangle-5eec563be8d4a86c.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd_detect-b4e863e039c1e2b2.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libhashbrown-2cba6cb85e41482c.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-04818ce3c2111186.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libminiz_oxide-a9c50009f9caf7a5.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libadler-14957fef627d3eac.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libunwind-7fd5a10030b438fd.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcfg_if-3ed6823815f7ddfa.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/liblibc-764cf06d9fa7ac52.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/liballoc-02813af72277ddec.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_std_workspace_core-e4efde0144e702d3.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcore-f5a882967048065e.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcompiler_builtins-6d60f560e3825be6.rlib" "-Wl,-Bdynamic" "-lstdc++" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/root/.cache/ort.pyke.io/dfbin/aarch64-unknown-linux-gnu/B40AB3EA5BF3BCBC73C18BA66A8F96ECAA9D08963C0D6A5268D608B0642D23D4/onnxruntime/lib" "-L" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib" "-o" "/code/target/release/deps/ort_test-c05537a8f0a8171b" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wl,--strip-debug" "-nodefaultlibs" 12.33 = note: /usr/bin/ld: cannot find -lstdc++ 12.33 collect2: error: ld returned 1 exit status 12.33 12.33 12.34 error: could not compile `ort-test` (bin "ort-test") due to 1 previous error ------ Dockerfile:11 -------------------- 9 | COPY src src 10 | 11 | >>> RUN cargo build --release 12 | 13 | # run stage -------------------- ERROR: failed to solve: process "/bin/sh -c cargo build --release" did not complete successfully: exit code: 101 View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/qtrnjm5fd7zpdmh6wnuog8p2y ```

Environment

Additional Context

system info:

$ sw_vers
ProductName:      macOS
ProductVersion:   14.6.1
BuildVersion:        23G93

$ uname -m
arm64
PierreLouisLetoquart commented 3 hours ago

Note: I used a model from onnx-community on HG

git clone https://huggingface.co/onnx-community/depth-anything-v2-small
cp depth-anything-v2-small/onnx/model.onnx /path/to/test/repo
decahedron1 commented 3 hours ago

libstdc++6 is required since ONNX Runtime is a C++ library. It seems the package is not installed by default on the minideb image.

PierreLouisLetoquart commented 2 hours ago

Thanks so much for the reactivity! Which image do you recommend for that usecase ? I've naivly tested to install libstdc++6 on the current one but it doesn't work

PierreLouisLetoquart commented 2 hours ago

It doesn't work ! I've tried various way, the "just install gcc" produces the same error output:

FROM rust:1.82-slim-bullseye AS builder
WORKDIR /code

RUN apt-get update && \
    apt-get install -y \
    gcc

RUN USER=root cargo init

COPY Cargo.toml Cargo.lock ./
RUN cargo fetch

COPY src src
COPY model.onnx model.onnx

RUN cargo build --release

# run stage
FROM bitnami/minideb:latest
WORKDIR /app

COPY --from=builder /code/model.onnx model.onnx
COPY --from=builder /code/target/release/ort-test ort-test

USER 1001

CMD [ "/app/ort-test" ]
Build Error Trace ```bash [+] Building 16.9s (16/18) docker:desktop-linux => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 527B 0.0s => [internal] load metadata for docker.io/bitnami/minideb:latest 0.2s => [internal] load metadata for docker.io/library/rust:1.82-slim-bullseye 0.2s => [internal] load .dockerignore 0.0s => => transferring context: 105B 0.0s => [builder 1/9] FROM docker.io/library/rust:1.82-slim-bullseye@sha256:36fa9bec836e763bb4456e7cdba6a2115e334c99ad4510db1cf205e49dc13e0e 0.0s => [internal] load build context 0.0s => => transferring context: 333B 0.0s => [stage-1 1/4] FROM docker.io/bitnami/minideb:latest@sha256:6bcaf017181f0b3f8196ace16df8176bf926bdcc08ff347793109f2547a841e8 0.0s => CACHED [builder 2/9] WORKDIR /code 0.0s => [builder 3/9] RUN apt-get update && apt-get install -y gcc 2.1s => CACHED [stage-1 2/4] WORKDIR /app 0.0s => [builder 4/9] RUN USER=root cargo init 0.7s => [builder 5/9] COPY Cargo.toml Cargo.lock ./ 0.0s => [builder 6/9] RUN cargo fetch 2.1s => [builder 7/9] COPY src src 0.0s => [builder 8/9] COPY model.onnx model.onnx 0.1s => ERROR [builder 9/9] RUN cargo build --release 11.6s ------ > [builder 9/9] RUN cargo build --release: 0.161 Compiling libc v0.2.161 0.161 Compiling cfg-if v1.0.0 0.161 Compiling shlex v1.3.0 0.161 Compiling typenum v1.17.0 0.161 Compiling version_check v0.9.5 0.161 Compiling autocfg v1.4.0 0.161 Compiling tinyvec_macros v0.1.1 0.161 Compiling rustls-pki-types v1.10.0 0.178 Compiling tinyvec v1.8.0 0.186 Compiling spin v0.9.8 0.248 Compiling cc v1.1.31 0.263 Compiling untrusted v0.9.0 0.304 Compiling rustix v0.38.37 0.360 Compiling generic-array v0.14.7 0.503 Compiling percent-encoding v2.3.1 0.516 Compiling bitflags v2.6.0 0.531 Compiling rustls v0.23.15 0.558 Compiling linux-raw-sys v0.4.14 0.619 Compiling unicode-bidi v0.3.17 0.631 Compiling form_urlencoded v1.2.1 0.669 Compiling num-traits v0.2.19 0.705 Compiling adler2 v2.0.0 0.793 Compiling subtle v2.6.1 0.821 Compiling zeroize v1.8.1 0.873 Compiling log v0.4.22 0.906 Compiling byteorder v1.5.0 0.983 Compiling unicode-normalization v0.1.24 1.040 Compiling once_cell v1.20.2 1.107 Compiling getrandom v0.2.15 1.151 Compiling cpufeatures v0.2.14 1.161 Compiling filetime v0.2.25 1.170 Compiling socks v0.3.4 1.201 Compiling miniz_oxide v0.8.0 1.238 Compiling webpki-roots v0.26.6 1.257 Compiling crc32fast v1.4.2 1.289 Compiling base64 v0.22.1 1.343 Compiling matrixmultiply v0.3.9 1.427 Compiling ring v0.17.8 1.431 Compiling idna v0.5.0 1.459 Compiling pkg-config v0.3.31 1.547 Compiling block-buffer v0.10.4 1.568 Compiling crypto-common v0.1.6 1.596 Compiling flate2 v1.0.34 1.608 Compiling digest v0.10.7 1.741 Compiling sha2 v0.10.8 1.852 Compiling url v2.5.2 1.909 Compiling rawpointer v0.2.1 1.924 Compiling tracing-core v0.1.32 1.951 Compiling pin-project-lite v0.2.14 1.986 Compiling half v2.4.1 1.995 Compiling num-complex v0.4.6 2.124 Compiling num-integer v0.1.46 2.438 Compiling tracing v0.1.40 2.502 Compiling ndarray v0.16.1 2.587 Compiling xattr v1.3.1 2.706 Compiling tar v0.4.42 3.376 Compiling rustls-webpki v0.102.8 5.722 Compiling ureq v2.10.1 6.298 Compiling ort-sys v2.0.0-rc.8 9.602 Compiling ort v2.0.0-rc.8 11.11 Compiling ort-test v0.1.0 (/code) 11.43 error: linking with `cc` failed: exit status: 1 11.43 | 11.43 = note: LC_ALL="C" PATH="/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/bin:/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/bin:/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/bin:/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" VSLANG="1033" "cc" "/tmp/rustc7OYUC2/symbols.o" "/code/target/release/deps/ort_test-c05537a8f0a8171b.ort_test.f793ec45b8c166e7-cgu.0.rcgu.o" "/code/target/release/deps/ort_test-c05537a8f0a8171b.ort_test.f793ec45b8c166e7-cgu.1.rcgu.o" "/code/target/release/deps/ort_test-c05537a8f0a8171b.ort_test.f793ec45b8c166e7-cgu.2.rcgu.o" "/code/target/release/deps/ort_test-c05537a8f0a8171b.ort_test.f793ec45b8c166e7-cgu.3.rcgu.o" "/code/target/release/deps/ort_test-c05537a8f0a8171b.ort_test.f793ec45b8c166e7-cgu.4.rcgu.o" "/code/target/release/deps/ort_test-c05537a8f0a8171b.2ct6k0b48srmn0n4p7irsxkcd.rcgu.o" "-Wl,--as-needed" "-Wl,-Bstatic" "/code/target/release/deps/libort-3d08ad875e8508ae.rlib" "/code/target/release/deps/libhalf-beb18ee1785c06d7.rlib" "/code/target/release/deps/libcfg_if-0026b015111e6727.rlib" "/code/target/release/deps/libndarray-5e72d2a0bf2f0ba0.rlib" "/code/target/release/deps/libmatrixmultiply-10aec57730c4ed56.rlib" "/code/target/release/deps/libnum_complex-ef1e2765bc91fc92.rlib" "/code/target/release/deps/libnum_integer-5354220c7654582a.rlib" "/code/target/release/deps/libnum_traits-73652e01c77e8fac.rlib" "/code/target/release/deps/librawpointer-8819c9b379461dac.rlib" "/code/target/release/deps/libtracing-510210d23f5dbd2c.rlib" "/code/target/release/deps/libpin_project_lite-43b02254a7e5d1bb.rlib" "/code/target/release/deps/libtracing_core-fa7fa346ba696018.rlib" "/code/target/release/deps/libonce_cell-07ee111a0d049f56.rlib" "/code/target/release/deps/libort_sys-199844376b12802e.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-6dd4704180e83658.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libpanic_unwind-4e6a2406b4d4238c.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libobject-14a05d7053312c41.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libmemchr-bc5d0c2c17f6efb5.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libaddr2line-d49284e733162194.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libgimli-399d6d9d480f795b.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_demangle-5eec563be8d4a86c.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd_detect-b4e863e039c1e2b2.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libhashbrown-2cba6cb85e41482c.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-04818ce3c2111186.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libminiz_oxide-a9c50009f9caf7a5.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libadler-14957fef627d3eac.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libunwind-7fd5a10030b438fd.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcfg_if-3ed6823815f7ddfa.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/liblibc-764cf06d9fa7ac52.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/liballoc-02813af72277ddec.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_std_workspace_core-e4efde0144e702d3.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcore-f5a882967048065e.rlib" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcompiler_builtins-6d60f560e3825be6.rlib" "-Wl,-Bdynamic" "-lstdc++" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/root/.cache/ort.pyke.io/dfbin/aarch64-unknown-linux-gnu/B40AB3EA5BF3BCBC73C18BA66A8F96ECAA9D08963C0D6A5268D608B0642D23D4/onnxruntime/lib" "-L" "/usr/local/rustup/toolchains/1.82.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib" "-o" "/code/target/release/deps/ort_test-c05537a8f0a8171b" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wl,--strip-debug" "-nodefaultlibs" 11.43 = note: /usr/bin/ld: cannot find -lstdc++ 11.43 collect2: error: ld returned 1 exit status 11.43 11.43 11.43 error: could not compile `ort-test` (bin "ort-test") due to 1 previous error ------ Dockerfile:16 -------------------- 14 | COPY model.onnx model.onnx 15 | 16 | >>> RUN cargo build --release 17 | 18 | # run stage -------------------- ERROR: failed to solve: process "/bin/sh -c cargo build --release" did not complete successfully: exit code: 101 View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/ry90l2g4pbzmg93pj759gv984 ```
audioXD commented 2 hours ago

Installing libstdc++-10-dev might help. Its probably missing the .a files.

PierreLouisLetoquart commented 2 hours ago

It is a little bit better (maybe, not sure lol) but I've a long af error trace rn

Build Error Trace ```bash 12.89 einsum.cc:(.text._ZN11onnxruntime27EinsumTypedComputeProcessorIfED2Ev[_ZN11onnxruntime27EinsumTypedComputeProcessorIfED5Ev]+0x78): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: einsum.cc:(.text._ZN11onnxruntime27EinsumTypedComputeProcessorIfED2Ev[_ZN11onnxruntime27EinsumTypedComputeProcessorIfED5Ev]+0x7c): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(einsum.cc.o):einsum.cc:(.text._ZN11onnxruntime27EinsumTypedComputeProcessorIfED2Ev[_ZN11onnxruntime27EinsumTypedComputeProcessorIfED5Ev]+0xb8): more undefined references to `__libc_single_threaded' follow 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(unsqueeze_elimination.cc.o): in function `onnxruntime::UnsqueezeElimination::Apply(onnxruntime::Graph&, onnxruntime::Node&, onnxruntime::RewriteRule::RewriteRuleEffect&, onnxruntime::logging::Logger const&) const': 12.89 unsqueeze_elimination.cc:(.text._ZNK11onnxruntime20UnsqueezeElimination5ApplyERNS_5GraphERNS_4NodeERNS_11RewriteRule17RewriteRuleEffectERKNS_7logging6LoggerE+0xd1c): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: unsqueeze_elimination.cc:(.text._ZNK11onnxruntime20UnsqueezeElimination5ApplyERNS_5GraphERNS_4NodeERNS_11RewriteRule17RewriteRuleEffectERKNS_7logging6LoggerE+0xdb8): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: unsqueeze_elimination.cc:(.text._ZNK11onnxruntime20UnsqueezeElimination5ApplyERNS_5GraphERNS_4NodeERNS_11RewriteRule17RewriteRuleEffectERKNS_7logging6LoggerE+0xdcc): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(transpose_optimizer.cc.o): in function `onnxruntime::TransposeOptimizer::~TransposeOptimizer()': 12.89 transpose_optimizer.cc:(.text._ZN11onnxruntime18TransposeOptimizerD2Ev[_ZN11onnxruntime18TransposeOptimizerD5Ev]+0x4c): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: transpose_optimizer.cc:(.text._ZN11onnxruntime18TransposeOptimizerD2Ev[_ZN11onnxruntime18TransposeOptimizerD5Ev]+0x50): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: transpose_optimizer.cc:(.text._ZN11onnxruntime18TransposeOptimizerD2Ev[_ZN11onnxruntime18TransposeOptimizerD5Ev]+0x104): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(transpose_optimizer.cc.o): in function `onnxruntime::TransposeOptimizer::~TransposeOptimizer()': 12.89 transpose_optimizer.cc:(.text._ZN11onnxruntime18TransposeOptimizerD0Ev[_ZN11onnxruntime18TransposeOptimizerD5Ev]+0x4c): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: transpose_optimizer.cc:(.text._ZN11onnxruntime18TransposeOptimizerD0Ev[_ZN11onnxruntime18TransposeOptimizerD5Ev]+0x50): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(transpose_optimizer.cc.o):transpose_optimizer.cc:(.text._ZN11onnxruntime18TransposeOptimizerD0Ev[_ZN11onnxruntime18TransposeOptimizerD5Ev]+0x100): more undefined references to `__libc_single_threaded' follow 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(transpose_optimizer.cc.o): in function `onnxruntime::TransposeOptimizer::ApplyImpl(onnxruntime::Graph&, bool&, int, onnxruntime::logging::Logger const&) const': 12.89 transpose_optimizer.cc:(.text._ZNK11onnxruntime18TransposeOptimizer9ApplyImplERNS_5GraphERbiRKNS_7logging6LoggerE+0xd74): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(ort_transpose_optimization.cc.o): in function `std::_Hashtable >, std::pair > const, onnx_transpose_optimization::HandlerInfo const&>, std::allocator > const, onnx_transpose_optimization::HandlerInfo const&> >, std::__detail::_Select1st, std::equal_to > >, std::hash > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits >::_Hashtable > const, onnx_transpose_optimization::HandlerInfo const&> const*>(std::pair > const, onnx_transpose_optimization::HandlerInfo const&> const*, std::pair > const, onnx_transpose_optimization::HandlerInfo const&> const*, unsigned long, std::hash > > const&, std::equal_to > > const&, std::allocator > const, onnx_transpose_optimization::HandlerInfo const&> > const&, std::integral_constant)': 12.89 ort_transpose_optimization.cc:(.text._ZNSt10_HashtableISt17basic_string_viewIcSt11char_traitsIcEESt4pairIKS3_RKN27onnx_transpose_optimization11HandlerInfoEESaISA_ENSt8__detail10_Select1stESt8equal_toIS3_ESt4hashIS3_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEEC2IPKSA_EET_SR_mRKSH_RKSF_RKSB_St17integral_constantIbLb1EE[_ZNSt10_HashtableISt17basic_string_viewIcSt11char_traitsIcEESt4pairIKS3_RKN27onnx_transpose_optimization11HandlerInfoEESaISA_ENSt8__detail10_Select1stESt8equal_toIS3_ESt4hashIS3_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEEC5IPKSA_EET_SR_mRKSH_RKSF_RKSB_St17integral_constantIbLb1EE]+0x30c): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: ort_transpose_optimization.cc:(.text._ZNSt10_HashtableISt17basic_string_viewIcSt11char_traitsIcEESt4pairIKS3_RKN27onnx_transpose_optimization11HandlerInfoEESaISA_ENSt8__detail10_Select1stESt8equal_toIS3_ESt4hashIS3_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEEC2IPKSA_EET_SR_mRKSH_RKSF_RKSB_St17integral_constantIbLb1EE[_ZNSt10_HashtableISt17basic_string_viewIcSt11char_traitsIcEESt4pairIKS3_RKN27onnx_transpose_optimization11HandlerInfoEESaISA_ENSt8__detail10_Select1stESt8equal_toIS3_ESt4hashIS3_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEEC5IPKSA_EET_SR_mRKSH_RKSF_RKSB_St17integral_constantIbLb1EE]+0x320): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(skip_layer_norm_fusion.cc.o): in function `void std::_Hashtable, std::allocator >, std::pair, std::allocator > const, onnx::AttributeProto>, std::allocator, std::allocator > const, onnx::AttributeProto> >, std::__detail::_Select1st, std::equal_to, std::allocator > >, std::hash, std::allocator > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits >::_M_assign, std::allocator >, std::pair, std::allocator > const, onnx::AttributeProto>, std::allocator, std::allocator > const, onnx::AttributeProto> >, std::__detail::_Select1st, std::equal_to, std::allocator > >, std::hash, std::allocator > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits > const&, std::__detail::_AllocNode, std::allocator > const, onnx::AttributeProto>, true> > > >(std::_Hashtable, std::allocator >, std::pair, std::allocator > const, onnx::AttributeProto>, std::allocator, std::allocator > const, onnx::AttributeProto> >, std::__detail::_Select1st, std::equal_to, std::allocator > >, std::hash, std::allocator > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits > const&, std::__detail::_AllocNode, std::allocator > const, onnx::AttributeProto>, true> > > const&)': 12.89 skip_layer_norm_fusion.cc:(.text._ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N4onnx14AttributeProtoEESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEE9_M_assignIRKSN_NSC_10_AllocNodeISaINSC_10_Hash_nodeISA_Lb1EEEEEEEEvOT_RKT0_[_ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N4onnx14AttributeProtoEESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEE9_M_assignIRKSN_NSC_10_AllocNodeISaINSC_10_Hash_nodeISA_Lb1EEEEEEEEvOT_RKT0_]+0x290): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(actions.cc.o): in function `onnxruntime::MergeIntoTargetFixed::ValueMoves(onnxruntime::MergeIntoTarget::RuntimeState const&) const': 12.89 actions.cc:(.text._ZNK11onnxruntime20MergeIntoTargetFixed10ValueMovesERKNS_15MergeIntoTarget12RuntimeStateE[_ZNK11onnxruntime20MergeIntoTargetFixed10ValueMovesERKNS_15MergeIntoTarget12RuntimeStateE]+0xe8): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(actions.cc.o):actions.cc:(.text._ZNK11onnxruntime19ReplaceWithNewFixed10ValueMovesERKNS_14ReplaceWithNew12RuntimeStateE[_ZNK11onnxruntime19ReplaceWithNewFixed10ValueMovesERKNS_14ReplaceWithNew12RuntimeStateE]+0xe8): more undefined references to `std::__throw_bad_array_new_length()' follow 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(qdq_actions.cc.o): in function `std::_MakeUniq::__single_object std::make_unique&>(onnxruntime::DataTypeImpl const*&, onnxruntime::TensorShape&&, std::shared_ptr&)': 12.89 qdq_actions.cc:(.text._ZSt11make_uniqueIN11onnxruntime6TensorEJRPKNS0_12DataTypeImplENS0_11TensorShapeERSt10shared_ptrINS0_12CPUAllocatorEEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_[_ZSt11make_uniqueIN11onnxruntime6TensorEJRPKNS0_12DataTypeImplENS0_11TensorShapeERSt10shared_ptrINS0_12CPUAllocatorEEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_]+0x40): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: qdq_actions.cc:(.text._ZSt11make_uniqueIN11onnxruntime6TensorEJRPKNS0_12DataTypeImplENS0_11TensorShapeERSt10shared_ptrINS0_12CPUAllocatorEEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_[_ZSt11make_uniqueIN11onnxruntime6TensorEJRPKNS0_12DataTypeImplENS0_11TensorShapeERSt10shared_ptrINS0_12CPUAllocatorEEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_]+0x44): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: qdq_actions.cc:(.text._ZSt11make_uniqueIN11onnxruntime6TensorEJRPKNS0_12DataTypeImplENS0_11TensorShapeERSt10shared_ptrINS0_12CPUAllocatorEEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_[_ZSt11make_uniqueIN11onnxruntime6TensorEJRPKNS0_12DataTypeImplENS0_11TensorShapeERSt10shared_ptrINS0_12CPUAllocatorEEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_]+0x84): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: qdq_actions.cc:(.text._ZSt11make_uniqueIN11onnxruntime6TensorEJRPKNS0_12DataTypeImplENS0_11TensorShapeERSt10shared_ptrINS0_12CPUAllocatorEEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_[_ZSt11make_uniqueIN11onnxruntime6TensorEJRPKNS0_12DataTypeImplENS0_11TensorShapeERSt10shared_ptrINS0_12CPUAllocatorEEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_]+0x88): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: qdq_actions.cc:(.text._ZSt11make_uniqueIN11onnxruntime6TensorEJRPKNS0_12DataTypeImplENS0_11TensorShapeERSt10shared_ptrINS0_12CPUAllocatorEEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_[_ZSt11make_uniqueIN11onnxruntime6TensorEJRPKNS0_12DataTypeImplENS0_11TensorShapeERSt10shared_ptrINS0_12CPUAllocatorEEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_]+0xf8): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(qdq_actions.cc.o): in function `std::_Hashtable, std::allocator >, std::pair, std::allocator > const, std::unique_ptr > >, std::allocator, std::allocator > const, std::unique_ptr > > >, std::__detail::_Select1st, std::equal_to, std::allocator > >, std::hash, std::allocator > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits >::_M_rehash(unsigned long, unsigned long const&)': 12.89 qdq_actions.cc:(.text._ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10unique_ptrIN11onnxruntime6TensorESt14default_deleteISA_EEESaISE_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSG_18_Mod_range_hashingENSG_20_Default_ranged_hashENSG_20_Prime_rehash_policyENSG_17_Hashtable_traitsILb1ELb0ELb1EEEE9_M_rehashEmRKm[_ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10unique_ptrIN11onnxruntime6TensorESt14default_deleteISA_EEESaISE_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSG_18_Mod_range_hashingENSG_20_Default_ranged_hashENSG_20_Prime_rehash_policyENSG_17_Hashtable_traitsILb1ELb0ELb1EEEE9_M_rehashEmRKm]+0x104): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(qdq_actions.cc.o): in function `onnxruntime::QDQ::DQMatMulToMatMulNBitsAction::ProcessNewNode(onnxruntime::Graph&, onnxruntime::NodesToOptimize const&, onnxruntime::Node&) const': 12.89 qdq_actions.cc:(.text._ZNK11onnxruntime3QDQ27DQMatMulToMatMulNBitsAction14ProcessNewNodeERNS_5GraphERKNS_15NodesToOptimizeERNS_4NodeE+0x3fc): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: qdq_actions.cc:(.text._ZNK11onnxruntime3QDQ27DQMatMulToMatMulNBitsAction14ProcessNewNodeERNS_5GraphERKNS_15NodesToOptimizeERNS_4NodeE+0x400): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: qdq_actions.cc:(.text._ZNK11onnxruntime3QDQ27DQMatMulToMatMulNBitsAction14ProcessNewNodeERNS_5GraphERKNS_15NodesToOptimizeERNS_4NodeE+0x448): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: qdq_actions.cc:(.text._ZNK11onnxruntime3QDQ27DQMatMulToMatMulNBitsAction14ProcessNewNodeERNS_5GraphERKNS_15NodesToOptimizeERNS_4NodeE+0x44c): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: qdq_actions.cc:(.text._ZNK11onnxruntime3QDQ27DQMatMulToMatMulNBitsAction14ProcessNewNodeERNS_5GraphERKNS_15NodesToOptimizeERNS_4NodeE+0x554): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(qdq_actions.cc.o):qdq_actions.cc:(.text._ZNK11onnxruntime3QDQ27DQMatMulToMatMulNBitsAction14ProcessNewNodeERNS_5GraphERKNS_15NodesToOptimizeERNS_4NodeE+0x558): more undefined references to `__libc_single_threaded' follow 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(qdq_final_cleanup.cc.o): in function `onnxruntime::(anonymous namespace)::CleanUpNodeSequence(onnxruntime::(anonymous namespace)::NodeSequence, onnxruntime::Graph&, unsigned long, onnxruntime::logging::Logger const&)': 12.89 qdq_final_cleanup.cc:(.text._ZN11onnxruntime12_GLOBAL__N_119CleanUpNodeSequenceENS0_12NodeSequenceERNS_5GraphEmRKNS_7logging6LoggerE+0x12c4): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: qdq_final_cleanup.cc:(.text._ZN11onnxruntime12_GLOBAL__N_119CleanUpNodeSequenceENS0_12NodeSequenceERNS_5GraphEmRKNS_7logging6LoggerE+0x12cc): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(not_where_fusion.cc.o): in function `onnxruntime::NotWhereFusion::Apply(onnxruntime::Graph&, onnxruntime::Node&, onnxruntime::RewriteRule::RewriteRuleEffect&, onnxruntime::logging::Logger const&) const': 12.89 not_where_fusion.cc:(.text._ZNK11onnxruntime14NotWhereFusion5ApplyERNS_5GraphERNS_4NodeERNS_11RewriteRule17RewriteRuleEffectERKNS_7logging6LoggerE+0x3b0): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(nhwc_transformer.cc.o): in function `onnxruntime::NhwcTransformer::~NhwcTransformer()': 12.89 nhwc_transformer.cc:(.text._ZN11onnxruntime15NhwcTransformerD2Ev[_ZN11onnxruntime15NhwcTransformerD5Ev]+0x110): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: nhwc_transformer.cc:(.text._ZN11onnxruntime15NhwcTransformerD2Ev[_ZN11onnxruntime15NhwcTransformerD5Ev]+0x114): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: nhwc_transformer.cc:(.text._ZN11onnxruntime15NhwcTransformerD2Ev[_ZN11onnxruntime15NhwcTransformerD5Ev]+0x1cc): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(nhwc_transformer.cc.o): in function `onnxruntime::NhwcTransformer::~NhwcTransformer()': 12.89 nhwc_transformer.cc:(.text._ZN11onnxruntime15NhwcTransformerD0Ev[_ZN11onnxruntime15NhwcTransformerD5Ev]+0x110): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: nhwc_transformer.cc:(.text._ZN11onnxruntime15NhwcTransformerD0Ev[_ZN11onnxruntime15NhwcTransformerD5Ev]+0x114): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(nhwc_transformer.cc.o):nhwc_transformer.cc:(.text._ZN11onnxruntime15NhwcTransformerD0Ev[_ZN11onnxruntime15NhwcTransformerD5Ev]+0x1c4): more undefined references to `__libc_single_threaded' follow 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(nhwc_transformer.cc.o): in function `std::_Hashtable, std::allocator >, std::__detail::_Select1st, std::equal_to, nhwc_map_internal::OpIdHash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits >::_M_rehash(unsigned long, unsigned long const&)': 12.89 nhwc_transformer.cc:(.text._ZNSt10_HashtableIN17nhwc_map_internal8OpIdInfoESt4pairIKS1_NS0_15OpTransformInfoEESaIS5_ENSt8__detail10_Select1stESt8equal_toIS1_ENS0_8OpIdHashENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb0ELb1EEEE9_M_rehashEmRKm[_ZNSt10_HashtableIN17nhwc_map_internal8OpIdInfoESt4pairIKS1_NS0_15OpTransformInfoEESaIS5_ENSt8__detail10_Select1stESt8equal_toIS1_ENS0_8OpIdHashENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb0ELb1EEEE9_M_rehashEmRKm]+0x104): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(matmul_bn_fusion.cc.o): in function `absl::InlinedVector >::InlinedVector(int const*, int const*, std::allocator const&)': 12.89 matmul_bn_fusion.cc:(.text._ZN4absl13InlinedVectorIiLm11ESaIiEEC2IPKiLi0EEET_S6_RKS1_[_ZN4absl13InlinedVectorIiLm11ESaIiEEC5IPKiLi0EEET_S6_RKS1_]+0x114): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(matmul_add_fusion.cc.o): in function `onnxruntime::MatMulAddFusion::ApplyImpl(onnxruntime::Graph&, bool&, int, onnxruntime::logging::Logger const&) const': 12.89 matmul_add_fusion.cc:(.text._ZNK11onnxruntime15MatMulAddFusion9ApplyImplERNS_5GraphERbiRKNS_7logging6LoggerE+0x8b8): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: matmul_add_fusion.cc:(.text._ZNK11onnxruntime15MatMulAddFusion9ApplyImplERNS_5GraphERbiRKNS_7logging6LoggerE+0x900): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: matmul_add_fusion.cc:(.text._ZNK11onnxruntime15MatMulAddFusion9ApplyImplERNS_5GraphERbiRKNS_7logging6LoggerE+0x94c): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(layer_norm_fusion.cc.o):layer_norm_fusion.cc:(.text._ZN4absl13InlinedVectorIPN11onnxruntime7NodeArgELm6ESaIS3_EEC2IPKS3_Li0EEET_S9_RKS4_[_ZN4absl13InlinedVectorIPN11onnxruntime7NodeArgELm6ESaIS3_EEC5IPKS3_Li0EEET_S9_RKS4_]+0xd4): more undefined references to `std::__throw_bad_array_new_length()' follow 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(conv_transpose.cc.o): in function `onnxruntime::xnnpack::ConvTranspose::PrePack(onnxruntime::Tensor const&, int, std::shared_ptr, bool&, onnxruntime::PrePackedWeights*)': 12.89 conv_transpose.cc:(.text._ZN11onnxruntime7xnnpack13ConvTranspose7PrePackERKNS_6TensorEiSt10shared_ptrINS_10IAllocatorEERbPNS_16PrePackedWeightsE+0x204): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: conv_transpose.cc:(.text._ZN11onnxruntime7xnnpack13ConvTranspose7PrePackERKNS_6TensorEiSt10shared_ptrINS_10IAllocatorEERbPNS_16PrePackedWeightsE+0x208): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: conv_transpose.cc:(.text._ZN11onnxruntime7xnnpack13ConvTranspose7PrePackERKNS_6TensorEiSt10shared_ptrINS_10IAllocatorEERbPNS_16PrePackedWeightsE+0x344): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: conv_transpose.cc:(.text._ZN11onnxruntime7xnnpack13ConvTranspose7PrePackERKNS_6TensorEiSt10shared_ptrINS_10IAllocatorEERbPNS_16PrePackedWeightsE+0x348): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: conv_transpose.cc:(.text._ZN11onnxruntime7xnnpack13ConvTranspose7PrePackERKNS_6TensorEiSt10shared_ptrINS_10IAllocatorEERbPNS_16PrePackedWeightsE+0x578): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(conv_transpose.cc.o):conv_transpose.cc:(.text._ZN11onnxruntime7xnnpack13ConvTranspose7PrePackERKNS_6TensorEiSt10shared_ptrINS_10IAllocatorEERbPNS_16PrePackedWeightsE+0x57c): more undefined references to `__libc_single_threaded' follow 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(utils.cc.o): in function `long& absl::inlined_vector_internal::Storage >::EmplaceBackSlow(long&&) [clone .isra.0]': 12.89 utils.cc:(.text._ZN4absl23inlined_vector_internal7StorageIlLm6ESaIlEE15EmplaceBackSlowIJlEEERlDpOT_.isra.0+0xfc): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(utils.cc.o): in function `void std::vector >, unsigned char>, std::allocator >, unsigned char> > >::_M_realloc_insert >, unsigned char> const&>(__gnu_cxx::__normal_iterator >, unsigned char>*, std::vector >, unsigned char>, std::allocator >, unsigned char> > > >, std::pair >, unsigned char> const&)': 12.89 utils.cc:(.text._ZNSt6vectorISt4pairIS_IfSaIfEEhESaIS3_EE17_M_realloc_insertIJRKS3_EEEvN9__gnu_cxx17__normal_iteratorIPS3_S5_EEDpOT_[_ZNSt6vectorISt4pairIS_IfSaIfEEhESaIS3_EE17_M_realloc_insertIJRKS3_EEEvN9__gnu_cxx17__normal_iteratorIPS3_S5_EEDpOT_]+0x1bc): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(utils.cc.o): in function `onnxruntime::xnnpack::ParseQuantParamForOp(onnxruntime::OpKernelInfo const&, int, unsigned long)': 12.89 utils.cc:(.text._ZN11onnxruntime7xnnpack20ParseQuantParamForOpERKNS_12OpKernelInfoEim+0x324): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: utils.cc:(.text._ZN11onnxruntime7xnnpack20ParseQuantParamForOpERKNS_12OpKernelInfoEim+0x348): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: utils.cc:(.text._ZN11onnxruntime7xnnpack20ParseQuantParamForOpERKNS_12OpKernelInfoEim+0x350): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(utils.cc.o):utils.cc:(.text._ZN11onnxruntime7xnnpack18GetTensorQuantTypeERKNS_8NodeUnitEibRKNS_11GraphViewerE+0x1288): more undefined references to `std::__throw_bad_array_new_length()' follow 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(sampling.cc.o): in function `std::vector >::_M_fill_insert(__gnu_cxx::__normal_iterator > >, unsigned long, OrtValue const&)': 12.89 sampling.cc:(.text._ZNSt6vectorI8OrtValueSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_[_ZNSt6vectorI8OrtValueSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_]+0xac): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: sampling.cc:(.text._ZNSt6vectorI8OrtValueSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_[_ZNSt6vectorI8OrtValueSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_]+0xb8): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: sampling.cc:(.text._ZNSt6vectorI8OrtValueSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_[_ZNSt6vectorI8OrtValueSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_]+0x104): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: sampling.cc:(.text._ZNSt6vectorI8OrtValueSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_[_ZNSt6vectorI8OrtValueSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_]+0x110): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: sampling.cc:(.text._ZNSt6vectorI8OrtValueSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_[_ZNSt6vectorI8OrtValueSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_]+0x1b8): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(sampling.cc.o):sampling.cc:(.text._ZNSt6vectorI8OrtValueSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_[_ZNSt6vectorI8OrtValueSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_]+0x1c4): more undefined references to `__libc_single_threaded' follow 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(logits_processor.cc.o): in function `onnxruntime::contrib::transformers::ILogitsProcessor*& absl::inlined_vector_internal::Storage*, 6ul, std::allocator*> >::EmplaceBackSlow*>(onnxruntime::contrib::transformers::ILogitsProcessor*&&) [clone .isra.0]': 12.89 logits_processor.cc:(.text._ZN4absl23inlined_vector_internal7StorageIPN11onnxruntime7contrib12transformers16ILogitsProcessorIfEELm6ESaIS7_EE15EmplaceBackSlowIJS7_EEERS7_DpOT_.isra.0+0xfc): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(logits_processor.cc.o): in function `std::_Hashtable, std::__detail::_Identity, std::equal_to, std::hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits >::_M_rehash(unsigned long, unsigned long const&)': 12.89 logits_processor.cc:(.text._ZNSt10_HashtableIiiSaIiENSt8__detail9_IdentityESt8equal_toIiESt4hashIiENS1_18_Mod_range_hashingENS1_20_Default_ranged_hashENS1_20_Prime_rehash_policyENS1_17_Hashtable_traitsILb0ELb1ELb1EEEE9_M_rehashEmRKm[_ZNSt10_HashtableIiiSaIiENSt8__detail9_IdentityESt8equal_toIiESt4hashIiENS1_18_Mod_range_hashingENS1_20_Default_ranged_hashENS1_20_Prime_rehash_policyENS1_17_Hashtable_traitsILb0ELb1ELb1EEEE9_M_rehashEmRKm]+0x104): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(beam_search.cc.o): in function `onnxruntime::contrib::transformers::BeamSearchBase::~BeamSearchBase()': 12.89 beam_search.cc:(.text._ZN11onnxruntime7contrib12transformers14BeamSearchBaseIfED2Ev[_ZN11onnxruntime7contrib12transformers14BeamSearchBaseIfED5Ev]+0xb0): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: beam_search.cc:(.text._ZN11onnxruntime7contrib12transformers14BeamSearchBaseIfED2Ev[_ZN11onnxruntime7contrib12transformers14BeamSearchBaseIfED5Ev]+0xb4): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: beam_search.cc:(.text._ZN11onnxruntime7contrib12transformers14BeamSearchBaseIfED2Ev[_ZN11onnxruntime7contrib12transformers14BeamSearchBaseIfED5Ev]+0xdc): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: beam_search.cc:(.text._ZN11onnxruntime7contrib12transformers14BeamSearchBaseIfED2Ev[_ZN11onnxruntime7contrib12transformers14BeamSearchBaseIfED5Ev]+0xe0): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: beam_search.cc:(.text._ZN11onnxruntime7contrib12transformers14BeamSearchBaseIfED2Ev[_ZN11onnxruntime7contrib12transformers14BeamSearchBaseIfED5Ev]+0x1dc): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(beam_search.cc.o):beam_search.cc:(.text._ZN11onnxruntime7contrib12transformers14BeamSearchBaseIfED2Ev[_ZN11onnxruntime7contrib12transformers14BeamSearchBaseIfED5Ev]+0x220): more undefined references to `__libc_single_threaded' follow 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(dynamicslice.cc.o): in function `onnxruntime::KernelCreateInfo onnxruntime::contrib::BuildKernelCreateInfo()': 12.89 dynamicslice.cc:(.text._ZN11onnxruntime7contrib21BuildKernelCreateInfoINS0_51kCpuExecutionProvider_DynamicSlice_kOnnxDomain_ver1EEENS_16KernelCreateInfoEv+0x340): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(crop.cc.o): in function `onnxruntime::contrib::BuildKernelCreateInfo()::{lambda(onnxruntime::FuncManager&, onnxruntime::OpKernelInfo const&, std::unique_ptr >&)#1}::_FUN(onnxruntime::FuncManager&, onnxruntime::OpKernelInfo const&, std::unique_ptr >&)': 12.89 crop.cc:(.text._ZZN11onnxruntime7contrib21BuildKernelCreateInfoINS0_43kCpuExecutionProvider_Crop_kOnnxDomain_ver1EEENS_16KernelCreateInfoEvENUlRNS_11FuncManagerERKNS_12OpKernelInfoERSt10unique_ptrINS_8OpKernelESt14default_deleteISA_EEE_4_FUNES5_S8_SE_+0x310): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: crop.cc:(.text._ZZN11onnxruntime7contrib21BuildKernelCreateInfoINS0_43kCpuExecutionProvider_Crop_kOnnxDomain_ver1EEENS_16KernelCreateInfoEvENUlRNS_11FuncManagerERKNS_12OpKernelInfoERSt10unique_ptrINS_8OpKernelESt14default_deleteISA_EEE_4_FUNES5_S8_SE_+0x318): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(uni_dir_attn_lstm.cc.o): in function `onnxruntime::contrib::rnn::detail::UniDirectionalAttnLstm::Compute(gsl::span const&, gsl::span const&, int, gsl::span const&, gsl::span const&, gsl::span&, gsl::span&, gsl::span&)': 12.89 uni_dir_attn_lstm.cc:(.text._ZN11onnxruntime7contrib3rnn6detail22UniDirectionalAttnLstmIfE7ComputeERKN3gsl4spanIKfLm18446744073709551615EEERKNS6_IKiLm18446744073709551615EEEiSA_SA_RNS6_IfLm18446744073709551615EEESG_SG_[_ZN11onnxruntime7contrib3rnn6detail22UniDirectionalAttnLstmIfE7ComputeERKN3gsl4spanIKfLm18446744073709551615EEERKNS6_IKiLm18446744073709551615EEEiSA_SA_RNS6_IfLm18446744073709551615EEESG_SG_]+0x14c): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: uni_dir_attn_lstm.cc:(.text._ZN11onnxruntime7contrib3rnn6detail22UniDirectionalAttnLstmIfE7ComputeERKN3gsl4spanIKfLm18446744073709551615EEERKNS6_IKiLm18446744073709551615EEEiSA_SA_RNS6_IfLm18446744073709551615EEESG_SG_[_ZN11onnxruntime7contrib3rnn6detail22UniDirectionalAttnLstmIfE7ComputeERKN3gsl4spanIKfLm18446744073709551615EEERKNS6_IKiLm18446744073709551615EEEiSA_SA_RNS6_IfLm18446744073709551615EEESG_SG_]+0x150): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: uni_dir_attn_lstm.cc:(.text._ZN11onnxruntime7contrib3rnn6detail22UniDirectionalAttnLstmIfE7ComputeERKN3gsl4spanIKfLm18446744073709551615EEERKNS6_IKiLm18446744073709551615EEEiSA_SA_RNS6_IfLm18446744073709551615EEESG_SG_[_ZN11onnxruntime7contrib3rnn6detail22UniDirectionalAttnLstmIfE7ComputeERKN3gsl4spanIKfLm18446744073709551615EEERKNS6_IKiLm18446744073709551615EEEiSA_SA_RNS6_IfLm18446744073709551615EEESG_SG_]+0x190): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: uni_dir_attn_lstm.cc:(.text._ZN11onnxruntime7contrib3rnn6detail22UniDirectionalAttnLstmIfE7ComputeERKN3gsl4spanIKfLm18446744073709551615EEERKNS6_IKiLm18446744073709551615EEEiSA_SA_RNS6_IfLm18446744073709551615EEESG_SG_[_ZN11onnxruntime7contrib3rnn6detail22UniDirectionalAttnLstmIfE7ComputeERKN3gsl4spanIKfLm18446744073709551615EEERKNS6_IKiLm18446744073709551615EEEiSA_SA_RNS6_IfLm18446744073709551615EEESG_SG_]+0x194): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: uni_dir_attn_lstm.cc:(.text._ZN11onnxruntime7contrib3rnn6detail22UniDirectionalAttnLstmIfE7ComputeERKN3gsl4spanIKfLm18446744073709551615EEERKNS6_IKiLm18446744073709551615EEEiSA_SA_RNS6_IfLm18446744073709551615EEESG_SG_[_ZN11onnxruntime7contrib3rnn6detail22UniDirectionalAttnLstmIfE7ComputeERKN3gsl4spanIKfLm18446744073709551615EEERKNS6_IKiLm18446744073709551615EEEiSA_SA_RNS6_IfLm18446744073709551615EEESG_SG_]+0x1c4): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(uni_dir_attn_lstm.cc.o):uni_dir_attn_lstm.cc:(.text._ZN11onnxruntime7contrib3rnn6detail22UniDirectionalAttnLstmIfE15AllocateBuffersEv[_ZN11onnxruntime7contrib3rnn6detail22UniDirectionalAttnLstmIfE15AllocateBuffersEv]+0x3c): more undefined references to `__libc_single_threaded' follow 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(cpuid_info.cc.o): in function `onnxruntime::CPUIDInfo::CPUIDInfo()': 12.89 cpuid_info.cc:(.text._ZN11onnxruntime9CPUIDInfoC2Ev+0x530): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(prepacked_weights_container.cc.o): in function `std::_Hashtable, std::allocator >, std::pair, std::allocator > const, std::shared_ptr >, std::allocator, std::allocator > const, std::shared_ptr > >, std::__detail::_Select1st, std::equal_to, std::allocator > >, std::hash, std::allocator > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits >::_M_rehash(unsigned long, unsigned long const&)': 12.89 prepacked_weights_container.cc:(.text._ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10shared_ptrIN11onnxruntime10IAllocatorEEESaISC_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSE_18_Mod_range_hashingENSE_20_Default_ranged_hashENSE_20_Prime_rehash_policyENSE_17_Hashtable_traitsILb1ELb0ELb1EEEE9_M_rehashEmRKm[_ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10shared_ptrIN11onnxruntime10IAllocatorEEESaISC_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSE_18_Mod_range_hashingENSE_20_Default_ranged_hashENSE_20_Prime_rehash_policyENSE_17_Hashtable_traitsILb1ELb0ELb1EEEE9_M_rehashEmRKm]+0x104): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(prepacked_weights_container.cc.o): in function `onnxruntime::PrepackedWeightsContainer::GetOrCreateAllocator(std::__cxx11::basic_string, std::allocator > const&)': 12.89 prepacked_weights_container.cc:(.text._ZN11onnxruntime25PrepackedWeightsContainer20GetOrCreateAllocatorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x128): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: prepacked_weights_container.cc:(.text._ZN11onnxruntime25PrepackedWeightsContainer20GetOrCreateAllocatorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x12c): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: prepacked_weights_container.cc:(.text._ZN11onnxruntime25PrepackedWeightsContainer20GetOrCreateAllocatorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x1bc): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: prepacked_weights_container.cc:(.text._ZN11onnxruntime25PrepackedWeightsContainer20GetOrCreateAllocatorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x1c0): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: prepacked_weights_container.cc:(.text._ZN11onnxruntime25PrepackedWeightsContainer20GetOrCreateAllocatorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x224): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(prepacked_weights_container.cc.o):prepacked_weights_container.cc:(.text._ZN11onnxruntime25PrepackedWeightsContainer20GetOrCreateAllocatorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x228): more undefined references to `__libc_single_threaded' follow 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(prepacked_weights_container.cc.o): in function `std::_Hashtable, std::allocator >, std::pair, std::allocator > const, onnxruntime::PrePackedWeights>, std::allocator, std::allocator > const, onnxruntime::PrePackedWeights> >, std::__detail::_Select1st, std::equal_to, std::allocator > >, std::hash, std::allocator > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits >::_M_rehash(unsigned long, unsigned long const&)': 12.89 prepacked_weights_container.cc:(.text._ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N11onnxruntime16PrePackedWeightsEESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEE9_M_rehashEmRKm[_ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N11onnxruntime16PrePackedWeightsEESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEE9_M_rehashEmRKm]+0x104): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(library_handles.cc.o): in function `std::pair, std::allocator >, void*>& absl::inlined_vector_internal::Storage, std::allocator >, void*>, 1ul, std::allocator, std::allocator >, void*> > >::EmplaceBackSlow, std::allocator >, void*> >(std::pair, std::allocator >, void*>&&) [clone .isra.0]': 12.89 library_handles.cc:(.text._ZN4absl23inlined_vector_internal7StorageISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPvELm1ESaISA_EE15EmplaceBackSlowIJSA_EEERSA_DpOT_.isra.0+0x1b0): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(library_handles.cc.o): in function `onnxruntime::LibraryHandles::UnloadLibraries() [clone .part.0]': 12.89 library_handles.cc:(.text._ZN11onnxruntime14LibraryHandles15UnloadLibrariesEv.part.0+0x694): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(allocator_utils.cc.o): in function `onnxruntime::CreateAllocator(onnxruntime::AllocatorCreationInfo const&)': 12.89 allocator_utils.cc:(.text._ZN11onnxruntime15CreateAllocatorERKNS_21AllocatorCreationInfoE+0x134): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: allocator_utils.cc:(.text._ZN11onnxruntime15CreateAllocatorERKNS_21AllocatorCreationInfoE+0x228): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: allocator_utils.cc:(.text._ZN11onnxruntime15CreateAllocatorERKNS_21AllocatorCreationInfoE+0x234): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: allocator_utils.cc:(.text._ZN11onnxruntime15CreateAllocatorERKNS_21AllocatorCreationInfoE+0x27c): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: allocator_utils.cc:(.text._ZN11onnxruntime15CreateAllocatorERKNS_21AllocatorCreationInfoE+0x2d4): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(allocator_utils.cc.o):allocator_utils.cc:(.text._ZN11onnxruntime15CreateAllocatorERKNS_21AllocatorCreationInfoE+0x308): more undefined references to `__libc_single_threaded' follow 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(allocator_utils.cc.o): in function `onnxruntime::CreateAllocator(onnxruntime::AllocatorCreationInfo const&)': 12.89 allocator_utils.cc:(.text._ZN11onnxruntime15CreateAllocatorERKNS_21AllocatorCreationInfoE+0x9ac): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(prog.cc.o): in function `re2::Prog::Optimize()': 12.89 prog.cc:(.text._ZN3re24Prog8OptimizeEv+0x350): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(prog.cc.o): in function `re2::Prog::Flatten()': 12.89 prog.cc:(.text._ZN3re24Prog7FlattenEv+0x384): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: prog.cc:(.text._ZN3re24Prog7FlattenEv+0x944): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: prog.cc:(.text._ZN3re24Prog7FlattenEv+0xa08): undefined reference to `std::__throw_bad_array_new_length()' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(prog.cc.o):prog.cc:(.text._ZN3re24Prog7FlattenEv+0xa0c): more undefined references to `std::__throw_bad_array_new_length()' follow 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(init.c.o): in function `xnn_initialize': 12.89 init.c:(.text.xnn_initialize+0x34): undefined reference to `__aarch64_cas8_sync' 12.89 /usr/bin/ld: /code/target/release/deps/libort_sys-199844376b12802e.rlib(xnnpack_init.cc.o): in function `std::shared_ptr::~shared_ptr()': 12.89 xnnpack_init.cc:(.text._ZNSt10shared_ptrIN11onnxruntime10IAllocatorEED2Ev[_ZNSt10shared_ptrIN11onnxruntime10IAllocatorEED5Ev]+0x14): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: xnnpack_init.cc:(.text._ZNSt10shared_ptrIN11onnxruntime10IAllocatorEED2Ev[_ZNSt10shared_ptrIN11onnxruntime10IAllocatorEED5Ev]+0x18): undefined reference to `__libc_single_threaded' 12.89 /usr/bin/ld: xnnpack_init.cc:(.text._ZNSt10shared_ptrIN11onnxruntime10IAllocatorEED2Ev[_ZNSt10shared_ptrIN11onnxruntime10IAllocatorEED5Ev]+0x5c): undefined reference to `__libc_single_threaded' 12.89 collect2: error: ld returned 1 exit status 12.89 12.89 = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified 12.89 = note: use the `-l` flag to specify native libraries to link 12.89 = 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) 12.89 12.90 error: could not compile `ort-test` (bin "ort-test") due to 1 previous error ------ Dockerfile:16 -------------------- 14 | COPY model.onnx model.onnx 15 | 16 | >>> RUN cargo build --release 17 | 18 | # run stage -------------------- ERROR: failed to solve: process "/bin/sh -c cargo build --release" did not complete successfully: exit code: 101 View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/utj13uhdp8yrn05smr4wwg0si ```
decahedron1 commented 2 hours ago

Try libstdc++-12-dev

PierreLouisLetoquart commented 2 hours ago

Does it requires somthing like:

fn main() {
    println!("cargo:rustc-link-lib=dylib=stdc++");
}

Never deal with that type of things ://

PierreLouisLetoquart commented 2 hours ago
 > [builder 3/9] RUN apt-get update &&     apt-get install -y     libstdc++-12-dev:
0.152 Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
0.188 Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [27.2 kB]
0.201 Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
0.240 Get:4 http://deb.debian.org/debian bullseye/main arm64 Packages [7955 kB]
0.455 Get:5 http://deb.debian.org/debian-security bullseye-security/main arm64 Packages [301 kB]
0.461 Get:6 http://deb.debian.org/debian bullseye-updates/main arm64 Packages [16.3 kB]
1.110 Fetched 8460 kB in 1s (8447 kB/s)
1.110 Reading package lists...
1.449 Reading package lists...
1.782 Building dependency tree...
1.851 Reading state information...
1.909 E: Unable to locate package libstdc++-12-dev
1.909 E: Couldn't find any package by regex 'libstdc++-12-dev'
decahedron1 commented 2 hours ago

Oh, how fun, minideb:latest isn't actually latest, but based on bullseye. The ONNX Runtime binaries provided by ort are built on Ubuntu 22.04 and thus require something closer to bookworm; try using bitnami/minideb:bookworm instead, or a non-minimal container like cimg/rust just to verify everything else works and then working backwards from there.

audioXD commented 2 hours ago

Can you use debian bookworm instead of bullseye (it has libstdc++-12-dev)?

PierreLouisLetoquart commented 2 hours ago

I'll do that

PierreLouisLetoquart commented 2 hours ago

Works perfectly, requires to manually add libstdc++-12-dev

Dockerfile:

FROM rust:1.82-slim-bookworm AS builder
WORKDIR /code

RUN apt-get update && \
    apt-get install -y \
    libstdc++-12-dev

RUN USER=root cargo init

COPY Cargo.toml Cargo.lock ./
RUN cargo fetch

COPY src src
COPY model.onnx model.onnx

RUN cargo build --release

# run stage
FROM bitnami/minideb:bookworm
WORKDIR /app

COPY --from=builder /code/model.onnx model.onnx
COPY --from=builder /code/target/release/ort-test ort-test

USER 1001

CMD [ "/app/ort-test" ]
PierreLouisLetoquart commented 2 hours ago

Or no need to manually add libstdc++-12-dev with (none slim) bookworm. Thanks @audioXD , @decahedron1 sooo much