Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust error in Docker, libLLVM-15-rust-1.66.0-stable.so #736

Open
koltyakov opened this issue Feb 6, 2024 · 0 comments
Open

Rust error in Docker, libLLVM-15-rust-1.66.0-stable.so #736

koltyakov opened this issue Feb 6, 2024 · 0 comments

Comments

@koltyakov
Copy link

koltyakov commented Feb 6, 2024

When running in Docker (ubuntu or debian based images) PyOxidizer fails with:

error[PYOXIDIZER_PYTHON_EXECUTABLE]: adding PythonExecutable to FileManifest
    
    Caused by:
        0: building Python executable
        1: resolving Rust toolchain
        2: error from command -- stderr:
           
           /root/.cache/pyoxidizer/rust/1.66.0-x86_64-unknown-linux-gnu/bin/rustc: error while loading shared libraries: libLLVM-15-rust-1.66.0-stable.so: cannot enable executable stack as shared object requires: Invalid argument
           
           stderr:
                 
      --> ./pyoxidizer.bzl:37:5
       |
    37 |     m.add_python_resource(".", exe)

Dockerfile sample fragment:

FROM rust:bookworm as builder

WORKDIR /home

RUN apt-get update && apt-get install -y wget python3 build-essential

RUN rustup target add x86_64-unknown-linux-musl

RUN wget https://github.com/indygreg/PyOxidizer/releases/download/pyoxidizer%2F0.24.0/pyoxidizer-0.24.0-x86_64-unknown-linux-musl.tar.gz
RUN tar -xzf pyoxidizer-0.24.0-x86_64-unknown-linux-musl.tar.gz
RUN mv pyoxidizer-0.24.0-x86_64-unknown-linux-musl/pyoxidizer /usr/local/bin/
RUN rm -rf pyoxidizer-0.24.0-x86_64-unknown-linux-musl.tar.gz pyoxidizer-0.24.0-x86_64-unknown-linux-musl

ADD pyoxidizer.bzl /home/pyoxidizer.bzl
ADD cli/ /home/cli/
ADD lib/schemas/ /home/lib/schemas/

RUN pyoxidizer build --release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant