elfexec icon indicating copy to clipboard operation
elfexec copied to clipboard

Not working with PyInstaller

Open vdun opened this issue 3 years ago • 1 comments

# cat h.py
print('hello')
# pyinstaller -F -c h.py
...
# cat ./dist/h | elfexec
[1518521] Cannot open PyInstaller archive from executable (/memfd:elfexec (deleted)) or external archive (/memfd:elfexec (deleted).pkg)

vdun avatar Dec 13 '22 10:12 vdun

PyInstaller use bootloader and try to open executed file itself via /proc/self/exe to unpack it to temppath/_MEIxxxxxx. But if you cat-ing executable file, where is no file on disk to open:

readlink("/proc/self/exe", "/memfd:elfexec (deleted)", 4095) = 24
openat(AT_FDCWD, "/memfd:elfexec (deleted)", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/memfd:elfexec (deleted).pkg", O_RDONLY) = -1 ENOENT (No such file or directory)

I have no idea how to workaround it with PyInstaller binaries.

abbat avatar Dec 17 '22 12:12 abbat