Compiling Emacs 25.1 on Ubuntu 16.04

6,146

Based on the comments, I got Xwidgets and Cairo to work. Here's what I did:

Install gtk3 libraries: sudo apt-get install libgtk-3-dev libwebkitgtk-3.0-dev

Configure with ./configure --with-cairo --with-xwidgets --with-x-toolkit=gtk3

Menus feel much nicer now! Thanks!

Share:
6,146

Related videos on Youtube

tom4everitt
Author by

tom4everitt

Updated on September 18, 2022

Comments

  • tom4everitt
    tom4everitt over 1 year

    I'm trying to compile the latest version of emacs on Ubuntu 16.04. After installing the libraries I could think of, the ./configure script outputs the following:

      Where should the build process find the source code?    .
      What compiler should emacs be built with?               gcc -g3 -O2
      Should Emacs use the GNU version of malloc?             yes
          (Using Doug Lea's new malloc from the GNU C Library.)
      Should Emacs use a relocating allocator for buffers?    no
      Should Emacs use mmap(2) for buffer allocation?         no
      What window system should Emacs use?                    x11
      What toolkit should Emacs use?                          LUCID
      Where do we find X Windows header files?                Standard dirs
      Where do we find X Windows libraries?                   Standard dirs
      Does Emacs use -lXaw3d?                                 yes
      Does Emacs use -lXpm?                                   yes
      Does Emacs use -ljpeg?                                  yes
      Does Emacs use -ltiff?                                  yes
      Does Emacs use a gif library?                           yes -lgif
      Does Emacs use a png library?                           yes -lpng12
      Does Emacs use -lrsvg-2?                                yes
      Does Emacs use cairo?                                   no
      Does Emacs use imagemagick?                             yes
      Does Emacs support sound?                               yes
      Does Emacs use -lgpm?                                   yes
      Does Emacs use -ldbus?                                  yes
      Does Emacs use -lgconf?                                 yes
      Does Emacs use GSettings?                               yes
      Does Emacs use a file notification library?             yes -lglibc (inotify)
      Does Emacs use access control lists?                    yes -lacl
      Does Emacs use -lselinux?                               yes
      Does Emacs use -lgnutls?                                yes
      Does Emacs use -lxml2?                                  yes
      Does Emacs use -lfreetype?                              yes
      Does Emacs use -lm17n-flt?                              yes
      Does Emacs use -lotf?                                   yes
      Does Emacs use -lxft?                                   yes
      Does Emacs directly use zlib?                           yes
      Does Emacs have dynamic modules support?                no
      Does Emacs use toolkit scroll bars?                     yes
      Does Emacs support Xwidgets (requires gtk3)?            no
    

    What do I need to install in order to cover the remaining four items? Especially the last one would be valuable.

    PS. This script got me to the point I am now: https://gist.github.com/favadi/18438172892bc4178b27

    • lawlist
      lawlist over 7 years
      Run configure help and see if there is a command-line option to force a particular feature that you believe you are missing. You may not necessarily need (or ever use) every single possible feature.
    • pauljohn32
      pauljohn32 over 7 years
      Does "apt-get build-dep emacs24" help? Otherwise I think you should have easy time tracking down devel packs for gtk3 and cairo if you use Synaptic package manager. You do want those--open door to cool new emacs features! I fear pull down menus and buttons will not work well without gtk3 devel headers. Cairo is for graphics inside buffers. Xwidgets leads to major gui enhancement potential in web browser. I saw one example with nice souped up chooser widgets in a browser view. Beaware of danger that rerunning config may not clear out previous fail. Sometimes dramatic cleanup needed.
    • tom4everitt
      tom4everitt over 7 years
      Thanks, that largely did it. I've now got cairo and xwidgets. Only missing xaw3d, dynamic modules, mmap(2), and relocating allocator, non of which I really know what they're doing.
  • Bjoern Dahlgren
    Bjoern Dahlgren almost 6 years
    And with Emacs 26.x we need libwebkit2gtk-4.0-dev
  • Peter Mortensen
    Peter Mortensen over 3 years
    One way to discover that is: apt-cache search libwebkit | grep -i dev