home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / lucid / help-lucid-emacs / text0544.txt < prev    next >
Encoding:
Text File  |  1993-07-14  |  7.5 KB  |  241 lines

  1.  
  2. Sergei Naoumov wrote about "Lemacs on Solaris" on 3 June 1993
  3.  > Hey guys!
  4.  > Is there a bynary code of Lemacs (it'd be nice to have 19.6) for Solaris? I'll run now
  5.  > Solaris 1.1 by certain reasons and Solaris 2.1 later. If no code exists could someone,
  6.  > please, tell what problems took place during compilation of Lemacs under Solaris?
  7.  > 
  8.  
  9.  
  10. Sergei,
  11.  
  12. I don't know if this is to late to help you or not, but here it is. 
  13.  
  14. This procedure is not from me, but Anne Lewis.  She was tasked with
  15. building lemacs for us.  Currently she doen't even have an account on
  16. our system *sigh*, but our admin people are really behind.  She has
  17. been using my account, thus I'm mailing it for her.  But enough of the
  18. trivia, on to the good stuff....
  19.  
  20. Oh, I'm also sending to the help system so others may benifit or
  21. comment and help us...
  22.  
  23.  
  24. -------  Anne's Notes  -------------
  25.  
  26.  
  27. I have built Lucid Emacs 19.5 under Solaris 2.1 with the benefit of
  28. Adriaan Joubert's experience and by following the README and MAKEFILE
  29. instructions fairly closely.  At each step I had to figure out which
  30. information applied to me, as will each builder of Emacs.  However, I
  31. will write the procedure that worked for me, incorporating the parts
  32. of Mr. Joubert's procedure that I found useful.  I will be building
  33. Emacs under Solaris 2.2 fairly soon and I will report whether or not my
  34. experience is the same as that under Solaris 2.1. 
  35.  
  36. Note: I am new to Emacs, as well as to building it.  Others may have
  37. far less trouble than I did.  I hope so.
  38.  
  39. I made the following changes to build-install in order to match my
  40. Emacs directories.  This may not apply to you:
  41.  
  42.     changed:    set EMACS=/usr/local/lemacs
  43.     to:        set EMACS=/export/home/mac/lemacs-19.5
  44.  
  45.     changed:    set BIN=/usr/local/bin
  46.     to:        set BIN=/export/home/mac/lemacs-19.5/bin
  47.  
  48.     changed:    /bin/sed "s;/usr/local/e,acs'$EMACS etc
  49.     to:        /bin/sed "s; /export/home/mac/lemacs-19.5
  50.  
  51. I changed config.h as follows:
  52.  
  53.     changed:    #include "s/s-sunos4shr.h"
  54.     to:        #include "s/s-solaris2.h"
  55.  
  56.     commented out:    #define GNU_MALLOC
  57.  
  58.     commented out:    #ifdef HAVE_XPM
  59.             #include <x11/xpm.h>
  60.             #endif
  61.  
  62. In the lemacs-19.5 directory I changed Makefile as follows:
  63.  
  64.     changed:    CC=cc
  65.     to:        CC=gcc
  66.     
  67.     changed:    LIBDIR=/usr/local/lemacs
  68.     to:        LIBDIR=/export/home/mac/lemacs-19.5/src/lwlib
  69.  
  70.     changed:    BINDIR=/usr/local/bin
  71.     to:        BINDIR=/export/home/mac/lemacs-19.5/bin
  72.  
  73. In /export/home/mac/lemacs-19.5/src/lwlib I changed Makefile as
  74. follows: 
  75.  
  76.     changed:    LIBDIR=/usr/local/lib
  77.     to:        LIBDIR=/export/home/mac/lemacs-19.6/src/lwlib
  78.  
  79.     changed:    BINDIR=/usr/local/bin
  80.     to:        BINDIR=/export/home/mac/lemacs-19.5/bin
  81.  
  82.     changed:    CFLAGS= -g
  83.     to:        CFLAGS= -O
  84.  
  85.     changed:    LOADLIBES= -lx
  86.     to:        LOADLIBES= -lkvm -lsocket -lnsl -lelf -lintl -ldl
  87.  
  88. In malloc.c I changed the following:
  89.  
  90.     commented out:    #ifndef_hpux
  91.             char*
  92.             valloc(size)
  93.             unsigned size;
  94.             {
  95.               return memalign(getpagesize(),size);
  96.             }
  97.             #endif /*not hpux*/
  98.  
  99. I changed -loadup.el as follows:
  100.  
  101.     commented out:
  102.         floating point stuff (I don't need it anyway right now)
  103.  
  104. You can then build Emacs this way:
  105.  
  106. First, I tried:
  107.      
  108. make "CC=gcc" (I know, I must have missed one somewhere or my change
  109. in Makefile was overidden)
  110.  
  111. This worked fine and it finished gracefully.  However, the executable
  112. was called emacs-19.5.1-Lucid so I knew something had not been done.
  113. However, the executable worked fine.
  114.  
  115. Second, I tried:
  116.  
  117. build-install (I tried this early on before I had changed everything
  118. correctly and it didn't work.)
  119.  
  120. build-install finished gracefully and created the executable lemacs,
  121. which is as it should be.  The only reason I included the command make
  122. CC=gcc is because it is the first thing I got working and it can be
  123. used in a pinch.
  124.  
  125. At this point, Lucid Emacs was built for me.  I now include Adriaan
  126. Joubert's message of 21 May because he advised doing some things I
  127. found unnecessary.  You may need to do these things.
  128.  
  129.  
  130. ***********************************************************************
  131.  
  132.  
  133.  
  134.  
  135. From: adriaan@dcs.qmw.ac.uk (Adriaan Joubert)
  136. Sender: help-lucid-emacs-request@lucid.com
  137. To: help-lucid-emacs@lucid.com
  138. Subject: Building lemacs-19.6 on solaris-2.1 without motif or openwin.
  139. Date: Fri, 21 May 1993 09:06:47 GMT
  140.  
  141. Hi,
  142.  
  143. I had a few requests from people who couldn't get lemacs built on solaris
  144. on how I managed to get it running. I think what follows is a summary
  145. of the essentials.
  146.  
  147. Ok, I hope I remember everything, because I had to mess around a bit, 
  148. before I got it running. The first thing seems to be to start with a 
  149. completely new copy of lemacs. It seems to mess itself up after a few
  150. goes, and I couldn't get it into any acceptable state anymore.
  151.  
  152. I used gcc 2.3.3, capable of finding its own libraries (I didn't install
  153. it, so I can't tell you anything about that.) Also X11R5. We have the 
  154. binaries available on the network. As far as I can remember, you have to 
  155. do the following:
  156.  
  157. 1) Edit the path names in the main Makefile.
  158. 2) Go to src and edit config.h:
  159.     #define USE_GCC
  160.     #include "s/s-solaris2.h
  161.     #include "m/m-sparc.h"
  162.     #define HAVE_X_WINDOWS
  163.  
  164.     Comment out the gnu/system malloc bit. Use the system malloc.
  165.     You don't need strdup, realpath or rel_alloc.
  166.     No motif or olit.
  167.     Set the LD_SWITCH_SITE and C_SWITCH_SITE to wherever your X files are.
  168.     (X11R5 in our case, you can get the binaries from the net)
  169.  
  170. 3) You have to edit s/s-solaris2.h if you don't want to use Openwindows.
  171.    Simply do:
  172.     /* Flags for OpenWindows */
  173.     #if 0    <---- replace 1 with 0
  174.     #undef LD_SWITCH_SYSTEM
  175.     #define LD_SWITCH_SYSTEM -L/usr/openwin/lib -R/usr/openwin/lib
  176.     #undef C_SWITCH_SYSTEM
  177.     #define C_SWITCH_SYSTEM -I/usr/openwin/include
  178.     #endif 
  179.  
  180.     Set LD_CMD to gcc
  181.  
  182. 4) Go to lwlib. I defined only USE_LUCID in the Imakefile, and nothing else.
  183.    BUILD_SHARED_LIB also works, but then you have to bother with 
  184.    LD_LIBRARY_PATH variables during the linking.
  185.  
  186.    Type xmkmf. I had to edit the makefile to set the paths to X11R5 correctly
  187.    and reset the C compiler to gcc.
  188.  
  189.    Then type make and lwlib should compile without any hassle.
  190.  
  191. 5) Go to lemacs-19.6/etc. Edit the makefile:
  192.    I set CFlags to -O and
  193.    LOADLIBES = -lkvm -lsocket -lnsl -lelf -lintl -ldl
  194.    You may be able to miss out some of them, because you only need -ldl, but
  195.    it doesn't seem able to find them if you only add -ldl, and with the whole
  196.    lot it works.
  197.    Set the paths of course.
  198.  
  199. 6) Go to the top directory. I don't think I had to edit the ymakefile in src.
  200.    type
  201.    > make "CC=gcc" "CPP=/lib/cpp"
  202.    and then it should work.  WAIT! Read the next 2 point first.
  203.  
  204. 7) Just remembered. It falls over during the compilation of editfns.c. The
  205.    timezone stuff doesn't work. I tried everything, and I couldn't get it
  206.    going, which is why I put (at line 658) 
  207.    #undef EMACS_CURRENT_TIME_ZONE <<<<
  208.    #ifdef EMACS_CURRENT_TIME_ZONE
  209.      int offset, savings_flag;
  210.      char standard[11];
  211.      char savings[11];
  212.  
  213.    I don't know what you need this for, and we'll have to live withou it.
  214.  
  215. 8) It also falls over when linking, because the size for the lisp code was
  216.    too small. I had to put PURESIZE to 400000 in puresize.h, but we load in
  217.    a few things from the site-init.el. You should initialize the site-init.el
  218.    with whatever you want before you compile.
  219.  
  220. I think that was about it. No guarantees. If you have more problems, mail me,
  221. perhaps I'll remember something else. If you manage to fix the TIME_ZONE bit,
  222. I would be interested.
  223.  
  224. --
  225. Mike Battaglia
  226. DSC Communications Corp
  227.  
  228. (214) 519-3253
  229. mbattagl@dsccc.com
  230.  
  231.  
  232. ==================================================================
  233.  
  234. "Study what the most respected authorities agree can NOT be done 
  235.     - then do it."
  236.  
  237.            (Clarks law)
  238.  
  239. ==================================================================
  240.  
  241.