cycle between ncurses/termcap linker scripts

Bug #836246 reported by Julian Taylor
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ncurses (Ubuntu)
Fix Released
High
Matthias Klose
Oneiric
Fix Released
High
Matthias Klose

Bug Description

libncurses.so.5 is a link to libtermcap. libtermcap.so is a linker script linking back to libncurses.so.5

$ ll /usr/lib/libncurses.so.5
lrwxrwxrwx 1 root root 13 2011-08-18 19:24 /usr/lib/libncurses.so.5 -> libtermcap.so
$ cat /usr/lib/libtermcap.so
INPUT(libncurses.so.5 -ltinfo)

This creates problems when linking:

//compile with gcc file -lncurses
char use_default_colors ();
int
main ()
{
return use_default_colors ();
}
gcc file -lncurses
/usr/bin/ld: cannot open linker script file /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib/libncurses.so.5: Too many open files
collect2: ld returned 1 exit status

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: libncurses5 5.9-1ubuntu2
ProcVersionSignature: Ubuntu 3.0.0-9.14-generic 3.0.3
Uname: Linux 3.0.0-9-generic x86_64
NonfreeKernelModules: fglrx
Architecture: amd64
Date: Sun Aug 28 22:25:01 2011
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha amd64 (20110805)
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ncurses
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Julian Taylor (jtaylor) wrote :
Changed in ncurses (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Stefano Rivera (stefanor) wrote :

As far as I can tell, the /usr/lib/libncurses.so.5 symlink, which is the problem, was created by ldconfig pre 5.9-1ubuntu1, and wasn't deleted when 5.9-1ubuntu1 turned /usr/lib/libncurses.so into a linker script.

ldconfig doesn't appear to delete symlinks in this case (if it does at all, I don't know it in that detail)

Revision history for this message
Thomas Dickey (dickey-his) wrote : Re: [Bug 836246] [NEW] cycle between ncurses/termcap linker scripts

On Sun, 28 Aug 2011, Julian Taylor wrote:

> Public bug reported:
>
> libncurses.so.5 is a link to libtermcap. libtermcap.so is a linker
> script linking back to libncurses.so.5
>
> $ ll /usr/lib/libncurses.so.5
> lrwxrwxrwx 1 root root 13 2011-08-18 19:24 /usr/lib/libncurses.so.5 -> libtermcap.so

that's always incorrect (the reverse can be usable)

> $ cat /usr/lib/libtermcap.so
> INPUT(libncurses.so.5 -ltinfo)
>
> This creates problems when linking:
>
> //compile with gcc file -lncurses
> char use_default_colors ();
> int
> main ()
> {
> return use_default_colors ();
> }
> gcc file -lncurses
> /usr/bin/ld: cannot open linker script file /usr/lib/gcc/x86_64-linux-gnu/4..6.1/../../../../lib/libncurses.so.5: Too many open files
> collect2: ld returned 1 exit status
>
> ProblemType: Bug
> DistroRelease: Ubuntu 11.10
> Package: libncurses5 5.9-1ubuntu2
> ProcVersionSignature: Ubuntu 3.0.0-9.14-generic 3.0.3
> Uname: Linux 3.0.0-9-generic x86_64
> NonfreeKernelModules: fglrx
> Architecture: amd64
> Date: Sun Aug 28 22:25:01 2011
> InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha amd64 (20110805)
> ProcEnviron:
> LANGUAGE=en_US:en
> PATH=(custom, user)
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> SourcePackage: ncurses
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> ** Affects: ncurses (Ubuntu)
> Importance: High
> Status: Confirmed
>
>
> ** Tags: amd64 apport-bug oneiric running-unity
>
> --
> You received this bug notification because you are subscribed to ncurses
> in Ubuntu.
> https://bugs.launchpad.net/bugs/836246
>
> Title:
> cycle between ncurses/termcap linker scripts
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/ncurses/+bug/836246/+subscriptions
>

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

Revision history for this message
nbubis (nbubis) wrote :

Is there a fix for this? can I just delete the symlink, and then re-install libncurses?

Revision history for this message
nbubis (nbubis) wrote :

Hmm.. removing libncurses-dev, and re-installing libncurses-dev and libncurses seems to solve the problem.

Julian, can you confirm?

Revision history for this message
Stefano Rivera (stefanor) wrote :

Doko said he'd fix it.

Changed in ncurses (Ubuntu Oneiric):
assignee: nobody → Matthias Klose (doko)
Revision history for this message
Matthias Klose (doko) wrote :

pending in the unapproved queue

Changed in ncurses (Ubuntu Oneiric):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ncurses - 5.9-1ubuntu3

---------------
ncurses (5.9-1ubuntu3) oneiric; urgency=low

  * Remove obsolete /usr/lib/libncurses.so.5, left by ldconfig. LP: #836246.
 -- Matthias Klose <email address hidden> Mon, 29 Aug 2011 15:58:07 +0200

Changed in ncurses (Ubuntu Oneiric):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.