bug-ncurses
[Top][All Lists]
Advanced

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

Problem producing portable linux binary using ncurses


From: Eric P. Mangold
Subject: Problem producing portable linux binary using ncurses
Date: Sat, 25 Jun 2011 20:32:48 -0500

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]