Operating System - HP-UX
1752800 Members
5760 Online
108789 Solutions
New Discussion юеВ

building gcc on PARISC and HP-UX 11.11

 
Denis Laroche
Occasional Advisor

building gcc on PARISC and HP-UX 11.11

I'm trying to build gcc version 4.2.3 from the source distribution found on the HP porting centre.

I managed to build all the prerequisites, except for one: autoconf. It actually builds but the test suite hangs. I installed it anyway (make install), but the build of binutils in gcc hangs at the following lines:

make[2]: Entering directory `/tmp_mnt/home/limpet/ex36672/tools/dist/gcc-4.2.3/binutils/bfd'
cd .././bfd && /bin/sh /home/limpet/ex36672/tools/dist/gcc-4.2.3/binutils/missing --run autoconf

which seems to indicate a problem wiht autoconf.

Would anybody have a suggestion?

Thanks in advance.
14 REPLIES 14
James R. Ferguson
Acclaimed Contributor

Re: building gcc on PARISC and HP-UX 11.11

Hi Denis:

There's a prebuilt PA-RISC 11.11 binary of 'gcc-4.2.3' available at the HP Porting Centre:

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

The runtime dependencies can/should also be fetched if you take this route.

Regards!

...JRF...
Denis Laroche
Occasional Advisor

Re: building gcc on PARISC and HP-UX 11.11

I don't have root access to the HP-UX server so I cannot install binary depots.

I really have to build gcc from the source distribution.

Thanks!
Steven Schweda
Honored Contributor

Re: building gcc on PARISC and HP-UX 11.11

> I don't have root access to the HP-UX
> server so I cannot install binary depots.

I have complete control over my HP-UX
systems, so I've never needed to worry about
it, but can't you install a depot to a
non-default location?

> Would anybody have a suggestion?

Uh, install a fresh autoconf?

> I'm trying to build gcc version 4.2.3 from
> the source distribution found on the HP
> porting centre.

Why? It looks as if 4.4.2 is current. The
last one I built from a source kit was this:

dy # gcc -v
Using built-in specs.
Target: hppa2.0w-hp-hpux11.11
Configured with: ../gcc-4.3.3/configure
Thread model: posix
gcc version 4.3.3 (GCC)

I never tried 4.2.3, but I did get 4.2.2 to
work (mostly -- not Java).

I started out with a depot for 4.1.2, but
then I used that to start building the thing
from the source. My notes suggest that I
needed to get GNU "bison", which required GNU
"m4", which led to getting GNU "diff"
("diffutils"), and putting "/usr/local/bin"
at the front of my PATH when building the
thing. Then I raised the default open file
limit (maxfiles, 60 -> 256), and then
everything worked except Java. The 4.3.x
versions also needed GMP and MPFR, and GNU
"sed", but the Java stuff started working at
4.3.0, and otherwise it's been a breeze.

> [...] but the test suite hangs.

I'm not sure if I ever did more than
"configure" and "gmake bootstrap-lean", so
you may have run into things which I did not.
Dennis Handly
Acclaimed Contributor

Re: building gcc on PARISC and HP-UX 11.11

Any reason you don't try building from HP's source? 4.3.3 or 4.4.0-1
http://www.hp.com/go/gcc

>I don't have root access to the HP-UX server

You don't need it to extract the source:
$ gunzip gcc-src-4.4.0-1.depot.gz
$ /usr/sbin/swinstall -x run_as_superuser=false \
-s $PWD/gcc-src-4.4.0-1.depot \* @ $PWD/local_src
$ ll $PWD/local_src/opt/hp-gcc-4.4.0/src/
-rwxrwxr-x 19783546 May 21 2009 binutils-2.18.tar.gz
-rwxrwxr-x 81816176 May 21 2009 gcc-4.4.0.tar.gz
Denis Laroche
Occasional Advisor

Re: building gcc on PARISC and HP-UX 11.11

I got the distribution from http://hpux.connect.org.uk and the gcc version there is 4.2.3.

I have no current gcc so I'm trying to build with the HP C and C++ compilers. The options I pass to the compilers and the linker when running configure are:

CFLAGS="-Ae +DA2.0W -mt -O -I/home/limpet/ex36672/tools/include"
CXXFLAGS="-AA +DA2.0W -mt -O -I/home/limpet/ex36672/tools/include"
LDFLAGS="+DA2.0W -L/home/limpet/ex36672/tools/hppa64/lib"

I also provide a prefix (/home/limpet/ex36672/tools) and exec-prefix (/home/limpet/ex36672/tools/hppa64) directory. I also built gmp and mpfr, which worked.

I tried to install the software depot for version 4.4.0-1 as suggested by Dennis, but the command seems to hang. It's been running for more than 30 minutes and I cannot stop it with Crtl-C:

/usr/sbin/swinstall -x run_as_superuser=false -s $PWD/gcc-src-4.4.0-1.depot \* @ $PWD

======= 01/06/10 09:02:40 EST BEGIN swinstall SESSION
(non-interactive) (non-privileged)

* Session started for user "ex36672@wcalqa1w".

* Beginning Selection
* Options:
preview no
target type root
linkinstall no
verbose 1
option file
session file
software file
target file

Olivier Masse
Honored Contributor

Re: building gcc on PARISC and HP-UX 11.11

Merijn makes available many versions of gcc for 11.11 here:
http://www.cmve.net/merijn/downloads.html

I didn't try any, but they seem to be in tar (.tbz) format so you'll have more options to extract them non-root instead of using depots. You'll need to download bzip2 on his page to extract the tar, it's is a straight PA executable.

Good luck
Steven Schweda
Honored Contributor

Re: building gcc on PARISC and HP-UX 11.11

> I have no current gcc [...]

I shouldn't need to be very current to be
able to bootstrap the latest one. As I said,
I started with a pre-built 4.1.2
("gcc-4.1.2-hppa-11.11.depot.bz2") which I
found in one of the popular places. The
first thing I did with it was build 4.2.2
from the source.

I let my c3700 grind on 4.4.2 over night, and
that seems to have come through ok. Today:

dy # gcc -v
Using built-in specs.
Target: hppa2.0w-hp-hpux11.11
Configured with: ../gcc-4.4.2/configure
Thread model: posix
gcc version 4.4.2 (GCC)

According to
http://gcc.gnu.org/install/test.html
I probably lack the infrastructure to run the
test suite, so I'm relying on the hope that
if it can build itself, then it can't be too
bad. (It hasn't failed me yet.)
Steve Ellcey
Valued Contributor

Re: building gcc on PARISC and HP-UX 11.11

You should not need autoconf to build GCC (or binutils). autoconf creates a configure script from configure.ac but any GCC (or binutils) source package you download should already have a configure script in it and so you should not need to run autoconf during the build (unless you modified configure.ac).

It could be that make thinks configure is out of date because the timestamp of configure.ac is later then the timestamp of configure due to the order of how tar unpacked the files.

Any GCC source package will have a file contrib/gcc_update, which if run with the '--touch' option, will touch generated files like configure to avoid the timestamp problem but I don't see a similar file in the binutils source package so you might want to just touch any 'configure' files by hand to make sure the timestamps are OK.
That should stop make from trying to run autoconf.
Denis Laroche
Occasional Advisor

Re: building gcc on PARISC and HP-UX 11.11

The problem is that I cannot install software depots as a non privileged user, even if the documentation of SD-UX says that it's possible.

When I tried it worked for the first depot, but failed at the second one with the error message:

"wcalqa1w:/assembly/support/systems/dev/amax/tools/ex36672/dvl/tools/dist/depot": Cannot establish a lock on this target because of an external error (for example, the lock file could not be created)

The log file /var/adm/sw/swagentd.log would contain this error message:

Cannot lock depot/root/PSF at
"/assembly/support/systems/dev/amax/tools/ex36672/dvl/tools/dist/depot".
Permission denied (13).

I placed a support call at HP but it never got resolved.

I was aware of the gcc binaries available at Merijin, but the version available for 11.11/64 is 3.4.3, which might be a bit old. I'll try to build a recent gcc with it.

Thanks to all for the great support.