From: mathieu@geod.emr.ca (Pierre Mathieu)
Subject: GNU Tools on HP9000/700: what works and what doesn't list - V1.2
Summary: A list of GNU successes and failures on HP
Keywords: GNU HP
Organization: Dept. of Energy, Mines, and Resources, Ottawa
Date: Mon, 14 Dec 1992 17:26:54 GMT


Due to the recent coming out of GCC 2.3.2, here is revision 1.2 of the list.

For those who may be interested in getting the GNU products for the
HP9000 Series 700 systems HP-UX 8.07, here is a list of the results
I have obtained with the packages available at prep.ai.mit.edu.

All of the results are based on compilation with GCC 2.3.2 and
not on the use of the HP C compiler. A section is included
in the list for applications that did not compile with
GCC but did with HP C.

The last part of the listing contains the applications I can't get to
compile. If you got them to compile with GCC 2.3.2 and can send
me fixes, I'll include them in this list.

Note: To compile GCC 2.3.2 with debugging support, you must have the
      UTAH GAS 1.36 version from jaguar.cs.utah.edu: pa-gas.u3.tar.Z.

Note also that for most of the products that fail to compile below, the fault 
lies with the compiled package and not with GCC 2.3.2. Some of these packages
are getting a bit out of date. ;-)

Furthermore, note that all the packages tested below are available from
my archive site at geod.emr.ca (132.156.33.33) in the /pub/gnu directory
and in the /pub/hp directory for HP specific items including jaguar
packages and HP specific patch kits.

Finally, hats off to the guys at UTAH for their porting efforts!


GNU products that compile fine:
------------------------------

bison-1.19
c-torture-test     (a few warnings, but nothing serious)
cpio-2.2
diff-2.0
emacs-18.58
emacs-18.59        (had troubles with installation although it compiles OK)
fileutils-3.4
find-3.7
flex-2.3.7
fontutils-0.6 
gas-1.36.utah      (from jaguar.cs.utah.edu pa-gas.u3.tar.Z)
gcc-2.3.2
gdb-4.6            (with pa-gdb-4.6.tar.Z patches from jaguar.cs.utah.edu)
ghostview-1.4
gmp-1.2
gnugo-1.1
gptx-0.2
grep-1.6
hello-1.1
indent-1.6
ispell-eeadfa-p0+9 (available from our site geod.emr.ca in /pub/hp or from
                    its mother sites in Australia: 
                    mirriwinni.ee.adfa.oz.au or evans.ee.adfa.oz.au
                    care of Phillip Musumeci, phillip@mirriwinni.ee.adfa.oz.au)
libg++-2.3
patch-2.0.12u8
perl-4.035
sed-1.11
shellutils-1.8
tar-1.10
termcap-1.1
texi2roff-2.0
texinfo-2.16
textutils-1.3
xinfo-1.01.01


GNU products that compile fine with notes:
-----------------------------------------

1) rcs-5.6

Paul Eggert (eggert@twinsun.com) adds:
"Note that you must set has_mmap to 0 manually in
rcs/src/conf.h to work around a kernel bug in HP-UX 8.07 that
causes the kernel to crash whenever you use RCS on NFSed files.
HP patch PHKL_0942 fixes this kernel bug."


2) ghostscript-2.5.2  (and fonts)

The executable doesn't work properly.


3) tar-1.11

Executable is buggy; dumps a lot of stuff to screen.



GNU products that don't support (yet?) HP9000/700:
-------------------------------------------------

dld-3.2.3
gas-1.38.1
gdb-4.7
glibc-1.05



GNU products that don't compile because another product doesn't:
---------------------------------------------------------------

autoconf-1.2    (m4-1.0)



