Building zsh without admin priv: No terminal handling library found

I see at least one thing missing: you're passing CFLAGS=-I/path/to/installation/include, which lets the compilation scripts find the header files, but you also need to let the compilation scripts find the library to link against (libncurses.a). Also the installation instructions say to use CPPFLAGS for the include directories, not CFLAGS.

export CPPFLAGS="-I$INSTALLATION_PATH/include" LDFLAGS="-L$INSTALLATION_PATH/lib"

Be sure to read the complete error messages from ./configure, and check the logs in config.log which contain more information (there's a detailed transcript of the commands that configure ran and their output).


Update:

Following Gilles' answer, I updated CPPFLAGS and LDFLAGS and the problem goes away during configure.

However, I now get an error during make:

<INSTALLATION_PATH>/lib/libncurses.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

I also get a recompile with -fPIC. I guess this refers to the compilation of ncurses. I presume this means that I built ncurses as static, and I should built it as dynamic? How would I do that?

Update 2:

I re-compiled ncurses again. This time, I did:

  • export CXXFLAGS=" -fPIC"
  • export CFLAGS=" -fPIC"

prior to make, and then added --enable-shared to ./configure for both ncurses and Zsh. This seems to have fixed the problem!

Tags:

Zsh

Compiling