1

I'd like to build Emacs 24.4 from source on a system where I don't have admin rights. When I run ./configure, I get the error:

The required function \'tputs' was not found in any library.
The following libraries were tried (in order):
  libtinfo, libncurses, libterminfo, libtermcap, libcurses
Please try installing whichever of these libraries is most appropriate
for your system, together with its header files.
For example, a libncurses-dev(el) or similar package.

I naively downloaded ncurses6.0 and built it, and then just pasted the headers, sources and .a files into the emacs24.4 directory. This didn't work. (I tried pasting those files into all of the subdirectories of emacs24.4, too.)

Any idea how, or if, I can do this? As you can tell, I'm not particularly experienced with building things on Linux.

Edit: I just double checked, and I found that ncurses is in fact installed on my system. Is there a way I can get the build script to recognize it, given the location of the ncurses install?

Ynjxsjmh
  • 273
  • 2
  • 8
gilbereth
  • 35
  • 4
  • 1
    Any particular reason you want 24.4? Emacs is up to version 26.3 at this stage. – Dan Nov 18 '19 at 17:45
  • @Dan To be honest, it's just because I was trying to install a package through MELPA and it said it needed at least 24.4. I should have gone with a new version. Thankfully, it seems that legoscia's answer will help me with building those as well. – gilbereth Nov 19 '19 at 17:41

1 Answers1

2

When building ncurses, tell it to install in a directory under your home directory:

./configure --prefix=$HOME/ncurses
make
make install

Then, when building Emacs, tell Emacs to look for include files and libraries under that directory:

./configure LDFLAGS=-L$HOME/ncurses/lib CPPFLAGS=-I$HOME/ncurses/include
legoscia
  • 6,012
  • 29
  • 54