GNU products not yet examined (don't have time right now):
---------------------------------------------------------

ae
f2c-3.2.90
finger-1.37
gnuplot-3.2
ms-0.06
mtools-2.0.7
nihcl-2.2
smalltalk-1.1.1
tile-forth-2.1
xboard-2.0



GNU products not examined (and I don't plan to):
-----------------------------------------------

button.3.00
dirent
elvis-1.6       (fine on PC; don't care on HP)
fax-3.2.1       (don't have a FAX modem)
fgrep-1.1       (too old to be interesting)
iostream-0.50
ispell-2.0.02   (use ispell-eeadfa-p0+9 instead)
malloc-0.1
oleo-0.03.2     (too old to be interesting)
readline-1.1    (GDB 4.6 readline lib compiles just fine)
uucp-1.03       (UUCP on HP is Honey-Danber)
vh-1.3



GNU products that don't compile with GCC 2.3.1 but do with HP C:
---------------------------------------------------------------

bash-1.12
bc-1.02
binutils-2.0
m4-1.0
screen-3.2b
time-1.4
tput-1.0


And now for the fun stuff.


GNU products that compile with easy fixes:
-----------------------------------------

1) cperf-2.1

gcc -DLO_CAL -DGATHER_STATISTICS  -O -fstrength-reduce -fomit-frame-pointer -fdelayed-branch -finline-functions  -o gperf options.o iterator.o main.o perfect.okeylist.o listnode.o xmalloc.o hashtable.o boolarray.o readline.o stderr.o version.o getopt.o
ld: Unsatisfied symbols:
   srandom (code)
   random (code)
collect: /bin/ld returned 1 exit status

FIX:

Add 

#define random rand
#define srandom srand

to options.h


2) cvs-1.3

gcc -O -g -DDIRENT -DSTDC_HEADERS -DPOSIX -I. -I../lib    -c subr.c -o subr.o
In file included from subr.c:11:
cvs.h:282: conflicting types for `gethostname'
/usr/include/sys/unistd.h:265: previous declaration of `gethostname'

Fix:

Comment out the line

int gethostname (char *name, int namelen);

in cvs.h


3) make-3.62

gcc -O -DUSG -DUSGr3 -DHPUX -DHAVE_DUP2  -g  -c load.c
In file included from /usr/include/fcntl.h:9, from load.c:181:
/usr/include/sys/fcntl.h:149: conflicting types for `open'
/usr/include/sys/fcntl.h:149: A parameter list with an ellipsis can't match
/usr/include/sys/fcntl.h:149: an empty parameter name list declaration.
make.h:230: previous declaration of `open'

Fix: (thanks to Arnaud Fevrier: fevrier@simtoul.fr)

Change line 230 in make.h from

extern int pipe (), close (), read (), write (), open ();

to 

#ifdef HPUX
extern int pipe (), close (), read (), write (), open (const char *, int, ...);#else
extern int pipe (), close (), read (), write (), open ();
#endif

and compile with

defines = -DHPUX -DUSG -DUSGr3 -DHAVE_DUP2 -DKERNEL_FILE_NAME=\"/hp-ux\"

You can use alloca.c from the gcc-2.3.1.u2 package.



GNU products that don't compile and associated errors:
-----------------------------------------------------


A - getopt problems:

2) bc-1.02

gcc -O -g -D_POSIX_SOURCE   -c bc.c -o bc.o
In file included from bc.c:33:
proto.h:164: conflicting types for `getopt'
/usr/include/stdlib.h:173: previous declaration of `getopt'

3) m4-1.0 

Francois Pinard (pinard@iro.umontreal.ca) promised that this
would be fixed in the next release. :-)

gcc -O -g -Ilib -DUSG -DHPUX -c m4.c -o m4.o
In file included from m4.c:22:
lib/getopt.h:99: conflicting types for `getopt'
/usr/include/stdlib.h:173: previous declaration of `getopt'

4) tput-1.0

gcc -O -I. -g -DSTDC_HEADERS   -c getopt.c -o getopt.o
getopt.c: In function `getopt':
getopt.c:254: argument `argv' doesn't match prototype


B - Others:

1) bash-1.12

This is the first error to popup but there is also a getopt error.

gcc -O -c -g  -DHAVE_VFPRINTF -DHAVE_UNISTD_H -DHAVE_GETGROUPS -DHAVE_RESOURCE -DVOID_SIGHANDLER -DHPUX_70 -DHAVE_WAIT_H  -DHAVE_DUP2 -DHAVE_STRERROR -D"hpux" -DHPUX -DSHELL -DHAVE_ALLOCA  -I/users/root/gnu/src/NotInstalled/bash-1.12 -I/users/root/gnu/src/NotInstalled/bash-1.12/./lib/ -I. -I./lib/ ulimit.c
builtins/ulimit.def: In function `pipesize':
builtins/ulimit.def:474: parse error before `)'
builtins/ulimit.def:555: `mode' undeclared (first use this function)
builtins/ulimit.def:555: (Each undeclared identifier is reported only once
builtins/ulimit.def:555: for each function it appears in.)
builtins/ulimit.def:561: `cmd' undeclared (first use this function)
builtins/ulimit.def:572: parse error before `static'
builtins/ulimit.def:581: parse error at end of input
make[2]: *** [ulimit.o] Error 1
make[1]: *** [builtins/libbuiltins.a] Error 1

2) binutils-2.0

gcc -O -c -g -DHOST_SYS=HPPAHPUX_SYS -DSELECT_ARCHITECTURES=bfd_hppa_arch -DUSG -I. -I. -I./../include  hppa.c
hppa.c:636: parse error before `_core_file_failing_command'

3) gawk-2.14

