1837855 Members
2831 Online
110122 Solutions
New Discussion

Re: GCC 2.8.1 HPUX 11.00

 
SOLVED
Go to solution
Pamela Hammitt
Advisor

GCC 2.8.1 HPUX 11.00

Hi I posted this question last week sometime, but now have more info.

I am building on an HPUX 11.00 server. I have to use GCC 2.8.1, no choice, government project...

outputs the following:

file /stand/vmunix
ELF-64 PA-RISC 2.0 (LP64)

model
9000/800/A500-7X

getconf KERNEL_BITS 64

I am using the following GNU tools:
Perl 5.004_05
bison 1.25
flex 2.54a
make 3.76.1
gawk 3.03
sed 2.05
binutils 2.9.1 Again, no choice regarding the version....

I am able to compile all of the utilities using the ANSI c compiler. I am unable however to get a clean compile of gcc. I keep getting size_t used before declaration (hash.h)

I cannot seem to locate a working gcc and binutils package to install for my environment.

Perl builds as a PA-RISC 2.0. It errors out if I try to force it to build PA-RISC 1.0

I don't know how to make binutils, bison, or flex build as a PA_RISC 2.0. It seems to only understand PA-RISC 1.0, or 1.0.

What I really need I think is a 32-bit working gcc so I can build gcc 2.8.1.

Can someone please help, Thanks Pam
11 REPLIES 11
Steven E. Protter
Exalted Contributor

Re: GCC 2.8.1 HPUX 11.00

Maybe gcc 2.8.1 is available here.

http://hpux.cs.utah.edu

Otherwise, you may need to modify the offending .h header file. I'm not sure what that will do for your government contract spec.

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
Pamela Hammitt
Advisor

Re: GCC 2.8.1 HPUX 11.00

I've tried there, I can't find binutils there to go with it.
Rick Garland
Honored Contributor

Re: GCC 2.8.1 HPUX 11.00

One place I have looked is http://www.gnu.org
Haven't looked very hard but they so have many references to 2.8.1.

At the very least I would think you could ask the maintainers what they might have.
C. Beerse_1
Regular Advisor
Solution

Re: GCC 2.8.1 HPUX 11.00

For the processors, I recall by head both PA_RISC 1.0 and PA_RISC 1.1 are 32 bit processors and PA_RISC 2.0 is 64 bit. The 2.0 can do 32 bit, the 1.x cannot do 64 bit. It is save to say that 32 bit on 2.0 is equal to 32 bit for 1.x.

If you do have source for the compiler (and tools) then the compiler comes with a build bootstrap that even builds on the brain-dead C compiler that came free with HP-UX 10.20. The bootstrap will just build the compiler 3 times: step 1 to build a fairly good compiler. Step 2 builds with the result of step 1 and creates a final version of the compiler. Step 3 builds using the result of step 2 and ends with a comparision between step 2 and step 3. (I know this because I have done this several times...)

Then on the gcc-versions, I think version 2.8.1 was only capable on doing 32-bits. As far as I know, 64 bits on pa-risc was introduced in 2.9-series of gcc (or even later in 3.x?). Best to check documentation for details on this.

As for the build problem, try building using a none ansi-compiler and/or remove strict checking which gives the use-before-declaration problems. The entire compiler build will be done with itself in the end (steps 2 and 3) using options that are known to work.

btw: there is an order in which to build binutils and gcc, check documentation on this too. I think it is: binutils with available compiler, then gcc, then binutils with gcc finishing with gcc using gcc-build binutils.
make everything as simple as possible, not simpler (A.Einstein??)
Pamela Hammitt
Advisor

Re: GCC 2.8.1 HPUX 11.00

Could you please explain how I turn off strict checking? I'm new at this...
no clue ----

Thanks
Pam

Pamela Hammitt
Advisor

Re: GCC 2.8.1 HPUX 11.00

Also, the c compiler I have is the bundled-c compiler that came with HPUX 11.00. Does that matter?
H.Merijn Brand (procura
Honored Contributor

Re: GCC 2.8.1 HPUX 11.00

Yes, sorry, but that matters. The bundled C compiler is a braindead stupid C compiler that is only there to enable you to (re)build the kernel.

It is NOT ANSI compliant.

It is VERY NOT ANSI compliant.

Did I already say that the bundled C compiler is a braindead non-ansi compliant compiler and therefor useless for *any* real work?

I tried building 2.8.1 with both GNU gcc-4.0 and with HP C-ANSI-C, and both failed pretty early, so I gave up. I don't think it is worth the trouble to build such an outdated compiler.

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Pamela Hammitt
Advisor

Re: GCC 2.8.1 HPUX 11.00

I have to build gcc 2.8.1 as stated above...
thanks to the government project. I have C-ANSI-C on my 10.20 CDs. Can I port that to my 11.00 system long enough to build the gcc.
H.Merijn Brand (procura
Honored Contributor

Re: GCC 2.8.1 HPUX 11.00

I understood the need :(

IMHO your best bet would be

1. Build gcc-2.8.1 on HP-UX 10.20 using HP C-ANSI-C
2. Copy the gcc tree to HP-UX 11.00
3. Rebuild gcc-2.8.1 from scratch with the 10.20 version

And pray. I don't believe it to be an easy process.

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
H.Merijn Brand (procura
Honored Contributor

Re: GCC 2.8.1 HPUX 11.00

Better yet! I contacted the guy who once did a port of 2.8.1 and he replied to me that his depot's are still available!

Help yourself he said:

http://ftp.kspei.com/pub/steve/hp/

So, please, help yourself.
It is very likely that I will copy his files to my site

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
H.Merijn Brand (procura
Honored Contributor

Re: GCC 2.8.1 HPUX 11.00

OK all transfered.

My site now also hosts those old depot's from Steven Pritchard

HP-UX 10.20:

* binutils-2.9.1-1
* egcs-1.1.2-1

HP-UX 11.00:

* binutils-2.9.1-1
* egcs-1.1.2-1
* gcc-2.8.1-1 (using HP as)
* gcc-2.8.1-2 (using GNU binutils)
* perl-5.005_03-1

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn