- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- shc doesn't work
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2008 09:50 PM
08-18-2008 09:50 PM
But shc doesn't work on my server.
I have installed HP C/aC++ Compiler on the server.
Is there other compiler needed?
The version of shc is 3.8.6.
# ll
total 336
-rw-r--r-- 1 501 501 3549 Jul 10 2006 CHANGES
-rw-r----- 1 501 501 17982 May 10 1996 Copying
-rw-r----- 1 501 501 1525 Jun 16 2005 Makefile
-rwxr-x--- 1 501 501 336 Feb 22 2003 match
-rwxr-x--- 1 501 501 155 Jun 20 2003 pru.sh
-rwxr-xr-x 1 501 501 39767 Jul 10 2006 shc
-rw-r----- 1 501 501 3136 Jul 8 2004 shc.1
-rw-r----- 1 501 501 1544 Jun 19 2003 shc.README
-rw-r----- 1 501 501 24715 Jul 10 2006 shc.c
-rw-r----- 1 501 501 4558 Jul 8 2004 shc.html
-rwxr-xr-x 1 501 501 138 Nov 13 2004 test.bash
-rwxr-x--- 1 501 501 52 Jun 20 2003 test.csh
# make
*** ¿Do you want to probe shc with a test script?
*** Please try... make test
# make test
*** Compiling script "match"
CFLAGS="-Wall -O6 -pedantic" ./shc -v -f matchjavascript:postMessageSubmit('submit');
/usr/bin/sh: ./shc: Execute permission denied.
*** Error exit code 1
Stop.
Solved! Go to Solution.
- Tags:
- shc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2008 10:34 PM
08-18-2008 10:34 PM
Re: shc doesn't work
There is permission denied.
Please provide the the process to execute, it will better if you can give chmod 777. Then you try further.
Regards,
Gokul Chandola
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 01:06 AM
08-19-2008 01:06 AM
Re: shc doesn't work
There is no permission problem. It already is executable: -rwxr-xr-x shc
You should never use 777, at most use "chmod a+x".
Try "file shc". This is probably an executable for IPF (if on PA) or some foreign devil machine.
- Tags:
- foreign devil tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 03:32 AM
08-19-2008 03:32 AM
Re: shc doesn't work
provide following:
which shc
ll path to shc
after install shc should have 755...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 05:30 PM
08-19-2008 05:30 PM
Re: shc doesn't work
The error is identical.
# file shc
shc: ELF-32 executable object file
# which shc
no shc in /usr/sbin /usr/bin /usr/ccs/bin /usr/contrib/bin /usr/contrib/Q4/bin /opt/perl/bin /opt/ipf/bin /opt/hparray/bin /opt/nettladm/bin /opt/fcms/bin /usr/bin/X11 /opt/resmon/bin /opt/perf/bin /usr/contrib/kwdb/bin /opt/wbem/bin /opt/wbem/sbin /opt/graphics/common/bin /opt/prm/bin /opt/sfm/bin /opt/upgrade/bin /opt/wlm/bin /opt/sas/bin /opt/sec_mgmt/bastille/bin /opt/dsau/bin /opt/dsau/sbin /opt/firefox /opt/gnome/bin /opt/mozilla /opt/perl_32/bin /opt/perl_64/bin /opt/sec_mgmt/spc/bin /opt/ssh/bin /opt/swa/bin /opt/hpsmh/bin /opt/thunderbird /opt/gwlm/bin /usr/contrib/bin/X11 /opt/ignite/bin /opt/langtools/bin /opt/omni/bin /opt/omni/sbin /opt/omni/lbin /opt/hpnpl//bin /opt/cfg2html /opt/caliper/bin /tmp/tmp/tmp /opt/mx/bin /opt/aCC/bin /opt/sanmgr/commandview/client/sbin /sbin /home/root
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 09:44 PM
08-19-2008 09:44 PM
Re: shc doesn't work
#make cleanall
rm -f *.o *~ *.x.c
rm -f shc *.x
#make test
/opt/hp-gcc/bin/gcc -Wall -O6 -pedantic shc.c -o shc
*** 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: /opt/hp-gcc/bin/gcc -Wall -O6 -pedantic match.x.c -o match.x
match.x.c:105: warning: string length '931' is greater than the length '509' ISO C90 compilers are required to support
match.x.c: In function 'untraceable':
match.x.c:286: error: too few arguments to function 'ptrace'
./shc: Error 0
*** Error exit code
Stop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 09:57 PM
08-19-2008 09:57 PM
Re: shc doesn't work
>The error is identical.
># file shc
>shc: ELF-32 executable object file
This should work fine but only on IPF.
Since shc is small, could you attach it to your reply?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 11:04 PM
08-19-2008 11:04 PM
Re: shc doesn't work
These are the files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 11:42 PM
08-19-2008 11:42 PM
Re: shc doesn't work
>This should work fine but only on IPF.
Oops, didn't look close enough. This is from some foreign devil machine, most likely x86 linux. HP-UX IPF has:
/usr/bin/ksh: ELF-32 executable object file - IA64
elfdump doesn't like it either:
$ elfdump -f shc
*** ELF Header ***
Class: ELF-32
Data: Little-endian
OS: 0
ABI Version: 0
Type: EXEC
elfdump: Bad machine: 3 (elfdumperr 3004)
You need to remove shc, then make it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 11:55 PM
08-19-2008 11:55 PM
Re: shc doesn't work
I have remove shc.
# make cleanall
rm -f *.o *~ *.x.c
rm -f shc *.x
# make test
cc -Wall -O6 -pedantic shc.c -o shc
cc: error 1914: bad form for `-W' option
*** Error exit code 1
Stop.
# ll
total 256
-rw-r--r-- 1 501 501 3549 Jul 10 2006 CHANGES
-rw-r----- 1 501 501 17982 May 10 1996 Copying
-rw-r----- 1 501 501 1525 Jun 16 2005 Makefile
-rwxr-x--- 1 501 501 336 Feb 22 2003 match
-rwxr-x--- 1 501 501 155 Jun 20 2003 pru.sh
-rw-r----- 1 501 501 3136 Jul 8 2004 shc.1
-rw-r----- 1 501 501 1544 Jun 19 2003 shc.README
-rw-r----- 1 501 501 24715 Jul 10 2006 shc.c
-rw-r----- 1 501 501 4558 Jul 8 2004 shc.html
-rwxr-xr-x 1 501 501 138 Nov 13 2004 test.bash
-rwxr-x--- 1 501 501 52 Jun 20 2003 test.csh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2008 12:12 AM
08-20-2008 12:12 AM
Re: shc doesn't work
>cc: error 1914: bad form for `-W' option
These are gcc options. Just replace all those by -O. If you are on IPF, you can replace -Wall by +wlint.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2008 12:12 AM
08-20-2008 12:12 AM
Re: shc doesn't work
# whereis gcc
gcc: /opt/hp-gcc-4.3.1/bin/gcc /opt/hp-gcc/bin/gcc /opt/hp-gcc-4.3.1/man/man1/gcc.1 /opt/hp-gcc/man/man1/gcc.1
# CC=/opt/hp-gcc/bin/gcc
# export CC
# make cleanall
rm -f *.o *~ *.x.c
rm -f shc *.x
# make test
/opt/hp-gcc/bin/gcc -Wall -O6 -pedantic shc.c -o shc
*** 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: /opt/hp-gcc/bin/gcc -Wall -O6 -pedantic match.x.c -o match.x
match.x.c:109: warning: string length '991' is greater than the length '509' ISO C90 compilers are required to support
match.x.c: In function 'untraceable':
match.x.c:290: error: too few arguments to function 'ptrace'
./shc: Error 0
*** Error exit code 1
Stop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2008 12:13 AM
08-20-2008 12:13 AM
Re: shc doesn't work
it's maybe not an issue, but:
you have for example:
-rw-r----- 1 501 501 17982 May 10 1996 Copying
The owner and the group seems to be unknown!
I would change ownership to your test-user/group.
At the moment some files are not readable by users not in this group '501' - and normally a number means this user-/group-id is unknown by the system.
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2008 12:19 AM
08-20-2008 12:19 AM
Re: shc doesn't work
# ll
total 448
-rw-r--r-- 1 root sys 3549 Jul 10 2006 CHANGES
-rw-r----- 1 root sys 17982 May 10 1996 Copying
-rw-r----- 1 root sys 1525 Jun 16 2005 Makefile
-rwxr-x--- 1 root sys 336 Feb 22 2003 match
-rw------- 1 root sys 11194 Aug 23 16:10 match.x.c
-rwxr-x--- 1 root sys 155 Jun 20 2003 pru.sh
-rwx------ 1 root sys 80820 Aug 23 16:10 shc
-rw-r----- 1 root sys 3136 Jul 8 2004 shc.1
-rw-r----- 1 root sys 1544 Jun 19 2003 shc.README
-rw-r----- 1 root sys 24715 Jul 10 2006 shc.c
-rw-r----- 1 root sys 4558 Jul 8 2004 shc.html
-rwxr-xr-x 1 root sys 138 Nov 13 2004 test.bash
-rwxr-x--- 1 root sys 52 Jun 20 2003 test.csh
# make cleanall
rm -f *.o *~ *.x.c
rm -f shc *.x
# make test
/opt/hp-gcc/bin/gcc -Wall -O6 -pedantic shc.c -o shc
*** 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: /opt/hp-gcc/bin/gcc -Wall -O6 -pedantic match.x.c -o match.x
match.x.c:101: warning: string length '867' is greater than the length '509' ISO C90 compilers are required to support
match.x.c: In function 'untraceable':
match.x.c:282: error: too few arguments to function 'ptrace'
./shc: Error 0
*** Error exit code 1
Stop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2008 12:43 AM
08-20-2008 12:43 AM
Re: shc doesn't work
mine = !ptrace(PTRACE_ATTACH, pid, 0, 0, 0);
^^^
# make test
*** Running a compiled test script!
*** It must show files with substring "sh" in your PATH...
./match.x sh
./match.x: Function is not available
*** Termination signal 9
Stop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2008 12:57 AM
08-20-2008 12:57 AM
Solutionhttp://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1192978
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2008 01:53 AM
08-20-2008 01:53 AM
Re: shc doesn't work
Thanks all.