indygreg / indygreg/PyOxidizer

thread 'main' panicked at 'failed to execute command: No such file or directory (os error 2)'

Open
#667 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
6.2k
Forks
256
PR merge metrics
No merged PRs in 30d

Description

I'm running PyOxidizer within a `ubi8-minimal` container (based on RHEL8). I'm attempting to package https://github.com/fabioz/mu-repo/ as a standalone binary. I've installed PyOxidizer through `pip3` in case that's helpful. And here's the full stacktrace of the error that I'm hitting

```
thread 'main' panicked at 'failed to execute command: No such file or directory (os error 2)', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/jemalloc-sys-0.5.2+5.3.0-patched/build.rs:326:19
stack backtrace:
0: rust_begin_unwind
at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:143:14
2: build_script_build::execute
at ./build.rs:326:19
3: build_script_build::run
at ./build.rs:319:5
4: build_script_build::main
at ./build.rs:257:5
5: core::ops::function::FnOnce::call_once
at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...
error[PYOXIDIZER_PYTHON_EXECUTABLE]: adding PythonExecutable to FileManifest

Caused by:
0: building Python executable
1: building executable with Rust project
2: cargo build failed
--> ./pyoxidizer.bzl:38:5
|
38 | files.add_python_resource(".", exe)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PythonExecutable.to_file_manifest()

error: adding PythonExecutable to FileManifest

Caused by:
0: building Python executable
1: building executable with Rust project
2: cargo build failed
```

This is the pyoxidizer.bzl file that I'm relying on: https://gist.github.com/wgordon17/f37e0500ba9998d0369d1c91ee1e3083

I don't have this issue when building on an `ubuntu` image, only the RHEL8-based image, and I can't figure out what the root cause is!

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure in the reported ubi8-minimal environment using the linked pyoxidizer.bzl, then compare it with an Ubuntu build. Read jemalloc-sys build.rs around line 326 and pyoxidizer.bzl around line 38, following the cargo build invoked while adding the Python resource. Done means the standalone build completes successfully on the RHEL8-based image or the missing command and required environment are clearly identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python, rust
Domain
build-system, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.