5

I'm having a hard time getting Emacs to build under CentOS 7.1 where I don't have admin rights to install dependencies. After downloading Emacs sources I tried ./configure, and I found out that I was missing X libraries.

I grabbed the gtk3-dev libraries from an rpm repository and extracted them with:

rpm2cpio ../gtk3-devel-3.8.8-10.el7.x86_64.rpm | cpio -idv

And then I tried both:

GTK_LIBS=-L$HOME/tmp/gtk3/usr/lib64/ ./configure \
--prefix=$HOME/Downloads/emacs-25.1/build-out --with-x-toolkit=gtk3

and

./configure --x-includes=$HOME/tmp/gtk3/usr/include/ \ 
--x-libraries=$HOME/tmp/gtk3/usr/lib64 --with-x-toolkit=gtk3

but the configure script through other messages telling me that other gtk3 dependencies where missing, or that it couldn't find everything.

I was wondering if anyone knows where to find a statically build Emacs 25 for centOS x86_64, or how to build Emacs without admin rights in such a way that all dependencies are handled and installed locally?

Any help would be greatly appreciated.

Daniel
  • 3,563
  • 16
  • 41
  • I built mine locally in a virtual machine (e.g., Parallels running the identical version of CentOS) and then uploaded the completed/built Emacs to my website (shared server) where I did not have sufficient privileges to build. – lawlist Nov 10 '16 at 16:11
  • Thanks for the comment. That's what I'm trying to do now. I've got the same CentOS version running on a VBox machine, but I don' t have much experience setting up all the configs (networking, users, etc) - so that is taking a lot of time. – Daniel Nov 10 '16 at 16:14
  • I had never installed CentOS before the same need arose -- it was just for this particular project (i.e., to build Emacs). I think you'll do just fine -- it is just a virtual machine, so no big deal if you make a mistake. – lawlist Nov 10 '16 at 16:15
  • Could you try `fedpkg`? It worked for me on CentOS several times. – wvxvw Nov 10 '16 at 17:43

1 Answers1

3

My solution was to create a virtual machine with Centos where I have admin rights, and compile emacs there.

When building, I added a prefix to configure. That way make install put everything within a folder that mimicked the directory tree of the machine where I have no admin rights.

  1. Install Centos on a virtual machine and grab all dependencies.
  2. Get the emacs repository and run autogen.sh
  3. Configure the build with configure -prefix=/home/USERNAME/local/emacs
  4. Build emacs with make install. The installation directory is all we need.
  5. Copy the install directory to the machine where you have no admin rights.
  6. DONE!
Daniel
  • 3,563
  • 16
  • 41