System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to find the installed compiler in HPUX 11.11

SOLVED
Go to solution
senthil_kumar_1
Super Advisor

How to find the installed compiler in HPUX 11.11

Hi All,

I am new to HP-UX.

My team lead asked me that what is the compiler has been installed (like C / C++ / COBOL) in one of hpux server (HPUX 11.11).

I used below command to find the compiler

# swlist -l product | grep -i compiler
C-ANSI-C B.11.11.04 HP C/ANSI C Compiler
CPS B.11.00 Compiler Parallel Support Library



So as per above output the C compiler has been installed, am i correct?





21 REPLIES
Pete Randall
Outstanding Contributor
Solution

Re: How to find the installed compiler in HPUX 11.11

Yes.

You should probably be aware that there is a stripped down, basic version of the C compiler installed on every HP-UX system. It is intended to compile the kernel and is not much good for anything else.

You, however, have the full-blown ANSI-C compiler, so that's a good thing.


Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: How to find the installed compiler in HPUX 11.11

Hi:

> So as per above output the C compiler has been installed, am i correct?

Yes.

Regards!

...JRF...
senthil_kumar_1
Super Advisor

Re: How to find the installed compiler in HPUX 11.11

Can i install the same "C-ANSI-C B.11.11.04 HP C/ANSI C Compiler" in HPUX 11i V3?

Is it possible?

If not, which version of "ANSI-C Compiler" supports HPUX 11i v3?



Pete Randall
Outstanding Contributor

Re: How to find the installed compiler in HPUX 11.11

I believe you will need to get a version specific to 11iV3. Check here:

https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B9007AA


Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: How to find the installed compiler in HPUX 11.11

Hi (again):

Can i install the same "C-ANSI-C B.11.11.04 HP C/ANSI C Compiler" in HPUX 11i V3?

No you cannot. A much newer bundle gives you both C and C++. The link Pete offered is correct.

Regards!

...JRF...
Dennis Handly
Acclaimed Contributor

Re: How to find the installed compiler in HPUX 11.11

You have an old version of C installed, Dec 2001. For the current version see:
http://www.hp.com/go/c

>Can I install the same "C-ANSI-C B.11.11.04 HP C/ANSI C Compiler" in HP-UX 11i V3? Is it possible?

It might be possible but it wouldn't be supported.
Is your 11.31 system PA or Integrity?

senthil_kumar_1
Super Advisor

Re: How to find the installed compiler in HPUX 11.11

It is a guest OS of Integrity VM.
Dennis Handly
Acclaimed Contributor

Re: How to find the installed compiler in HPUX 11.11

>It is a guest OS of Integrity VM.

So it is Integrity.
You can't install an obsolete PA compiler on Integrity.
senthil_kumar_1
Super Advisor

Re: How to find the installed compiler in HPUX 11.11

Hi All,

I have installed guest OS (HPUX 11.31) on Integrity VM.

I need to install ANSI-C compiler for that OS.

I checked if ANSI-C compiler is already installed?

# swlist -l product | grep -i compile
COMPLIBS B.11.31 Compiler Support Libraries
PHCO_36769 1.0 linker/compiler English manpages
PHCO_37027 1.0 linker/compiler Japanese patch



where we can download the ANSI-C compiler as depot from?

Dennis Handly
Acclaimed Contributor

Re: How to find the installed compiler in HPUX 11.11

>where we can download the ANSI-C compiler as depot from?

You must purchase it. Or you can download gcc.
http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=e9083a7373f021103a7373f02110275d6e10RCRD
senthil_kumar_1
Super Advisor

Re: How to find the installed compiler in HPUX 11.11

Hi Dennis,

Is gcc is C++ compiler?

what is the download location to gcc compiler?

what is the cost of C-ANSI-Compiler?

Pete Randall
Outstanding Contributor

Re: How to find the installed compiler in HPUX 11.11

> Is gcc is C++ compiler? Yes

> what is the download location to gcc compiler?

http://hpux.connect.org.uk/hppd/hpux/Gnu/gcc-4.2.3/

> what is the cost of C-ANSI-Compiler? $996

https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B9007AA


Pete

Pete
senthil_kumar_1
Super Advisor

Re: How to find the installed compiler in HPUX 11.11

Hi All,

I have installed the C-ANSI-Compiler.

How to check whether it is working fine.
Pete Randall
Outstanding Contributor

Re: How to find the installed compiler in HPUX 11.11

> How to check

Uhhhh . . . . . compile something?


Pete

Pete
Raj D.
Honored Contributor

Re: How to find the installed compiler in HPUX 11.11

Senthil:

>I have installed the C-ANSI-Compiler.
>How to check whether it is working fine.


Following steps can be done to check :
1. # swlist -l | grep -i -e C-ANSI -e C++
# swlist -l fileset -a state | grep -i -e C-ANSI -e C++



2. Compile a simple program and check the output:

# vi test1.c # & save the file

#include
main ()
{
printf ("Welcome! This is a test.\n");
printf ("------------------------\n");
}



- Check with : # which cc
[ Make sure this is refereing the correct cc : path for cansi that installed currently. ]

- Compile & execute:
# cc test1.c -o test1
# chmod +x test1 ; ./test1

If output looks ok, you are done.


Cheers,
Raj.



" If u think u can , If u think u cannot , - You are always Right . "
Suraj K Sankari
Honored Contributor

Re: How to find the installed compiler in HPUX 11.11

Hi,
>>How to check whether it is working fine

If you have any c or c++ code then compile the same or else download from net any c/c++ program and compile.

Suraj
Dennis Handly
Acclaimed Contributor

Re: How to find the installed compiler in HPUX 11.11

>Is gcc is C++ compiler?

No, that's a C compiler. You really should use g++ when compiling and linking C++ sources.

>How to check whether it is working fine.

You should see something like this for swlist:
B9007AA B.11.11.20 HP C/aC++ Developer's Bundle

By definition if it is installed, it works fine. :-)
senthil_kumar_1
Super Advisor

Re: How to find the installed compiler in HPUX 11.11

Hi Raj,

I tried your insturction.

But when compiling i am getting following error.

# cc test1.c -o test1
Internal Error: Corrupted codeword in file /opt/aCC/newconfig/aCC.cwd.


Then i checked that file:

# more /opt/aCC/newconfig/aCC.cwd
6429351087c3366d6f30124070


How to solve this?
Raj D.
Honored Contributor

Re: How to find the installed compiler in HPUX 11.11

Senthil,

It looks like a licnese /codeword issue,

Have you applied the HP C++ codeword correctly, that came in a printed paper or you may got from HP licensing support:


Check this link for 'Internal Error: Corrupted codeword' issue :


http://forums11.itrc.hp.com/service/forums/questionanswer.do?&threadId=1290876

http://www.unix.com/hp-ux/25238-ansi-c-compiler-hp-ux-11-11-a.html

hth,
Raj.


" If u think u can , If u think u cannot , - You are always Right . "
Dennis Handly
Acclaimed Contributor

Re: How to find the installed compiler in HPUX 11.11

>But when compiling I am getting following error.
Internal Error: Corrupted codeword in file /opt/aCC/newconfig/aCC.cwd.
>How to solve this?

Make sure you don't have a DOS file with a CR on the end of the line. See dos2ux(1).
senthil_kumar_1
Super Advisor

Re: How to find the installed compiler in HPUX 11.11

Hi Dennis,

You are correct now it is working fine.