Upgrading emacs fails for tputs

Installing and maintaining the FreeBSD Ports Collection or FreeBSD Packages (i.e. third party software).

Upgrading emacs fails for tputs

Postby multix » 26 Feb 2013, 15:14

Hi,

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


I get:
Code: Select all
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?
multix
Junior Member
 
Posts: 37
Joined: 08 Aug 2012, 07:06
Location: Italy

Postby cpm » 26 Feb 2013, 15:35

cpm
Senior Member
 
Posts: 1353
Joined: 30 Jul 2011, 20:10

Postby multix » 28 Feb 2013, 08:55

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!
multix
Junior Member
 
Posts: 37
Joined: 08 Aug 2012, 07:06
Location: Italy

Postby cpm » 28 Feb 2013, 14:17

The way it's supposed to work is that [FILE]emacs[/FILE] will depend on [FILE]ncurses[/FILE] if it's installed when the [FILE]emacs[/FILE] port is built, and to the base system if not. Check you have installed [FILE]ncurses[/FILE] library which should provide tputs(3) routine.
[CMD="#"]locate libncurses[/CMD]

Note that before using locate(1) need run as root the following script [FILE]/usr/libexec/locate.updatedb[/FILE] to generate [FILE]/var/db/locate.database[/FILE].
cpm
Senior Member
 
Posts: 1353
Joined: 30 Jul 2011, 20:10

Postby multix » 28 Feb 2013, 17:48

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: Select all
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
multix
Junior Member
 
Posts: 37
Joined: 08 Aug 2012, 07:06
Location: Italy

Postby multix » 28 Feb 2013, 17:58

No, it doesn't work. I'll analyze the logs next time.
multix
Junior Member
 
Posts: 37
Joined: 08 Aug 2012, 07:06
Location: Italy

Postby cpm » 28 Feb 2013, 18:58

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


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

Please file a PR to the freebsd-ports-bugs mailing list.
cpm
Senior Member
 
Posts: 1353
Joined: 30 Jul 2011, 20:10

Postby multix » 04 Mar 2013, 13:23

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 [FILE]libICU[/FILE] upgrade. Together with [FILE]linbcurses-devel[/FILE], I was able to successfully upgrade [FILE]emacs[/FILE] too.
multix
Junior Member
 
Posts: 37
Joined: 08 Aug 2012, 07:06
Location: Italy


Return to Installation and Maintenance of FreeBSD Ports or Packages

Who is online

Users browsing this forum: No registered users and 2 guests