Compiles with "configure sysv3" (it would be nice to have a "configure hp" in
the next release) and some touch ups to the config.h file but
bombs when you run "make test". A sample:

gawk: swaplns.awk:5: fatal error: internal error
/bin/sh: 11588 abort - core dumped
make[1]: *** [swaplns] Error 134
/bin/sh: 11590 abort - core dumped
make[1]: *** [messages] Error 134
gawk: argarray.awk:7: fatal error: internal error
/bin/sh: 11592 abort - core dumped
make[1]: *** [argarray] Error 134
gawk: longwrds.awk:6: fatal error: internal error
cmp longwrds.good tmp && rm -f tmp
cmp: EOF on tmp
make[1]: *** [longwrds] Error 1
cmp getline.good tmp && rm -f tmp
cmp: EOF on tmp


4) gdbm-1.5

gcc -g -O -DSYSV   -c gdbmreorg.c -o gdbmreorg.o
In file included from gdbmdefs.h:36, from gdbmreorg.c:31:
systems.h:39: warning: `L_SET' redefined
/usr/include/sys/file.h:121: warning: this is the location of the previous definition
gdbmreorg.c:45: warning: static declaration for `rename' follows non-static
gdbmreorg.c: In function `rename':
gdbmreorg.c:47: argument `old_name' doesn't match prototype
gdbmreorg.c:47: argument `new_name' doesn't match prototype


5) gnuchess-4.0

gcc -g -DAG4 -DQUIETBACKGROUND -DNOSCORESPACE -DHISTORY -O  -DHASHFILE=\"/usr/local/gnu/games/lib/gnuchess.hash\" -DLANGFILE=\"/usr/local/gnu/games/lib/gnuchess.lang\" -DBOOK=\"/usr/local/gnu/games/lib/gnuchess.book\" -c genmoves.c
sh: Warning!  The following language(s) are not available:
                LANG=-DLANGFILE=\"$(LIBDIR)/gnuchess.lang\"
Continuing processing using the language "C".
gcc: Internal compiler error: program cc1 got fatal signal 6
make: *** [genmovesN.o] Error 1


6) graphics-0.17

lots of errors. Samples:

gcc -g -O -I/usr/include/X11R4 -I/usr/local/include/X11R4 -o plot2tek plot.o ../getopt/getopt.o ../getopt/getopt1.o libtek.a -lm
ld: Unsatisfied symbols:
   drem (code)
collect: /bin/ld returned 1 exit status

gcc -g -O -I/usr/include/X11R4 -I/usr/local/include/X11R4 -o plot2ps plot.o  ../getopt/getopt.o ../getopt/getopt1.o libps.a -lm
ld: Unsatisfied symbols:
   drem (code)
collect: /bin/ld returned 1 exit status

gcc -g -O -I/usr/include/X11R4 -I/usr/local/include/X11R4 -o plot2fig plot.o ../getopt/getopt.o ../getopt/getopt1.o libfig.a -lm
ld: Unsatisfied symbols:
   re_exec (code)
   re_comp (code)
collect: /bin/ld returned 1 exit status


7) groff-1.06

Runing configure gives the following message

checking for grops to derive installation directory prefix
checking for gcc
checking if C compiler is also a C++ compiler
checking that C++ compiler can compile very simple C++ program
checking that C++ static constructors and destructors are called
gcc -O is not installed correctly: static constructors and destructors do not work


8) screen-3.2b

gcc -O -c -g  -I. -DETCSCREENRC=\"/usr/local/gnu/lib/screenrc\" ./screen.c
In file included from ./screen.c:333:
./extern.h:57: conflicting types for `wait3'
/usr/include/sys/wait.h:81: previous declaration of `wait3'
./extern.h:73: conflicting types for `crypt'
/usr/include/sys/unistd.h:237: previous declaration of `crypt'
./extern.h:86: conflicting types for `putenv'
/usr/include/stdlib.h:155: previous declaration of `putenv'
./screen.c:343: conflicting types for `select'
/usr/include/sys/time.h:146: previous declaration of `select'
./screen.c: In function `main':
./screen.c:1054: warning: passing arg 2 of `signal' from incompatible pointer type
etc...

9) time-1.4

gcc -O -c -g  -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_STRERROR=1 -DHAVE_DOPRNT=1 -I. time.c
time.c:93: conflicting types for `wait3'
/usr/include/sys/wait.h:81: previous declaration of `wait3'
time.c: In function `run_command':
time.c:636: warning: passing arg 2 of `execvp' from incompatible pointer type
m
--
Pierre Mathieu                          "We have seen the enemy,
Geodetic Survey of Canada                  and the enemy is us."
Ottawa, Canada                                                Pogo
Internet: mathieu@geod.emr.ca
Newsgroups: comp.sys.hp