JonathonReinhart / staticx

Create static executable from dynamic executable
https://staticx.readthedocs.io/
Other
345 stars 37 forks source link

run centos 6 failed #126

Closed peterlus closed 2 years ago

peterlus commented 4 years ago

build on debian 9, worked well in debian/ubuntu and centos7 only exceptions on centos 6 with following error:

/bin/sh: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /tmp/_MEIWJZnVe/libtinfo.so.5)

source file is simple:

import os
if __name__ == '__main__':
    uuid = os.popen("dmidecode | grep 'UUID'").read().strip().replace('UUID: ', '')
    print(uuid)

seems it failed on execute with os.popen and subprocess

JonathonReinhart commented 4 years ago

Hi @peterlus.

Can you provide more information about what you're building?

I see Python code, so I'm assuming you're using staticx to wrap up a PyInstaller single-binary output. But I also see that you're trying to run dmidecode. Does your program expect dmidecode to already be installed on the target system? Or are you bundling it in your PyInstaller application? Or am I misunderstanding your use-case entirely?

I'm currently thinking that you're relying on dmidecode to be on the target system. It's possible, although I'm not sure how, that the staticx bootloader is somehow affecting the environment and preventing dmidecode from running.

If you're bundling dmidecode from a newer OS in a PyInstaller app, then that is the problem: staticx doesn't work recursively on bundled applications.

JonathonReinhart commented 4 years ago

Hi @peterlus.

Version v0.11.0 was just released which contains #139, a major fix for NSS, and #138 which should prevent incorrect libraries from being attempted to be loaded in the first place.

I encourage you to try it out and report back!

JonathonReinhart commented 2 years ago

Haven't heard anything in a very long time.