home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / Programming / Source / winterp-1.13 / doc / COMPILING < prev    next >
Encoding:
Text File  |  1991-10-06  |  15.7 KB  |  339 lines

  1. # WINTERP Copyright 1989, 1990, 1991 Hewlett-Packard Company (by Niels Mayer).
  2. # XLISP version 2.1, Copyright (c) 1989, by David Betz.
  3. #
  4. # Permission to use, copy, modify, distribute, and sell this software and its
  5. # documentation for any purpose is hereby granted without fee, provided that
  6. # the above copyright notice appear in all copies and that both that
  7. # copyright notice and this permission notice appear in supporting
  8. # documentation, and that the name of Hewlett-Packard, David Betz and
  9. # Niels Mayer not be used in advertising or publicity pertaining to distribution
  10. # of the software without specific, written prior permission.  Hewlett-Packard,
  11. # David Betz and Niels Mayer makes no representations about the suitability of
  12. # this software and documentation for any purpose.  It is provided "as is"
  13. # without express or implied warranty.
  14. #
  15.  
  16. BUILDING WINTERP:
  17. ================
  18.  
  19. WINTERP and XLISP are designed to be very portable. I've received reports
  20. that the previous version, WINTERP 1.12, has compiled and run successfully
  21. on the following systems:
  22.     * HP9000s3xx (68030/68040) running HPUX 7.0, HPUX 6.5.
  23.     * HP9000s8xx (HP's PA-RISC) running HPUX 7.0, HPUX 3.1.
  24.     * HP9000s7xx (HP's PA-RISC 1.1) running HPUX 8.0
  25.     * Sun Sparc 2 running SunOS Release 4.1.1
  26.     * Data General AViiON (m88k, DG/UX 4.30, GNU C 1.37.23)
  27.     * DECStation 3100 running Ultrix.
  28.     * SGI 4D ("MIPS, SGI Unix, latest release (Cypress)")
  29.  
  30. Since WINTERP 1.13 is just a minor patch release over version 1.12, I
  31. expect it to be just as portable as 1.12. Unfortunately, I have only had
  32. time to test WINTERP 1.13 on the following machines/configurations:
  33.     * HP9000s370 (68030) running HPUX 7.0 (Motif 1.0, Motif 1.1.3,
  34.       Motif 1.1.1, HP UEDK Motif 1.1).
  35.     * HP9000s835 (HP's PA-RISC) running HPUX 8.0 and HP's UEDK Motif 1.1
  36.  
  37. I've received reports that previous versions of WINTERP (v 1.01) have run
  38. on the following.
  39.     * IBM RS6000 AIX 3.1
  40.     * Sun 3 running SunOS 4.0.3
  41.     * MIPS (Mips RS2030)
  42.     * Intel System Vr3.2 v2.2 (using Intel X11R3 with Intel Motif v1.0.A and TWG/TCP v3.1)
  43.     * Apollo's 680xx machines.
  44.  
  45. I believe that if your system can run X11, the Xtoolkit, and Motif, then
  46. you should be able to build and run WINTERP on it. I've tested WINTERP with
  47. Motif 1.0, 1.1, 1.1.1, 1.1.3, and HP UEDK 1.1. I expect that it will work
  48. with 1.1.4 and 1.1.5 unless some gratuitous API incompatibilities are
  49. thrown in (I've seen that happen with Motif 1.0.X patches...). Chances are,
  50. WINTERP will NOT work with Motif 1.2 without some changes to the source. I
  51. plan to put out future releases tracking Motif 1.2, 2.0, etc. Typically
  52. WINTERP will support Motif releases with an approx. 3 month delay (no
  53. promises though, I may be busy with other work).
  54.  
  55. If you have problems compiling WINTERP on your machine, let me know about
  56. them by sending mail to mayer@hplabs.hp.com or hplabs!mayer. Obviously, I
  57. prefer it if the mail you send me details the problem precisely, or failing
  58. that, at least contains a copy of the error-output from compilation, link,
  59. or runtime.  Most preferred are portability patches, bugfixes, and
  60. improvements to the source. And be sure to tell me exactly what kind of
  61. hardware and operating system platform you are using, as well as the Motif
  62. version and patchlevel, etc.
  63.  
  64. I've received a lot of mail from people whose problems stemmed from the
  65. fact that they had never compiled Motif applications on their machine
  66. before.  Please do not send me mail asking how to build your first Motif
  67. program because (1) I don't have the time to be a free Motif consultant;
  68. (2) My schedule is such that I may not be able to get back to you within a
  69. timeframe that you might consider "soon enough." Please remember that this
  70. is free software -- I try to support it as best I can, but you should look
  71. at it as unsupported, or at least erratically supported software.
  72.  
  73. If you have a compilation problem, please, at least, make sure that Motif
  74. libraries (1.0 or 1.1) are installed on your machine.  Beyond that, at
  75. least take some time to verify that the errors you are seeing are not a
  76. result of mis-compilation. Typical problems include
  77.     * Using the wrong X or Motif headers;
  78.     * Having incompatible versions of the Xtoolkit and Motif
  79.       headers/libraries. (see Make-file variable LIBS and INCLUDES);
  80.     * Having incorrect values for C pre-processor symbols
  81.       (see Make-file variable DEFINES);
  82.     * Having incorrect C compiler flags (see CFLAGS).
  83.  
  84. If you have not compiled a Motif program on your system, then you should
  85. try compiling an existing, known-working 10-50 line Motif C program.  You
  86. should be able to at least find a few Motif C examples in your vendor's
  87. distribution of Motif -- these can be especially useful because the
  88. Makefiles will tell you which Makefile variables need to be customized for
  89. your particular vendor's hardware and software., e.g.  DEFINES, CFLAGS,
  90. INCLUDES and LIBS.
  91.  
  92. If you are using Motif source straight from OSF (rather than a
  93. vendor-supplied library), you should find such example programs in the
  94. Motif distribution. Alternately, take a look at the Imake configuration
  95. files to figure out which DEFINES, CFLAGS, and INCLUDES need to be set in
  96. WINTERP's Makefiles.
  97.  
  98. Hints:
  99.  
  100.     ** Motif is not free nor public domain. Contact the OSF for
  101.     ordering info on the Motif toolkit. I will not and cannot send you
  102.     the Motif libraries -- Motif is licensed software. Sources are
  103.     available from OSF for $1000.00. The Motif binary distributions for
  104.     SUNS is available from Integrated Computer Systems. Motif headers and
  105.     libraries are included with HPUX, IBM's AIX, DEC's Ultrix, Data
  106.     General    DG/UX, and many others.
  107.  
  108.     ** You can compile WINTERP in a number of ways:
  109.  
  110.         (1) The supposedly easiest technique is to use xmkmf, but this
  111.     requires that you have installed X11r4 xmkmf/imake on your system,
  112.     and that the X11r4 libs, headers, and configuration files are
  113.     disk-accessible (locally, or over a network). I haven't tested
  114.     building WINTERP with xmkmf because I have my vendor's X/Xt/Motif,
  115.     etc installed on my workstation and keep MIT's bits off in their
  116.     own space. If you have installed MIT's X11r4 core distribution,
  117.     then you may prefer using xmkmf -- let it handle whatever magic it
  118.     needs to compile portable X11 programs on your system.
  119.     Winterp's Imakefiles have been updated for X11r4, so I'd expect
  120.     this to work correctly.
  121.  
  122.         (2) The Imake technique that I have tested is to place the WINTERP
  123.     distribution into the X11r4 source tree. Given X11r4 build tree
  124.     <path>X11r4, place the WINTERP distribution top-level
  125.     at <path>X11r4/contrib/clients/winterp-1.12. Then, while cd'd to
  126.     the WINTERP top-level directory, do 'make World' -- this will build
  127.     the binaries 'winterp' and 'wl' according to the vendor-specific
  128.     rules built into the Imake configuration files. If you don't have
  129.     the 'contrib' tree around, but do have the 'mit' tree, you can also
  130.     put it in <path>X11r4/mit/clients/winterp-1.12
  131.  
  132.     Note that the above assumes that the X11r4 distribution has a
  133.     configuration file for your machine and operating system.  (see
  134.     <path>X11r4/mit/config/Imake.tmpl and <path>X11r4/mit/config/*.cf for
  135.     details). Note also that you don't actually need to have the 
  136.     X11r4 distribution installed on your machine -- use the script
  137.     <path>X11r4/mit/util/scripts/lndir.sh. The script creates a "shadow
  138.     link directory" which creates symbolic links pointing to source
  139.     files mounted on NFS, AFS, or RFA filesystems.
  140.  
  141.         (3) If you don't want to bother with Imake at all
  142.     use Makefile.{generic,hpux,sparc} in directories {winterp,
  143.         winterp/src-server,winterp/src-server/xlisp,winterp/src-client}.
  144.         Makefile.sparc should work on a SunOS 4.?? Sparcstation, though I
  145.         haven't tested it. Makefile.gen is a generic template that can
  146.         be modified for other machines.
  147.  
  148.     Makefile.hpux is for HPUX 7.0 s300 machines -- see comments in this
  149.     file for the (trivial) changes needed to compile on HP's s700 or
  150.     s800 machines. Note that I've only tested Makefile.hpux    on HPUX 7.0
  151.     s300 using HP Motif 1.0, HP Motif 1.1, OSF Motif 1.1, and OSF Motif
  152.     1.1.1; Makefile.hpux was only tested on s800 HPUX 7.0 with HP Motif
  153.     1.0 -- this is due to the fact that my workstation is a s300
  154.     and the s800 I can access is a shared system without enough
  155.     diskspace to handle building the needed X11r4 and OSF/Motif 1.1.1
  156.     libs.
  157.  
  158.     Makefile.hpux8 has been tested on an HP9000s730, HP9000s835, and
  159.     HP9000s370 running HPUX    8.0. Note that src-server/Makefile.hpux8
  160.     produces a shared library version of the WINTERP binary. 
  161.  
  162.     If you have some other kind of machine, copy all the
  163.     Makefile.gen files to Makefile.<machine> in each directory
  164.     {winterp,winterp/src-server,winterp/src-server/xlisp,
  165.     winterp/src-client}.
  166.     In each Make-file you will have to modify the Make variable
  167.     MAKEFILE, changing "Makefile.gen" to "Makefile.<machine>".
  168.     Additionally, you may have to modify the Make variables
  169.     INCLUDES, LIBS, DEFINES, and CFLAGS.
  170.  
  171.     INCLUDES and LIBS default to values which work only if you have
  172.     Motif 1.1 or Motif 1.0 installed in the standard locations such
  173.     that 'cc' will find the headers, and such that the linker will find
  174.     the libraries. If that isn't the case, then you'll have to update
  175.     INCLUDES and LIBS so that they point to the appropriate headers and
  176.     libraries. See the comments in Makefile.{generic,hpux,sparc} for
  177.     details.
  178.  
  179.     To determine the machine-specific values for DEFINES and CFLAGS
  180.     you may want to take a look at the X11r4 files
  181.     <path>X11r4/mit/config/README, <path>X11r4/mit/config/Imake.tmpl,
  182.     <path>X11r4/mit/config/*.cf, and <path>X11r4/mit/config/imakemdep.h.
  183.     Those files will tell you the compiler options flags to place in
  184.     CFLAGS and C preprocessor flags (-D) to place in DEFINES.  Again, see
  185.     the comments in Makefile.{generic,hpux,sparc} for details and hints.
  186.  
  187.     For example, the file <path>X11r4/mit/config/ultrix.cf specifies the
  188.     following:
  189.         #ifdef MipsArchitecture
  190.         #define XmfbpmaxServer Xmfbpmax
  191.         #define XcfbpmaxServer Xcfbpmax
  192.         #define StandardDefines
  193.         #define DefaultCCOptions -Wf,-XNh2000 -Olimit 2000
  194.         #define ServerDefines StandardDefines ExtensionDefines -DXDMCP
  195.         #endif
  196.     The above tells you that you must update CFLAGS in each
  197.     Makefile.ultrix, with the value from "DefaultCCOptions" above.
  198.     
  199.     ** If you are compiling WINTERP on a system that provides separate
  200.     SYSV and BSD compilation worlds, you may want to compile within the
  201.     BSD world. winterp.c and wl.c use a lot of BSD socket code that
  202.     isn't in vanilla SYSV. Merged systems like SUNOS and HPUX have no
  203.     problems with this. With Apollo or MIPS systems, use the BSD world.
  204.  
  205.     ** Compiling under SunOS: Use Makefile.sparc. Pay particular
  206.     attention to comments in
  207.     ../src-server/Makefile.sparc and
  208.     ../src-server/xlisp/Makefile.sparc.
  209.  
  210.     ** IBM AIX 3.1 hints:
  211.         (1) Use Makefile.gen in directory ../ ../src-server
  212.         ../src-server/xlisp, ../src-client.
  213.  
  214.         (2) Add -D_BSD compiler switch to DEFINES
  215.  
  216.         (3) Link with libbsd.
  217.  
  218.     ** To interact with WINTERP, you must send it "Lisp Events" over 
  219.     a network socket using the WINTERP client program 'wl'. (Note that
  220.     the gnuemacs interface hides this ugliness while providing the ideal
  221.     interactive programming environment for writing Winterp-Lisp code.)
  222.     By default, WINTERP compiles with a server based on Unix Domain Sockets.
  223.     
  224.     If for some reason your machine or OS does not support Unix Domain
  225.     Sockets, you may turn off compilation of these features. Do this by
  226.     commenting out "#define WINTERP_WANT_UNIX_SERVER" in
  227.     ../src-server/config.h and recompiling ../src-server/.
  228.  
  229.     ** WINTERP also has the capabilities of using a TCP/IP based socket
  230.     for communications to WINTERP's lisp eval server. By default this
  231.     functionality is not compiled into WINTERP because the TCP/IP
  232.     server is a security hole, and because the TCP/IP code had problems
  233.     porting to some machines. In order to enable the TCP/IP functionality,
  234.     you should uncomment "#define WINTERP_WANT_INET_SERVER" in 
  235.     ../src-server/config.h.
  236.  
  237.     Notes:
  238.  
  239.         (1) Even with the TCP/IP server compiled-in, WINTERP will not
  240.         enable the feature unless resource "Winterp.enableInetServer"
  241.         is set to "true".
  242.  
  243.         (2) The client for the TCP/IP eval server is 'wl-tcpip'
  244.         Compile this with
  245.         "make -f Makefile.{hpux,sparc,generic,...} wl-tcpip"
  246.         or with "cc -O -o wl-tcpip wl-tcpip.c"
  247.  
  248.         (3) By default, the program 'wl-tcpip' attempts to connect
  249.         to the WINTERP server through your machine's loopback
  250.         address, which it assumes is 127.0.0.1. If that is not your
  251.         loopback address (isn't that IP adress standard??), then you
  252.         may have to specify 'localhost' or the hostname of your
  253.         machine. 'wl-tcpip' will be able to connect to the WINTERP
  254.         server more quickly if it can get an IP address without
  255.         having to do a gethostbyname().    That's why I hardcoded the
  256.         loopback address into wl-tcpip.c... (If this lookup is too
  257.         slow, and you are running 'winterp' and 'wl-tcpip' locally,
  258.         you may prefer using the Unix Domain Socket server mentioned
  259.         above.)
  260.  
  261.             ------------------------------
  262.  
  263. On SunOS, if you get errors like :
  264. |
  265. |    Warning: Widget class VendorShell version mismatch:
  266. |      widget 11004 vs. intrinsics 11003.
  267. |
  268. then you will need to ensure that you are dynamically linking with the
  269. correct X11r4 libXt.a and libX11.a, rather than the outdated ones supplied
  270. by Sun. (In particular, make sure that you are using a libXt.a that has all
  271. 18 MIT X consortium patches applied as well as the OSF-supplied patch).
  272.  
  273. The following message may provide you with the hints for forcing use of the
  274. correct shared libriaries:
  275.  
  276. | From: dbc@cs.brown.edu (Brook Conner)
  277. | Newsgroups: comp.windows.x
  278. | Subject: Re: Xwebster printing odd warnings
  279. | Message-ID: <69667@brunix.UUCP>
  280. | Date: 23 Mar 91 16:36:40 GMT
  281. | References: <JC.91Mar22022948@condor.bu.edu>
  282. | Sender: news@brunix.UUCP
  283. | Distribution: comp
  284. | Organization: Brown Computer Science Dept.
  285. | Lines: 43
  286. | In article <JC.91Mar22022948@condor.bu.edu>, jc@condor.bu.edu (James Cameron) writes:
  287. | |> 
  288. | |> Running SunOS 4.1.1 on SparcStation 2's and other fun things...  *8-)
  289. | |> 
  290. | |> 
  291. | |> I just got webster and Xwebster up and running (after a bit
  292. | |> of work) and I know seem to be getting some weird warning messages
  293. | |> from Xwebster.  (prelude - I have seen and used Xwebster on another
  294. | |> similiar system.)  Now, the warnings don't *seem* to do anything
  295. | |> at all, they are just a irritation...
  296. | |> 
  297. | |> Warning: Widget class VPanedWindow version mismatch:
  298. | |>   widget 11004 vs. intrinsics 11003.
  299. | [About a billion more such messages deleted (actually one per widget class)]
  300. | |> 
  301. | |> Suggestions anyone???
  302. | |> 
  303. | |> JC
  304. | |> 
  305. | [big sig deleted]
  306. | This happens because there are two versions of Xt running around on
  307. | the SPARC.  The version you should find in $OPENWINHOME/lib and
  308. | the version you should find in /usr/lib/X11 (i.e. MIT X11R4) 
  309. | disagree on a very minor version number. You're right -- these
  310. | messages don't seem to have any earthly effect on the code.
  311. | There are  two ways to fix this problem:
  312. | 1) Carefully set your LD_LIBRARY_PATH so that when you use apps built
  313. |     using X11R4, you do not have $OPENWIHOME/lib in that path (which
  314. |     is a bit of a pain if you use both Motif/Athena apps and XView apps,
  315. |     which I do (since Sun's XGL only seems to be happy under olwm, but I
  316. |     prefer Motif for my widgets))
  317. | 2) Get your sysadmin to fix it. We fixed it by making the copies of Xt in
  318. |     $OPENWINHOME/lib be links to the MIT X11R4 versions.  This doesn't
  319. |     seem to cause any problems, since XView doesn't use Xt.
  320. | Brook
  321. | - -- 
  322. | Brook Conner        | Klacktoveedsedstene
  323. | Brown Computer Graphics    | Fortune sez: Brook's Law -- Adding manpower to a late
  324. | dbc@cs.brown.edu         |      software project makes it later
  325. | uunet!brunix!dbc dbc@browncs.bitnet   Box 4013 Brown U Prov RI 02912
  326.  
  327.  
  328. -------------------------------------------------------------------------------
  329.         Niels Mayer -- hplabs!mayer -- mayer@hplabs.hp.com
  330.           Human-Computer Interaction Department
  331.                Hewlett-Packard Laboratories
  332.                   Palo Alto, CA.
  333.                    *
  334.