Subject: Bug#644728: libncurses5-dev: static linking with -lncurses is broken

From: Sven Joachim <[email-masked]>
Date: Sat, 08 Oct 2011 16:14:43 +0200

Package: libncurses5-dev
Version: 5.9-2
Severity: serious
X-Debbugs-CC: Matthias Klose <[email-masked]>

Static linking with -lncurses fails if you need symbols from libtinfo:

,----
| $ cat foo.c
| #include <term.h>
| #include <stdlib.h>
| 
| int main(void)
| {
|   return tgetent(NULL, "");
| }
| $ LANG=C gcc foo.c -lncurses -static
| /tmp/ccRe0RW2.o: In function `main':
| foo.c:(.text+0x19): undefined reference to `tgetent'
| collect2: ld returned 1 exit status
`----

This makes zsh and possibly a few other packages FTBFS.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (101, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 3.1.0-rc9-nouveau (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libncurses5-dev depends on:
ii  libc6-dev [libc-dev]  2.13-21
ii  libncurses5           5.9-2
ii  libtinfo-dev          5.9-2
ii  ncurses-bin           5.9-2

libncurses5-dev recommends no packages.

Versions of packages libncurses5-dev suggests:
ii  ncurses-doc  5.9-2

-- no debconf information