home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / softsys / khoros / 2907 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  61.8 KB

  1. Path: sparky!uunet!sun-barr!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!mimbres.cs.unm.edu!pprg.unm.edu!daemon
  2. From: sauer@chama.eece.unm.edu (Tom Sauer)
  3. Newsgroups: comp.soft-sys.khoros
  4. Subject: KHOROS COMPILE FAQ
  5. Message-ID: <41673@pprg.eece.unm.edu.pprg.unm.edu>
  6. Date: 16 Nov 92 17:43:43 GMT
  7. Sender: news@pprg.unm.edu
  8. Lines: 1637
  9.  
  10.  
  11.  
  12.  
  13.         FREQUENTLY ASKED QUESTIONS ABOUT COMPILING KHOROS
  14.  
  15.         date last updated: Sept 25, 1992
  16.                        Sept 28, 1992
  17.                       fixed A3, A6, A9, Q28, added Q29
  18.                    Oct  03, 1992
  19.                       added new Q1, Q2, Q4, Q5, Q6, 
  20.                       scooted other #'s down
  21.                    Oct  27, 1992
  22.                       added Q35 - Q37
  23.  
  24.                 ( Please Read!  Please Redistribute! )
  25.  
  26.                 ( Also - Please See the General Khoros FAQ )
  27.  
  28.         Contents:  Questions 1 - 37
  29.  
  30.                    * installing Khoros on IBM RS6000, 386/486, HP
  31.            * compiling Khoros with shared libraries
  32.            * compiling Khoros with X11R5
  33.            * Makefiles, Imakefiles (compiling new programs)
  34.            * compiling with/without FORTRAN
  35.            * compiling with gcc
  36.            * and more!
  37.  
  38.  
  39. ----------  Installing Khoros on various architectures -----
  40.  
  41. Q1.  What machines does Khoros currently run on?
  42.  
  43. Q2.  I have machine X running operating system Y (not listed in A1).
  44.      Has anyone ported Khoros to this architecture?
  45.  
  46. Q3.  I want to install Khoros on an IBM RS/6000 workstation
  47.      running under AIX x.x {and am getting error messages from the
  48.      C compiler} {and would like more info} {has anybody done this}
  49.      {are binaries available}?.
  50.  
  51. Q4.  I want to install Khoros on a 386/486 machine {and am getting 
  52.      error messages from the C compiler} {and would like more info} 
  53.      {has anybody done this} {are binaries available}?.
  54.  
  55. Q5.  I want to install Khoros on an HP under HP-UX x.x {9000/s370, 
  56.      s400, s800, or s700}.  {and am getting error messages from the 
  57.      C compiler} {and would like more info} {has anybody done this} 
  58.      {are binaries available}?.
  59.  
  60. Q6.  I want to install Khoros on a Convex,  under ConvexOS x.x
  61.      {and am getting error messages from the C compiler} {and 
  62.      would like more info} {has anybody done this} {are binaries available}?.
  63.  
  64. Q7.  Can I run Khoros on my PC? Is Khoros available for PC's running DOS?
  65.  
  66. Q8.  Is there a port of Khoros for a VMS system?
  67.  
  68.  
  69. -----------  Compiling with shared libraries -----
  70.  
  71. Q9.  What are shared libraries?  Does Khoros work with shared libraries?  
  72.      What are the advantages/disadvantages of using shared libraries?
  73.      Should I compile Khoros with shared libraries?
  74.  
  75. Q10. Why do I get unresolved references when I compile Khoros with
  76.      shared libraries on a SUN4?
  77.  
  78. Q11. When compiling shared, I get a large set of errors from
  79.      the loader listed in my make.World file, as in:
  80.  
  81.         rm -f vadd
  82.         cc -o vadd vadd.o  -L/home/holst/khoros/lib -L/mnt/elocal/lang/SC1.0
  83.         -O -Bdynamic -lghost  -lvexpr  -lnum_anal  -ldspl  -lformat
  84.         -lgeo_surf  -lvipl  -lvutils  -lvmath  -lvrast  -lvgparm  -lverror
  85.         -ltiff  -lm -ll -ldl
  86.         ld: Undefined symbol
  87.            _cg_
  88.            _zgedi_
  89.            _zgeco_
  90.            _zgesl_
  91.            _zsvdc_
  92.            _ch_
  93.            _dgesl_
  94.            _dgefa_
  95.            _e_wsfe
  96.            _pow_ii
  97.            _s_wsFe
  98.            _s_stop
  99.         *** Error code 2
  100.         install in ./vipl/arith_binary/vadd done
  101.         make: Warning: Target `install' not remade because of errors
  102.  
  103. Q12. I am compiling [some xvroutine] against X11R5 with shared libraries.
  104.      The linker produces this error message:
  105.  
  106.      ld: /lib/libXaw.sa.5.0(sharedlib.o): _formWidgetClass: multiply defined
  107.          /lib/libXaw.sa.5.0(sharedlib.o): _labelWidgetClass: multiply defined
  108.      *** Error code 2
  109.      make: Fatal error: Command failed for target `{xvroutine}'
  110.  
  111. Q13. I am having problems using cantata (or other xvroutine)
  112.      after recently compiling on a SUN with shared libraries.  I get the
  113.      error message:
  114.  
  115.      Warning: Widget class VendorShell version mismatch (recompilation needed):
  116.        widget 11004 vs. intrinsics 11003.
  117.      Warning: Widget class Form version mismatch (recompilation needed):
  118.        widget 11004 vs. intrinsics 11003.
  119.  
  120.  
  121. Q14. Warpimage {or other xvroutine} did not compile after on a SUN4
  122.      architecture with static libraries;  in fact, it made the cc compiler
  123.      segmentation fault and core dump!  What happened?
  124.  
  125.  
  126. Q15. Khoros compiled ok under shared libraries.  However, when I try to
  127.      use the programs, I get messages that say:
  128.      lib{something}.so.1 not found
  129.  
  130. ------------  Compiling with X11R5 -----
  131.  
  132. Q16. Can I compile Khoros with X11R5?
  133.  
  134. Q17. I am compiling Khoros with MIT's X11R5.  When linking xvroutines
  135.      (cantata, editimage, etc), the compiler tells me that
  136.      _viewportWidgetClass is multiply defined.  What's the problem?
  137.  
  138.  
  139. ------------  Makefiles, Imakefiles (compiling new programs) -----
  140.  
  141. Q18. I don't want to compile Khoros source, but I want to compile
  142.      my own programs so I need the libraries. How can I obtain the
  143.      Khoros libraries?
  144.  
  145. Q19. I am trying to compile an xvroutine, and when I run make install
  146.      I get the error:
  147.      installing in ./{xvroutine}...
  148.      Make:  Don't know how to make {KHOROS_HOME}/lib/libdisplay.a.
  149.      Stop.
  150.      *** Error code 1
  151.  
  152. Q20. I want to link a {vroutine/xvroutine} for dbx.
  153.  
  154. Q21. I want my {vroutine/xvroutine} to use some specific 
  155.      include files and special libraries.
  156.  
  157. Q22. Is there a way to get ghostwriter to automatically generate 
  158.      the Makefile so that it will look for other include directories 
  159.      and libraries?
  160.  
  161. ------------  Compiling With gcc -----
  162.  
  163. Q23. I'm having a problem with gcc:
  164.  
  165.      % gcc test.c -I/usr/local/include -I$KHOROS_HOME/include
  166.  
  167.      In file included from KHOROS_HOME/include/vinclude.h:128,
  168.      from test.c:3:
  169.      KHOROS_HOME/include/vdefines.h:219: conflicting types for `malloc'
  170.      /usr/local/{...}/include/malloc.h:41: previous declaration of `malloc'
  171.      KHOROS_HOME/include/vdefines.h:223: conflicting types for `calloc'
  172.      /usr/local/{...}/include/malloc.h:39: previous declaration of `calloc
  173.  
  174. Q24. I noticed in the make.World file is that a few files are compiled 
  175.      using 'cc', while some others are compilied using 'gcc'. Is this normal? 
  176.      Also, there were messages like: 
  177.      gcc: file path prefix `dynamic' never used
  178.  
  179.  
  180. ------------  Compiling With/Without FORTRAN -----
  181.  
  182. Q25. Do I HAVE to have FORTRAN to compile Khoros?  Which Khoros programs
  183.      will I miss out on if I don't compile with FORTRAN?
  184.  
  185. Q26. How do I compile the Khoros system without FORTRAN?
  186.  
  187. Q27. I don't have a FORTRAN compiler, but I need the Khoros programs that
  188.      use FORTRAN.  What can I do?
  189.  
  190. Q28. I am writing a {vroutine/xvroutine} in which I need to make a call
  191.      from my C code to a FORTRAN subroutine.  How do I do this?
  192.  
  193. Q29. I am setting up my *.cf configuration file in preparation for compiling
  194.      Khoros.  How do I find out what libraries the linker expects in order
  195.      to link C code against FORTRAN, in order to provide the proper
  196.      libraries for the ForSysLibs option?
  197.  
  198. ------------  Miscellaneous -----
  199.  
  200. Q30. I seem to be having some trouble getting Khoros working on our Sun 3.
  201.      I have tried executing {cantata, editimage, etc}  {journal playbacks},
  202.      but I keep getting the error "ld.so: libXaw.so.4: not found".
  203.  
  204. Q31. Since RPC isn't implemented yet, I defined UseSunRPC as NO in my 
  205.      sun.cf file. Compiling phantomd results in the following message:
  206.           ld: Undefined
  207.           _sunrpc_tempnam
  208.           _sunrpc_gethostname
  209.  
  210. Q32. On Sun3, OS 4.1.1, a segmentation fault results when cantata is run.
  211.  
  212. Q33. During the compile of Khoros, I get this error message:
  213.          /: write failed, file system is full
  214.          compiler(iropt) error:  write_irfile: No space left on device
  215.  
  216. Q34. I am trying to compile a {toolbox, new program, etc}, but "make"
  217.      keeps giving me error messages that say:
  218.  
  219.      make: Fatal error:
  220.      Don't know how to make target `{KHOROS_HOME}/lib/lib{something}.a
  221.  
  222. Q35. Where in the Khoros Manual is the documentation relating to installation
  223.      of programs in Khoros?
  224.  
  225. Q36. How does one selectively fix a program and recompile it without doing
  226.      the whole installation process again?
  227.  
  228. Q37. When I try to compile dzresp, dfilter, mat2viff, etc., I get 
  229.      unresolved symbols for _dspl_parse, _format_parse, and _vexpr_parse.
  230.      Where do I find these routines?
  231.  
  232. ===============================================================================
  233.  
  234. ===========   Installing Khoros on Various Architectures ======================
  235.  
  236.    Q1.  What machines does Khoros currently run on?
  237.  
  238.    A1.  Khoros 1.0 compiles on the following machines (MIT X unless
  239.         otherwise noted):
  240.  
  241.         ApolloDN10000      OS 10.3, Fortran 10.8, cc 6.8
  242.         CRAY YMP's, XMP's, Cray II's running UNICOS 6.0, and 6.1.
  243.         DEC   5000/3100    Ultrix 4.2, mips cc 2.0, DEC f77 V3.0-2
  244.         DEC   Vax 3600     Ultrix 4.1, cc1.37.1
  245.         HP    9000/*       HP-UX 7.05, HP-UX 8.05
  246.         IBM   RS/6000      AIX v3.1
  247.         OMRON Luna88k      Mach 2.5, gcc 1.37, f77 1.8.5
  248.         NeXT  68030,40     MACH 2.0, gcc 1.37, Absoft f77 2.0, Pensoft X
  249.         SGI   All          OS 3.3.2, OS 4.0, X11 1.2, f77 3.3
  250.         SUN   SPARCstations, SUN4   SUN OS 4.1.1, f77 1.4.5
  251.         SUN   SUN3/        SUN OS 4.1.1, f77 1.3.1, gcc 1.39/2.0
  252.  
  253.         As of Patch 5, increased support was added for:
  254.  
  255.         Convex C220, running ConvexOS 9.1 with standard C compiler
  256.         MacII running A/UX 2.0.1 using gcc-1.39 as C compiler.
  257.         DG Aviion running DG/UX 4.3 (thanks to Bob Clark)
  258.         Intel 386/486 running Interactive Unix  (thanks to Maurizio Davini)
  259.         Luna 88K running Mach 2.0  (thanks to Ping-Kang Hsiung & Hideo Noro)
  260.  
  261.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  262.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  263.  
  264.    Q2.  I have machine X running operating system Y (not listed in A1).
  265.         Has anyone ported Khoros to this architecture?
  266.  
  267.    A2.  Currently, Khoros is being / has been ported by various people
  268.         in the Khoros user community to a variety of architectures,
  269.         including the Alliant VFX/2800, Apollo 425T, Convex C220,
  270.         DG Aviion, Fujitsu VP2200/10, IBM RS6000, Integraph
  271.         Interpro, MacII, Sony 3710, and some 386/486 machines.
  272.  
  273.         At this time, these platforms are not directly supported by the
  274.         Khoros group.  For more details, you may mail to
  275.         danielle@bullwinkle.eece.unm.edu; she is compiling a list of Khoros
  276.         ports, and can give you the information that she has so far.
  277.  
  278.         If YOU have done a port of Khoros to machine X running operating
  279.         system Y, she would very much appreciate a letter from you,
  280.         specifying:
  281.  
  282.            1) your name and place of employment (phone number optional)
  283.            2) your return email address
  284.            3) which version of Khoros you ported,
  285.            4) which machine /operating system you ported to
  286.            5) comments you might like to make.
  287.  
  288.         If you *do not* want to be contacted by other Khoros users, simply
  289.         say so and your name / email address will not be released.
  290.  
  291.  
  292.  
  293.  
  294.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  295.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  296.  
  297.  
  298.    Q3.  I want to install KHOROS on an IBM RS/6000 workstation
  299.     running under AIX x.x {and am getting error messages from the 
  300.         C compiler} {and would like more info} {has anybody done this}
  301.     {are binaries available}?.
  302.  
  303.    A3.  The Khoros group at UNM cannot help you directly with compiler errors
  304.         from the RS/6000, as they do not have an RS/6000 to test on.  However, 
  305.         binaries are available from an ftp site in Italy (thanks, Maurizio!) 
  306.         and advice from Nagarajan Ramesh has proven valuable to many:
  307.  
  308.         (1) Maurizio Davini (mau@ipifidpt.difi.unipi.it)
  309.  
  310.             Has ported Khoros 1.0 P5 to the IBM RS6000 running AIX 3.2;
  311.  
  312.             He has an official ftp site in Pisa, Italy, which includes the
  313.             Khoros source & system distribution, plus binaries for the
  314.             IBM RS6000 and Interactive Unix 2.2.1, available via anonymous ftp:
  315.  
  316.             address   = ipifidpt.difi.unipi.it (131.114.8.130)
  317.                  ftp  = anonymous (ftp)
  318.               passwd  = user@machine
  319.             directory = /pub/khoros
  320.             binaries  = /pub/khoros/bin/RS6000
  321.  
  322.         The khoros distribution is available also under our gopher server
  323.         ipifidpt.difi.unipi.it port 70
  324.  
  325.         (2) Nagarajan Ramesh (nagraj@watson.ibm.com)
  326.  
  327.             Has ported Khoros 1.0 P5 to IBM RS/6000 running AIX 3.1.5.
  328.             Has these comments for compiling on the RS6000 with AIX 3.1.5:
  329.  
  330.             "I substituted the bsd compiler for the 'cc' compile command, and
  331.             it works.  To do this you have to modify  your /etc/xlc.cfg file by
  332.             including the following stanza - EXACTLY THE WAY IT IS.
  333.  
  334.             bsdcc:  use             = DEFLT
  335.                     crt             = /lib/crt0.o
  336.                     mcrt            = /lib/mcrt0.o
  337.                     gcrt            = /lib/gcrt0.o
  338.                     libraries       = -lbsd, -lc
  339.                     proflibs        = -L/lib/profiled,-L/usr/lib/profiled
  340.                     options         = -H512,-T512, -qlanglvl=extended, -qnoro,
  341.                                       -D_BSD, -D_NONSTD_TYPES, -D_NO_PROTO,
  342.                                       -D_BSD_INCLUDES, -bnodelcsect,
  343.                                       -U__STR__, -U__MATH__
  344.  
  345.             Then, define a symbollic link from /bin/bsdcc to /bin/xlc.
  346.             You also have to change the 'cc' to 'bsdcc' in the ibm.cf file."
  347.  
  348.  
  349.  
  350.         (3) In addition, the following people have ported Khoros 1.0 P5
  351.             to IBM RS/6000 running AIX 3.2, and have been willing to answer
  352.             questions in the past:
  353.  
  354.             * Roque Donizete De Oliveira (oliveria@caen.engin.umich.edu)
  355.             * Edmond Mesrobian (edmond@cs.ucla.edu)
  356.             * Nick Kisseberth (nkissebe@delphi.beckman.uiuc.edu)
  357.  
  358.  
  359.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  360.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  361.  
  362.     Q4.  I want to install KHOROS on a 386/486 machine {and am getting 
  363.      error messages from the C compiler} {and would like more info} 
  364.      {has anybody done this} {are binaries available}?.
  365.  
  366.     A4.  (1) Scott Wilson (swilson@chama.eece.unm.edu)
  367.  
  368.             Khoros 1.0 P5 to Intel 486 based platform running Interactive
  369.             Unix System V/386 Release 3.2, Version 3.0. All software was
  370.             stock Interactive except  for the use of gcc2.2.2 as a compiler
  371.             and f2c to handle the fortran code.
  372.  
  373.             He is providing the Khoros 1.0 P5 on the main Khoros server.
  374.  
  375.             address   = pprg.eece.unm.edu (129.24.24.10)
  376.                  ftp  = anonymous (ftp)
  377.               passwd  = user@machine
  378.             directory = /pub/khoros
  379.             binaries  = /pub/khoros/bin/bin486
  380.             libraries = /pub/khoros/bin/lib486
  381.  
  382.  
  383.         (2) Maurizio Davini (mau@ipifidpt.difi.unipi.it)
  384.  
  385.             Khoros 1.0 to Interactive unix 386 2.2.1, using gcc 1.40 ,f2c
  386.             and X386 (the public domain version X11r4 of T.Roell).
  387.  
  388.             He is providing the Khoros 1.0 P5 binaries for Interactive
  389.             Unix 2.2.1, plus binaries for IBM RS6000 running AIX 3.2 via
  390.             anonymous ftp:
  391.  
  392.             address   = ipifidpt.difi.unipi.it (131.114.8.130)
  393.                  ftp  = anonymous (ftp)
  394.               passwd  = user@machine
  395.             directory = /pub/khoros
  396.             binaries  = /pub/khoros/bin/ISC-2.2.1
  397.                         /pub/khoros/bin/RS6000
  398.  
  399.             In the directory 386ix, you can also find the X11R4,
  400.             fortran compiler, and math library he used to compile Khoros.
  401.             For more information, please contact Maurizio.
  402.  
  403.  
  404.         (3) Dominic Richens (dominic@shamin.genie.uottawa.ca or
  405.                              richens@panda1.uottawa.ca)
  406.  
  407.             Khoros 1.0 P5 to HP Vectra RS-25C (386 box) running
  408.             SCO System V 3.2.2 ODT 1.1.
  409.  
  410.             He is providing the Khoros 1.0 P5 system with shell scripts
  411.             and patches needed to build Khoros under SCO ODT 1.1
  412.             via anonymous ftp:
  413.  
  414.             address   = popeye.genie.uottawa.ca (137.122.20.3)
  415.                  ftp  = anonymous (ftp)
  416.               passwd  = user@machine
  417.             directory = /pub/khoros
  418.  
  419.  
  420.         (4) Ulrich Breuer (breuer@pool.informatik.rwth-aachen.de)
  421.  
  422.             Used Maurizio Davini's port of Khoros 1.0 P5 as a starting point,
  423.             in order to port Khoros 1.0 P5 to 386ix running ISC Version 2.2 with
  424.             gcc-2.2.2 and no fortran.
  425.  
  426.             His configuration file, as well as a summary of the changes
  427.             necessary for doing the port may be obtained from Danielle Argiro
  428.             (danielle@chama.eece.unm.edu), or directly from him.
  429.  
  430.  
  431.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  432.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  433.  
  434.     Q5.  I want to install Khoros on an HP {9000/s370, s400, s800, or s700}.
  435.      {and am getting error messages from the C compiler} {and would like 
  436.      more info} {has anybody done this} {are binaries available}?.
  437.      
  438.     A5.  (answer thanks to Konstantinos Konstaninides, Hewlett-Packard 
  439.           Laboratories, Palo Alto, CA, kk@hpkronos.hpl.hp.com)
  440.  
  441.      Binaries are not available for the HP, but you should be able to
  442.      compile quite easily provided you have the complete C compiler
  443.      and a Fortran compiler.  To port khoros 1 patch 5 to HP-UX on an 
  444.      HP9000/s370, s400, s800, or s700, the following steps were taken.
  445.      
  446.      1. Get the Xaw and Xmu libraries and include files
  447.         from hpcvaaz.cv.hp.com:~ftp/pub/MitX11R4/libs.s300.Z (or libs.s800.Z
  448.         for the snakes) using anonymous ftp.
  449.      
  450.         As an alternative, you can also get the X11R5 libraries from
  451.         ~ftp/pub/MitX11R5 (same machine). This is probably the preferred
  452.         approach if you want to use X11 shared libraries.
  453.      
  454.         Uncompress and untar them into your favorite directory.
  455.      
  456.         NOTE: Don't mix those binaries with HP binaries in /usr/lib/X11R4
  457.         and the include files with include files in /usr/include/X11R4.
  458.         Unpredictable core dumbs may happen!
  459.         Instead use /usr/local/X11R4 or /usr/lib/X11R5 or whatever else
  460.         you like.
  461.      
  462.         (Ignore this step if you already have somehow the above
  463.         include files and libraries in your system.)
  464.      
  465.      2. Edit src/xvroutines/Lib/xvforms/Imakefile
  466.         Remove:
  467.         #define UnsharedObjs
  468.         UNSHAREDOBJS =\
  469.                 init.o
  470.      
  471.        and include init.o with the other objects.
  472.      
  473.      3. Edit $KHOROS_HOME/repos/config/imake_conf/hp.cf
  474.         and $KHOROS_HOME/repos/config/imake_conf/Lib/hpLib.rules
  475.      
  476.        as shown in the diffs file below
  477.        The changes fix the following problems:
  478.        a) Strip automatically the binaries (-s)
  479.        b) On the s700 solve the "too much defining" error message. (-Wp,..)
  480.        c) Include the appropriate Fortran libraries in the linking
  481.            of C code, since some khoros libraries use FORTRAN routines too.
  482.        d) Eliminate the -Dxxxx in f77 calls (with Shared Libraries).
  483.        e) Point to the correct place for the X11 Libraries
  484.        f) Install libraries with mode 555 (otherwise code with shared 
  485.                 libraries will not run)
  486.      
  487.      4. Depending on when you got your code you may want
  488.          a) get the fixed src/dspl/Lib/ldfilter.c routine
  489.            posted in the network. (4/9/92)
  490.          b) rm khoros/src/dspl/Lib/poly_yacc.c
  491.          (b) solves a linker problem on the s400.
  492.      
  493.      5. Run installit. Everything should compile with no problems.
  494.         After the compilation do
  495.      - ----------------------
  496.      
  497.      1. edit bin/kinstall_csh, and replace "mail -s" with "mailx -s"
  498.      2. You may want to edit bin/prnmanual
  499.         (Even if you don't have troff or groff, but you have a postscript 
  500.             printer, you can still print the man pages. Only set up the printer 
  501.             command and always accept the default answers. It should print the 
  502.             existing xxxxx.ps files)
  503.      
  504.  
  505.     -------------Diffs----------------
  506.  
  507. *** hp.cf.orig    Fri Apr 10 10:44:33 1992
  508. - --- hp.cf    Fri Apr 10 10:44:33 1992
  509. ***************
  510. *** 7,15 ****
  511.    */
  512.   
  513.   
  514. ! #define OSName                 HP-UX 8.05
  515.   #define OSMajorVersion         8
  516. ! #define OSMinorVersion         5
  517.   
  518.   #define SystemV                YES
  519.   
  520. - --- 7,15 ----
  521.    */
  522.   
  523.   
  524. ! #define OSName                 HP-UX 8.07
  525.   #define OSMajorVersion         8
  526. ! #define OSMinorVersion         7
  527.   
  528.   #define SystemV                YES
  529.   
  530. ***************
  531. *** 76,87 ****
  532.   #define InstallCmd $(SCRIPTSRC)/bsdinst.sh
  533.   #define BaseName /bin/basename
  534.   
  535.   #ifdef hp9000s800
  536. ! #   define StandardDefines        -DSYSV
  537.   #   define OptimizedCDebugFlags   +O1
  538.   #else
  539.   #  if OSMajorVersion == 8
  540. ! #      define StandardDefines        -DSYSV
  541.   #  else
  542.   #       define StandardDefines    -Wc,-Nd4000,-Ns4300,-Ne700,-Np300 -DSYSV -D_BSD -Drindex=strrchr -Dindex=strchr
  543.   #  endif
  544. - --- 76,88 ----
  545.   #define InstallCmd $(SCRIPTSRC)/bsdinst.sh
  546.   #define BaseName /bin/basename
  547.   
  548. + #define InstLibFlags -m 0555
  549.   #ifdef hp9000s800
  550. ! #   define StandardDefines        -s -Wp,-H512000 -DSYSV
  551.   #   define OptimizedCDebugFlags   +O1
  552.   #else
  553.   #  if OSMajorVersion == 8
  554. ! #  define StandardDefines         -s -DSYSV
  555.   #  else
  556.   #       define StandardDefines    -Wc,-Nd4000,-Ns4300,-Ne700,-Np300 -DSYSV -D_BSD -Drindex=strrchr -Dindex=strchr
  557.   #  endif
  558. ***************
  559. *** 89,98 ****
  560.   
  561.   #if OSMajorVersion == 8
  562.   #  if defined (hp9000s300) || defined (hp9000s400)
  563. ! #    define SysLibs -lBSD -lmalloc -lm -ll
  564.   #    define ForSysLibs -lFext -lF77 -lI77
  565.   #  else
  566. ! #    define SysLibs -lBSD -lmalloc -lm -ll
  567.   #    define ForSysLibs -lcl -lfsys
  568.   #  endif
  569.   #else
  570. - --- 90,99 ----
  571.   
  572.   #if OSMajorVersion == 8
  573.   #  if defined (hp9000s300) || defined (hp9000s400)
  574. ! #    define SysLibs -lBSD -lmalloc -lm -ll -lIO77
  575.   #    define ForSysLibs -lFext -lF77 -lI77
  576.   #  else
  577. ! #    define SysLibs -lBSD -lmalloc -lm -ll -lcl
  578.   #    define ForSysLibs -lcl -lfsys
  579.   #  endif
  580.   #else
  581. ***************
  582. *** 100,106 ****
  583. - --- 101,114 ----
  584.   #   define ForSysLibs -lFext -lF77 -lI77
  585.   #endif
  586.   
  587. + #define XLibDir  /usr/local/x11r4/lib.s300
  588. + #define XIncludes -I/usr/local/x11r4
  589.   /*
  590. + #define XLibDir  /usr/lib/X11R5
  591. + #define XIncludes -I/usr/include/X11R5
  592. + */
  593. + /*
  594.    * The Shared libaries for HP may not be complete.  We do not
  595.    * have an HP. This Lib/hpLib.rules is a guess at how hp
  596.    * shared libs should be made. Please mail and changes
  597. ***************
  598. *** 108,114 ****
  599.    * update for the next version. 
  600.    */
  601.   
  602. ! #define HasSharedLibraries NO
  603.   
  604.   #if HasSharedLibraries
  605.   #  define SharedLibRev 1.1                /* Use Khoros revision number */
  606. - --- 116,122 ----
  607.    * update for the next version. 
  608.    */
  609.   
  610. ! #define HasSharedLibraries YES
  611.   
  612.   #if HasSharedLibraries
  613.   #  define SharedLibRev 1.1                /* Use Khoros revision number */
  614. *** Lib/hpLib.rules.or    Mon Apr  6 13:38:05 1992
  615. - --- Lib/hpLib.rules    Mon Apr  6 13:38:05 1992
  616. ***************
  617. *** 73,81 ****
  618.                                       @@\
  619.   .f.o:                                    @@\
  620.       $(RM) $@ shared/$@                        @@\
  621. !     $(FC) -c $(SHAREDCODEDEF) $(SHLIBDEF) $(FLIBFLAGS) $*.f        @@\
  622.       $(MV) $*.o shared/$*.o                        @@\
  623. !     $(FC) -c $(SHLIBDEF) $(FLIBFLAGS) $*.f                @@\
  624.                                                                         @@\
  625.   clean::                                @@\
  626.       -@if [ -d shared ]; then echo " $(RM) shared/?*.o"; \        @@\
  627. - --- 73,81 ----
  628.                                       @@\
  629.   .f.o:                                    @@\
  630.       $(RM) $@ shared/$@                        @@\
  631. !     $(FC) -c $(FLIBFLAGS) $*.f                    @@\
  632.       $(MV) $*.o shared/$*.o                        @@\
  633. !     $(FC) -c $(FLIBFLAGS) $*.f                    @@\
  634.                                                                         @@\
  635.   clean::                                @@\
  636.       -@if [ -d shared ]; then echo " $(RM) shared/?*.o"; \        @@\
  637.  
  638.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  639.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  640.  
  641.    Q6.  I want to install Khoros on a Convex,  under ConvexOS x.x
  642.         {and am getting error messages from the C compiler} {and 
  643.         would like more info} {has anybody done this} {are binaries available}?.
  644.  
  645.    A6.  (answer thanks to Tait Cyrus, CONVEX Computer Corp., Colorado 
  646.      Springs, CO, cyrus@convex.com) 
  647.  
  648.     Binaries for the Convex are not available;  however, building
  649.         Khoros 1.0 P5 on the Convex is quite easy.  The following is a 
  650.     convex.cf file which may be used for compiling Khoros under 
  651.     ConvexOS 9.1.
  652.  
  653. /*
  654.  * convex.cf - Provided by W. Tait Cyrus (cyrus@convex.com) April. 22, 1992
  655.  * This is a configuration file for a Convex.
  656.  * Thanks to Minaz Punjani <cziup09@pluto.ulcc.ac.uk> for verifying under
  657.  *      ConvexOS 10.0.
  658.  *
  659.  * Khoros has been successfully compiled using the following:
  660.  *      ConvexOS        9.1 & 10.0
  661.  *      C               4.1, 4.3.1, and 4.3.2
  662.  *      Fortran         6.1 & 7.0 [see note below]
  663.  *      CXWindows       2.1 & 3.0
  664.  *
  665.  * SET VERSION NUMBERS BEFORE MAKING MAKEFILES
  666.  */
  667.  
  668. /*
  669.  * Set the major version number of the Fortran compiler you will be using
  670.  * in the following #define.
  671.  */
  672.  
  673. #define Convex_fc_MajorVersion 7
  674.  
  675. #if Convex_fc_MajorVersion >= 7
  676. #   define Convex_fc_lib        -llfs
  677. #else
  678. #   define Convex_fc_lib
  679. #endif
  680.  
  681. #define OSName                  ConvexOS V9.1
  682. #define OSMajorVersion          9
  683. #define OSMinorVersion          1 
  684. /*
  685.  * Uncommenting for a ConvexOS 10.0 system is not really necessary since 
  686.  * nowhere in Khoros is a check of OSMajorVersion made for 10.  The only check
  687.  * is the one below and it just checks against 8.
  688.  *
  689.  * #define OSName               ConvexOS V10.0
  690.  * #define OSMajorVersion       10
  691.  * #define OSMinorVersion       0 
  692.  */
  693.  
  694. /*
  695.  * does your machine support saber C
  696.  */
  697. #define HasSaberC               NO      /* for machines that have it */
  698.  
  699. /*
  700.  * Do you want to Compile the tiff library and tiff2viff/viff2tiff
  701.  * conversion routines? If set to NO, then the tiff library will
  702.  * not be compiled and thus no programs will link against that
  703.  * library.
  704.  */
  705.  
  706. #define UseTiff YES
  707.  
  708.  
  709. /*
  710.  * are you using gcc? if yes then set HasGcc to YES
  711.  */
  712. #define HasGcc                  NO
  713.  
  714. #define SystemV                 NO
  715. #define HasVoidSignalReturn     YES
  716. #define StandardDefines         -DXAW_BC
  717. #define VersionNumber           2.0
  718. #define HasFortran              YES
  719. #define FortranCmd              /usr/convex/fc
  720. #define HasPutenv               NO
  721. #define HasBsearch              YES
  722. #define HasVFork                YES
  723. #define HasTempnam              NO
  724. #define HasBsdTypes             YES
  725. #define HasRandom               YES
  726. #define HasDirent               NO
  727. #define HasWait3                NO
  728.  
  729. #if OSMajorVerson == 8
  730.  
  731. #   define OptimizedCDebugFlags -O3
  732. #   define InstScriptFlags      -m 0755 -g bin
  733. #   define InstManFlags         -m 0444 -g bin
  734. #   define BootstrapCFlags      -Dconvex -pcc
  735.  
  736. #   define DefaultCCOptions     -O3 -pcc
  737. #   define FortranDebugFlags    -O3
  738.  
  739. #   define ForSysLibs -lF77 -lI77 -lD77 -lmathC2 
  740.  
  741. #else  /* assuming OSMajorVersion > 8 */
  742.  
  743. #   define OptimizedCDebugFlags
  744. #   define InstScriptFlags      -m 0755 
  745. #   define InstManFlags         -m 0444
  746. #   define BootstrapCFlags      -Dconvex
  747. #   define DefaultCCOptions     -O3 -or none -fi
  748. #   define FortranFlags         -O3 -fi -or none
  749. #   define LibraryFCOptions     -O3 -fi -or none
  750. #   define ForSysLibs -lF77 -lI77 -lD77 -lmathC2 Convex_fc_lib
  751.  
  752. #endif
  753.  
  754. #define ReDefFortran NO
  755. #define UNCOMPRESSPATH /usr/local/bin/uncompress
  756. #define UseCCMakeDepend YES
  757. #define LibraryFDebugFlags -pp=fcpp1 -uo -is .
  758.  
  759. /* 
  760.  * the following is a list of data transports available for
  761.  * use within Khoros:
  762.  *      UseFile            - Standard file system transport
  763.  *      UseSockets         - bsd Sockets
  764.  *      UseSharedMem       - shared memory
  765.  *      UseSunVirMem       - sun virtual memory
  766.  *      UsePipes           - Pipes
  767.  *      UseStream          - Named pipes
  768.  *      UseSunRPC          - Sun's remote procedure call
  769.  *      UseKTLI            - sysV transport layer interface
  770.  *      UseApolloRPC       - Apollo's remote procedure call
  771.  *
  772.  * Set the data transports that you want to use to YES and
  773.  * all others to NO. normally, you should not have to
  774.  * modify this list.
  775.  * 
  776.  */
  777.  
  778. #define UseFile         YES
  779. #define UseSockets      NO
  780. #define UseSharedMem    NO
  781. #define UseSunVirMem    NO
  782. #define UsePipes        NO
  783. #define UseStream       NO
  784. #define UseSunRPC       NO
  785. #define UseKTLI         NO
  786. #define UseApolloRPC    NO
  787.  
  788. #define NormalFortranObjectRule()                                       @@\
  789. all::                                                                   @@\
  790.         $(FC) -il $(FSRCS)                                              @@\
  791.                                                                         @@\
  792. .f.o:                                                                   @@\
  793.         $(RM) $@                                                        @@\
  794.         $(FC) -c $(FLIBFLAGS) $*.f                                      @@\
  795.                                                                         @@\
  796. clean::                                                                 @@\
  797.         $(RM) *.fil
  798.  
  799.  
  800.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  801.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  802.  
  803.    Q7.  Can I run Khoros on my PC? Is Khoros available for PC's running DOS?
  804.  
  805.    A7a. The three major requirements for Khoros are: X11R4, a UNIX-type
  806.         operating system, and lots of space (min. 120-150 Meg).  Only if your
  807.         PC has these three prerequisites can you consider doing a port of
  808.         Khoros to your PC.  Successful ports of Khoros have been done for
  809.         the Mac II and various 386/486 machines that meet these requirements.    
  810.     Please see Q4 for more details on ports to the 386/486.
  811.  
  812.    A7b.    No, nor are there plans to make Khoros available for PC's
  813.     running DOS as of yet.  The design changes necessary for
  814.     completing such a task would be so extensive as to make the
  815.     attempt unworkable at this time.
  816.  
  817.  
  818.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  819.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  820.  
  821.    Q8.  Is there a port of Khoros for a VMS system?
  822.  
  823.    A8.  No.  The software depends heavily on system functions that are
  824.         unique to Unix-based operating systems.
  825.  
  826.  
  827.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  828.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  829.  
  830. ================  Compile With Shared Libraries ===============================
  831.  
  832.    Q9.  What are shared libraries?  Does Khoros work with shared libraries?
  833.         What are the advantages/disadvantages of using shared libraries?
  834.     Should I compile Khoros with shared libraries?
  835.  
  836.    A9a. Shared libraries are a mechanism implemented by some operating 
  837.     systems (SUN, HP, DG Aviion, etc)  that allow a significant savings
  838.     of disk space by allowing programs to link against any necessary
  839.     libraries at runtime rather than at compile time.  Since the libraries
  840.     are not compiled into the program's executable, each program that
  841.     is compiled with shared libraries takes up much less space. 
  842.  
  843.    A9b. Yes. You can compile Khoros with/for shared libraries.
  844.         If you are compiling shared, make sure that your machine.cf
  845.         configuration file has the symbol HasSharedLibraries set to YES.
  846.  
  847.    A9c. The advantage, of course, is savings on disk space.  The disadvantage
  848.         is that because libraries must be linked in at runtime, you will
  849.     experience a lag in startup time of programs.  The disk space savings,
  850.     like amount of the extra time at startup, will vary with machine 
  851.     architecture, operating system implementation, and other factors.
  852.  
  853.    A9d. That depends on your position with respect to the tradeoffs.  
  854.     If you are short on disk space, using shared libraries may be the 
  855.     answer to your problems.  If you have plenty of disk space to waste, 
  856.     you may want to go ahead and compile statically so that programs 
  857.     run faster.  
  858.  
  859.     Some excerpts of mail from Khoros users who have reported disk savings 
  860.     due to shared libraries follow (thanks, guys, for the info):
  861.  
  862.     "I've just brought Khoros up with shared libraries under
  863.      DG/UX 5.4 (DG AViiON).  However, the size savings seems quite
  864.      a bit less than I was expecting...Anyway, there is a net disk 
  865.      savings of 22.2MB, some 27MB (from 86MB to 59MB) in bin and about
  866.      4.7MB in lib).        -- Steve"  
  867.  
  868.     "I don't know about the savings, but do know the sizes with SUN
  869.      shared libs.  (patchlevel 5) Bin: 24Mb Lib: 9.2Mb, with 3.7Mb shared 
  870.      libs.  I recall needing approx. 80-90 Mb for bin without shared libs 
  871.      (for patch level 2).   -- Klamer"
  872.  
  873.     "I got 7 MB of libraries and about 20 MB of executables on a 
  874.      SPARCstation running {shared libs}. I would have to expect 63 MB of 
  875.      executables + 21 MB of librares and objects when not using shared 
  876.      code - it saved about 40 - 50 MB...  -- Kritt"
  877.  
  878.     "Here are my numbers for khoros patch 5: bin 9.3 MB, lib 9.1 MB
  879.      The lib contains BOTH shared and archive libs. Thus, making khoros 
  880.      shared gives 9.3 MB bins + 4.5 MB libs = 13.8 MB...  Not long ago I 
  881.      had an unstrip'ed code of patch 4 that took (read my lips) 165 MB!!   
  882.      -- Peder"
  883.  
  884.  
  885.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  886.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  887.  
  888.    Q10. Why do I get unresolved references when I compile Khoros with
  889.         shared libraries on a SUN4?
  890.  
  891.    A10. If you are compiling on a SUN4 under 4.1.1 and have installed
  892.         the loader (ld) program patch, or you are compiling on a SUN4
  893.         under 4.1.2 you must compile Khoros statically. Make sure
  894.         you set HasSharedLibraries to NO in the sun.cf file.
  895.  
  896.         The ld program under 4.1.1 (with the patch) and under 4.1.2
  897.         requires that all references in the libraries be resolved. So,
  898.         this means that every Khoros routine will need to load against
  899.         all the libraries. This is not reasonable for Khoros, and the
  900.         size of the shared executables after loading against all the
  901.         libraries are not significantly smaller than if they were
  902.         loaded statically.
  903.  
  904.  
  905.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  906.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  907.  
  908.    Q11. When compiling shared, I get a large set of errors from
  909.         the loader listed in my make.World file, as in:
  910.  
  911.         rm -f vadd
  912.         cc -o vadd vadd.o  -L/home/holst/khoros/lib -L/mnt/elocal/lang/SC1.0
  913.         -O -Bdynamic -lghost  -lvexpr  -lnum_anal  -ldspl  -lformat
  914.         -lgeo_surf  -lvipl  -lvutils  -lvmath  -lvrast  -lvgparm  -lverror
  915.         -ltiff  -lm -ll -ldl
  916.         ld: Undefined symbol
  917.            _cg_
  918.            _zgedi_
  919.            _zgeco_
  920.            _zgesl_
  921.            _zsvdc_
  922.            _ch_
  923.            _dgesl_
  924.            _dgefa_
  925.            _e_wsfe
  926.            _pow_ii
  927.            _s_wsFe
  928.            _s_stop
  929.         *** Error code 2
  930.         install in ./vipl/arith_binary/vadd done
  931.         make: Warning: Target `install' not remade because of errors
  932.  
  933.    A11. This is the behavior of the loader in Sun OS 4.1.2. It
  934.         insists on resolving everything in linpack, and since that
  935.         version of linpack does not appear to be fully consistent
  936.         (i.e. those routines are reference but not defined), you get
  937.         these error messages.
  938.         To solve the problem, you may:
  939.  
  940.         * use the (pre ld patch) loader of 4.1.1.
  941.  
  942.       suggestion, to use something like:
  943.           lrwxrwxrwx  1 root            8 Jun 10 11:04 /usr/bin/ld -> ld.4.1.1
  944.           -rwxr-xr-x  1 root       156161 Mar  5 15:46 /usr/bin/ld.4.1.1*
  945.           -rwxr-xr-x  1 root       156161 Oct 23  1991 /usr/bin/ld.4.1.2*
  946.       so that you can switch between the two loaders easily.
  947.  
  948.         * add stub routines to linpack (like extern void zgeco_() {} )
  949.  
  950.         * in $KHOROS_HOME/repos/config/imake_conf/sun.cf,
  951.           change:
  952.         #  define DefaultCCOptions -Bdynamic
  953.         #  define LibraryLdOptions -assert pure-text
  954.       to:
  955.         #  define DefaultCCOptions -Bdynamic -Qoption ld -assert -Qoption ld
  956.               nodefinitions
  957.             #  define LibraryLdOptions -assert nodefinitions
  958.  
  959.  
  960.         If you are compiling on a SUN4 under 4.1.1 and have installed
  961.         the loader (ld) program patch, you must either follow the solutions 
  962.     given above, or  compile statically.
  963.  
  964.  
  965.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  966.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  967.  
  968.  
  969.    Q12. I am compiling [some xvroutine] against X11R5 with shared libraries.
  970.         The linker produces this error message:
  971.  
  972.     ld: /lib/libXaw.sa.5.0(sharedlib.o): _formWidgetClass: multiply defined
  973.             /lib/libXaw.sa.5.0(sharedlib.o): _labelWidgetClass: multiply defined
  974.         *** Error code 2
  975.         make: Fatal error: Command failed for target `{xvroutine}'
  976.  
  977.    A12. You will need to change Form.c in 
  978.         $KHOROS_HOME/src/xvroutines/Lib/xvutils.
  979.  
  980.     Try changing line 137 from:
  981.         WidgetClass formWidgetClass = (WidgetClass)&formClassRec;
  982.     to:
  983.         static WidgetClass formWidgetClass = (WidgetClass)&formClassRec;
  984.  
  985.     And, in the file Label.c in $KHOROS_HOME/src/xvroutines/Lib/xvutils,
  986.     Try changing line 140 from:
  987.         WidgetClass labelWidgetClass = (WidgetClass)&labelClassRec;
  988.     to:
  989.         static WidgetClass labelWidgetClass = (WidgetClass)&labelClassRec;
  990.  
  991.     Recompile the xvutils library, and recompile the xvroutine.
  992.  
  993.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  994.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  995.  
  996.    Q13. I am having problems using cantata (or other xvroutine)
  997.         after recently compiling on a SUN with shared libraries.  I get the
  998.         error message:
  999.      Warning: Widget class VendorShell version mismatch (recompilation needed):
  1000.        widget 11004 vs. intrinsics 11003.
  1001.      Warning: Widget class Form version mismatch (recompilation needed):
  1002.        widget 11004 vs. intrinsics 11003.
  1003.  
  1004.    A13. Your LD_LIBRARY_PATH environment variable that you use to compile
  1005.         your object files with is different than your run time environment.
  1006.  
  1007.         To get a bit of information about what is going on, do:
  1008.         % ldd $KHOROS_HOME/bin/{problem program}
  1009.  
  1010.         If the path printed for Xaw and Xt is different than what is listed
  1011.         when you do:
  1012.         % printenv
  1013.         then this is the problem.  To fix it, unset LD_LIBRARY_PATH or set it
  1014.         to the correct path.
  1015.  
  1016.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  1017.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1018.  
  1019.    Q14. Warpimage {or other xvroutine} did not compile after on a SUN4 
  1020.     architecture with static libraries;  in fact, it made the cc compiler 
  1021.     segmentation fault and core dump!  What happened?
  1022.  
  1023.    A14. The problem is that the Makefile that is created for warpimage has
  1024.         a line that is too long for ld to handle.  The solution is to edit
  1025.         the Makefile and delete these three lines:
  1026.  
  1027.         $(FILEFORMATLIB) \
  1028.         $(DSPLLIB) \
  1029.         $(TIFFLIB)
  1030.  
  1031.         and change the line
  1032.         $(VERRORLIB) \
  1033.         to
  1034.         $(VERRORLIB)
  1035.  
  1036.         This causes the cc line to be of a reasonable length, and warpimage
  1037.         {or other xvroutine} will now compile properly.
  1038.  
  1039.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  1040.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1041.  
  1042.    Q15. Khoros compiled ok under shared libraries.  However, when I try to
  1043.         use the programs, I get messages that say:
  1044.  
  1045.         lib{something}.so.1 not found
  1046.  
  1047.    A15. The message implies that your LD_LIBRARY_PATH environment variable 
  1048.         that was used to compile the Khoros object files is different than 
  1049.         your run time environment.
  1050.  
  1051.         To get a bit of information about what is going on, do:
  1052.         % ldd $KHOROS_HOME/bin/{problem program}
  1053.  
  1054.         If the path printed for lib{something} is different than what is 
  1055.         listed when you do:
  1056.         % printenv
  1057.         then this is the problem.  To fix it, unset LD_LIBRARY_PATH or set 
  1058.         it to the correct path.
  1059.  
  1060.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1061.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1062.  
  1063. =====================   Compiling with X11R5  ================================
  1064.  
  1065.  
  1066.    Q16. Can I compile Khoros with X11R5?
  1067.  
  1068.    A16. Yes.  See Q12 for the most frequent problems when compiling 
  1069.     Khoros with X11R5.
  1070.  
  1071.  
  1072.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  1073.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  1074.  
  1075.    Q17. I am compiling Khoros with MIT's X11R5.  When linking xvroutines
  1076.         (cantata, editimage, etc), the compiler tells me that
  1077.         _viewportWidgetClass is multiply defined.  What's the problem?
  1078.  
  1079.    A17. This problem is due to the fact that we have our own bugged fixed
  1080.         versions of the Viewport widget.  We were hoping that R5
  1081.         would have these fixes so that we could delete them, but unfortunately
  1082.         this isn't the case.  Kim Tang provides these fixes to get around the
  1083.         problem:
  1084.  
  1085.         In $KHOROS_HOME/src/xvroutines/cantata/Viewport.c, change line 141 to:
  1086.         static WidgetClass viewportWidgetClass = (WidgetClass)&viewportClassRec;
  1087.  
  1088.  
  1089.    Q17b. ld: /lib/libXaw.sa.5.0(sharedlib.o): _formWidgetClass: multiply defined
  1090.             /lib/libXaw.sa.5.0(sharedlib.o): _labelWidgetClass: multiply defined
  1091.         *** Error code 2
  1092.         make: Fatal error: Command failed for target `{xvroutine}'
  1093.  
  1094.    A17b. see Q13.
  1095.  
  1096.  
  1097.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  1098.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  1099.  
  1100.  
  1101. ===========  Makefiles, Imakefiles (Compiling New Programs) ===================
  1102.  
  1103.    Q18. I don't want to compile Khoros source, but I want to compile
  1104.         my own programs so I need the libraries. How can I obtain the
  1105.         Khoros libraries?
  1106.  
  1107.    A18. We distribute libraries for the SUN4, Decmips, and SGI via
  1108.         anonymous FTP:
  1109.   
  1110.            USA:                 ftp pprg.eece.unm.edu  (129.24.24.10)
  1111.         (University of  Login:  anonymous  (or ftp)
  1112.             New Mexico) Password: user_name@machine
  1113.   
  1114.         To obtain the libraries, cd to "pub/khoros/bin". You will find
  1115.         three sub-directories called libsun4, libdecmips and libsgi.
  1116.         In these sub-directories are the compressed tar files containing
  1117.         the libraries. Unpack the libraries the same way you would
  1118.         unpack the binaries. Consult the Khoros installation guide.
  1119.  
  1120.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1121.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1122.  
  1123.     Q19. I am trying to compile an xvroutine, and when I run make install
  1124.          I get the error:
  1125.          installing in ./{xvroutine}...
  1126.          Make:  Don't know how to make {KHOROS_HOME}/lib/libdisplay.a.
  1127.          Stop.
  1128.          *** Error code 1
  1129.  
  1130.     A19. Most likely, you do not have the Khoros libraries that are necessary
  1131.          to compile spectrum (and any other toolbox you may acquire).
  1132.          These libraries (*.a) would be located in $KHOROS_HOME/lib if you
  1133.          had them.  If you do not have them, you may either:
  1134.          (1) ftp them from pprg  (see Q11)
  1135.          - or -
  1136.          (2) compile the Khoros system (you must have source code for this)
  1137.  
  1138.  
  1139.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1140.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1141.  
  1142.     Q20. I want to link a {vroutine/xvroutine} for dbx.
  1143.  
  1144.     A20. In your Imakefile, add:
  1145.          CDEBUGFLAGS = -g
  1146.  
  1147.      % makemake
  1148.  
  1149.          To remake your Makefile.
  1150.  
  1151.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1152.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1153.  
  1154.     Q21. I want my {vroutine/xvroutine} to use some specific 
  1155.          include files and special libraries.
  1156.  
  1157.     A21. Suppose you have additional include files you want (relative to the
  1158.          program) in "../../include" and an extra library you want to use in
  1159.          "../../lib/libfubar.a."
  1160.  
  1161.          So in your Imakefile, you'd add:
  1162.  
  1163.          EXTRA_INCLUDES =  -I../../include
  1164.          EXTRA_LIBRARIES = ../../lib/libfubar.a
  1165.  
  1166.      % makemake 
  1167.  
  1168.      To remake your Makefile.  You can also use the absolute path, but 
  1169.      this is not a good idea if you have your program on more than one 
  1170.          architectures using NFS, as all the architectures will use the same 
  1171.      Imakefile, but the absolute path on one machine may not be the same 
  1172.          as the absolute path on the second.
  1173.  
  1174.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1175.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1176.  
  1177.    Q22.  Is there a way to get ghostwriter to automatically generate 
  1178.      the Makefile so that it will look for other include directories 
  1179.          and libraries?
  1180.  
  1181.    A22.  (answer thanks to Bradford Castallia, Planetary Image Research Lab,
  1182.           University of Arizona)
  1183.  
  1184.          You can specify site-specific libraries that should always be 
  1185.          referenced.
  1186.  
  1187.       However, for specific cases, modify the {toolbox}.def file (under
  1188.       $TOOLBOX/repos/config/imake_conf). Edit the lines containing the
  1189.       definitions of TOOLBOXINCLUDE and TOOLBOX_LIBRARIES, and you may also
  1190.       want to edit the line defining TOOLBOX_DEP_LIBRARIES to be consistent
  1191.       with the definition of TOOLBOX_LIBRARIES. For example, I have a
  1192.       toolbox for applications that access our digital filmwriter which
  1193.       requires access to a few special include files and libraries, so I have
  1194.       modified filmwriter.def thus:
  1195.       
  1196.       TOOLBOXINCLUDE = -I$(TB_NAME)/include \
  1197.                        -I/usr/local/QCR/include \
  1198.                        -I/usr/local/image/include \
  1199.                         -I/usr/local/PIRL
  1200.       
  1201.       TOOLBOX_LIBRARIES = -lfilmwriter \
  1202.                           -lQCR \
  1203.                           -lImage \
  1204.                           -lPIRL
  1205.      
  1206.          TOOLBOX_DEP_LIBRARIES = $(LIBDIR)/libfilmwriter.a \
  1207.                                /usr/local/lib/libQCR.a \
  1208.                                /usr/local/lib/libImage.a \
  1209.                                /usr/local/lib/libPIRL.a
  1210.       
  1211.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1212.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1213.  
  1214. ===================  Compiling with gcc ======================================
  1215.  
  1216.  
  1217.    Q23.  I'm having a problem with gcc:
  1218.  
  1219.       % gcc test.c -I/usr/local/include -I$KHOROS_HOME/include
  1220.  
  1221.      In file included from {KHOROS_HOME}/include/vinclude.h:128, 
  1222.      from test.c:3: 
  1223.      {KHOROS_HOME}/include/vdefines.h:219: conflicting types for `malloc' 
  1224.          /usr/local/{...}/include/malloc.h:41: previous declaration of `malloc'
  1225.          {KHOROS_HOME}/include/vdefines.h:223: conflicting types for `calloc'
  1226.          /usr/local/{...}/include/malloc.h:39: previous declaration of `calloc'
  1227.  
  1228.    A23.  In the file $KHOROS_HOME/include/vdefines.h,
  1229.      change the line:
  1230.  
  1231.      #ifndef AUX
  1232.      to:
  1233.       #if !defined(AUX) && !defined(__GNUC__)
  1234.  
  1235.      Then, in $KHOROS_HOME/src, execute 
  1236.      % make Makefiles
  1237.      % make install
  1238.  
  1239.  
  1240.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1241.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1242.  
  1243.    Q24. I noticed in the make.World file is that a few files are compiled 
  1244.         using 'cc', while some others are compilied using 'gcc'. Is this normal? 
  1245.         Also, there were messages like: 
  1246.         gcc: file path prefix `dynamic' never used
  1247.  
  1248.    A24. The -Bdynamic flag does not exist for gcc. Use -static for a static
  1249.         binary compile, as the default is to load dynamically. The -Bdynamic 
  1250.         flag was ignored and not used.
  1251.  
  1252.     It is normal that some files will be compiled with cc.  We use cc to 
  1253.         compile the bootstrap programs such as imake. However, gcc should have
  1254.         been used for all the rest of the routines.
  1255.  
  1256.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1257.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1258.  
  1259. ===================  Compiling With/Without FORTRAN ==========================
  1260.  
  1261.    Q25. Do I HAVE to have FORTRAN to compile Khoros?  Which Khoros programs
  1262.         will I miss out on if I don't compile with FORTRAN?
  1263.  
  1264.    A25. No, you don't have to have FORTRAN to compile Khoros, although there
  1265.         are some Khoros programs that use it.  If you don't compile with
  1266.         FORTRAN, you will NOT be able to run the following programs, nor will
  1267.     you be able to make calls to any of their associated library routines:  
  1268.  
  1269.     Program         Library Call
  1270.         -------         ------------
  1271.     * warpimage
  1272.     * vbilinco     (lvbilinco)
  1273.     * vpolyco    (lvpolyco)
  1274.     * vsvpsf    (lvsvpsf)
  1275.     * vblse        (lvblse)
  1276.     * vfft        (lvfft)
  1277.     * dmusic    (ldmusic)
  1278.     * dminorm    (ldminorm)
  1279.     * dacorr    (ldacorr)
  1280.     * dxcorr    (ldxcorr)
  1281.     * dconvo    (ldconvo)
  1282.     * dfft1d    (ldfft1d)
  1283.     * difft1d    (ldifft1d)
  1284.     * minvert    (lminvert)
  1285.     * msvd        (lmsvd)
  1286.     * meigen    (lmeigen)
  1287.     * mlud        (lmlud)
  1288.     * mlse        (lmlse)
  1289.     * minfo        (lminfo)
  1290.  
  1291.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1292.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1293.  
  1294.    Q26. How do I compile the Khoros system without FORTRAN?
  1295.  
  1296.    A26. Look for the line in your configuration (*.cf) file that says,
  1297.         #define HasFortran YES
  1298.         Change it to:
  1299.         #define HasFortran NO
  1300.  
  1301.         For those compiling on a SUN architecture, note that in the sun.cf 
  1302.     file for Khoros 1.0 Patch 5, there is an INCORRECT comment:
  1303.         /*
  1304.          * does your machine have fortran? If not comment the next
  1305.          * two lines
  1306.          */
  1307.     The comment lies.  Do not comment out the lines, simply make
  1308.     sure that HasFortran is set to 'NO' (not 'no' or 'No').  
  1309.  
  1310.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1311.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1312.  
  1313.    Q27. I don't have a FORTRAN compiler, but I need the Khoros programs that
  1314.         use FORTRAN.  What can I do?
  1315.  
  1316.    A27. The public domain "f2c" FORTRAN-to-C converter can be used to produce
  1317.         C code from the FORTRAN sections of Khoros.  The "f2c" program can
  1318.         be obtained via anonymous ftp from various sites including 
  1319.     pprg.eece.unm.edu (129.24.24.10) in the directory, /pub/dist/f2c, and
  1320.     research.att.com (192.20.225.2) in the directory, /netlib.  
  1321.     Khoros programs that depend on FORTRAN code that was converted to 
  1322.     C by the f2c program dont't have their results guaranteed by the Khoros 
  1323.     group, however, at least not at this time.
  1324.  
  1325.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1326.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1327.  
  1328.    Q28. I am writing a {vroutine/xvroutine} in which I need to make a call
  1329.         from my C code to a FORTRAN subroutine/function.  How do I do this?
  1330.  
  1331.    A28. (1) Declare the FORTRAN subroutine/function, making sure you use an 
  1332.             underscore after the name, as in:
  1333.             (void) subroutine_();
  1334.             (type) function_();
  1335.  
  1336.     (2) Call the subroutine/function, remembering that when you call FORTRAN 
  1337.         from C, you must always pass values by reference (address), as in:
  1338.             int int_value, *int_array;
  1339.         (void) subroutine_(&int_value, int_array);
  1340.  
  1341.     (3) Note that 2D arrays in FORTRAN are stored in the opposite way 
  1342.         from those in C.  In C, a 2D array is stored as row by row, 
  1343.         whereas in FORTRAN a 2D array is stored column by column.  
  1344.  
  1345.     (4) Also note that the TRUE and FALSE status values returned by 
  1346.         a FORTRAN program may not be the 1 and 0 that are used by 
  1347.         convention in C.
  1348.  
  1349.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1350.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1351.  
  1352.    Q29.  I am setting up my *.cf configuration file in preparation for compiling
  1353.          Khoros.  How do I find out what libraries the linker expects in order
  1354.          to link C code against FORTRAN, in order to provide the proper
  1355.          libraries for the ForSysLibs option?
  1356.  
  1357.    A29.  You can find out what libraries the linker expects by compiling any
  1358.          available Fortran program with the [-v] option, and looking for the
  1359.          libraries specified after a [-l] that are NOT used when compiling
  1360.          C code.  Roque Donizete De Oliveria provides the example below, which
  1361.          he used in getting Khoros to compile under Ultrix 4.2:
  1362.  
  1363.         % f77 -v machar.F
  1364.         /lib/cpp -DLANGUAGE_FORTRAN -DMIPSEL -Dunix -Dmips -Dhost_mips 
  1365.            machar.F > machar.i
  1366.         /usr/lib/cmplrs/fort/decfort -o /tmp/forAAAa01710.o machar.i
  1367.         /usr/bin/cc -v /tmp/forAAAa01710.o -nocount -lUfor -lfor -lutil 
  1368.        -li -lot s -lm
  1369.         /usr/lib/cmplrs/cc/ld -G 8 -g0 -nocount /usr/lib/cmplrs/cc/crt0.o 
  1370.        -count /tmp/forAAAa01710.o -nocount -lUfor -lfor -lutil -li 
  1371.            -lots -lm -nocount -lc
  1372.         0.2u 1.7s 0:09 21% 84+285k 333+63io 17pf+0w
  1373.  
  1374.          In this case, therefore, you would specify in the ultrix.cf file:
  1375.  
  1376.          ForSysLibs: -lUfor -lfor -lutil -li -lots
  1377.  
  1378.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1379.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1380.  
  1381. ===================  Miscellaneous ============================================
  1382.  
  1383.     Q30. I seem to be having some trouble getting Khoros working on our Sun 3. 
  1384.          I have tried executing {cantata, editimage, etc}  {journal playbacks}, 
  1385.      but I keep getting the error "ld.so: libXaw.so.4: not found".
  1386.  
  1387.     A30. (answer thanks to Mike Gross, Physics Board, Univ of California)
  1388.  
  1389.      Your problem is that you have to run ldconfig to tell your system where
  1390.      your shared libraries are. The syntax is:
  1391.  
  1392.      ldconfig <directory> [<directory>] [<directory>] ...
  1393.  
  1394.      where each directory is a possible location for a *.so.* file. You
  1395.      may have to use find to figure out where all the libraries are. Try
  1396.      this out, and if it works, put the ldconfig command in /etc/rc.local,
  1397.      so that you won't lose it next time your system crashes.
  1398.  
  1399.      An alternative is to compile khoros using static libraries, but this
  1400.      will make your executables much larger.
  1401.  
  1402.  
  1403.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1404.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1405.  
  1406.     Q31.  Since the docs say that RPC isn't implemented yet, I defined 
  1407.       UseSunRPC as NO.  Compiling phantomd results in the following:
  1408.       ld: Undefined
  1409.       _sunrpc_tempnam
  1410.       _sunrpc_gethostname
  1411.  
  1412.     A31.  Suggestions:
  1413.  
  1414.       1) make sure that the SunRPC variable in 
  1415.              repos/config/imake_conf/sun.cf is set to 'NO' rather than 'no'.
  1416.  
  1417.           2) cd into src and run the "installit" script again.
  1418.                         - or -
  1419.       2) cd into src/Lib/vgparm and run:
  1420.  
  1421.             % make Makefile
  1422.             % make install
  1423.  
  1424.             You should see it recompile with a set of defines specified on 
  1425.             the compilation command.  Make sure that -DKSUNRPC option is *not*
  1426.             defined.  This is what's trying to pull in the non-existent
  1427.             Sun RPC transport.
  1428.  
  1429.          3) If you are not using shared libraries, then change directories 
  1430.             to $KHOROS_HOME/src and run:
  1431.             % make install
  1432.  
  1433.         If you are using shared libraries, simply rerunning the phantomd
  1434.         should work.
  1435.  
  1436.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1437.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1438.  
  1439.      Q32. On Sun3, OS 4.1.1, a segmentation fault results when cantata is run.
  1440.  
  1441.      The problem is that the bug is caused in the vgparm and vutils 
  1442.      library, not in the cantata program code.  
  1443.  
  1444.      In the file $KHOROS_HOME/src/Lib/vgparm/listfile.c there is a bug.
  1445.      Make the following changes to this file
  1446.     
  1447.      at line 100 change:
  1448.  
  1449.             char    character, *fullpath, entry[LENGTH], **list;
  1450.      to:
  1451.             char    character[2], *fullpath, entry[LENGTH], **list;
  1452.  
  1453.  
  1454.          and line 144 change:
  1455.  
  1456.            if ((void) fscanf(file, " %[#]", &character) == 1)
  1457.          to:
  1458.            if ((void) fscanf(file, " %[#]", character) == 1)
  1459.  
  1460.  
  1461.          and line 157 change:
  1462.  
  1463.            else if ((void)fscanf(file, "%[/]%[*]", &character, &character) == 2)
  1464.          to:
  1465.            else if ((void) fscanf(file, "%[/]%[*]", character, character) == 2)
  1466.  
  1467.  
  1468.          Then in the file $KHOROS_HOME/src/Lib/vutils/readascii.c some
  1469.      changes need to be made.
  1470.     
  1471.      at line 99 change:
  1472.  
  1473.            char    dummy[512], character;
  1474.          to:
  1475.            char    dummy[512], character[2];
  1476.  
  1477.  
  1478.          and line 128 change:
  1479.            if ((void) fscanf(file, "%[#]", &character) == 1)
  1480.          to:
  1481.            if ((void) fscanf(file, "%[#]", character) == 1)
  1482.  
  1483.  
  1484.          and line 139 change:
  1485.            else if ((void)fscanf(file, "%[/]%[*]", &character, &character) == 2)
  1486.          to:
  1487.            else if ((void)fscanf(file, "%[/]%[*]", character, character) == 2)
  1488.  
  1489.  
  1490.          there also seems to be a problem caused by the optimizer
  1491.          using -O on sun3.  It is necessary to recompile the system using -01
  1492.          which is defined as follows in your sun.cf file:
  1493.  
  1494.           #define HaveSunPatchedLd NO
  1495.           #define HasGcc NO
  1496.           #define DefaultCDebugFlags -O1          /* for programs */
  1497.           #define LibraryCDebugFlags -O1          /* for libraries */
  1498.  
  1499.          Note that a comment in sun.cf has a typing error.  The correct
  1500.          flag is -O1 (minus oh one) and not -01 (minus zero one).  
  1501.  
  1502.          Then change directory to $KHOROS_HOME/src, run "make allclean"
  1503.          and then the "installit".
  1504.  
  1505.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1506.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1507.  
  1508.    Q33.  During the compile of Khoros, I get this error message:
  1509.          /: write failed, file system is full
  1510.          compiler(iropt) error:  write_irfile: No space left on device
  1511.  
  1512.    A33.  This error is becuase you have run out of disk space in /tmp. 
  1513.          By default the C compilier uses /tmp as the place to store 
  1514.          intermediate files. To fix this, set the environment variable 
  1515.      TMPDIR to a partition with more disk space, as in:
  1516.      % setenv TMPDIR /large_tmp_dir
  1517.  
  1518.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1519.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1520.  
  1521.    Q34. I am trying to compile a {toolbox, new program, etc}, but "make"
  1522.     keeps giving me error messages that say:
  1523.  
  1524.     make: Fatal error: 
  1525.     Don't know how to make target `{KHOROS_HOME}/lib/lib{something}.a
  1526.  
  1527.    A34. It is likely that you simply don't have the Khoros libraries installed 
  1528.     on your system.  Look and see if there is a {KHOROS_HOME}/lib 
  1529.     directory, which contains a large variety of files ending in ".a".
  1530.     If this directory is missing, whoever installed Khoros probably got 
  1531.     just system & binaries.  If you want to compile anything, though, 
  1532.     you must have the Khoros libraries installed properly in 
  1533.     $KHOROS_HOME/lib.  You may obtain the Khoros libraries in one of 
  1534.     two ways:
  1535.  
  1536.        (1) for SUN4, SGI, DECMIPS, and 486 architectures, the libraries can
  1537.                be ftp'd from pprg.eece.unm.edu, in /pub/khoros/bin.  Put 
  1538.                the *.a's in $KHOROS_HOME/lib, and you will be able to compile.
  1539.  
  1540.        (2) you may acquire Khoros source code from pprg.eece.unm.edu, in
  1541.            /pub/khoros/src, and compile the Khoros system according to the
  1542.            installation guide.  The Khoros libraries will be compiled as
  1543.            part of the entire Khoros installation process.
  1544.  
  1545.  
  1546.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1547.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1548.  
  1549.    Q35. Where in the Khoros Manual is the documentation relating to 
  1550.     compilation/installation of programs in Khoros?
  1551.  
  1552.    A35. The installation guide for the Khoros system as a whole is  
  1553.         available via anonymous ftp from pprg.eece.unm.edu, in the 
  1554.     file /pub/khoros/release/install.ftp.  This is also Chapter 10
  1555.     of the Khoros Programmer's Manual.
  1556.  
  1557.     For becoming familiar with the source configuration of Khoros,
  1558.         the imake system, the tools available for compiling Khoros programs,
  1559.     adding new routines to existing libraries, creating new libraries,
  1560.     creating new programs, and maintaining Khoros on multiple architectures,
  1561.     you want Chapter 9 of the Khoros Programmer's Manual.
  1562.  
  1563.     Either of these chapters may be printed using the "prnmanual" program.
  1564.  
  1565.  
  1566.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1567.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1568.  
  1569.    Q36. How does one selectively fix a program and recompile it without doing
  1570.         the whole installation process again?
  1571.  
  1572.    A36. The process will differ if the fix is to a library on which the 
  1573.     program depends, or to the program itself.
  1574.  
  1575.     Case 1: Fix is to a library on which the program depends.
  1576.  
  1577.     a1) In the case that the fix involves adding a new file to the 
  1578.             library, copy the new file to the library.  Then execute "imkmf",
  1579.         followed by "make Makefile".
  1580.  
  1581.         a2) In the case that the fix involves over-writing an old file with a 
  1582.             new, bug-fixed file, it is generally wise to make a backup copy
  1583.             of the old file before you over-write it.  
  1584.  
  1585.      b) Now, execute, "make depend", followed by "make install".  
  1586.         This recompiles the library.
  1587.  
  1588.      c) Finally, you must recompile the program(s) which depend on the
  1589.             library.  
  1590.  
  1591.         In some cases, there will be only one program that is affected.  
  1592.         For example, if the fix was in the IPL library, the DSPL library,
  1593.         or the File Formats library, it is likely that the fix will only 
  1594.         affect one program.  Find the directory in which the program is
  1595.         located, and recompile it using, "make install".
  1596.  
  1597.         In the case of the xvdisplay, xvforms, xvgraphics, and xvutils
  1598.         libraries,  all xvroutines will be affected.  
  1599.         Go to $KHOROS_HOME/src/xvroutines and execute, "make install".
  1600.  
  1601.         In other cases, the fix to the library may affect every program in
  1602.         the Khoros system.  This will be the case with fixes to the 
  1603.         verror, vexpr, vgparm, vmath, vrast, and vutils libraries.  
  1604.         After making a fix to one of these libraries, it is best to go to 
  1605.         $KHOROS_HOME/src, and do "installit" again.
  1606.  
  1607.  
  1608.     Case 2: the fix is to the program itself
  1609.  
  1610.     In this case, simply find the program in the KHOROS_HOME source tree.
  1611.  
  1612.     a1) In the case that the fix involves adding a new file to the 
  1613.             program, copy the new file to the program directory.  
  1614.         Then execute "imkmf", followed by "make Makefile".
  1615.  
  1616.         a2) In the case that the fix involves over-writing an old file with a 
  1617.             new, bug-fixed file, it is generally wise to make a backup copy
  1618.             of the old file before you over-write it.  
  1619.  
  1620.      a) Now, execute, "make depend", followed by "make install".  
  1621.         This recompiles and installs the program.
  1622.  
  1623.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1624.     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
  1625.  
  1626.    Q37. When I try to compile dzresp, dfilter, mat2viff, etc., I get 
  1627.         unresolved symbols for _dspl_parse, _format_parse, and _vexpr_parse.
  1628.         Where do I find these routines?
  1629.  
  1630.    A37. The problem you are experiencing is the result of using GNU's version
  1631.         of the program 'sed'.  What you need to do is change your path so
  1632.         that /bin/sed or /usr/bin/sed are used and then do the following:
  1633.  
  1634.         cd $KHOROS_HOME/src/Lib/vexpr
  1635.         make clean
  1636.         cd $KHOROS_HOME/src/dspl/Lib
  1637.         make clean
  1638.         cd $KHOROS_HOME/src/file_formats/Lib
  1639.         make clean
  1640.         cd $KHOROS_HOME/src
  1641.         make install
  1642.  
  1643.  
  1644.  
  1645.  
  1646.