Upgrading emacs fails for tputs

Hi,

while updating emacs, portupgrade tells me:
Code:
+ editors/emacs (emacs-24.2,2 -> emacs-24.2_1,3)

I get:
Code:
checking for library containing tputs... no
configure: error: The required function `tputs' was not found in any library.
These libraries were tried: 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.
===>  Script "configure" failed unexpectedly.
I have none of the 4 libraries installed as ports. Should I? Shouldn't they be pulled in in case?
 
I did not have ncurses. I installed ncurses from ports, upgrade emacs and get the error.

ncurses-5.9_1 Library for terminal-independent, full-screen output

I then removed ncurses and I get the erroor again.

So with neither combination I can upgrade emacs!
 
The way it's supposed to work is that emacs will depend on ncurses if it's installed when the emacs port is built, and to the base system if not. Check you have installed ncurses library which should provide tputs(3) routine.
# locate libncurses

Note that before using locate(1) need run as root the following script /usr/libexec/locate.updatedb to generate /var/db/locate.database.
 
Hi,

yes, it should depend on one or the other. THough I gather from the thread you linked, that the system one is not enough or not working for emacs.

Code:
ls /usr/lib/libncurses*
/usr/lib/libncurses.a   /usr/lib/libncursesw.a
/usr/lib/libncurses.so  /usr/lib/libncursesw.so

These are from my base system.

Apparently the solution is to install ncurses-devel, not ncurses from ports.

Riccardo
 
The key there is the LDFLAGS so that the configure script can find the ncurses library in your local build environment. In Makefile you can see the value of PREFIX will be set to LOCALBASE (defaulting to /usr/local).
Code:
CPPFLAGS+=      -I${LOCALBASE}/include
LDFLAGS+=       -L${LOCALBASE}/lib

But your base system ncurses library are located in /usr/lib and /usr/include. As above message recommends as workaround to move /usr/local/lib/libncurses.* and /usr/local/include/ncurses.h aside temporarily. Then install editors/emacs.

Please file a PR to the freebsd-ports-bugs mailing list.
 
No need to file a bug report. Having checked the logs, I found out the problem being caused by one of the dependencies not being recompiled after libICU upgrade. Together with linbcurses-devel, I was able to successfully upgrade emacs too.
 
Back
Top