emacs_tutorial/doc/compile.org

91 lines
2.1 KiB
Org Mode
Raw Permalink Normal View History

2022-12-14 20:05:16 +01:00
#+date: 2022-12-14
#+options: toc:nil num:nil
* Compiling emacs in GNU linux systems
2023-03-07 14:33:29 +01:00
Emacs is available in all GNU-linux distributions. If you want to install emacs
directly from any free-software distribution, you may check [[https://www.gnu.org/software/emacs/download.html][this information]].
However, you may be interested in compiling emacs for your operational system.
To compile emacs it's important to install some development libraries before
downloading the emacs tarball.
2023-04-06 18:48:23 +02:00
Below there are options to compile emacs in debian-like free software
distributions
2023-03-07 14:33:29 +01:00
** Install ~build-essential~
2022-12-14 20:05:16 +01:00
#+begin_example sh
sudo apt install build-essential
#+end_example
#+begin_example sh
sudo apt update && sudo apt build-dep emacs
#+end_example
2023-04-06 18:48:23 +02:00
2023-03-07 14:33:29 +01:00
** Download emacs (tarball), extract and open the source directory
2023-04-06 18:48:23 +02:00
Visit the [[https://www.gnu.org/software/emacs/][Emacs website]]
Let's say you want to download emacs 28.2. You may use ~wget~ to download the
tarball:
2023-03-07 14:33:29 +01:00
#+begin_example sh
wget http://ftp.gnu.org/gnu/emacs/emacs-28.2.tar.gz
#+end_example
Then, extract the files and open a terminal within the main directory of the package.
#+begin_example sh
tar xvfz emacs-28.2.tar.gz
#+end_example
Change the directory to the extracted files:
#+begin_example sh
cd emacs-28.2
#+end_example
** Execute the following commands in a terminal to begin with the process
2022-12-14 20:05:16 +01:00
2023-04-06 18:48:23 +02:00
Run the [[https://git.savannah.gnu.org/cgit/emacs.git/tree/autogen.sh][autogen.sh]] script. The script should be inside the emacs directory.
2022-12-14 20:05:16 +01:00
#+begin_example sh
./autogen.sh
#+end_example
2023-04-06 18:48:23 +02:00
Configure
2022-12-14 20:05:16 +01:00
#+begin_example sh
./configure
#+end_example
2023-04-06 18:48:23 +02:00
Make the package and install in the system
2022-12-14 20:05:16 +01:00
#+begin_example sh
2023-04-06 18:48:23 +02:00
make
2022-12-14 20:05:16 +01:00
sudo make install
#+end_example
2023-03-07 14:33:29 +01:00
** Facing problems due to lack of XLibs in Debian system
2023-04-06 18:48:23 +02:00
Install the following libraries: (for PureOS or Debian Buster):
#+begin_comment
libc6-dev libjpeg62-turbo libncurses5-dev libpng-dev libtiff5-dev libgif-dev xaw3dg-dev zlib1g-dev libx11-dev
2023-04-06 18:48:23 +02:00
#+end_comment
To install, use:
#+begin_example sh
apt install
#+end_example
2023-03-07 14:33:29 +01:00
** References
* [[https://www.emacswiki.org/emacs/BuildingEmacs][Emacs wiki]]
2023-04-06 18:48:23 +02:00