From: sauer@chama.eece.unm.edu (Tom Sauer)
Newsgroups: comp.soft-sys.khoros
Subject: Re: Hp 9000/730 port
Date: 25 Aug 92 14:38:12 GMT

Hi,

On Aug 24, 23:48, Larry Libersky wrote:
} Subject: Hp 9000/730 port
>> Dear khoros group,
>> 	
>> 	I am trying to run your khoros package on my HP 9000/730
>> Workstation, but I am having problems.  It seems I don't have
>> some libraries, for example, I tried to make editimage but I don't
>> have the following libraries anywhere on my system : libxvforms.a,
>> libxvplot.a,libxvutils.a,libgraphics.a and libdisplay.a.  If you could
>> help me with either obtaining these libraries or an executable version
>> of khoros for my system it would be much appreciated.

Unfortunately there are no distribution sites of Khoros distributing 
Bins and Libs  for the HP. The best thing to do is compile it your self.
Below is the porting instructions for the HP9000's.


>> 
>> 	Sincerely,
>> 
>> 	Larry Libersky
>> 	e-mail larry@illusion.nmt.edu
}-- End of excerpt from Larry Libersky


The following explains how to port khoros patch 5 to HP-UX for
s300/400 or s800/s700 workstations.

The file may look long, but it is very verbose, and includes diffs
for hp.cf. It assumes you want to use SharedLibraries since it
decreases the code size significantly (less than 35 MBytes for s700).
You actually need to edit a couple of lines in hp.cf, and do some other
minor editing.

Konstantin Konstantinides
- ----------------------------------------------------
To port khoros 1 patch 5 to HP-UX on an HP9000/s370, s400, s800, or s700
the following steps were taken.

1. Get the Xaw and Xmu libraries and include files 
   from hpcvaaz.cv.hp.com:~ftp/pub/MitX11R4/libs.s300.Z (or libs.s800.Z
   for the snakes) using anonymous ftp.

   As an alternative, you can also get the X11R5 libraries from
   ~ftp/pub/MitX11R5 (same machine). This is probably the preferred
   approach if you want to use X11 shared libraries.

   Uncompress and untar them into your favorite directory.

   NOTE: Don't mix those lib binaries with HP binaries in /usr/lib/X11R4
   and the include files with include files in /usr/include/X11R4.
   Unpredictable core dumbs may happen!
   Instead use /usr/local/X11R4 or /usr/lib/X11R5 or whatever else
   you like.

   (Ignore this step if you already have somehow the above
   include files and libraries in your system.)

2. Edit src/xvroutines/Lib/xvforms/Imakefile
   Remove:
   #define UnsharedObjs
   UNSHAREDOBJS =\
	   init.o

  and include init.o with the other objects.
      -------    
3. Edit /khoros/repos/config/imake_conf/hp.cf
  and /khoros/repos/config/imake_conf/Lib/hpLib.rules

  as shown in the diffs file below 
  The changes fix the following problems:
    a) Strip automatically the binaries (-s)
    b) On the s700 solve the "too much defining" error message. (-Wp,..)
    c) Include the appropriate Fortran libraries in the linking
       of C code, since some khoros libraries use FORTRAN routines too.
    d) Eliminate the -Dxxxx in f77 calls (with Shared Libraries).
    e) Point to the correct place for the X11 Libraries
    f) Install libraries with mode 555 (otherwise code with shared libraries
       will not run)

4. Depending on when you got your code you may want
    a) get the fixed src/dspl/Lib/ldfilter.c routine
      posted in the network. (4/9/92)
    b) rm khoros/src/dspl/Lib/poly_yacc.c
    Step (b) solves a linker problem on the s400.

5. Run make clean; installit. Everything should compile with no problems.
   After the compilation do
- ----------------------

1. edit bin/kinstall_csh, and replace "mail -s" with "mailx -s"
2. You may want to edit bin/prnmanual
(Even if you don't have troff or groff, but you have a postscript printer,
you can still print the man pages. Only set up the printer command and
always accept the default answers. It should print the existing xxxxx.ps files)

Distributed processing works, but start phantomd on the remote machine first.

Konstantinos Konstantinides

Hewlett-Packard Laboratories
P.O. Box 10490
Palo Alto, CA 94303
tel: (415) 857-4086
e-mail: kk@hpkronos.hpl.hp.com

- ------------------------Diffs----------------------------------------
*** hp.cf.orig	Fri Apr 10 10:44:33 1992
- --- hp.cf	Fri Apr 10 10:44:33 1992
***************
*** 7,15 ****
   */
  
  
! #define OSName                 HP-UX 8.05
  #define OSMajorVersion         8
