Operating System - HP-UX
1832297 Members
1844 Online
110041 Solutions
New Discussion

GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

 
Würfel
Occasional Advisor

GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

Hello all,

(Please excuse my bad English. I tried my best to write a clear and polite letter.)

I desperately tried to solve my problem the last 4 days, but I didn't succeed. I hope you can help me.

For our actual project I need GCC 2.95.3 on HPUX 11.00.
There are mainly two reasons for this:
1) our code doesn't compile with V3.x (I heard that there have been changes to the C++ Syntax in V3.x)
2) this is more a "political" reason. Our Program also gets compiled on Linux. There we are using gcc V2.95.3, because our customer doesn't allow us to use another compiler :-(
(Thats also the reason, why the code doesn't compile on V3.x)

The last 4 days I searched the net for binary distributions und I also tried to compile GCC by myself.

Until now with no success. At the latest when I tried to compile GCC with itself (as a sort of test, to see if it works), the compile
failed.
What me wonders is, that the README says that during "make bootstrap" GCC is built three times. Only the fist time the "old" compiler is used.
The second and third time the same compiler is used to build itself.
Therefore I think, it should be possible to compile the GCC with itself, because the bootstrap process finished without an error.

In the Internet I find contradictory informations about version 2.95.3
running on HPUX 11.00. Some people say it won't work at all, other say it is possible, but with some precautions (like patch for the linker, install binutils 2.10.1 first).

On some places in the net I found links to modified sources (header files and config files), but unfortunately those sources / patches don't exist anymore.

Nothing I did, has led to a working installation of GCC :-((

Has somebody still a binary distribution of GCC V2.95.3 floating around, or does somebody still have some sort of "How-To", which I could use to compile GCC successfully on my machine?

Please don't tell me to use the more recent V3.x versions of GCC. I know that there are plenty working binary distributions of this version, but I am not allowed to use them :-((


Many thanks for your help.

21 REPLIES 21
RAC_1
Honored Contributor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

Try getting it at
http://hpux.connect.uk.org. also all of it's mirror sites.

I am not good at this, but may you will get one at any of the above sites.

There is no substitute to HARDWORK
Würfel
Occasional Advisor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

The sites of the HP-UX porting center were my starting point. They only have the most actual GCC on their sites (i.e. 3.x).

I also asked them via email, if they just happen to have some old porting instuction floating around. Unfortunately they don't.
:-(
H.Merijn Brand (procura
Honored Contributor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

I have a 2.95 on my site available for 10.20, and it might just as well work on 11.00
Give it a try

A how-to is included on my site, so it just might work out for you

My HP ITRC site pages can be found at (please use LA as primary choice):

USA Los Angeles http://mirrors.develooper.com/hpux/
SGP Singapore https://www.beepz.com/personal/merijn/
USA Chicago http://ww.hpux.ws/merijn/
NL Hoofddorp http://www.cmve.net/~merijn/

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Würfel
Occasional Advisor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

Hello Merijn,

I already know your site and I have to say it is a very good and informative site. Thanks a lot. Please keep up the good work!

I already tried the precompiled version for 10.20 on my 11.00 machine. Unless I made something terribly wrong, it looks to me that the port for 10.20 doesn't work on 11.00.

I extracted the tar-file to /usr/local/pa20_32 then I've put /usr/local/pa20_32/bin as first entry in my $PATH.
(I still have /usr/local/bin somewhere later in my path. In /usr/local/bin there are other gnu tools like bison, flex and there is still the latest version of gcc from the HPUX porting centre installed. I hope this doesn't produce any conflicts.)

When I try to compile Hello World V1.3 (from gnu) with these settings on my machine, I get

# ../src/hello-1.3/configure
[some outputs from configure deleted]
[looks like everything is ok]

# make
gcc -c -DHAVE_STRING_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_FILE_H=1 -DSTACK_DIRECTION=0 -g /home/root/src/hello-1.3/hello.c
gcc: installation problem, cannot exec `cpp0': No such file or directory
*** Error exit code 1

Stop.

I get similar errors, when I try to compile binutils.

I have searched my harddisk for cpp0 and I found e few instances in different locations. One is somewhere below /usr/local/pa20_32, so I think gcc should know about it, shouldn't it?

--

Regarding your scripts (gcc-util) to build gcc:
When I start Conf-gcc, configure complains, that -hp-hpux11.00 is an invalid configuration. (see below)

# ./Conf-gcc
Configuring for a -hp-hpux11.00 host.
Invalid configuration `-hp-hpux11.00': machine `-hp' not recognized
Invalid configuration `-hp-hpux11.00': machine `-hp' not recognized
Unrecognized host system name -hp-hpux11.00.


Looks to me like configure from version 2.95.3 doesn't know about HPUX 11, at least not using this identifier.
When I run configure without any parameters, it looks like configure found out by itself, that my machine is a HPUX 11.00 machine.

The more I try, the more I get confused...

H.Merijn Brand (procura
Honored Contributor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

Just strip the --host= lines from the scripts. gcc-2 is not as full featured as gcc-3 and the Configure process has changed a lot

find /opt /usr -name cpp0

put that in your $PATH additionally/ just for ... sake

Enjoy, Have FUN! [ who would try himself if he did not have a headache ]
Enjoy, Have FUN! H.Merijn
H.Merijn Brand (procura
Honored Contributor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

I did it anyway. Sorry. Could not resist the temptation.

[ Note to self. Don't give in to temptations anymore ]

uploaded gcc-2.95.3-32-11.00-hppa2.0.tbz
perl.org will have synced tomorrow

Enjoy, Have FUN! H.Merijn [ who now wants an extra penguin^wbunny ]
Enjoy, Have FUN! H.Merijn
Würfel
Occasional Advisor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

Many thanks for compiling gcc and puting it on your web site.
I have just downloaded it and installed it on my machine. Unfortunately it still doesn't work.

I tried to install it first in /usr/local/pa20_32-2 then I just copied everything into /usr/local.

When I try to compile "hello world", I fist got the error "cpp0 not found". Then after putting it into my $PATH, I get:

=========== Begin Console Output =========

# make
gcc -c -DHAVE_STRING_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_FILE_H=1 -DSTACK_DIRECTION=0 -g /home/root/src/hello-1.3/hello.c
In file included from /home/root/src/hello-1.3/hello.c:42:
/usr/include/string.h:51: warning: conflicting types for built-in function `memcmp'
/usr/include/string.h:116: warning: conflicting types for built-in function `memcpy'
/usr/include/string.h:125: warning: conflicting types for built-in function `memset'
gcc -c -DHAVE_STRING_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_FILE_H=1 -DSTACK_DIRECTION=0 -g /home/root/src/hello-1.3/version.c
gcc -c -DHAVE_STRING_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_FILE_H=1 -DSTACK_DIRECTION=0 -g /home/root/src/hello-1.3/getopt.c
gcc -c -DHAVE_STRING_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_FILE_H=1 -DSTACK_DIRECTION=0 -g /home/root/src/hello-1.3/getopt1.c
gcc -c -DHAVE_STRING_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_FILE_H=1 -DSTACK_DIRECTION=0 -g /home/root/src/hello-1.3/alloca.c
/home/root/src/hello-1.3/alloca.c: In function `alloca':
/home/root/src/hello-1.3/alloca.c:178: warning: initialization makes pointer from integer without a cast
gcc -g -o hello hello.o version.o getopt.o getopt1.o alloca.o
/usr/ccs/bin/ld: Can't find library: "gcc"
*** Error exit code 1

Stop.

=========== End Console Output =========

How am I supposed to configure my system?
Where should I put the binaries on my system?
Which environment variables do I have to set with which values?
Is there anything I can do, so the compiler finds the correct header files and libraries?

H.Merijn Brand (procura
Honored Contributor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

That's because it expects certain folders

# cd /usr/local
# bzip2 -d # mv pa20_32 pa20_32-3
# mv pa20_32-2 pa20_32
# export PATH=/usr/local/pa20_32/bin:$PATH

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Würfel
Occasional Advisor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

Many thanks again for your help.

I think I have it now almost up and running.

To test the Installation, I just tried to compile binutils and bash.
Configure works fine (no errors).
But when I start to build with make, I get many warnings.

It looks like there are three warnings that get generated repeatedly:

- `__va__list' redefined
- this is the location of the previous definition
- parse error before `size_t'

Any ideas why I always get those three messages?


Example of detailed error messages follows:


========== Last lines of Console Output ==========

In file included from ../../../src/binutils-2.10.1/gprof/../bfd/sysdep.h:32,
from ../../../src/binutils-2.10.1/gprof/gprof.h:27,
from ../../../src/binutils-2.10.1/gprof/symtab.c:1:
/usr/local/pa20_32/lib/gcc-lib/hppa2.0w-hp-hpux11.00/2.95.3/include/stdio.h:24: warning: `__size_t' redefined
/usr/local/pa20_32/lib/gcc-lib/hppa2.0w-hp-hpux11.00/2.95.3/include/stddef.h:165: warning: this is the location of the previous definition
In file included from ../../../src/binutils-2.10.1/gprof/../bfd/sysdep.h:36,
from ../../../src/binutils-2.10.1/gprof/gprof.h:27,
from ../../../src/binutils-2.10.1/gprof/symtab.c:1:
/usr/include/errno.h:26: warning: `__va__list' redefined
/usr/local/pa20_32/lib/gcc-lib/hppa2.0w-hp-hpux11.00/2.95.3/include/stdio.h:30: warning: this is the location of the previous definition
../../../src/binutils-2.10.1/gprof/symtab.c: In function `symtab_finalize':
../../../src/binutils-2.10.1/gprof/symtab.c:76: warning: implicit declaration of function `qsort'
gcc -DHAVE_CONFIG_H -I. -I../../../src/binutils-2.10.1/gprof -I. -D_GNU_SOURCE -DDEBUG -I../bfd -I../../../src/binutils-2.10.1/gprof/../include -I..inutils-2.10.1/gprof/../bfd -I../../../src/binutils-2.10.1/gprof/../intl -I../intl -I. -DLOCALEDIR="\"/usr/local/share/locale\"" -g -O2 -W -Wall -c ../..tils-2.10.1/gprof/sym_ids.c
In file included from ../../../src/binutils-2.10.1/gprof/../bfd/sysdep.h:32,
from ../../../src/binutils-2.10.1/gprof/gprof.h:27,
from ../../../src/binutils-2.10.1/gprof/cg_arcs.h:4,
from ../../../src/binutils-2.10.1/gprof/sym_ids.c:4:
/usr/local/pa20_32/lib/gcc-lib/hppa2.0w-hp-hpux11.00/2.95.3/include/stdio.h:30: warning: `__va__list' redefined
/usr/include/ctype.h:26: warning: this is the location of the previous definition
In file included from ../../../src/binutils-2.10.1/gprof/../bfd/sysdep.h:36,
from ../../../src/binutils-2.10.1/gprof/gprof.h:27,
from ../../../src/binutils-2.10.1/gprof/cg_arcs.h:4,
from ../../../src/binutils-2.10.1/gprof/sym_ids.c:4:
/usr/include/errno.h:26: warning: `__va__list' redefined
/usr/local/pa20_32/lib/gcc-lib/hppa2.0w-hp-hpux11.00/2.95.3/include/stdio.h:30: warning: this is the location of the previous definition
In file included from ../../../src/binutils-2.10.1/gprof/sym_ids.c:3:
../../../src/binutils-2.10.1/gprof/../include/libiberty.h:136: warning: parameter names (without types) in function declaration
../../../src/binutils-2.10.1/gprof/../include/libiberty.h:142: parse error before `size_t'
../../../src/binutils-2.10.1/gprof/../include/libiberty.h:147: warning: parameter names (without types) in function declaration
../../../src/binutils-2.10.1/gprof/../include/libiberty.h:155: parse error before `size_t'
../../../src/binutils-2.10.1/gprof/sym_ids.c: In function `parse_spec':
../../../src/binutils-2.10.1/gprof/sym_ids.c:106: warning: implicit declaration of function `atoi'
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.

====== End of Console Output ==========


H.Merijn Brand (procura
Honored Contributor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

You are not by any chance running on 11.11? Are you?

The subject clearly states 11.00!

This error is known on 11.11, and is caused by .... 11.11. You need gcc compiled for 11.11 if you are on 11.11 to get rid of those errrors.

First confirm you are indeed on 11.00.

FWIW binutils-2.15 - compiled with gcc-3.4.1 - are already in my gcc-2.95.3 distribution

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Würfel
Occasional Advisor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

here the output from uname -a

# uname -a
HP-UX trinidad B.11.00 U 9000/785 2014989444 unlimited-user license

n.b.:
Just as a little explanation: I didn't compile binutils and bash because I need them. I know they are on your site and the site of the HP Porting Center to download.
I use them as test. If they compile, I think I can be fairly sure, to have gcc installed correctly.

btw:
In my original post, I mentioned, that I can compile V2.95.3 using the compiler from HP and that "make bootstrap" finishes without problems. Then, when I install this gcc and try to compile gcc V2.95.3 again, but now using itself, I get errors / warnings.
These errors mentioned there are the same errors I get now, using your compiler.

If there is any other information that can be helpful, please tell me.

H.Merijn Brand (procura
Honored Contributor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

Personally I would not choose gcc on HP-UX in two cases
1. If I can use HP C-ANSI-C (because the compiled binaries are *MUCH* faster)
2. If I can use gcc-3.0.4 or up (because as of 3.0.4 pa-risc support has a major overhaul in which pa-risc support in general was brough to an acceptable level)

So I'd never advise to use any gcc older than 3.0.4, but sometime one has to.

HP does not keep gcc in mind when updating the system and the include files, and gcc-2.x in not exactly an up to date compiler anymore.

Enjoy, Have FUN! H.Merijn [ Who did not run into errors ]
Enjoy, Have FUN! H.Merijn
Tim Krego_1
Frequent Advisor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

I have on my server the following...

gcc-2.95.3-sd-11.00.depot

I'ved not used it myself. Our old sysadmin downloaded it in April 2001 and I've kept a backup of everything we use. If you would like a copy let me know.
HP/UX Newbie
Würfel
Occasional Advisor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

Yes, sure.
Since I still don't have a working solution, I would love to try this.
Victor BERRIDGE
Honored Contributor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

Hi Würfel,

With a bit of luck I may have a copy that works (I dont want to install just to check - I have no test box around..):
-rwxrwxrwx 1 vbe seinf 3915380 Dec 11 2000 gcc-2.95.2-sd-11.00.depot.gz

If you have an idea on how I can send it to you...


All the best
Victo
Victor BERRIDGE
Honored Contributor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

Sorry
I missed the dot 3 I can only offer .2


All the best
VIctor
Tim Krego_3
Advisor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

Send me your email address and I'll send you a link to download the file.
H.Merijn Brand (procura
Honored Contributor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

Dear depot holders :)

If you make them (temporary) web available somewhere, I'll put them on my site

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Tim Krego_3
Advisor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

http://www.timzhaus.com/files/gcc-2.95.3-sd-11.00.depot

The file was not coHpiled by me. It was downloaded from the HPUX archive long ago.
H.Merijn Brand (procura
Honored Contributor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

Added to my site. Please enjoy.

My HP ITRC site pages can be found at (please use LA as primary choice):

USA Los Angeles http://mirrors.develooper.com/hpux/
SGP Singapore https://www.beepz.com/personal/merijn/
USA Chicago http://ww.hpux.ws/
NL Hoofddorp http://www.cmve.net/~merijn/

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Würfel
Occasional Advisor

Re: GCC 2.95.3 on HPUX 11.00 -- searching for binary distribution or HOWTO

Many thanks again to all who tried to help me. I really appreciate your efforts.

I just downloaded this version, but unfortunately it also brings those warnings I mentioned above :-(
Looks like there are some strange headerfiles on my system.

I tried to compile some of the gnu tools with newer versions of gcc (e.g. v3.2.2) and then I don't get those warnings...

Looks like I have either to convince our customer to use a newer version of gcc or I have to use different compilers on on Linux and HP-UX.

Again, many thanks for your help, especially to Merijn and to Tim Krego.