Operating System - HP-UX
1756125 Members
3337 Online
108841 Solutions
New Discussion юеВ

Build gcc 64 on HPUX 11.11 problem

 
SOLVED
Go to solution
Raymond Cordoni
Occasional Advisor

Build gcc 64 on HPUX 11.11 problem

I am trying to build the 64bit gcc compiler on my HPUX 11.11 system. This is step 1 in getting 64bit Oracle DBI/DBD support to work with perl 5.8.0 as I do not have the HP ANSI C compiler. I am using the 64 bit 3.2 pre-release gcc source for HPUX 11.0 and 11i from the HP DSPP site. First I installed the binary version to get a (I think 11.0 compliant) 64bit gcc compiler on my system. I then installed and built gmake (had to use HP bundled C for this), M4, bison, and flex. I then followed the instructions on Merijin's site for building gcc from source and am now having problems getting the make to work. The error I am getting is:

gcc -mpa-risc-2-0 -c -DHAVE_CONFIG_H -O -pipe -I. -I../../src/libiberty/../include -W -Wall -Wtraditional -pedantic ../../src/libiberty/floatformat.c
../../src/libiberty/floatformat.c:24: error: parse error before "size_t"
../../src/libiberty/floatformat.c:25: error: parse error before "size_t"
gmake[1]: *** [floatformat.o] Error 1
gmake[1]: Leaving directory `/usr/local/src/gcc/obj-64/libiberty'
gmake: *** [all-libiberty] Error 2

I did some searching around the forum and found if I added /usr/include ahead of the existing header search directories, I could get floatformat.c program to compile. If I try to put /usr/include in the entire make, then it fails in other places. I compared the stddef.h in /usr/include to the one that came with the gcc source and they are significantly different. Unfortunately, I am not a C programmer and I don't understand what I am looking at or even how to fix it. I gather from other forum messages that HPUX 11.11 system headers are different that 11.0 versions and that the gcc source has to be corrected for this - but I don't even know where to begin. Has anybody actually built gcc 64bit 3.2 on HPUX 11.11 and can they give me some idea of how to proceed?

... Ray Cordoni
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: Build gcc 64 on HPUX 11.11 problem

Caesar_3
Esteemed Contributor

Re: Build gcc 64 on HPUX 11.11 problem

Hello!

To solve the problem in the other way you can download the gcc version compiled for your OS from www.hp.com or from hpux.connect.org.uk

Caesar
Suraj Nair
New Member

Re: Build gcc 64 on HPUX 11.11 problem

Hi !

I am facing exactly the same problem with building 64 bit gcc:
../../gcc-3.3.2/binutils/libiberty/floatformat.c:25: error: parse error before "size_t"
../../gcc-3.3.2/binutils/libiberty/floatformat.c:26: error: parse error before "size_t"
*** Error exit code 1

I also tried installing the precompiled binaries but that gives me this error:
$ /usr/local/pa64/bin/g++ helloWorld.cpp
exec(2): could not load a.out

Any suggestions ?

Warm Regards,
Suraj
Raymond Cordoni
Occasional Advisor

Re: Build gcc 64 on HPUX 11.11 problem

Wow I am surprised to see a post on this old plea for help!

The solution for me was to wait until a binary version of the 64bit gcc compiler on HPUX 11.11 was available for download. There is one on Merijn's site. If you havn't seen this site before you are missing an excellent resource. Now Merijn has various versions of both gcc and perl both 32bit and 64bit and HPUX 10.20, 11.0, and 11.11. Very impressive! Thank you, Merijn.

http://mirrors.develooper.com/hpux/
H.Merijn Brand (procura
Honored Contributor
Solution

Re: Build gcc 64 on HPUX 11.11 problem

You're welcome :)

Enjoy, Have FUN! H.Merijn

Enjoy, Have FUN! H.Merijn
Suraj Nair
New Member

Re: Build gcc 64 on HPUX 11.11 problem

Wow !

Thats a really impressive site. I was really missing a wonderful resource.
But I still have a problem. I tried downloading the following:
gcc 3.3.2 + binutils 2.14 + gdb-6.0
gcc 3.3.3 + binutils 2.14 + gdb-6.0
gcc 3.4.2 + binutils 2.15 + gdb-6.2.1
for 11.11/64.
But all these, when untarred, dont give me any binaries. All the g++ etc. files I get are of 0 bytes. Although the filenames speak of it, the tarballs did not give me the binutils/code.

Please tell me where to find the source for gcc 3.3.2 on 11.11/64 so that I can give building it a try.
Suraj Nair
New Member

Re: Build gcc 64 on HPUX 11.11 problem

One other thing.
I do have a 64 bit g++ on my machine.
But it doesnt work. Please note the following:

$ file g++
g++: ELF-64 executable object file - PA-RISC 2.0 (LP64)

But I still get:
$ ./g++
exec(2): could not load a.out
whereas I should get:
g++: no input files.

My machine is supposed to support this:
$ file /stand/vmunix
/stand/vmunix: ELF-64 executable object file - PA-RISC 2.0 (LP64)

and my memory should be sufficient:
$ grep Physical /var/adm/syslog/syslog.log
Aug 13 11:49:33 sgushp1 vmunix: Physical: 2097152 Kbytes, lockable: 1571912 Kbytes, available: 1812084 Kbytes

Help me out !
Raymond Cordoni
Occasional Advisor

Re: Build gcc 64 on HPUX 11.11 problem

You said you already had a g++ on your system but that it didn't work. You should delete any previous version of gcc 64bit first from you system before installing a new one. In my case, I had stuff on my system from a failed attempt to build gcc from source. Luckily everything was in /usr/local/pa20_64, so I just deleted this directory and all of its sub-directories (after doing a backup first - just in case).

You should also put /usr/local/pa20_64/bin ahead of everything else in your PATH. This will make sure that when run gcc, it will run the 64bit version and be able to find all the associated programs ahead of what comes installed with HPUX. I also added /usr/local/pa20_64/man to /etc/MANPATH.

Then unzip and untar the file from Merijin's site to /usr/local - which installs it to /usr/local/pa20_64. I did this a while ago with gcc 3.4.1-64 and my g++ file seems OK.

... Ray