1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Upgrading emacs fails for tputs

Discussion in 'Installation and Maintenance of Ports or Packages' started by multix, Feb 26, 2013.

  1. multix

    multix New Member

    Messages:
    37
    Likes Received:
    0
    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?
     
  2. cpm

    cpm Member

    Messages:
    1,377
    Likes Received:
    2
  3. multix

    multix New Member

    Messages:
    37
    Likes Received:
    0
    I did not have ncurses. I installed ncurses from ports, upgrade emacs and get the error.

    I then removed ncurses and I get the erroor again.

    So with neither combination I can upgrade emacs!
     
  4. cpm

    cpm Member

    Messages:
    1,377
    Likes Received:
    2
    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.
     
  5. multix

    multix New Member

    Messages:
    37
    Likes Received:
    0
    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
     
  6. multix

    multix New Member

    Messages:
    37
    Likes Received:
    0
    No, it doesn't work. I'll analyze the logs next time.
     
  7. cpm

    cpm Member

    Messages:
    1,377
    Likes Received:
    2
    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.
     
  8. multix

    multix New Member

    Messages:
    37
    Likes Received:
    0
    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.