[comp.soft-sys.andrew] Status of ATK on HP-UX

gascon@IAG.HP.COM (Jean Gascon) (01/16/90)

The original port of the Andrew Toolkit (ATK) for the HP 9000, series
300 machines  was done on version 6.2 of HP-UX and X11R2.  The version
shipped on the X11R4 tape should also work with HP-UX 6.5 and X11R2.  It
will not work (as a matter of fact it won't even build without errors)
on the new version of HP-UX (HP-UX 7.0 with X11R3 and Motif) that  is
now being shipped to customers.  We are working with the ITC at CMU at
solving those problems and hope that patches will be made available from
CMU as soon as we have things under control.  ATK is not a supported HP
product;  as a matter of fact, I am the only person at HP who is working
at solving those problems and I have to do it on top of my regular job
assignments.  Fortunately,  the CMU people have been very helpful.

Here are some of the problems that people are likely to encounter as
they try to build ATK on top of HP-UX 7.0.  I am using the product
version of X11R3 (the one shipped with HP-UX 7.0) but I suspect that
similar difficulties  will arise if people try to build ATK on top of
HP-UX 7.0 and X11R4.  As stated in the documentation shipped with the
X11R4 release from MIT, the R4 software has been tested with HP-UX 6.5,
not 7.0.  The problems result from changes in this major release of the
operating system, especially the ones aimed at making the different C
libraries compatible with a number of emerging standards like POSIX and
X/Open.  Here are the different problems that I have run into in
building ATK on HP-UX 7.0 and some solutions.  By the way, I am
compiling things with -D_CLASSIC_TYPES and without optimization for the
time being.

Jean
----------
1.  Symptom:  make Makefiles  breaks in overhead/util/hdrs

    Problem:  The Makefile generated by imake is not acceptable to make.
     Imake uses the c-preprocessor cpp.  The new cpp generates sequence
    line numbers and blank lines.  In this particular case it generates:

        ./genhdr ...
        #35

        mv andrdir.h.1 andrdir.h

    and this is not acceptable to make.

    Solution: There are at least 2 solutions.  One would be to change
    the imake script in a way that would not put an #ifdef in the middle
    of commands to be executed by make (note that this is the only
    occurence in all the Imakefile scripts).
    Another solution is to build a new imake that sets a flag to cpp
    (the flag is -P) to prevent the generation of line numbers.  This
    can be achieved by modifying mit/config/imakemdep.h, adding a
    cpp_argv of  "-P" and defining FIXUP_CPP_WHITESPACE.
----------
2. Symptom:  linking of executables leaves some undefined symbols

    Problem: a couple of files have to be modified in
    overhead/class/machdep/hp_68k to accommodate changes in the C
    libraries.

    Solution: Patches will be shipped from CMU.
----------
3. Symptom: linking of overhead/eli/bglisp/bglisp generates a missing  _bcopy

    Problem: bcopy is a BSD call, not defined in HP-UX (and probably not
    in other SYSV based systems).

    Solution: overhead/malloc/malloc.ci needs an #include <andrewos.h>.
        By the way: why not call the file malloc.c (the .ci extension
    makes this file invisible to a grep *.c).
----------
4.  Symptom: compiling atk/typescript/tscript.c and contrib/tm.c gives
an "Undefined variable t").

    Problem: The t in question is the first argument to _IO and _IOW. 
    The new standards require that it be defined as a character constant
    't'.

    Solution: Put single quotes around the first argument to _IO and
    _IOW.  If this fix works also on other systems make the change
    directly, otherwise embed in #ifdef hpux.
----------
5.  Symptom:  compiling atk/eq/symbols.c cannot find include file parse.h.

Problem: The file parse.h should have been generated from parse.y

Solution: CMU should check the dependencies in the make script.
----------
6.  Symptom: In atk/ness/doc, nessrun present.n nessauth.d results in
ness compile errors.

    Problem: The function sort_record_per_flags is not found, although
    /usr/andrew/lib/ness/sort.n is there and compiles properly.

    Solution: ??  Note that dynamic loading is not working properly (see
    below).
----------
7.  Symptom:  Programs like messages or ez insets not working.

    Problem: Dynamic loader

    Solution:  We are working on it.
-----------

wjh+@ANDREW.CMU.EDU (Fred Hansen) (01/17/90)

Excerpts from internet.info-andrew: 15-Jan-90 Status of ATK on HP-UX
Jean Gascon@iag.hp.com (4180+0)

> Solution: overhead/malloc/malloc.ci needs an #include <andrewos.h>.

Well, it has one.  But its after the call to bcopy.  Solution:  move
lines 1037 and 1038 to follow line 51:
diff -c ~/bs/overhead/malloc/malloc.ci /tmp/malloc.ci
*** /afs/andrew.cmu.edu/usr13/wjh/bs/overhead/malloc/malloc.ci	Tue Dec
12 16:24:20 1989
--- /tmp/malloc.ci	Tue Jan 16 11:46:00 1990
***************
*** 49,55 ****
--- 49,58 ----
  #include <stdio.h>
  #include "malloc.h"
  #include "imalloc.h"
+ #include <andrewos.h> /* bcopy, sys/types.h, sys/time.h */
+ #include <sys/resource.h>
  
+ 
  static char msgbuf[200];
  #define ferr4(fmt, a, b, c, d) {sprintf(msgbuf, fmt, a, b, c, d); \
  				write(2, msgbuf, strlen(msgbuf));}
***************
*** 1034,1041 ****
  }
  
  
- #include <andrewos.h> /* sys/types.h sys/time.h */
- #include <sys/resource.h>
  /* must be the right number, is the same used by 4.3 on vax and s800 */
  #ifdef hp9000s300
  #define RLIMIT_DATA 2
--- 1037,1042 ----


> 	By the way: why not call the file malloc.c (the .ci extension makes
> this file invisible to a grep *.c).

(sigh) there is a malloc.c.  And a pmalloc.c.  Both .c files consist
almost entirely of #include <malloc.ci>.  This should now be done in the
Imakefile by testing MALLOC_DEBUG_ENV, but changing file names will be
confusing at this point.