Operating System - HP-UX
1819870 Members
2507 Online
109607 Solutions
New Discussion юеВ

HP 64-bit ANSI C Compiler

 
SOLVED
Go to solution
Nino Guba
Advisor

HP 64-bit ANSI C Compiler

Hi.

We just reinstalled HPUX11.00 64bit Kernel and found out we dont have the ANSI C compiler after install. Does this compiler come with the HPUX CDs or is it a separate product that we need to obtain?

Free? No? Any help will be very much appreciated.

Thanks!
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: HP 64-bit ANSI C Compiler

Ansi C compiler is a codeword protected add in product.

It's probably on the Core OS Cd

Its definitely on the Application CD


You can buy it online or perhaps from a reseller.
http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B3899BA

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Stf
Esteemed Contributor

Re: HP 64-bit ANSI C Compiler

Hello,

ANSI C compiler isn't bundled with HPUX 11.00 and as far as i know it required a licence.
The gnu gcc compiler is free and works well on hpux...

Stf ;-)
A. Clay Stephenson
Acclaimed Contributor

Re: HP 64-bit ANSI C Compiler

The only compiler that comes with HP-UX is the Bundled C compiler. It does not speak ANSI and is really only intended for building kernels. You need to purchase either ANSI/C or aCC. ANSI/C speaks ANSI and K&R C. aCC speaks ANSI/C and C++. Both of these must be purchased from HP. They are on any Applications CD set but you will need a codeword from HP to unlock/install them.

Your other option is gcc available from any of the HP-UX Porting Centre's for free.
If it ain't broke, I can fix that.
Nino Guba
Advisor

Re: HP 64-bit ANSI C Compiler

Thanks for all the replies.

I believe we specifically need the ANSI/C. We know about gcc but we definitely need the ANSI/C for the stuff we need to do.

Ok you mentioned about a codeword. We actually have the ANSI/C compiler loaded on our 32-bit HPUX11 and it is working fine. Is it possible to obtain this codeword from there?

As far as we know, we lost the CD or any material that lets us install the ANSI/C compiler. Too bad.
A. Clay Stephenson
Acclaimed Contributor

Re: HP 64-bit ANSI C Compiler

Sorry that dog won't hunt. The codeword is specific to a Part No. - a particular CD set. If you are under a support agreement, you can transfer the license and request a new codeword.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: HP 64-bit ANSI C Compiler

I should point out that your 32-bit HP-UX 11x box is perfectly capable of producing 64-bit code eventhough it won't be able to execute it. Simply compile your code using the "+DD64" option on your 32-bit box and then transfer the executable to your 64-bit box.

This does assume that your 32-bit box and your 64-bit boxes are both 11.0; 11.11 code will not run on (reliably) 11.0.

If you can find your application CD's AND you do a swremove of ANSI/C from your 32-bit box so that you have only a single version of the compiler installed AND the two machines are of equal tier --- I'm getting all the licensing ducks in a row --- then you should be able to find your codewords under /var/adm/sw. on yoiur 32-bit box. If you need to run ANSI/C on both boxes then you will have to purchase another license.
If it ain't broke, I can fix that.
derek b smith_1
Regular Advisor

Re: HP 64-bit ANSI C Compiler

How can I tell the HPUX 11.11 system to not use it default braindead C compiler /usr/bin/cc but instead use gcc version 4.1.1?

I manually edited the Makefile to point CC=/usr/local/bin/gcc but I get the errors below:

Do I need an ANSI C compiler?



Please advise!



Thank you

Derek



As root:



# make

Manifying ../blib/man3/Proc::ProcessTable::Process.3

/usr/local/bin/gcc -c -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_H

PUX_SOURCE -Wl,+vnocompatwarnings -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFF

SET_BITS=64 -fast +Onolimit +Opromote_indirect_calls +DAportable +DS2.0 -DVER

SION=\"0.40\" -DXS_VERSION=\"0.40\" +Z "-I/opt/perl/lib/5.8.2/PA-RISC1.1-thread

-multi/CORE" ProcessTable.c

gcc: +Onolimit: No such file or directory

gcc: +Opromote_indirect_calls: No such file or directory

gcc: +DAportable: No such file or directory

gcc: +DS2.0: No such file or directory

gcc: +Z: No such file or directory

cc1: error: unrecognized command line option "-fast"

*** Error exit code 1







Here is my cc version info:



# cc -V -v derek.c junk

(Bundled) cc: NLSPATH is /usr/lib/nls/msg/%L/%N.cat:/usr/lib/nls/msg/C/%N.cat:

(Bundled) cc: CCOPTS is not set.

(Bundled) cc: INCLUDIR is INCLUDIR=/usr/include

/usr/ccs/lbin/cpp derek.c /var/tmp/ctmAAAa01455 -$ -D__hp9000s800 -D__hppa -D__h

pux -D__unix -V -D_ILP32 -D_PA_RISC2_0 -D__CLASSIC_C__ -j

(Bundled) cc: Entering Preprocessor.

cpp: HP92453-01 B.11.11.02 HP C (Bundled) Preprocessor

/usr/ccs/lbin/ccom /var/tmp/ctmAAAa01455 derek.o -Fderek.c -V

ccom: HP92453-01 A.11.01.21 HP C (Bundled) Compiler

(Bundled) cc: "derek.c", line 1: warning 501: Empty source file.

(Bundled) cc: LPATH is /usr/lib:/opt/langtools/lib:

/usr/ccs/bin/ld /usr/ccs/lib/crt0.o -u main -V derek.o junk -lc

(Bundled) cc: Entering Link editor.

/usr/ccs/bin/ld: 92453-07 linker linker ld B.11.40 040530

/usr/ccs/bin/ld: Can't open junk

/usr/ccs/bin/ld: No such file or directory
A. Clay Stephenson
Acclaimed Contributor

Re: HP 64-bit ANSI C Compiler

A very easy check is:

cc -Aa bogusfile.c

If you are running the Bundled compiler, you will get a warning that the -A option is only available with the ANSI C compiler (in addition to the warning that file bogusfile.c is not found). You wuill get the file not found error with either compiler.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: HP 64-bit ANSI C Compiler

I should have read your post a bit more. The options for the Gnu C Compiler (gcc) (at least most of them) do not match those of the ANSI/C compiler of aCC (the C++ / ANSI/C compiler). You will need to modify your makefile to use the options appropriate to gcc.
If it ain't broke, I can fix that.