home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 August - Disc 2 / chip_20018102_hu.iso / linux / X-4.1.0 / doc / OS2.Notes < prev    next >
Text File  |  2001-06-27  |  10KB  |  228 lines

  1.                 Notes on Rebuilding XFree86/OS2 from Scratch
  2.  
  3.                                  Holger Veit
  4.  
  5.                         Last modified March 8th, 2000
  6.  
  7. 1.  Preface
  8.  
  9. X11 and XFree86 were initially developed on Unix-based systems. Usually Unix
  10. systems provide a rich number of tools and utilities to get certain things
  11. done. Under OS/2, these tools are not installed, but ports are available
  12. which are sometimes functionally equivalent to Unix utilities with the same
  13. name, but also differ sometimes in a subtle way.  This guide will give you
  14. hints if you intend to rebuild the system from scratch under OS/2.
  15.  
  16. Please also read README.OS2 for end-user information, and set at least the
  17. environment variables described there.
  18.  
  19. At the current time, the most recent version available is XFree86-4.0.  This
  20. is a full and unrestricted version which comes with complete source code. 4.0
  21. is a highly experimental release, so many features that might have worked in
  22. earlier versions, may now no longer work, or work differently.  Be aware that
  23. for OS/2, XFree86-4.0 is considered to be alpha software.
  24.  
  25. If you want to join the XFree86 developer team, e.g. to add support for cer-
  26. tain hardware, please send a request to BOD@XFree86.org. Please think about
  27. such a step carefully before, though, since much work is involved. Please use
  28. the XFree86-4.0 source code as a test example how to compile the system. The
  29. ability to manage that is a basic requirement for becoming a developer.
  30.  
  31. 2.  Tools required
  32.  
  33. I have tried to reduce the number of external tools, but when looking back it
  34. seems I were not very successful. At least I managed to get everything work-
  35. ing with the native CMD.EXE shell only. However, there is still plenty of
  36. software required.  Most of this software is available from hobbes.nmsu.edu
  37. or ftp.leo.org via anonymous FTP. The following shopping list shows what you
  38. will need:
  39.  
  40.    o gcc  EMX/gcc emx 0.9C patch4 or later (0.9d preferred!)
  41.  
  42.    o gzip GNU zip/unzip
  43.  
  44.    o tar  GNU tar
  45.  
  46.    o patch     Larry Wall's patch utility (attention: incompatible tool with
  47.      same name in OS/2)
  48.  
  49.    o install   BSD/GNU install
  50.  
  51.    o rm,mv,cp  GNU file utilities
  52.  
  53.    o tee,..    GNU shell utilities
  54.  
  55.    o groff     GNU nroff/troff
  56.  
  57.    o sed  GNU sed stream editor
  58.  
  59.    o grep GNU grep
  60.  
  61.    o gawk GNU awk
  62.  
  63.    o make GNU make 3.71/3.72 (use the one from Xprog.zip!)
  64.  
  65.    o flex GNU flex
  66.  
  67.    o bison     GNU bison
  68.  
  69.    o m4   GNU m4
  70.  
  71.    o find GNU find    (attention: incompatible tool with the same name in
  72.      OS/2)
  73.  
  74. If there is no version number given, any new version will do. Particularly
  75. critical is only EMX/gcc and GNU make. Note that the second GCC implementa-
  76. tion which might still be available from some archives is NOT compatible.
  77.  
  78. Furthermore, you need the XFree86 sources. These are available from the com-
  79. mon XFree86 repositories. Look into a directory which is often named
  80. /pub/XFree86/4.0/source.
  81.  
  82. 3.  Compiling and Installing
  83.  
  84. You need about 300MB of free HPFS space for the whole system. This does not
  85. include space for the postscript and troff documentation files. I have never
  86. installed them. Nor did I install the test subtree.
  87.  
  88.   1.  Install all the above utilities. Refer to the corresponding documenta-
  89.       tion.  Verify that everything works well, particularly EMX.
  90.  
  91.   2.  It is a good idea to use the same or a similar structure I have.  I
  92.       have made a directory \x11 on the partition for compiling and have put
  93.       everything below this tree. I found that a clean tree occupies less
  94.       than the half space of the disk, this gives me the opportunity to
  95.       rename this tree to \x11old and copy a new version to the same disk to
  96.       produce diffs. Last time the complete tree was arranged under the root
  97.       directory xc, this would become \x11\xc then.
  98.  
  99.   3.  To unpack the files you would usually execute the command
  100.  
  101.            gzip -dc file.tar.gz | tar xvf -
  102.  
  103.       in the \x11 directory. At the end you will usually see the irritating,
  104.       but non-fatal message "gzip: stdout Broken pipe". Ignore it.
  105.  
  106.   4.  After that, is is likely necessary to apply some patches, either from
  107.       the XConsortium or from the XFree86 project. Before you do this, enter
  108.  
  109.                  chmod -R a+rw \x11\xc
  110.  
  111.       to make certain files in the tree writable.
  112.  
  113.   5.  There should be a file added-XXX accompanying the patch file which
  114.       lists the files that are newly created. The patch program has a problem
  115.       with creating new directories, so we need to create them on advance.
  116.       For each added-XXX file you find, execute from \x11
  117.  
  118.            xc\config\util\added added-XXX
  119.  
  120.       If there is no added-XXX file available, you can make one with the fol-
  121.       lowing instructions:
  122.  
  123.                  grep "\*\*\* xc/" patchfile >added-file
  124.  
  125.       Edit added-file with a text editor and remove the ***  at the beginning
  126.       and the time stamp at the end (search for a TAB and erase to the end of
  127.       the line). You get a list of file paths, one in a line, which is the
  128.       input to the added utility.
  129.  
  130.   6.  After that you can apply the patches in the right order. Usually this
  131.       is done by a command
  132.  
  133.                  patch -p -E <patchfile 2>&1 | tee patchlog
  134.  
  135.       from the \x11 directory. Be aware to use the right patch - OS/2 has a
  136.       utility with the same name and different functionality.  Don't use the
  137.       recommended -s option, this makes patch quiet, and you won't see prob-
  138.       lems in the patchlog file. Use
  139.  
  140.                  find \x11 -name *.rej -print
  141.                  find \x11 -name *# -print
  142.  
  143.       to find any rejects and unapplied patches (attention: yet another OS/2
  144.       program with wrong functionality). Normally there shouldn't be any
  145.       problems of this kind, else you have made a mistake. Finally remove the
  146.       original files with
  147.  
  148.                  find \x11 -name *.orig -print -exec rm {} ;
  149.  
  150.   7.  Go to the xc/config/cf directory and edit the xf86site.def file to
  151.       match your requirements (you probably don't want to compile all X
  152.       servers). Certain changes must be set to the following values:
  153.  
  154.          o Disable if not already done any PC98 server; PC98 (Japanese
  155.            XFree86) does not work yet. Porters from Japan are welcome!
  156.  
  157.          o #define WacomSupport            NO #define ElographicsSupport
  158.            NO Both options are not yet supported.
  159.  
  160.          o Tcl* and Tk* don't need to be set explicitly. Reasonable defaults
  161.            are in the other config files, provided you have a complete
  162.            XFree86/OS2 binary tree with the tcl/tk runtime support installed.
  163.  
  164.          o #define BuildDynamicLoading   NO This does not work.
  165.  
  166.   8.  Go to the directory xc\util\compress and make compress.exe there.
  167.       Install the program produced there in your path. I stumbled more than
  168.       once on half-ported compress programs on OS/2 ftp servers that are
  169.       defective w.r.t.  reading and writing stdin/stdout. In some stage (font
  170.       compression) otherwise you will get a core dump of mkfontdir, because
  171.       all compressed fonts are corrupt.
  172.  
  173.   9.  Set the environment variable X11ROOT to something different than it is;
  174.       otherwise the installation process will overwrite your original
  175.       XFree86/OS2 installation. If you have not set this variable, go back to
  176.       the prefix section of this document: you have forgotten something.
  177.  
  178.  10.  Copy the file xc/pro-
  179.       grams/Xserver/hw/xfree86/etc/bindist/OS2/host.def.os2 to the location
  180.       xc/config/cf/host.def. Use this file to do any specific modifications
  181.       to imake variables, rather than editing the file xfree86.cf,
  182.       imake.tmpl, or os2.cf directly.
  183.  
  184.  11.  Copy the file xc/config/util/buildos2.cmd into the xc directory. If
  185.       this is a second or later attempt, you might need to copy the saved
  186.       toplevel Makefile.os2 back to Makefile.
  187.  
  188.  12.  Execute this buildos2.cmd command in the xc directory; it will produce
  189.       a logfile buildxc.log in this directory.
  190.  
  191.  13.  Go have a bucket of coffee, or better, buy new coffee - in Colombia!
  192.       The compile will need between 2 and 20 hours, depending on your selec-
  193.       tions, and the horse power of your hardware.
  194.  
  195.  14.  When finished, view the logfile for errors, and fix the problems if
  196.       there are some. I have managed to compile the whole system flawlessly,
  197.       so there is at least one configuration that works.
  198.  
  199.  15.  Finally, from the xc dir, execute
  200.  
  201.                  xmake install
  202.                  xmake install.man
  203.  
  204.  16.  There are a few minor glitches in the installation:
  205.  
  206.         1.  The xdm and linkkit directories will fail in compile and instal-
  207.             lation.  This is no problem and has no effect on the rest of the
  208.             system.
  209.  
  210.         2.  The imake.exe which is installed in \XFree86\bin is usually
  211.             defective.  The one which was built initially and installed in
  212.             the root directory of the drive where you have the source tree is
  213.             okay. So simply copy this \imake.exe to the \XFree86\bin direc-
  214.             tory manually. Some day this might be fixed.
  215.  
  216.         3.  XF86Setup is not ported yet and won't work with the tcl/tk port
  217.             available for XFree86/OS2. My idea was to replace this by some
  218.             native installation tool, which I didn't find the time to do yet.
  219.             Feel free to spend a bit of time to play with XF86Setup if you
  220.             like.
  221.  
  222. Well, you see, this was quite easy :-)
  223.  
  224.      Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/OS2note.sgml,v 3.7 2000/04/05 18:13:46 dawes Exp $
  225.  
  226.      $XConsortium: OS2note.sgml /main/1 1996/02/24 10:08:59 kaleb $
  227.  
  228.