bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem producing portable linux binary using ncurses


From: Eric P. Mangold
Subject: Re: Problem producing portable linux binary using ncurses
Date: Sat, 25 Jun 2011 23:29:35 -0500

To follow up, it *seems* this is caused by some debian-specific
ncurses patching going on.... the stock ncurses 5.9 from GNU does NOT
work against the system-installed terminfo database in
/usr/share/terminfo on Debian Squeeze. (Sorry, it is Squeeze that I am
testing on, not Lenny.). Even compiled on Squeeze it still looks for
the non-existant /usr/share/terminfo/x/xterm file. Of course ncurses
includes the necessary "xterm" terminfo file - but I have not
installed them to my system directory.

So I'm still at a loss as to how I can have a single ncurses library
image (.so file) that works with the system-supplied terminfo database
on both systems. Any hints welcome.

-E

On Sat, Jun 25, 2011 at 20:32, Eric P. Mangold <address@hidden> wrote:
> Hello,
>
> I'm hoping someone here can help me with an ncurses issue, but first
> let me explain what I'm trying to accomplish.
>
> I have a program (darcs - a revision control system), which I am
> compiling on Debian Sarge, and it is linked to libncurses.
>
> I'm packing this binary along with the shared libraries it uses using
> a program called Ermine, which incidentally is quite nice for this
> sort of thing - but it doesn't solve all portability problems.
>
> So this 32-bit binary will run on any linux, 32 or 64 bit, with a kernel > 
> 2.6.
>
> The problem is that certain operations, like "darcs record", utilize
> ncurses, which results in ncurses trying to find a suitable terminfo
> file for the $TERM the user has set.
>
> For example, if $TERM=xterm, it will look here: /usr/share/terminfo/x/xterm
>
> This file exists on Debian Sarge and all is well. But on Debian Lenny,
> for example, this file does not exist, and so the program crashes with
> "setupTerm: Couldn't look up terminfo entry "xterm"".
>
> An strace clearly shows that the missing terminfo file is what causes the 
> crash.
>
> On Lenny, there is no /usr/share/terminfo/x/xterm, there is only files
> named like "xterm-old" and various other filenames like that...
>
> So I though "OH, I'll just compile latest ncurses library on sarge,
> and it will understand how to access terminfo files using the new
> naming conventions", but alas no, even ncurses 5.9 compiled on sarge
> and linked to my program, still only looks for a plain "xterm" file
> when packed with my binary and run on debian lenny.
>
> So I'm looking for a solution that will allow a single binary linked
> with a bundled ncurses library to work on both systems. I'm happy to
> modify ncurses code to achieve this, if that is the only way (could
> use some pointers on where to find the routines that look up terminfo
> files).
>
> Any ideas?
>
> Thanks,
> Eric Mangold
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]