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?

2
  • 1
    Any particular reason you want 24.4? Emacs is up to version 26.3 at this stage.
    – Dan
    Commented Nov 18, 2019 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
    Commented Nov 19, 2019 at 17:41

1 Answer 1

3

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
1
  • Thank you, that worked perfectly!
    – gilbereth
    Commented Nov 18, 2019 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.