shc
shc copied to clipboard
Compiled script using -H won't run on other machine.
Hello SHC 4.0.3
I've compiled my script using: shc -r -H -U -f test.sh -o test
When run on the server it's compiled on it works fine, when run on another server I get 2 lines of output:
sh: cc: command not found
sh: cc: command not found
Looking at the users on both systems they both has there default shell as /bin/bash
The script also starts #!/bin/bash
Any idea how to resolve this ? Thanks
I've just rebuilt shc on openSUSE 15.1 Before doing this I tried the following:
CC=/usr/bin/gcc
export CC=/usr/bin/gcc
./configure
make
sudo make install
I then ran shc using:
sudo shc -vrUH -f test.sh -o test
shc shll=bash
shc [-i]=-c
shc [-x]=exec '%s' "$@"
shc [-l]=
shc opts=
shc: cc test.sh.x.c -o test
shc: strip test
shc: chmod ug=rwx,o=rx test
When test is run on the machine it was built on I get:
linux-18ds:/home/user # ./test
Working OK
On a different machine I get:
./test
Operation not permitted
Killed
When run with sudo I get:
default@linux-c0a9:/home/test> sudo ./test
[sudo] password for root:
sh: cc: command not found
sh: cc: command not found
How do I get this working ? Thanks
I've the same problem. Is there any solution?
@MadTomT @khalequzzaman17 Did either of you figure out the solution to this problem?
I've not looked at this for a while, but I didn't get it working.
did you try;
CFLAGS="-static" shc -r -f input.sh -o output
?
It works for me in simmilar problem.