[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7. Compiling and installing Emacs

7.1 How do I install Emacs?  
7.2 How do I update Emacs to the latest version?  
7.3 What should I do if I have trouble building Emacs?  
7.4 Why does linking Emacs with -lX11 fail?  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.1 How do I install Emacs?

This answer is meant for users of Unix and Unix-like systems. Users of other operating systems should see the series of questions beginning with 8.7 Where can I get Emacs for my PC running MS-DOS?, which describe where to get non-Unix source and binaries, and how to install Emacs on those systems.

For Unix and Unix-like systems, the easiest way is often to compile it from scratch. You will need:

At this point, the Emacs sources (all 70+ megabytes of them) should be sitting in a directory called `emacs-21.1'. On most common Unix and Unix-like systems, you should be able to compile Emacs (with X Window system support) with the following commands:

 
cd emacs-21.1       # change directory to emacs-21.1
./configure         # configure Emacs for your particular system 
make                # use Makefile to build components, then Emacs 

If the make completes successfully, the odds are fairly good that the build has gone well. (See section 7.3 What should I do if I have trouble building Emacs?, if you weren't successful.)

By default, Emacs is installed in the following directories:

`/usr/local/bin'
binaries.

`/usr/local/share/emacs/21.1'
Lisp code and support files.

`/usr/local/info'
Info documentation.

To install files in those default directories, become the superuser and type

 
make install

Note that `make install' will overwrite `/usr/local/bin/emacs' and any Emacs Info files that might be in `/usr/local/info'.

Much more verbose instructions (with many more hints and suggestions) come with the Emacs sources, in the file `INSTALL'.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.2 How do I update Emacs to the latest version?

See section 7.1 How do I install Emacs?, and follow the instructions there for installation.

Most files are placed in version-specific directories. Emacs 21.1, for instance, places files in `/usr/local/share/emacs/21.1'.

Upgrading should overwrite only, `/usr/local/bin/emacs' (the Emacs binary) and documentation in `/usr/local/info'. Back up these files before you upgrade, and you shouldn't have too much trouble.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.3 What should I do if I have trouble building Emacs?

First look in the file `etc/PROBLEMS' (where you unpack the Emacs source) to see if there is already a solution for your problem. Next, look for other questions in this FAQ that have to do with Emacs installation and compilation problems.

If you'd like to have someone look at your problem and help solve it, see 3.9 Where can I get help in installing Emacs?.

If you cannot find a solution in the documentation, send a message to bug-gnu-emacs@gnu.org.

Please don't post it to news:gnu.emacs.help or send e-mail to help-gnu-emacs@gnu.org. For further guidelines, see 2.3 What are appropriate messages for news:gnu.emacs.help, news:gnu.emacs.bug, news:comp.emacs, etc.? and 2.5 Where should I report bugs and other problems with Emacs?.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.4 Why does linking Emacs with -lX11 fail?

Emacs needs to be linked with the static version of the X11 library, `libX11.a'. This may be missing.

On OpenWindows, you may need to use add_services to add the "OpenWindows Programmers" optional software category from the CD-ROM.

On HP-UX 8.0, you may need to run update again to load the X11-PRG "fileset". This may be missing even if you specified "all filesets" the first time. If `libcurses.a' is missing, you may need to load the "Berkeley Development Option."

David Zuhn says that MIT X builds shared libraries by default, and only shared libraries, on those platforms that support them. These shared libraries can't be used when undumping temacs (the last stage of the Emacs build process). To get regular libraries in addition to shared libraries, add this to `site.cf':

 
#define ForceNormalLib YES

Other systems may have similar problems. You can always define CANNOT_DUMP and link with the shared libraries instead.

To get the Xmenu stuff to work, you need to find a copy of MIT's `liboldX.a'.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by (Blade) GNU s/w Owner on November, 2 2001 using texi2html