From: mathieu@geod.emr.ca (Pierre Mathieu)
Subject: GNU compilation successes list - Revision 1.3 (HP900/700 - HPUX 8.07)
Summary: What works and what doesn't
Keywords: GNU
Organization: Dept. of Energy, Mines, and Resources, Ottawa
Date: Mon, 25 Jan 1993 22:00:58 GMT


Due to the recent coming out of GCC 2.3.3, here is revision 1.3 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.3 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.3 and can send
me fixes, I'll include them in this list.

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

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.3. 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:
------------------------------

autoconf-1.2
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.u4.tar.Z)
gawk-2.14
gcc-2.3.3          (from jaguar.cs.utah.edu gcc-2.3.3.u2.tar.Z)
gdb-4.6            (with pa-gdb-4.6.tar.Z patches from jaguar.cs.utah.edu)
gdbm-1.5
ghostscript-2.5.2  (and fonts)
ghostview-1.4
gmp-1.2
gnugo-1.1
gptx-0.2
grep-1.6
gzip-0.7
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         (with Bart Muijzer, bartm@cv.ruu.nl, patches available
                    from geod.emr.ca in /pub/hp/libg++-2.3.patches.shar)
m4-1.0.3
patch-2.0.12u8
perl-4.035
sed-1.13
shellutils-1.8
tar-1.10
termcap-1.1
texi2roff-2.0
texinfo-2.16
textutils-1.4
wdiff-0.04
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) 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 not yet examined (don't have time right now):
---------------------------------------------------------

ae
elib-0.05
f2c-3.2.90
finger-1.37
gnuplot-3.2
lemacs-19.3
mm-1.07
ms-0.06
mtools-2.0.7
nihcl-3.0
smalltalk-1.1.1
tile-forth-2.1
xboard-2.0.pl25



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
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
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


x) oleo-1.2.2

Several errors can be fixed as follows.

Fix 1:

Change

extern int gethostname (char *, int);

to

extern int gethostname (char *, size_t);

in sysdef.h

Fix 2:

Take out 

extern VOIDSTAR sbrk (size_t);
extern VOIDSTAR brk (VOIDSTAR);

in panic.c

Fix 3:

Take out beep function in io-curses.c


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:

1) bash-1.12

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/use
rs/root/gnu/src/NotInstalled/bash-1.12/./lib/ -I. -I./lib/ getopts.c
In file included from getopts.c:63:
./getopt.h:95: conflicting types for `getopt'
/usr/include/sys/unistd.h:225: previous declaration of `getopt'

2) bc-1.02

gcc -O -g -D_POSIX_SOURCE   -c bc.c -o bc.o
In file included from bcdefs.h:46, from bc.y:31:
const.h:41: warning: `BC_BASE_MAX' redefined
/usr/include/limits.h:96: warning: this is the location of the previous definiti
on
const.h:42: warning: `BC_SCALE_MAX' redefined
/usr/include/limits.h:98: warning: this is the location of the previous definiti
on
const.h:48: warning: `BC_DIM_MAX' redefined
/usr/include/limits.h:97: warning: this is the location of the previous definiti
on
In file included from bc.c:33:
proto.h:164: conflicting types for `getopt'
/usr/include/stdlib.h:175: previous declaration of `getopt'

3) recode-3.2.4

gcc -O -g -I. -DSTDC_HEADERS=1 -DHAVE_DUP2=1 -DHAVE_POPEN=1 -DHAVE_RENAME=1 -DDE
FAULT_CODE=\"latin1\"   -c recode.c -o recode.o
recode.c:64: conflicting types for `getopt'
/usr/include/stdlib.h:175: 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) 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'


2) gnuchess-4.0

gcc -g -W  -DAG4 -DQUIETBACKGROUND -DNOSCORESPACE -DHASGETTIMEOFDAY -DGNU3 -DHIS
TORY -DCACHE -DGDX -DSEMIQUIETBOOKGEN -DNULLMOVE -O -funroll-loops -traditional-
cpp   -DHASHFILE=\"/usr/local/gnu/games/lib/gnuchess/gnuchess.hash\" -DLANGFILE=
\"/usr/local/gnu/games/lib/gnuchess/gnuchess.lang\"  -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


3) graphics-0.17

Note: HP-UX has regcomp and regexec.

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


4) groff-1.06

Running "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


5) hp2xx-3.1.0

gcc -g -c -DUNIX -I/usr/include/X11R4   -O -ansi -fstrength-reduce -finline-func
tions -Wall      to_x11.c
In file included from to_x11.c:42:
/usr/include/X11R4/X11/Xutil.h:312: parse error before `caddr_t'


6) make-3.63

gcc -O -DHAVE_CONFIG_H -DLIBDIR=\"/usr/local/gnu/lib\" -DINCLUDEDIR=\"/usr/local/gnu/include\" -c -I. -I. -I./glob -g job.c -o job.o
job.c: In function `reap_children':
job.c:244: warning: passing arg 2 of `waitpid' from incompatible pointer type
job.c:247: warning: passing arg 1 of `wait' from incompatible pointer type
job.c:263: aggregate value used where an integer was expected
job.c:264: aggregate value used where an integer was expected
job.c:264: invalid operands to binary &
job.c:264: aggregate value used where an integer was expected
job.c:265: aggregate value used where an integer was expected


7) 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...


8) 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