SHC Compiler [ERROR] AIX


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting SHC Compiler [ERROR] AIX
# 1  
Old 11-06-2009
Data 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”.

Code:
# 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:

Code:
# 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!!!

Last edited by pludi; 11-06-2009 at 01:35 PM.. Reason: code tags, please...
# 2  
Old 11-25-2009
Problem Solved

SmilieWell, after a lot of research the problem was resolved !!! Smilie

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:

Code:
$./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) Smilie Smilie

Code:
$./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) Smilie :

Code:
#if !TRACEABLE
        untraceable(argv[0]);
#endif

- Now run the command to build again in the file C teste.x:

Code:
$ cc teste.x.c -o teste.x

- Running the script again teste.x generated: Smilie Smilie

Code:
$./teste.x
SOFTWARE TESTING SHC!

- It worked!! Smilie

Thanks for help Marcelo Ramos from IBM.

= Jefferson Lima Aredes =
# 3  
Old 04-26-2010
Hi,

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

Regards,
Sam
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Explanation of C Compiler for AIX

Hi, I have the following packages installed on my AIX server xlC.aix50.rte 10.1.0.2 COMMITTED XL C/C++ Runtime for AIX 5.3 xlC.cpp 9.0.0.0 COMMITTED C for AIX Preprocessor xlC.msg.en_US.cpp 9.0.0.0 COMMITTED C for AIX Preprocessor xlC.msg.en_US.rte 10.1.0.2 COMMITTED XL C/C++ Runtime xlC.rte... (4 Replies)
Discussion started by: jimthompson
4 Replies

2. Shell Programming and Scripting

shc compiler issue

I am using the shc shell compiler, it works fine, just that when i execute it, it displays the code at the terminal. Is there any way to hide this as well? otherwise it beats the purpose of hiding the code. Thanks ! (7 Replies)
Discussion started by: ysvsr1
7 Replies

3. AIX

AIX Xlc compiler

Hi Team I have a native applicaiton built on AIX using the xLC v8 Which could be the possible impacts from a code change point of view if I'll compile with the xLC v10? Thanks Marco (0 Replies)
Discussion started by: antcos
0 Replies

4. AIX

C++ compiler for AIX

please I want a help to how can I get C++ compiler to AIX OS. (3 Replies)
Discussion started by: Ahmed waheed
3 Replies

5. AIX

How to install gcc compiler on AIX?

I want to install gcc compiler on aix box. $uname -a AIX GTMIT 3 5 000000000000 Can any one help me installing gcc compiler(step by step)either by smit or rpm commands ? What is boot straping ? Its urgent .. Thanks in advance (2 Replies)
Discussion started by: kittu1979
2 Replies

6. HP-UX

Failed to install shell script compiler (shc)

I have install gcc, downloaded shc-3.8.6 and extracted in /install > cd /install/shc-3.8.6 > export CC=/usr/local/bin/gcc > make cleanall > make test "Makefile" 72 lines, 1526 characters # make test /usr/local/bin/gcc -Wall -O6 -pedantic shc.c -o shc *** Compiling script "match"... (0 Replies)
Discussion started by: alfredo
0 Replies

7. AIX

AIX 5.3 gcc compiler

Hi there I've got a problem getting my mysql libraries to work. every time I compile my source code it gives my a compiler error. Cannot find a rule to create target /usr/include/mysql/mysql.h AND /usr/include/mysql/mysql.h: Permission denied Is anyone fimiliar with this error, and can... (1 Reply)
Discussion started by: cipher#1
1 Replies

8. UNIX for Dummies Questions & Answers

AIX 5.3 gcc compiler

Hi there I've got a problem getting my mysql libraries to work. every time I compile my source code it gives my a compiler error. Cannot find a rule to create target /usr/include/mysql/mysql.h AND /usr/include/mysql/mysql.h: Permission denied Is anyone fimiliar with this error, and can... (0 Replies)
Discussion started by: cipher#1
0 Replies

9. Shell Programming and Scripting

shc: shell compiler?

Has anyone ever gotten shc compiler program to work. I am trying to encrypt a bash script on centos. When I run the command "shc -f test.sh", the binary actually gets created; however, when I try to run the binary I get the following the error: # ./test.sh.x ./test.sh.x: No such file or... (1 Reply)
Discussion started by: cstovall
1 Replies

10. AIX

gcc compiler on AIX 5.2

Does anybody know a web site where I could download gcc for AIX 5.2 (I've downloaded gcc 3.2 from http://www.bullfreeware.com/, but it doesn't work)? Thanks a lot for your answers. (2 Replies)
Discussion started by: SMISS
2 Replies
Login or Register to Ask a Question