! #define OSMinorVersion         5
  
  #define SystemV                YES
  
- --- 7,15 ----
   */
  
  
! #define OSName                 HP-UX 8.07
  #define OSMajorVersion         8
! #define OSMinorVersion         7
  
  #define SystemV                YES
  
***************
*** 76,87 ****
  #define InstallCmd $(SCRIPTSRC)/bsdinst.sh
  #define BaseName /bin/basename
  
  #ifdef hp9000s800
! #   define StandardDefines        -DSYSV
  #   define OptimizedCDebugFlags   +O1
  #else
  #  if OSMajorVersion == 8
! #      define StandardDefines        -DSYSV
  #  else
  #       define StandardDefines	-Wc,-Nd4000,-Ns4300,-Ne700,-Np300 -DSYSV -D_BSD -Drindex=strrchr -Dindex=strchr
  #  endif
- --- 76,88 ----
  #define InstallCmd $(SCRIPTSRC)/bsdinst.sh
  #define BaseName /bin/basename
  
+ #define InstLibFlags -m 0555
  #ifdef hp9000s800
! #   define StandardDefines        -s -Wp,-H512000 -DSYSV
  #   define OptimizedCDebugFlags   +O1
  #else
  #  if OSMajorVersion == 8
! #  define StandardDefines         -s -DSYSV
  #  else
  #       define StandardDefines	-Wc,-Nd4000,-Ns4300,-Ne700,-Np300 -DSYSV -D_BSD -Drindex=strrchr -Dindex=strchr
  #  endif
***************
*** 89,98 ****
  
  #if OSMajorVersion == 8
  #  if defined (hp9000s300) || defined (hp9000s400)
! #    define SysLibs -lBSD -lmalloc -lm -ll
  #    define ForSysLibs -lFext -lF77 -lI77
  #  else
! #    define SysLibs -lBSD -lmalloc -lm -ll
  #    define ForSysLibs -lcl -lfsys
  #  endif
  #else
- --- 90,99 ----
  
  #if OSMajorVersion == 8
  #  if defined (hp9000s300) || defined (hp9000s400)
! #    define SysLibs -lBSD -lmalloc -lm -ll -lIO77
  #    define ForSysLibs -lFext -lF77 -lI77
  #  else
! #    define SysLibs -lBSD -lmalloc -lm -ll -lcl
  #    define ForSysLibs -lcl -lfsys
  #  endif
  #else
***************
*** 100,106 ****
- --- 101,114 ----
  #   define ForSysLibs -lFext -lF77 -lI77
  #endif
  
+ #define XLibDir  /usr/local/x11r4/lib.s300
+ #define XIncludes -I/usr/local/x11r4
  /*
+ #define XLibDir  /usr/lib/X11R5
+ #define XIncludes -I/usr/include/X11R5
+ */
+ 
+ /*
   * The Shared libaries for HP may not be complete.  We do not
   * have an HP. This Lib/hpLib.rules is a guess at how hp
   * shared libs should be made. Please mail and changes
***************
*** 108,114 ****
   * update for the next version. 
   */
  
! #define HasSharedLibraries NO
  
  #if HasSharedLibraries
  #  define SharedLibRev 1.1                /* Use Khoros revision number */
- --- 116,122 ----
   * update for the next version. 
   */
  
! #define HasSharedLibraries YES
  
  #if HasSharedLibraries
  #  define SharedLibRev 1.1                /* Use Khoros revision number */
*** Lib/hpLib.rules.or	Mon Apr  6 13:38:05 1992
- --- Lib/hpLib.rules	Mon Apr  6 13:38:05 1992
***************
*** 73,81 ****
  									@@\
  .f.o:									@@\
  	$(RM) $@ shared/$@						@@\
! 	$(FC) -c $(SHAREDCODEDEF) $(SHLIBDEF) $(FLIBFLAGS) $*.f		@@\
  	$(MV) $*.o shared/$*.o						@@\
! 	$(FC) -c $(SHLIBDEF) $(FLIBFLAGS) $*.f				@@\
                                                                          @@\
  clean::									@@\
  	-@if [ -d shared ]; then echo " $(RM) shared/?*.o"; \		@@\
- --- 73,81 ----
  									@@\
  .f.o:									@@\
  	$(RM) $@ shared/$@						@@\
! 	$(FC) -c $(FLIBFLAGS) $*.f		@@\
  	$(MV) $*.o shared/$*.o						@@\
! 	$(FC) -c $(FLIBFLAGS) $*.f				@@\
                                                                          @@\
  clean::									@@\
  	-@if [ -d shared ]; then echo " $(RM) shared/?*.o"; \		@@\