Operating System - HP-UX
1834018 Members
2236 Online
110063 Solutions
New Discussion

How to know that is a cc compilor

 
SOLVED
Go to solution
Frank de Vries
Respected Contributor

How to know that is a cc compilor

He geezers,

I thought I had ANSI C installed on our hp11 (64bit) system.
But when I tried to compile, it started to
give me aggro.

[root@orasrv1:]/root<>>> cc -Aa -g priv_glob.c -o priv_glob
(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C product; ignored.

which cc gives
/usr/bin/cc. So that's not it then ?
What am I looking for ?



Look before you leap
8 REPLIES 8
Pete Randall
Outstanding Contributor

Re: How to know that is a cc compilor

Frank,

The "(Bundled)" notation gives it away. This is the freebie. The real ANSI C should show up in swlist as just that.


Pete

Pete
Peter Godron
Honored Contributor

Re: How to know that is a cc compilor

Frank,
HP includes a simple C compiler, which is used in kernel compilation.

It's good enough for simple "hello world" C, but not much use for application development.
Check whether you have ANSI C installed which swlist command.

Most people recommend using the free gcc compiler from:
http://hpux.connect.org.uk/hppd/hpux/Gnu/gcc-4.1.0/
H.Merijn Brand (procura
Honored Contributor

Re: How to know that is a cc compilor

If it were installed correctly, /usr/bin/cc would have been re(sym_linked

a5:/ 102 > ls -l /usr/bin/cc /usr/ccs/bin/cc /opt/ansic/bin/cc
-r-xr-xr-x 1 bin bin 618496 Jan 25 2005 /opt/ansic/bin/cc
lr-xr-xr-t 1 root sys 17 Feb 17 2003 /usr/bin/cc -> /opt/ansic/bin/cc
lrwxr-xr-x 1 root sys 12 Feb 17 2003 /usr/ccs/bin/cc -> ./cc_bundled
a5:/ 103 > swlist -l bundle -l product -l subproduct | grep ANSI
# B3901BA B.11.02.10 HP C/ANSI C Developer's Bundle for HP-UX 11.0 (S800)
B3901BA.C-ANSI-C B.11.11.10 HP C/ANSI C Compiler
BUNDLE.PHSS_32509 1.0 ANSI C compiler B.11.11.12 cumulative patch
a5:/ 104 >

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
James R. Ferguson
Acclaimed Contributor

Re: How to know that is a cc compilor

Hi Frank:

Normally during installation of ANSI C, a link from '/usr/bin/cc' is created to point to the product.

# whereis cc
cc: /usr/bin/cc /usr/ccs/bin/cc /opt/ansic/bin/cc /opt/ansic/share/man/man1.Z/cc
.1

# ls -l /usr/bin/cc
lr-xr-xr-t 1 root sys 17 Jan 29 2004 /usr/bin/cc -> /opt/an
sic/bin/cc

Regards!

...JRF...
H.Merijn Brand (procura
Honored Contributor

Re: How to know that is a cc compilor

That was the output on 11.00, here's the same for 11.11:

r3:/ 102 > ls -l /usr/bin/cc /usr/ccs/bin/cc /opt/ansic/bin/cc
-r-xr-xr-x 1 bin bin 692224 Feb 1 17:00 /opt/ansic/bin/cc
lr-xr-xr-t 1 root sys 17 Jun 28 2004 /usr/bin/cc -> /opt/ansic/bin/cc
lrwxr-xr-x 1 root sys 12 Jun 28 2004 /usr/ccs/bin/cc -> ./cc_bundled
r3:/ 103 > swlist -l bundle -l product -l subproduct | grep ANSI
# B3901BA B.11.11.14 HP C/ANSI C Developer's Bundle for HP-UX (S800)
B3901BA.C-ANSI-C B.11.11.14 HP C/ANSI C Compiler
r3:/ 104 >

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Arunvijai_4
Honored Contributor
Solution

Re: How to know that is a cc compilor

Hi,

You can do two things,

# what `which cc`

It will give the version information,

# swlist -l file |grep -i "/usr/bin/cc"

It will display where it is from.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Frank de Vries
Respected Contributor

Re: How to know that is a cc compilor

that all figures.
fast replies get top marks !!

Look before you leap
Frank de Vries
Respected Contributor

Re: How to know that is a cc compilor

[root@orasrv2:]/root<>>> what `which cc`
/usr/bin/cc:
HP92453-01 A.11.00.00 HP C (Bundled) Compiler
CUPROS_IC23B //1
/ux/core/libs/libc/archive_pa1/libc.a_ID
Oct 21 1997 13:07:38

[root@orasrv2:]/root<>>> swlist -l file |grep -i "/usr/bin/cc"
OS-Core.CMDS-AUX: /usr/bin/ccat
PHCO_20035.CMDS-AUX: /usr/bin/ccat
[root@orasrv2:]/root<>>>

Look before you leap