exodus icon indicating copy to clipboard operation
exodus copied to clipboard

pyinstaller --onefile output elf does not work

Open cainiaocome opened this issue 6 years ago • 1 comments

os: ubuntu16.04 server cpu: x86-64 python: 3.6.3

"pyinstaller --onefile t.py" output an elf file, t.

exodus ./dist/t -o /tmp/t -> ok

/tmp/t -> ok

/opt/exodus/bin/t -> error

error detail:

[4092] Cannot open self /opt/exodus/bundles/3cad7d5bdde37965bddba10dea540f3609875ee80cb5215cabb459b05c5880ea/root/tmp/dist/linker-6d0bfd685a7ad6dfccae1fae70c1f06018a0f756c53de0aabb609456a10f3747 or archive /opt/exodus/bundles/3cad7d5bdde37965bddba10dea540f3609875ee80cb5215cabb459b05c5880ea/root/tmp/dist/linker-6d0bfd685a7ad6dfccae1fae70c1f06018a0f756c53de0aabb609456a10f3747.pkg

cainiaocome avatar Apr 27 '18 07:04 cainiaocome

This is most likely happening because the pyinstaller bundle is probably using readlink("/proc/self/exe") to determine its own location. That corresponds to the linker rather than the original executable in an Exodus bundle. This is also an issue for several other complex applications like Firefox. There are plans in place to preload a readlink symbol which "lies" about the executable path, but this is made difficult by the fact that different systems might have very different glibc versions.

I'm guessing that it doesn't work if you don't use --onefile either? If the pyinstaller bundle only uses /proc/self/exe to determine the directory, and then expects a specific filename within that directory for the package, it might work.

sangaline avatar Apr 27 '18 11:04 sangaline