GCC 4.4.x on HPUX 11.00 PA-RISC

View: New views
3 Messages — Rating Filter:   Alert me  

GCC 4.4.x on HPUX 11.00 PA-RISC

by Phezzan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm trying to build GCC 4.4.0 on HPUX 11.00 using a GCC 3.2 binary
built by a third party.
I get the same error with 4.4.2.

I've run into and worked around a few problems - the most significant
being an assembler problem
"Error: Field out of range" while compiling fold-const.c which I
worked around by forcing -O2 into CFLAGS for the gcc Makefile

I'm stuck in libgcc - specifically using xgcc to build libgcc2.c - I get this:
/home/install/gcc/gcc-4.4.0/libgcc/../gcc/libgcc2.c: In function '__clzdi2':
/home/install/gcc/gcc-4.4.0/libgcc/../gcc/libgcc2.c:735: internal
compiler error: Segmentation fault
Please submit a full bug report,

I have no idea how to deal with this...  here's the command line it's
running that fails:

/home/install/gcc/build-gcc-4.4.0/./gcc/xgcc
-B/home/install/gcc/build-gcc-4.4.0/./gcc/
-B/usr/gcc-4.4.0/hppa2.0w-hp-hpux11.00/bin/
-B/usr/gcc-4.4.0/hppa2.0w-hp-hpux11.00/lib/ -isystem
/usr/gcc-4.4.0/hppa2.0w-hp-hpux11.00/include -isystem
/usr/gcc-4.4.0/hppa2.0w-hp-hpux11.00/sys-include -g -O2 -O2   -DIN_GCC
  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wcast-qual -Wold-style-definition  -isystem ./include  -fPIC -g
-DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I. -I.
-I../.././gcc -I/home/install/gcc/gcc-4.4.0/libgcc
-I/home/install/gcc/gcc-4.4.0/libgcc/.
-I/home/install/gcc/gcc-4.4.0/libgcc/../gcc
-I/home/install/gcc/gcc-4.4.0/libgcc/../include  -DHAVE_CC_TLS -o
_clzdi2.o -MT _clzdi2.o -MD -MP -MF _clzdi2.dep -DL_clzdi2 -c
/home/install/gcc/gcc-4.4.0/libgcc/../gcc/libgcc2.c \

GCC configuration:
/home/install/gcc/gcc-4.4.0/configure -C --with-gmp=/usr/local
--with-mpfr=/usr/local --disable-nls --enable-languages=c,c++
--with-gnu-as --with-as=/usr/local/bin/as --with-ld=/usr/bin/ld
--enable-shared --prefix=/usr/gcc-4.4.0 --enable-debug=no
--disable-nls --enable-threads=posix

I've tried binutils 2.18, 2.19, 2.20  all with the same result.

Thanks in advance,
Phez

Re: GCC 4.4.x on HPUX 11.00 PA-RISC

by Ian Lance Taylor-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Phezzan <phezzan0@...> writes:

> I'm trying to build GCC 4.4.0 on HPUX 11.00 using a GCC 3.2 binary
> built by a third party.
> I get the same error with 4.4.2.
>
> I've run into and worked around a few problems - the most significant
> being an assembler problem
> "Error: Field out of range" while compiling fold-const.c which I
> worked around by forcing -O2 into CFLAGS for the gcc Makefile
>
> I'm stuck in libgcc - specifically using xgcc to build libgcc2.c - I get this:
> /home/install/gcc/gcc-4.4.0/libgcc/../gcc/libgcc2.c: In function '__clzdi2':
> /home/install/gcc/gcc-4.4.0/libgcc/../gcc/libgcc2.c:735: internal
> compiler error: Segmentation fault
> Please submit a full bug report,
>
> I have no idea how to deal with this...  here's the command line it's
> running that fails:
>
> /home/install/gcc/build-gcc-4.4.0/./gcc/xgcc
> -B/home/install/gcc/build-gcc-4.4.0/./gcc/
> -B/usr/gcc-4.4.0/hppa2.0w-hp-hpux11.00/bin/
> -B/usr/gcc-4.4.0/hppa2.0w-hp-hpux11.00/lib/ -isystem
> /usr/gcc-4.4.0/hppa2.0w-hp-hpux11.00/include -isystem
> /usr/gcc-4.4.0/hppa2.0w-hp-hpux11.00/sys-include -g -O2 -O2   -DIN_GCC
>   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
> -Wcast-qual -Wold-style-definition  -isystem ./include  -fPIC -g
> -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I. -I.
> -I../.././gcc -I/home/install/gcc/gcc-4.4.0/libgcc
> -I/home/install/gcc/gcc-4.4.0/libgcc/.
> -I/home/install/gcc/gcc-4.4.0/libgcc/../gcc
> -I/home/install/gcc/gcc-4.4.0/libgcc/../include  -DHAVE_CC_TLS -o
> _clzdi2.o -MT _clzdi2.o -MD -MP -MF _clzdi2.dep -DL_clzdi2 -c
> /home/install/gcc/gcc-4.4.0/libgcc/../gcc/libgcc2.c \


