Open hexclann opened 3 years ago
try CFLAGS="-static" shc -U -r -f myscript.sh -o myscript
glibc-static package need to be installed on a Fedora base OS. I think this issue can be closed.
Well , we have the same problem :
We should find a way to maximize portability across generation of distribution
CFLAGS="-static"
solved it for me. Now I can compile in Ubuntu 22.04 and run in Ubuntu 20.04. Thanks @RandomOS!
PS: should work for you too, @freechelmi.
I'm compiling the bash script in a machine, I want to use it different OS, but not all the OS has the same glibc version so the binary will fail with a message :
I'm compiling the shell script with the command -
shc -U -r -f myscript.sh -o myscript
How to make my script to compatible with multiple OS?