Bug 221829

Summary: sysutils/screen: Dependency error
Product: Ports & Packages Reporter: Jochen Neumeister <joneum>
Component: Individual Port(s)Assignee: Cy Schubert <cy>
Status: Closed FIXED    
Severity: Affects Only Me CC: freebsd-bt, joneum, w.schwarzenfeld
Priority: --- Flags: bugzilla: maintainer-feedback? (cy)
Version: Latest   
Hardware: Any   
OS: Any   

Description Jochen Neumeister freebsd_committer freebsd_triage 2017-08-26 12:17:38 UTC
/usr/ports/sysutils/screen # make
Dependency error: this port wants the ncurses library from the FreeBSD
base system. You can't build against it, while a newer
version is installed by a port.
Please deinstall the port or undefine WITH_NCURSES_BASE.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/sysutils/screen
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/screen
root@phantomias:/usr/ports/sysutils/screen # make showconfig
===> The following configuration options are available for screen-4.6.1_1:
     INFO=on: Build and install info documentation
     MAN=on: Build and install man pages
     NETHACK=on: Enable nethack-style messages
     SHOWENC=off: Show encoding on the status line
     SYSTEM_SCREENRC=on: Install system screenrc with helpful status line
     XTERM_256=on: Enable support for 256 colour xterm
====> Options available for the single IPC: you have to select exactly one of them
     SOCKETS=on: Use new (4.2.1+) sockets for IPC (default)
     NAMED_PIPES=off: Use legacy (4.0.3) named pipes for IPC (override)
===> Use 'make config' to modify these settings
root@phantomias:/usr/ports/sysutils/screen # make deinstall clean
===>  Deinstalling for screen
===>   screen not installed, skipping
===>  Cleaning for screen-4.6.1_1
root@phantomias:/usr/ports/sysutils/screen #
Comment 1 Cy Schubert freebsd_committer freebsd_triage 2017-08-26 14:08:07 UTC
This is intentional. When linked against devel/ncurses curses applications fail to work unless you set TERM=XTERM. This is because ncurses does not contain a definition for TERM=screen whereas ncurses in base does. I'll see if I can put together a patch for devel/ncurses to support screen.
Comment 2 Cy Schubert freebsd_committer freebsd_triage 2017-08-26 14:16:17 UTC
When linked against devel/ncurses apps such as vi return:

slippy<0>$ view /etc/passwd 
view: No terminal database found
slippy<0>$
Comment 3 Sigi 2017-08-26 21:51:16 UTC
I can confirm the xterm problem. But i am not really happy about the solution. Using ncurses from base means delete ncurses from ports and recompile 215 ports in one case.
Comment 4 Cy Schubert freebsd_committer freebsd_triage 2017-08-27 03:09:20 UTC
(In reply to Sigi from comment #3)

Actually, it's not that bad. There is a trick that works with ncurses, openssl, and heimdal/krb5.

make -C /usr/ports/devel/ncurses
make -C /usr/ports/devel/ncurses deinstall
make -C /usr/ports/sysutils/screen deinstall install
make -C /usr/ports/devel/ncurses install

You can use this trick with ports that depend on openssl as well.

The temporary solution for now is to add an ncurses option (as adding screeninfo.src to terrminfo.src in devel/ncurses doesn't work). Until a permanent solution is found the option will allow users to circumvent the issue. (Remember to set TERM=xterm though.)
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-08-27 03:35:35 UTC
A commit references this bug:

Author: cy
Date: Sun Aug 27 03:35:20 UTC 2017
New revision: 448799
URL: https://svnweb.freebsd.org/changeset/ports/448799

Log:
  Allow the user to select dependency on ncurses in base (USES=ncurses:base)
  or devel/ncurses in ports (USES=ncurses:ports). The default option is to
  depend on ncurses in ports (if installed), otherwise depend on base
  (same as USES=ncurses).

  This works around the following problem when screen is linked with
  devel/ncurses:

  $ view /etc/passwd
  view: No terminal database found
  $

  To avoid the above problem either have screen depend on ncurses in base
  or set TERM=xterm when creating new screen window.

  Adding screeninfo.src from the screen tarball to terminfo.src in
  devel/ncurses does not resolve this issue.

  This problem does not affect packages built by poudriere.

  PR:		221829

Changes:
  head/sysutils/screen/Makefile