You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For situations where a (modern) Python is not available, it would be convenient if one can execute BenchExec (or at least runexec) as a tool with as few dependencies as possible. Not sure if this is really feasible, but we should investigate.
Possible variants of this:
A ZIP with a bundled Python and BenchExec, potentially even with a static build of Python, or one that only depends on an (old) libc.
I’d like to investigate this. My plan is to compare PyInstaller, Nuitka, and staticx to see which one best handles BenchExec's specific challenges—particularly the heavy ctypes usage for Linux syscalls/namespaces and the dynamic loading of tool modules.
I will start by attempting to bundle just runexec as a proof-of-concept, as it should be simpler than the full suite.
A few quick questions before I dive in: 1. Is a binary size of ~50-100MB acceptable? 2. Do you have a specific minimum target OS or glibc version in mind (e.g., Ubuntu 18.04)?
I’d like to investigate this. My plan is to compare PyInstaller, Nuitka, and staticx to see which one best handles BenchExec's specific challenges—particularly the heavy ctypes usage for Linux syscalls/namespaces and the dynamic loading of tool modules.
Thanks! I agree with you.
I will start by attempting to bundle just runexec as a proof-of-concept, as it should be simpler than the full suite.
Yes. And actually runexec is the most important part for this.
Is a binary size of ~50-100MB acceptable?
Certainly. If we manage to do this at all, size is secondary.
Do you have a specific minimum target OS or glibc version in mind (e.g., Ubuntu 18.04)?
Not really so far. The less dependencies the better, but there might be a tradeoff with effort, we have to see. Yesterday we had a use case where it would have been handy to run runexec on Ubuntu 20.04 (where Python is too old).
I've successfully implemented bundling of runexec using PyInstaller and created a pull request.
Results
Approach: PyInstaller Binary Size: 17 MB (well under the 50-100MB acceptable limit) Dependencies: Only standard system libraries (libc, libdl, libz, libpthread) Build Time: ~30 seconds
Testing Results
✅ All core features working:
Version check and help
Command execution
Resource limits (--memlimit, --timelimit)
Cgroups support and resource measurement
Container mode (on native Linux)
Implementation
Files added:
bundling_investigation/build_bundle.sh - Production build script
From a quick look, it seems like an interesting alternative. Since PyInstaller is working well for our current use case (17MB binary, all features working), we could keep BriefCase in mind for future improvements or if we encounter any limitations with PyInstaller.
Would you like me to do a quick comparison/investigation of BriefCase vs our current PyInstaller approach, or is the current solution sufficient for now?
Activity
saurabh12nxf commentedon Dec 19, 2025
Hi @PhilippWendler ,
I’d like to investigate this. My plan is to compare PyInstaller, Nuitka, and staticx to see which one best handles BenchExec's specific challenges—particularly the heavy ctypes usage for Linux syscalls/namespaces and the dynamic loading of tool modules.
I will start by attempting to bundle just runexec as a proof-of-concept, as it should be simpler than the full suite.
A few quick questions before I dive in: 1. Is a binary size of ~50-100MB acceptable? 2. Do you have a specific minimum target OS or glibc version in mind (e.g., Ubuntu 18.04)?
PhilippWendler commentedon Dec 19, 2025
Thanks! I agree with you.
Yes. And actually runexec is the most important part for this.
Certainly. If we manage to do this at all, size is secondary.
Not really so far. The less dependencies the better, but there might be a tradeoff with effort, we have to see. Yesterday we had a use case where it would have been handy to run runexec on Ubuntu 20.04 (where Python is too old).
Add PyInstaller-based bundling support for runexec (sosy-lab#1243)
saurabh12nxf commentedon Jan 3, 2026
Investigation Complete ✅
Hi @PhilippWendler,
I've successfully implemented bundling of
runexecusing PyInstaller and created a pull request.Results
Approach: PyInstaller
Binary Size: 17 MB (well under the 50-100MB acceptable limit)
Dependencies: Only standard system libraries (libc, libdl, libz, libpthread)
Build Time: ~30 seconds
Testing Results
✅ All core features working:
--memlimit,--timelimit)Implementation
Files added:
Usage:
cd bundling_investigation ./build_bundle.sh ./dist/runexec --versionPhilippWendler commentedon Jan 19, 2026
For the record: I just found BriefCase, which might also be a solution.
saurabh12nxf commentedon Jan 21, 2026
Hi @PhilippWendler ,
Thanks for sharing! I wasn't aware of BriefCase.
From a quick look, it seems like an interesting alternative. Since PyInstaller is working well for our current use case (17MB binary, all features working), we could keep BriefCase in mind for future improvements or if we encounter any limitations with PyInstaller.
Would you like me to do a quick comparison/investigation of BriefCase vs our current PyInstaller approach, or is the current solution sufficient for now?