This looks like a bug in the compiler.  If this is happening in the
first stage, then it may be a bug in the compiler you are using to do
the stage 1 build--i.e., gcc 3.2.  In that case, you should use -O2
only for fold-const.c, and not for any other file.  If that doesn't
help, then unfortunately I don't have any suggestion other than to
file a bug report as described at http://gcc.gnu.org/bugs.html .

Ian

Re: GCC 4.4.x on HPUX 11.00 PA-RISC

by Dr. David Kirkby :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Phezzan wrote:

> I'm trying to build GCC 4.4.0 on HPUX 11.00 using a GCC 3.2 binary
> built by a third party.
> I get the same error with 4.4.2.
>
> I've run into and worked around a few problems - the most significant
> being an assembler problem
> "Error: Field out of range" while compiling fold-const.c which I
> worked around by forcing -O2 into CFLAGS for the gcc Makefile
>
> I'm stuck in libgcc - specifically using xgcc to build libgcc2.c - I get this:
> /home/install/gcc/gcc-4.4.0/libgcc/../gcc/libgcc2.c: In function '__clzdi2':
> /home/install/gcc/gcc-4.4.0/libgcc/../gcc/libgcc2.c:735: internal
> compiler error: Segmentation fault
> Please submit a full bug report,
>
> I have no idea how to deal with this...  here's the command line it's
> running that fails:
>
> /home/install/gcc/build-gcc-4.4.0/./gcc/xgcc
> -B/home/install/gcc/build-gcc-4.4.0/./gcc/
> -B/usr/gcc-4.4.0/hppa2.0w-hp-hpux11.00/bin/
> -B/usr/gcc-4.4.0/hppa2.0w-hp-hpux11.00/lib/ -isystem
> /usr/gcc-4.4.0/hppa2.0w-hp-hpux11.00/include -isystem
> /usr/gcc-4.4.0/hppa2.0w-hp-hpux11.00/sys-include -g -O2 -O2   -DIN_GCC
>   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
> -Wcast-qual -Wold-style-definition  -isystem ./include  -fPIC -g
> -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I. -I.
> -I../.././gcc -I/home/install/gcc/gcc-4.4.0/libgcc
> -I/home/install/gcc/gcc-4.4.0/libgcc/.
> -I/home/install/gcc/gcc-4.4.0/libgcc/../gcc
> -I/home/install/gcc/gcc-4.4.0/libgcc/../include  -DHAVE_CC_TLS -o
> _clzdi2.o -MT _clzdi2.o -MD -MP -MF _clzdi2.dep -DL_clzdi2 -c
> /home/install/gcc/gcc-4.4.0/libgcc/../gcc/libgcc2.c \
>
> GCC configuration:
> /home/install/gcc/gcc-4.4.0/configure -C --with-gmp=/usr/local
> --with-mpfr=/usr/local --disable-nls --enable-languages=c,c++
> --with-gnu-as --with-as=/usr/local/bin/as --with-ld=/usr/bin/ld
> --enable-shared --prefix=/usr/gcc-4.4.0 --enable-debug=no
> --disable-nls --enable-threads=posix
>
> I've tried binutils 2.18, 2.19, 2.20  all with the same result.
>
> Thanks in advance,
> Phez
>

Have you thought of trying both the HP assembler and linker rather than the GNU
assembler? Certainly on Solaris, the Sun linker seems a lot better than the GNU
one.  Every time I build GCC on Solaris, I use both the Sun linker and Sun
assembler.

I do not have much experience of HP-UX, but I do have an HP-UX box which has gcc
4.4.0 on it. This is how it was configured.

$ uname -a
HP-UX hpbox B.11.11 U 9000/785 2016698240 unlimited-user license
$ gcc -v
Using built-in specs.
Target: hppa1.1-hp-hpux11.11
Configured with: /tmp/gcc-4.4.0.tar.gz/gcc-4.4.0/configure
--host=hppa1.1-hp-hpux11.11 --target=hppa1.1-hp-hpux11.11
--build=hppa1.1-hp-hpux11.11 --prefix=/opt/hp-gcc-4.4.0 --with-gnu-as
--without-gnu-ld --enable-threads=posix --enable-languages=c,c++
--with-gmp=/proj/opensrc/be/hppa1.1-hp-hpux11.11
--with-mpfr=/proj/opensrc/be/hppa1.1-hp-hpux11.11
Thread model: posix
gcc version 4.4.0 (GCC)

I downloaded that binary from HP's web site. They make the point there that they
supply the binutils, and these have changes from the official GNU versions. I
assume HP have had some trouble building gcc with the GNU tools.

If you do get this resolved, I'd be interested in you posting the results, as I
tool do have an HP-UX box, but I do not use it much at all.

Certainly for HP-UX 11.11, it is possible to download the binary and the source
code from the HP site. The source might give you a clue what HP have done to the
assembler to make it work, as clearly they have built gcc 4.4.0.

If all you want is the binary, then just download it, but it is better to be
able to build from source.

Dave