SHC Compiler [ERROR] AIX

Hello there,

I�m compiling a shell script under UNIX AIX 5.3 operating system.

I�m facing a �glitch� when I tried to run the .x file AIX sent the error message �Killed�.

# rpm -qa 
libgcc-4.2.0-3
libstdc++-4.2.0-3
gcc-4.2.0-3
libstdc++-devel-4.2.0-3
gcc-c++-4.2.0-3

# make
***  �Do you want to probe shc with a test script?
***  Please try... make test
Target "all" is up to date.
 
# ./shc -v -r -f script
shc shll=ksh
shc [-i]=-c
shc [-x]=exec '%s' "$@"
shc [-l]=
shc opts=
shc: cc  script.x.c -o script.x
shc: strip script.x
shc: chmod go-r script.x
 
# ./script.x
Killed
 
# echo $? 
137
This error is a signal 9
 
# type gcc
gcc is /usr/bin/gcc
 
# type cc
cc is /usr/bin/cc

Does anyone have any idea about that?
Thanks a lot

---------- Post updated at 12:28 PM ---------- Previous update was at 11:30 AM ----------

All,

I put the command make clean and run make again and after make test, take a look the output:

# make test
*** Compiling script "match"
 CFLAGS="-Wall -O6 -pedantic" ./shc -v -f match
shc shll=sh
shc [-i]=-c
shc [-x]=exec '%s' "$@"
shc [-l]=
shc opts=
shc: cc -Wall -O6 -pedantic match.x.c -o match.x
match.x.c:113: warning: string length '1043' is greater than the length '509' ISO C90 compilers are required to support
shc: strip match.x
shc: chmod go-r match.x
*** Running a compiled test script!
*** It must show files with substring "sh" in your PATH...
 ./match.x sh
make: The signal code from the last command is 9.

Stop.

Thanks!!!

:cool:Well, after a lot of research the problem was resolved !!! :wink:

I installed in an AIX 5.3 32bits and it worked perfectly.

When installed on AIX 64bits something can not interpret the function TRACEABLE on software.

1 - Install and run the program generating the binary:

$./shc -v -r -f test
shc shll = ksh
shc [-i] =- c
shc [-x] = exec '% s' "$ @"
shc [-l] =
shc opts =
shc: cc teste.x.c it teste.x
shc: strip teste.x
shc: chmod go-r teste.x

2 - Run the binary generated, will give the error (Killed) :confused: :eek:

$./teste.x
Killed
  • To work I deleted the option traceable, the possibility of trying to scan the script to check its contents.

  • Taking this option is not possible to scan the generated script teste.x.

  • In the script generated in C teste.x.c, draw the following lines (at end of file) :wink: :

#if !TRACEABLE
        untraceable(argv[0]);
#endif
  • Now run the command to build again in the file C teste.x:
$ cc teste.x.c -o teste.x
  • Running the script again teste.x generated: :smiley: :rolleyes:
$./teste.x
SOFTWARE TESTING SHC!
  • It worked!! :b:

Thanks for help Marcelo Ramos from IBM.

= Jefferson Lima Aredes =

Hi,

You could use "shc -T -f test",It works fine in AIX 5.3

Regards,
Sam