f



testing out 'error opening terminal: xterm'

I wrote a C program that uses SDL for graphics and ncurses for user i/f. 
Using GNU autotools I created a .deb file for installing the program 
without the need to separately install the SDL and ncurses libraries and 
headers. The .deb  file installs the program and the program runs 
perfectly on the (Ubuntu 14.04) system where I built both the program 
and the .deb file.

I tested the .deb file (and the program) on two other Ubuntu 14.04 
systems where SDL and ncurses were not installed: 1) a virtual machine 
on the same PC and 2) a different PC.  On both, the .deb file runs 
(installs) without error.  When the program itself is started it runs 
until the point where an ncurses routine occurs, then it throws the error:

error opening terminal: xterm.

It seems odd that xterm is involved, since I always run the program in 
gnome terminal. The TERM variable on all three machines is 'xterm'. The 
opinion on the internet about the error is that xterm is not installed 
correctly.  A way of testing xterm is to run editor 'pico' which uses 
xterm.  Pico runs fine.  If I change TERM variable to 'gnome' and try to 
run pico editor it throws the same 'error opening terminal:xterm' error, 
thus proving that pico does indeed use xterm and that apparently xterm 
is installed correctly.

A further test.  I copied the program created by the .deb file on the 
virtual machine over to the host machine and ran it there.  It does not 
throw the error on that machine.

QUESTION: does anyone have an idea why the program throws the error?

TIA.     Bill S.
0
bilsch
8/12/2016 10:33:58 AM
comp.unix.programmer 10848 articles. 0 followers. kokososo56 (350) is leader. Post Follow

39 Replies
813 Views

Similar Articles

[PageSpeed] 32

On 2016-08-12, bilsch <king621@comcast.net> wrote:
> I wrote a C program that uses SDL for graphics and ncurses for user i/f. 
> Using GNU autotools I created a .deb file for installing the program 
> without the need to separately install the SDL and ncurses libraries and 
> headers. The .deb  file installs the program and the program runs 
> perfectly on the (Ubuntu 14.04) system where I built both the program 
> and the .deb file.
>
> I tested the .deb file (and the program) on two other Ubuntu 14.04 
> systems where SDL and ncurses were not installed: 1) a virtual machine 
> on the same PC and 2) a different PC.  On both, the .deb file runs 
> (installs) without error.  When the program itself is started it runs 
> until the point where an ncurses routine occurs, then it throws the error:
>
> error opening terminal: xterm.

Maybe this really means "cannot find the terminfo database entry for the
string 'xterm'?" Curses needs to look up the terminal type in a database
so it knows the correct escape sequences to use for controlling it.

Has it occurred to you to Google "error opening terminal" in quotes?
0
Kaz
8/12/2016 3:35:59 PM
On 08/12/2016 08:35 AM, Kaz Kylheku wrote:
> On 2016-08-12, bilsch <king621@comcast.net> wrote:
>> I wrote a C program that uses SDL for graphics and ncurses for user i/f.
>> Using GNU autotools I created a .deb file for installing the program
>> without the need to separately install the SDL and ncurses libraries and
>> headers. The .deb  file installs the program and the program runs
>> perfectly on the (Ubuntu 14.04) system where I built both the program
>> and the .deb file.
>>
>> I tested the .deb file (and the program) on two other Ubuntu 14.04
>> systems where SDL and ncurses were not installed: 1) a virtual machine
>> on the same PC and 2) a different PC.  On both, the .deb file runs
>> (installs) without error.  When the program itself is started it runs
>> until the point where an ncurses routine occurs, then it throws the error:
>>
>> error opening terminal: xterm.
>
> Maybe this really means "cannot find the terminfo database entry for the
> string 'xterm'?" Curses needs to look up the terminal type in a database
> so it knows the correct escape sequences to use for controlling it.
>
> Has it occurred to you to Google "error opening terminal" in quotes?
>

On a system with the xterm error, the README in /etc/terminfo says:

"This directory is for system-local terminfo descriptions. By default,
ncurses will search ${HOME}/.terminfo first, then /etc/terminfo (this
directory), then /lib/terminfo, and last /usr/share/terminfo."

In /lib/terminfo/x are these binary files:
xterm, xterm-256color, xterm-color, xterm-debian, xterm-mono,
xterm-r5, xterm-r6, xterm-vt220, xterm-xfree86

What else can I do?

As I said in my original post, pico editor, which uses xterm does not
get the error.  Doesn't that indicate that xterm support is installed?

I did google "error opening terminal" and read the articles there
before posting my question in this group.

0
bilsch
8/13/2016 10:10:44 PM
On Sat, 13 Aug 2016 15:10:44 -0700, bilsch wrote:

> What else can I do?

Is your program linked against the same ncurses library as pico?

Different libncurses binaries may have different search paths. If you try
to statically link ncurses, you'll end up with a binary which searches the
terminfo directories which are appropriate for the system on which the
program was built, but not necessarily for the system on which it is run.

E.g. not all systems use /lib/terminfo (/lib and /usr/lib are for
architecture-specific files, but terminfo files are portable).

0
Nobody
8/14/2016 1:55:34 AM
On 2016-08-14, Nobody <nobody@nowhere.invalid> wrote:
> On Sat, 13 Aug 2016 15:10:44 -0700, bilsch wrote:
>
>> What else can I do?
>
> Is your program linked against the same ncurses library as pico?
>
> Different libncurses binaries may have different search paths.

strace is your friend in ferreting out where a program is actually
searching for configuration info.
0
Kaz
8/14/2016 1:31:43 PM
bilsch <king621@comcast.net> writes:
> I wrote a C program that uses SDL for graphics and ncurses for user
> i/f. Using GNU autotools I created a .deb file for installing the
> program without the need to separately install the SDL and ncurses
> libraries and headers. The .deb  file installs the program and the
> program runs perfectly on the (Ubuntu 14.04) system where I built both
> the program and the .deb file.
>
> I tested the .deb file (and the program) on two other Ubuntu 14.04
> systems where SDL and ncurses were not installed: 1) a virtual machine
> on the same PC and 2) a different PC.  On both, the .deb file runs
> (installs) without error.  When the program itself is started it runs
> until the point where an ncurses routine occurs, then it throws the
> error:
>
> error opening terminal: xterm.

Do you have ncurses-base installed?  That’s where the terminfo file for
‘xterm’ is.

> It seems odd that xterm is involved, since I always run the program in
> gnome terminal. The TERM variable on all three machines is
> 'xterm'. The opinion on the internet about the error is that xterm is
> not installed correctly.  A way of testing xterm is to run editor
> 'pico' which uses xterm.  Pico runs fine.  If I change TERM variable
> to 'gnome' and try to run pico editor it throws the same 'error
> opening terminal:xterm' error, thus proving that pico does indeed use
> xterm and that apparently xterm is installed correctly.

The error message quotes the value of TERM, so I don’t think you can
have successfully changed it for this test.  Unless you have terminfo
file for ‘gnome’ then I’m not sure what it’s supposed to achieve anyway.

-- 
http://www.greenend.org.uk/rjk/
0
Richard
8/14/2016 2:08:55 PM
On 2016-08-12 03:33 -0700, bilsch wrote:

> Pico runs fine.  If I change TERM variable to 'gnome' and try to run
> pico editor it throws the same 'error opening terminal:xterm' error,

Does it really say this, and not

error opening terminal:gnome

?

That would be very strange.

-- 
Please *no* private Cc: on mailing lists and newsgroups
Why does the arrow on Hillary signs point to the right?

0
Ian
8/14/2016 7:10:27 PM
 >
 > Do you have ncurses-base installed?  That’s where the terminfo file for
 > ‘xterm’ is.

I have several things with ncurses-base in the name. I don't see 
anything like a terminfo file.  ncurses-base itself says:

# The description refers to the terminfo entry which is lowercase.
ncurses-base: capitalization-error-in-description linux Linux

I think terminfo for xterm is in  /lib/terminfo/x.  It has these binary 
files:
xterm, xterm-256color, xterm-color, xterm-debian, xterm-mono,
xterm-r5, xterm-r6, xterm-vt220, xterm-xfree86

What do you have in ncurses-base?

 >
 >> It seems odd that xterm is involved, since I always run the program in
 >> gnome terminal. The TERM variable on all three machines is
 >> 'xterm'. The opinion on the internet about the error is that xterm is
 >> not installed correctly.  A way of testing xterm is to run editor
 >> 'pico' which uses xterm.  Pico runs fine.  If I change TERM variable
 >> to 'gnome' and try to run pico editor it throws the same 'error
 >> opening terminal:xterm' error, thus proving that pico does indeed use
 >> xterm and that apparently xterm is installed correctly.
 >
 > The error message quotes the value of TERM, so I don’t think you can
 > have successfully changed it for this test.  Unless you have terminfo
 > file for ‘gnome’ then I’m not sure what it’s supposed to achieve anyway.
 >
I didn't say that right: with TERM=gnome the error is:
'error opening terminal:gnome'


0
bilsch
8/14/2016 8:19:34 PM
On 08/14/2016 12:10 PM, Ian Zimmerman wrote:
> On 2016-08-12 03:33 -0700, bilsch wrote:
>
>> Pico runs fine.  If I change TERM variable to 'gnome' and try to run
>> pico editor it throws the same 'error opening terminal:xterm' error,
>
> Does it really say this, and not
>
> error opening terminal:gnome
>
> ?
>
> That would be very strange.
>
yes.  you are right.  I said it wrong.
0
bilsch
8/14/2016 8:21:20 PM
bilsch <king621@comcast.net> writes:
>> Do you have ncurses-base installed?  That’s where the terminfo file for
>> ‘xterm’ is.
>
> I have several things with ncurses-base in the name. I don't see
> anything like a terminfo file.  ncurses-base itself says:

I mean the ncurses-base package.

> # The description refers to the terminfo entry which is lowercase.
> ncurses-base: capitalization-error-in-description linux Linux

That looks like lintian output.  I’ve no idea why you’re quoting that.

-- 
http://www.greenend.org.uk/rjk/
0
Richard
8/14/2016 8:40:43 PM
>
> I mean the ncurses-base package.
>
  I did sudo apt-get install ncurses-base.  It says:
  ncurses-base is already the newest version.

I tried lsmod but I don't see any likely candidate listed.

So apparently I have it but I don't know where or what uses it or what 
it contains.


0
bilsch
8/14/2016 10:17:09 PM
>
> Is your program linked against the same ncurses library as pico?

I don't know about pico but my program (graf) is compiled and linked 
without a makefile as follows:

gcc -Wall graf.c -o graf -lm -lSDL2 -lncurses


#include <ncurses.h>	
#include <string.h>

#include <SDL2/SDL.h>

#include <stdio.h>

#include <time.h>

#include <stdlib.h>

#include <math.h>


I did strace graf and I got:

stat64("/home/bilsch01/.terminfo", 0x9350670) = -1 ENOENT
(No such file or directory)
stat64("/usr/share/terminfo", 0x9350670) = -1 ENOENT
(No such file or directory)
time(NULL)                              = 1471215095
write(2, "Error opening terminal: xterm.\n",

which tells me the paths it searched unsuccessfully.

Then
  I did strace graf on the system with no error message.  I got:

stat64("/home/bilsch/.terminfo", 0x815e670) = -1 ENOENT
(No such file or directory)
stat64("/usr/share/terminfo", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
time(NULL)                              = 1471217712
access("/usr/share/terminfo/x/xterm", R_OK) = 0
open("/usr/share/terminfo/x/xterm", O_RDONLY|O_LARGEFILE) = 3

which tells me it searched different paths, and got the right one, which 
is /usr/share/terminfo/x/xterm.

Possibly I could write the /x/xterm file to one of the paths being 
searched by the errant graf program - but that is a klooj.  Better to 
get the errant graf program to search the path where /x/xterm file is.

What determines the paths searched by the errant graf program ?
How do I get my .deb file to hook this up correctly?

I have built many versions of the graf program and this is the first 
time I got this problem.


>
> Different libncurses binaries may have different search paths. If you try
> to statically link ncurses, you'll end up with a binary which searches the
> terminfo directories which are appropriate for the system on which the
> program was built, but not necessarily for the system on which it is run.
>
> E.g. not all systems use /lib/terminfo (/lib and /usr/lib are for
> architecture-specific files, but terminfo files are portable).
>

0
bilsch
8/15/2016 12:05:43 AM
bilsch <king621@comcast.net> writes:
>> I mean the ncurses-base package.
>>
>  I did sudo apt-get install ncurses-base.  It says:
>  ncurses-base is already the newest version.
>
> I tried lsmod but I don't see any likely candidate listed.

lsmod is totally irrelevant here.

-- 
http://www.greenend.org.uk/rjk/
0
Richard
8/15/2016 8:10:20 AM
bilsch <king621@comcast.net> writes:
> I did strace graf and I got:
>
> stat64("/home/bilsch01/.terminfo", 0x9350670) = -1 ENOENT
> (No such file or directory)
> stat64("/usr/share/terminfo", 0x9350670) = -1 ENOENT
> (No such file or directory)
> time(NULL)                              = 1471215095
> write(2, "Error opening terminal: xterm.\n",
>
> which tells me the paths it searched unsuccessfully.
>
> Then
>  I did strace graf on the system with no error message.  I got:
>
> stat64("/home/bilsch/.terminfo", 0x815e670) = -1 ENOENT
> (No such file or directory)
> stat64("/usr/share/terminfo", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> time(NULL)                              = 1471217712
> access("/usr/share/terminfo/x/xterm", R_OK) = 0
> open("/usr/share/terminfo/x/xterm", O_RDONLY|O_LARGEFILE) = 3
>
> which tells me it searched different paths, and got the right one,
> which is /usr/share/terminfo/x/xterm.
>
> Possibly I could write the /x/xterm file to one of the paths being
> searched by the errant graf program - but that is a klooj.  Better to
> get the errant graf program to search the path where /x/xterm file is.
>
> What determines the paths searched by the errant graf program ?
> How do I get my .deb file to hook this up correctly?

What ‘ldd graf’ reveal on the two mcahines?

AFAICS the paths are baked into the ncurses libraries (specifically
libtinfo) when it is built.  Does the anomalous machine have a local
build of ncurses?

-- 
http://www.greenend.org.uk/rjk/
0
Richard
8/15/2016 8:16:31 AM
bilsch <king621@comcast.net> writes:
>> Is your program linked against the same ncurses library as pico?
>
> I don't know about pico but my program (graf) is compiled and linked
> without a makefile as follows:
>
> gcc -Wall graf.c -o graf -lm -lSDL2 -lncurses

[...]

> I did strace graf and I got:

[...]

> stat64("/usr/share/terminfo", 0x9350670) = -1 ENOENT

[...]

> which tells me the paths it searched unsuccessfully.
>
> Then
>  I did strace graf on the system with no error message.  I got:

[...]

> stat64("/usr/share/terminfo", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> access("/usr/share/terminfo/x/xterm", R_OK) = 0
> open("/usr/share/terminfo/x/xterm", O_RDONLY|O_LARGEFILE) = 3

[...]

> which tells me it searched different paths, and got the right one,

It tried the same top-level path (/usr/share/terminfo) on both
systems. On the first, the stat call ran into an ENOENT error which
means /usr/share/terminfo didn't exist there. Hence, the program not
trying to access /usr/share/terminfo/x/xterm afterwards seems
unsurprising: That's below /usr/share/terminfo. If that doesn't
exist, the other obviously cannot exist, either.
0
Rainer
8/15/2016 2:24:54 PM
On 8/14/2016 8:05 PM, bilsch wrote:
>[...]
> I did strace graf and I got:
>
> stat64("/home/bilsch01/.terminfo", 0x9350670) = -1 ENOENT
> (No such file or directory)
> stat64("/usr/share/terminfo", 0x9350670) = -1 ENOENT
> (No such file or directory)
> time(NULL)                              = 1471215095
> write(2, "Error opening terminal: xterm.\n",
>
> which tells me the paths it searched unsuccessfully.
>
> Then
>  I did strace graf on the system with no error message.  I got:
>
> stat64("/home/bilsch/.terminfo", 0x815e670) = -1 ENOENT
> (No such file or directory)
> stat64("/usr/share/terminfo", {st_mode=S_IFDIR|0755, st_size=4096, ...})
> = 0
> time(NULL)                              = 1471217712
> access("/usr/share/terminfo/x/xterm", R_OK) = 0
> open("/usr/share/terminfo/x/xterm", O_RDONLY|O_LARGEFILE) = 3
>
> which tells me it searched different paths, and got the right one, which
> is /usr/share/terminfo/x/xterm.

     Looks like they searched the *same* paths -- at least, the
first searched the same path prefix as the second, and bailed
out when that prefix was found not to exist.  Conclusion: On the
system where things fail, the directory /usr/share/terminfo does
not exist, though the program searches for things beneath that
location.

-- 
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM
0
Eric
8/15/2016 2:38:47 PM
On 2016-08-13 15:10 -0700, bilsch wrote:

> In /lib/terminfo/x are these binary files:
> xterm, xterm-256color, xterm-color, xterm-debian, xterm-mono,
> xterm-r5, xterm-r6, xterm-vt220, xterm-xfree86
> 
> What else can I do?

On this system, run

dpkg -S /lib/terminfo/x

On the other system, run

dpkg -S /usr/share/terminfo/x

Post the output.

Are both the same Ubuntu version?  Do they have the same versions of
packages installed?  Has one been updated but not the other?

-- 
Please *no* private Cc: on mailing lists and newsgroups
Why does the arrow on Hillary signs point to the right?

0
Ian
8/15/2016 3:23:23 PM
Ian Zimmerman <itz@buug.org> writes:
>On 2016-08-13 15:10 -0700, bilsch wrote:
>
>> In /lib/terminfo/x are these binary files:
>> xterm, xterm-256color, xterm-color, xterm-debian, xterm-mono,
>> xterm-r5, xterm-r6, xterm-vt220, xterm-xfree86
>> 
>> What else can I do?
>
>On this system, run
>
>dpkg -S /lib/terminfo/x
>
>On the other system, run
>
>dpkg -S /usr/share/terminfo/x
>
>Post the output.
>
>Are both the same Ubuntu version?  Do they have the same versions of
>packages installed?  Has one been updated but not the other?

Note that the user can set TERMINFO in the environment to point to a user-selected
directory which contains terminfo files.

Note that one can use the infocmp(1) command to extract a compilable
terminfo description from a binary terminfo file.

Note that one can use tic(1) command to compile a terminfo description
into a binary terminfo file.

Using those three 'Notes', one can copy a terminfo file from the
system where it exists to the system where it doesn't exist.

man -k terminfo
man 1  tic
man 1  infocmp
man 5  terminfo
0
scott
8/15/2016 4:43:21 PM
On 08/15/2016 08:23 AM, Ian Zimmerman wrote:
> On 2016-08-13 15:10 -0700, bilsch wrote:
>
>> In /lib/terminfo/x are these binary files:
>> xterm, xterm-256color, xterm-color, xterm-debian, xterm-mono,
>> xterm-r5, xterm-r6, xterm-vt220, xterm-xfree86
>>
>> What else can I do?
>
> On this system, run
>
> dpkg -S /lib/terminfo/x
>
> On the other system, run
>
> dpkg -S /usr/share/terminfo/x
>
> Post the output.
>
> Are both the same Ubuntu version?  Do they have the same versions of
> packages installed?  Has one been updated but not the other?
>
Please disregard what I said about /lib/terminfo/x - it confuses the 
issue.

Two systems. Please tell me which dpkg line to use with each one.

The first is a well used Ubuntu 14.04 system with an ncurses 5.9 package 
(aka ncurses 6.0)  from official website installed. I do not remember if 
the ncurses package was compiled here or if it is binaries that I 
downloaded. The graf executable runs on this system. The .deb file was 
built on this system. The .deb file was never run on this system.
The first system has xterm file at /usr/share/terminfo/x/.

The second system is a fresh install of Ubuntu 14.04 (with updates). The 
..deb file has been run on this system, thus (hopefully) installing the 
necessary ncurses files, but the ncurses package was not otherwise 
installed here. The graf executable generated on the second system by 
running the .deb file gets the error "error opening terminal: xterm" 
when run on the second system, but the graf executable runs without 
error on the first system - where the .deb file was built.

The .deb file, which builds graf (executable) and installs ncurses 
library does not install an xterm file in either path
  /usr/share/terminfo/x or /home/bilsch01/.terminfo, even though the 
graf executable searches for xterm in only those two locations. This 
seems to me like a fault in the .deb file.

Does this sound like a faulty .deb file to you ?




0
bilsch
8/18/2016 10:40:53 AM
bilsch <king621@comcast.net> writes:
> On 08/15/2016 08:23 AM, Ian Zimmerman wrote:
>> On 2016-08-13 15:10 -0700, bilsch wrote:
>>
>>> In /lib/terminfo/x are these binary files:
>>> xterm, xterm-256color, xterm-color, xterm-debian, xterm-mono,
>>> xterm-r5, xterm-r6, xterm-vt220, xterm-xfree86
>>>
>>> What else can I do?
>>
>> On this system, run
>>
>> dpkg -S /lib/terminfo/x
>>
>> On the other system, run
>>
>> dpkg -S /usr/share/terminfo/x
>>
>> Post the output.
>>
>> Are both the same Ubuntu version?  Do they have the same versions of
>> packages installed?  Has one been updated but not the other?
>>
> Please disregard what I said about /lib/terminfo/x - it confuses the
> issue.
>
> Two systems. Please tell me which dpkg line to use with each one.
>
> The first is a well used Ubuntu 14.04 system with an ncurses 5.9
> package (aka ncurses 6.0)  from official website installed. I do not
> remember if the ncurses package was compiled here or if it is binaries
> that I downloaded. The graf executable runs on this system. The .deb
> file was built on this system. The .deb file was never run on this
> system.
> The first system has xterm file at /usr/share/terminfo/x/.
>
> The second system is a fresh install of Ubuntu 14.04 (with
> updates). The .deb file has been run on this system, thus (hopefully)
> installing the necessary ncurses files, but the ncurses package was
> not otherwise installed here. The graf executable generated on the
> second system by running the .deb file gets the error "error opening
> terminal: xterm" when run on the second system, but the graf
> executable runs without error on the first system - where the .deb
> file was built.
>
> The .deb file, which builds graf (executable) and installs ncurses
> library does not install an xterm file in either path
>  /usr/share/terminfo/x or /home/bilsch01/.terminfo, even though the
> graf executable searches for xterm in only those two locations. This
> seems to me like a fault in the .deb file.

Do you actually read replies you get? Judging from the strace output you
posted, the 2nd system doesn't have the terminfo database installed in
/usr/share/terminfo. As determine by spending about 5 minutes looking at
the 14.04 package listings, the essential ncurses-base packages provides
some terminal defnitions in /lib/terminfo (this makes little sense as
they architecture independent but systemd developers haven't discovered
computer networks beyond 'the WWW' yet and thus, don't believe in
them). The ncurses-term package provides additional terminal definitions
below /usr/share/terminfo. Your problem could possibly vanish by
installing this package.

HOWEVER,

A much more interesting question is "Why isn't your program using the
proper terminfo search path for the system it's supposed to run
on?". The Debian/ Ubuntu curses is compiled with

 --with-terminfo-dirs="/etc/terminfo:/lib/terminfo:/usr/share/terminfo" \

The one your program is using seems to restrict itself of the default
path of the ncurses source package.

Did you per chance link that statically on the misguided assumption
that this would be some kind of magic bullet worthy of having on its
own?
0
Rainer
8/18/2016 3:48:39 PM
On 08/18/2016 08:48 AM, Rainer Weikusat wrote:
> bilsch <king621@comcast.net> writes:
>> On 08/15/2016 08:23 AM, Ian Zimmerman wrote:
>>> On 2016-08-13 15:10 -0700, bilsch wrote:
>>>
>>>> In /lib/terminfo/x are these binary files:
>>>> xterm, xterm-256color, xterm-color, xterm-debian, xterm-mono,
>>>> xterm-r5, xterm-r6, xterm-vt220, xterm-xfree86
>>>>
>>>> What else can I do?
>>>
>>> On this system, run
>>>
>>> dpkg -S /lib/terminfo/x
>>>
>>> On the other system, run
>>>
>>> dpkg -S /usr/share/terminfo/x
>>>
>>> Post the output.
>>>
>>> Are both the same Ubuntu version?  Do they have the same versions of
>>> packages installed?  Has one been updated but not the other?
>>>
>> Please disregard what I said about /lib/terminfo/x - it confuses the
>> issue.
>>
>> Two systems. Please tell me which dpkg line to use with each one.
>>
>> The first is a well used Ubuntu 14.04 system with an ncurses 5.9
>> package (aka ncurses 6.0)  from official website installed. I do not
>> remember if the ncurses package was compiled here or if it is binaries
>> that I downloaded. The graf executable runs on this system. The .deb
>> file was built on this system. The .deb file was never run on this
>> system.
>> The first system has xterm file at /usr/share/terminfo/x/.
>>
>> The second system is a fresh install of Ubuntu 14.04 (with
>> updates). The .deb file has been run on this system, thus (hopefully)
>> installing the necessary ncurses files, but the ncurses package was
>> not otherwise installed here. The graf executable generated on the
>> second system by running the .deb file gets the error "error opening
>> terminal: xterm" when run on the second system, but the graf
>> executable runs without error on the first system - where the .deb
>> file was built.
>>
>> The .deb file, which builds graf (executable) and installs ncurses
>> library does not install an xterm file in either path
>>  /usr/share/terminfo/x or /home/bilsch01/.terminfo, even though the
>> graf executable searches for xterm in only those two locations. This
>> seems to me like a fault in the .deb file.
>
> Do you actually read replies you get?

Yes.  I Don't always understand everything in them.

Judging from the strace output you
> posted, the 2nd system doesn't have the terminfo database installed in
> /usr/share/terminfo.

Yes.


 > As determine by spending about 5 minutes looking at
> the 14.04 package listings, the essential ncurses-base packages provides
> some terminal defnitions in /lib/terminfo (this makes little sense as
> they architecture independent but systemd developers haven't discovered
> computer networks beyond 'the WWW' yet and thus, don't believe in
> them). The ncurses-term package provides additional terminal definitions
> below /usr/share/terminfo. Your problem could possibly vanish by
> installing this package.

The objective is to create a .deb file that provides functionality to 
run the graf executable on a freshly installed Ubuntu system. Maybe it 
is unrealistic.  I don't think you are saying install ncurses-term on 
the first system thereby resulting in a better .deb file that matches up 
a term file with a search path. Or am I mistaken thinking the .deb file 
can do anything like that?

>
> HOWEVER,
>
> A much more interesting question is "Why isn't your program using the
> proper terminfo search path for the system it's supposed to run
> on?". The Debian/ Ubuntu curses is compiled with
>
>  --with-terminfo-dirs="/etc/terminfo:/lib/terminfo:/usr/share/terminfo" \
>
> The one your program is using seems to restrict itself of the default
> path of the ncurses source package.


I don't know.

>
> Did you per chance link that statically on the misguided assumption
> that this would be some kind of magic bullet worthy of having on its
> own?
>
I've never static linked while doing any of this.


0
bilsch
8/18/2016 10:29:04 PM
I should reinstall the ncurses package
0
bilsch
8/18/2016 10:42:59 PM
bilsch <king621@comcast.net> writes:

>
>The objective is to create a .deb file that provides functionality to 
>run the graf executable on a freshly installed Ubuntu system. Maybe it 
>is unrealistic.  I don't think you are saying install ncurses-term on 
>the first system thereby resulting in a better .deb file that matches up 
>a term file with a search path. Or am I mistaken thinking the .deb file 
>can do anything like that?

So, in your 'graf' .deb file, specify ncurses-base as a dependency and
the package manager will handle loading it.
0
scott
8/19/2016 1:10:12 PM
scott@slp53.sl.home (Scott Lurndal) writes:
> bilsch <king621@comcast.net> writes:
>
>>
>>The objective is to create a .deb file that provides functionality to 
>>run the graf executable on a freshly installed Ubuntu system. Maybe it 
>>is unrealistic.  I don't think you are saying install ncurses-term on 
>>the first system thereby resulting in a better .deb file that matches up 
>>a term file with a search path. Or am I mistaken thinking the .deb file 
>>can do anything like that?
>
> So, in your 'graf' .deb file, specify ncurses-base as a dependency and
> the package manager will handle loading it.

ncurses-base is 'required' and should this always exist. But in Ubuntu
14.04, it only provides terminal definitions in /lib/terminfo.

0
Rainer
8/19/2016 1:42:26 PM
Rainer Weikusat <rweikusat@talktalk.net> writes:
> scott@slp53.sl.home (Scott Lurndal) writes:
>> bilsch <king621@comcast.net> writes:

>>>The objective is to create a .deb file that provides functionality to
>>>run the graf executable on a freshly installed Ubuntu system. Maybe
>>>it is unrealistic.  I don't think you are saying install ncurses-term
>>>on the first system thereby resulting in a better .deb file that
>>>matches up a term file with a search path. Or am I mistaken thinking
>>>the .deb file can do anything like that?
>>
>> So, in your 'graf' .deb file, specify ncurses-base as a dependency and
>> the package manager will handle loading it.

That is completely the wrong approach.

> ncurses-base is 'required' and should this always exist. But in Ubuntu
> 14.04, it only provides terminal definitions in /lib/terminfo.

....which includes xterm[1].  And the libtinfo from that version will
look there by default:

[1] http://packages.ubuntu.com/trusty/all/ncurses-base/filelist

$ strings -a lib/x86_64-linux-gnu/libtinfo.so.5|grep terminfo
_nc_home_terminfo
/etc/terminfo
/etc/terminfo:/lib/terminfo:/usr/share/terminfo
%s/.terminfo

So either bilsch isn’t using the standard version of the library or they
have somehow configured it so that it does not work.  Hence asking for
ldd output.

-- 
http://www.greenend.org.uk/rjk/
0
Richard
8/19/2016 3:03:41 PM
Richard Kettlewell , dans le message
<8760qw3inm.fsf@LkoBDZeT.terraraq.uk>, a écrit :
> So either bilsch isn’t using the standard version of the library or they
> have somehow configured it so that it does not work.  Hence asking for
> ldd output.

Have you noticed how people who have weird problems always answer first to
messages that suggest random non-solutions and never to messages that follow
competent diagnosing protocol?
0
Nicolas
8/19/2016 3:11:54 PM
Nicolas George <nicolas$george@salle-s.org> writes:
> Richard Kettlewell writes:
>> So either bilsch isn’t using the standard version of the library or they
>> have somehow configured it so that it does not work.  Hence asking for
>> ldd output.
>
> Have you noticed how people who have weird problems always answer first to
> messages that suggest random non-solutions and never to messages that follow
> competent diagnosing protocol?

Yes l-)

-- 
http://www.greenend.org.uk/rjk/
0
Richard
8/19/2016 3:24:28 PM
On 2016-08-18 15:29 -0700, bilsch wrote:

> The objective is to create a .deb file that provides functionality to
> run the graf executable on a freshly installed Ubuntu system. Maybe it
> is unrealistic.  I don't think you are saying install ncurses-term on
> the first system thereby resulting in a better .deb file that matches
> up a term file with a search path. Or am I mistaken thinking the .deb
> file can do anything like that?

One problem in helping you is that you keep using this funny language
"run a deb file".  A deb is not an executable; it is a data file for the
packaging system.  Because you say this one has the feeling of not
knowing what it is precisely you do.

More specifically:  I am not sure anymore that your deb doesn't actually
include a copy of ncurses.  It doesn't, right?  If it does, _change
that_.  Do not bundle libraries like that.  Make your package _depend_
on libncurses5, and optionally on ncurses-term.

-- 
Please *no* private Cc: on mailing lists and newsgroups
Why does the arrow on Hillary signs point to the right?

0
Ian
8/19/2016 7:18:30 PM
bilsch <king621@comcast.net> writes:
> On 08/18/2016 08:48 AM, Rainer Weikusat wrote:

[ncurses program can't find xterm terminal definition on Unbutu 14.04]


>> posted, the 2nd system doesn't have the terminfo database installed in
>> /usr/share/terminfo.
>
> Yes.
>
>
>> As determine by spending about 5 minutes looking at
>> the 14.04 package listings, the essential ncurses-base packages provides
>> some terminal defnitions in /lib/terminfo (this makes little sense as
>> they architecture independent but systemd developers haven't discovered
>> computer networks beyond 'the WWW' yet and thus, don't believe in
>> them). The ncurses-term package provides additional terminal definitions
>> below /usr/share/terminfo. Your problem could possibly vanish by
>> installing this package.
>
> The objective is to create a .deb file that provides functionality to
> run the graf executable on a freshly installed Ubuntu system. Maybe it
> is unrealistic.  I don't think you are saying install ncurses-term on
> the first system thereby resulting in a better .deb file that matches
> up a term file with a search path. Or am I mistaken thinking the .deb
> file can do anything like that?

You could declare a dependency on ncurses-term. This would probably hide
the problem with your binary.

>> HOWEVER,
>>
>> A much more interesting question is "Why isn't your program using the
>> proper terminfo search path for the system it's supposed to run
>> on?". The Debian/ Ubuntu curses is compiled with
>>
>>  --with-terminfo-dirs="/etc/terminfo:/lib/terminfo:/usr/share/terminfo" \
>>
>> The one your program is using seems to restrict itself of the default
>> path of the ncurses source package.
>
> I don't know.

I do, at least if the strace output you posted was complete
enough. According to the Debian/ Ubuntu ncurses source package, the
library should search for terminfo files in /etc/terminfo, /lib/terminfo
and /usr/share/terminfo. Hence, it should find the xterm definition in
/lib/terminfo. But the library your program uses apparently doesn't do
that. That's the issue to investigate here. A first step towards that
would be (as already suggested) to run ldd on your program and one some
curses-using program which works, eg, pico, and compare the output.


0
Rainer
8/19/2016 8:16:05 PM
On 08/19/2016 08:03 AM, Richard Kettlewell wrote:
> Rainer Weikusat <rweikusat@talktalk.net> writes:
>> scott@slp53.sl.home (Scott Lurndal) writes:
>>> bilsch <king621@comcast.net> writes:
>
>>>> The objective is to create a .deb file that provides functionality to
>>>> run the graf executable on a freshly installed Ubuntu system. Maybe
>>>> it is unrealistic.  I don't think you are saying install ncurses-term
>>>> on the first system thereby resulting in a better .deb file that
>>>> matches up a term file with a search path. Or am I mistaken thinking
>>>> the .deb file can do anything like that?
>>>
>>> So, in your 'graf' .deb file, specify ncurses-base as a dependency and
>>> the package manager will handle loading it.
>
> That is completely the wrong approach.
>
>> ncurses-base is 'required' and should this always exist. But in Ubuntu
>> 14.04, it only provides terminal definitions in /lib/terminfo.
>
> ...which includes xterm[1].  And the libtinfo from that version will
> look there by default:
>
> [1] http://packages.ubuntu.com/trusty/all/ncurses-base/filelist
>
> $ strings -a lib/x86_64-linux-gnu/libtinfo.so.5|grep terminfo
> _nc_home_terminfo
> /etc/terminfo
> /etc/terminfo:/lib/terminfo:/usr/share/terminfo
> %s/.terminfo
>
> So either bilsch isn’t using the standard version of the library or they
> have somehow configured it so that it does not work.  Hence asking for
> ldd output.
>

Here is the ldd output.
Note: a message during creation of the .deb file says ncurses library is 
imbedded.

bilsch01@bilsch01-VirtualBox:/usr/bin$ ldd pico
	linux-gate.so.1 =>  (0xb77a1000)
	libncursesw.so.5 => not found
	libtinfo.so.5 => /lib/i386-linux-gnu/libtinfo.so.5 (0xb7766000)
	libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb75b6000)
	/lib/ld-linux.so.2 (0x8009a000)
bilsch01@bilsch01-VirtualBox:/usr/bin$ cd /home/bilsch01
bilsch01@bilsch01-VirtualBox:~$ ldd grafeotx
	linux-gate.so.1 =>  (0xb77b8000)
	libSDL2-2.0.so.0 => /usr/lib/i386-linux-gnu/libSDL2-2.0.so.0 (0xb768b000)
	libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb7645000)
	libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7495000)
	libasound.so.2 => /usr/lib/i386-linux-gnu/libasound.so.2 (0xb739f000)
	libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb739a000)
	libpulse-simple.so.0 => /usr/lib/i386-linux-gnu/libpulse-simple.so.0 
(0xb7395000)
	libpulse.so.0 => /usr/lib/i386-linux-gnu/libpulse.so.0 (0xb7346000)
	libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xb7211000)
	libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xb71fe000)
	libXcursor.so.1 => /usr/lib/i386-linux-gnu/libXcursor.so.1 (0xb71f3000)
	libXinerama.so.1 => /usr/lib/i386-linux-gnu/libXinerama.so.1 (0xb71ef000)
	libXi.so.6 => /usr/lib/i386-linux-gnu/libXi.so.6 (0xb71df000)
	libXrandr.so.2 => /usr/lib/i386-linux-gnu/libXrandr.so.2 (0xb71d3000)
	libXss.so.1 => /usr/lib/i386-linux-gnu/libXss.so.1 (0xb71cf000)
	libXxf86vm.so.1 => /usr/lib/i386-linux-gnu/libXxf86vm.so.1 (0xb71c9000)
	libwayland-egl.so.1 => /usr/lib/i386-linux-gnu/libwayland-egl.so.1 
(0xb71c6000)
	libwayland-client.so.0 => 
/usr/lib/i386-linux-gnu/libwayland-client.so.0 (0xb71ba000)
	libwayland-cursor.so.0 => 
/usr/lib/i386-linux-gnu/libwayland-cursor.so.0 (0xb71b0000)
	libxkbcommon.so.0 => /usr/lib/i386-linux-gnu/libxkbcommon.so.0 (0xb7174000)
	libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7158000)
	librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb714f000)
	/lib/ld-linux.so.2 (0x8008f000)
	libpulsecommon-4.0.so => 
/usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-4.0.so (0xb70df000)
	libjson-c.so.2 => /lib/i386-linux-gnu/libjson-c.so.2 (0xb70d4000)
	libdbus-1.so.3 => /lib/i386-linux-gnu/libdbus-1.so.3 (0xb7089000)
	libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xb7067000)
	libXrender.so.1 => /usr/lib/i386-linux-gnu/libXrender.so.1 (0xb705c000)
	libXfixes.so.3 => /usr/lib/i386-linux-gnu/libXfixes.so.3 (0xb7055000)
	libffi.so.6 => /usr/lib/i386-linux-gnu/libffi.so.6 (0xb704e000)
	libwrap.so.0 => /lib/i386-linux-gnu/libwrap.so.0 (0xb7044000)
	libsndfile.so.1 => /usr/lib/i386-linux-gnu/libsndfile.so.1 (0xb6fd2000)
	libasyncns.so.0 => /usr/lib/i386-linux-gnu/libasyncns.so.0 (0xb6fcb000)
	libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xb6fc6000)
	libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xb6fbf000)
	libnsl.so.1 => /lib/i386-linux-gnu/libnsl.so.1 (0xb6fa6000)
	libFLAC.so.8 => /usr/lib/i386-linux-gnu/libFLAC.so.8 (0xb6f72000)
	libvorbisenc.so.2 => /usr/lib/i386-linux-gnu/libvorbisenc.so.2 (0xb6dfa000)
	libvorbis.so.0 => /usr/lib/i386-linux-gnu/libvorbis.so.0 (0xb6dcd000)
	libogg.so.0 => /usr/lib/i386-linux-gnu/libogg.so.0 (0xb6dc4000)
	libresolv.so.2 => /lib/i386-linux-gnu/libresolv.so.2 (0xb6dac000)

0
bilsch
8/20/2016 1:12:31 PM
bilsch <king621@comcast.net> writes:
> Richard Kettlewell wrote:
>> So either bilsch isn’t using the standard version of the library or
>> they have somehow configured it so that it does not work.  Hence
>> asking for ldd output.
>
> Here is the ldd output.
> Note: a message during creation of the .deb file says ncurses library
> is imbedded.

Please get into the habit of using copy and paste to report messages,
rather than inaccurately re-typing them.  In this case you are probably
referring to https://lintian.debian.org/tags/embedded-library.html.

> bilsch01@bilsch01-VirtualBox:/usr/bin$ cd /home/bilsch01
> bilsch01@bilsch01-VirtualBox:~$ ldd grafeotx

Your program was called ‘graf’ when you posted strace output.  What’s
the reason for the discrepancy?

> 	linux-gate.so.1 =>  (0xb77b8000)
[...]

None of the curses libraries appear in this list, and Lintian is warning
you that you are statically linked against ncurses.  You may wish to
reflect on the fact that it’s taken most of a week to determine this
from the first request for ldd output, or that Rainer also guessed it a
couple of days back.

Anyway since it has a different terminfo search path to the Debian &
Ubuntu builds I think it must be your own local build of ncurses, or
possibly one from some other Linux distribution.

-- 
http://www.greenend.org.uk/rjk/
0
Richard
8/20/2016 2:17:35 PM
>>   ldd grafeotx
>

eotx = error opening terminal:xterm

>
> None of the curses libraries appear in this list

I did ldd right away and was puzzled by no ncurses library because the 
program does run on the system where it was built - just doesn't run on 
system with no ncurses installed.  That's the whole problem.

The .deb file should provide the ncurses info - thats the point.  You 
don't have to install ncurses (or SDL) on your PC in order to run graf.


> you are statically linked against ncurses.

gcc -Wall graf.c -o graf -lm -lSDL2 -lncurses
that's not static linking


> I think it must be your own local build of ncurses

then it must be, but I don't know why that's a problem.

0
bilsch
8/20/2016 3:51:26 PM
bilsch <king621@comcast.net> writes:

>> None of the curses libraries appear in this list
>
> I did ldd right away and was puzzled by no ncurses library because the
> program does run on the system where it was built - just doesn't run
> on system with no ncurses installed.  That's the whole problem.
> 
> The .deb file should provide the ncurses info - thats the point.  You
> don't have to install ncurses (or SDL) on your PC in order to run
> graf.

This is not really a sensible approach when targetting Debian/Ubuntu
systems.  Install the dependencies on the target in the normal way
(i.e. apt-get install).  Don’t attempt to package them as part of your
application.

>> you are statically linked against ncurses.
>
> gcc -Wall graf.c -o graf -lm -lSDL2 -lncurses
> that's not static linking

You can’t tell from that line on its own.

You *can* tell from ldd, and the answer is: you did not dynamically link
against ncurses.

>> I think it must be your own local build of ncurses
>
> then it must be, but I don't know why that's a problem.

Because it doesn’t know where to look for the terminfo files on the
target system.

-- 
http://www.greenend.org.uk/rjk/
0
Richard
8/20/2016 4:05:18 PM
On 08/19/2016 06:10 AM, Scott Lurndal wrote:
> bilsch <king621@comcast.net> writes:
>
>>
>> The objective is to create a .deb file that provides functionality to
>> run the graf executable on a freshly installed Ubuntu system. Maybe it
>> is unrealistic.  I don't think you are saying install ncurses-term on
>> the first system thereby resulting in a better .deb file that matches up
>> a term file with a search path. Or am I mistaken thinking the .deb file
>> can do anything like that?
>
> So, in your 'graf' .deb file, specify ncurses-base as a dependency and
> the package manager will handle loading it.

My debian/control file is shown below.  I tried adding a couple of 
things to 'Build-Depends' and 'Depends' but it doesn't like my syntax. I 
checked the debian policy manual to find examples. None.  Do you know 
the syntax for adding 'ncurses-base' to Depends: ?

Source: graf
Maintainer: bilsch01 <bilsch01@gmail.com>
Section: misc
Priority: optional
Standards-Version: 3.9.5
Build-Depends: debhelper (>= 9)

Package: graf
Architecture: i386
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: plots parametric graphs
  graf plots parametric graphs with periodic functions on x & y-axes.
0
bilsch
8/20/2016 5:15:13 PM
bilsch <king621@comcast.net> writes:
> My debian/control file is shown below.  I tried adding a couple of
> things to 'Build-Depends' and 'Depends' but it doesn't like my
> syntax. I checked the debian policy manual to find examples. None.  Do
> you know the syntax for adding 'ncurses-base' to Depends: ?

Don’t do that; it’s not likely to solve the actual problem, which seems
to be to do with how you build your program.

> Source: graf
> Maintainer: bilsch01 <bilsch01@gmail.com>
> Section: misc
> Priority: optional
> Standards-Version: 3.9.5
> Build-Depends: debhelper (>= 9)
>
> Package: graf
> Architecture: i386

Should probably be Architecture: any.

> Depends: ${shlibs:Depends}, ${misc:Depends}}
> Description: plots parametric graphs
>  graf plots parametric graphs with periodic functions on x & y-axes.

-- 
http://www.greenend.org.uk/rjk/
0
Richard
8/20/2016 9:14:07 PM
bilsch <king621@comcast.net> writes:

[...]

>> you are statically linked against ncurses.
>
> gcc -Wall graf.c -o graf -lm -lSDL2 -lncurses
> that's not static linking

That's linking with the first ncurses version the linker found in it's
search path.
0
Rainer
8/21/2016 6:54:28 PM
Using your suggestions and tools you showed me, I created a .deb file 
that installs the SDL files and the graf program on a fresh Ubuntu 14.04 
install.  The ncurses files all come with the Ubuntu install.  I  made 
ncurses-base a dependency.  I ran ./configure with some
   "--with-terminfo-dirs=" options set.

I checked the system for libSDL.bla.bla files and there were none before 
I ran the .deb file - but afterwards there are plenty, and some are 
large, like 1.1 MB.  This is what I planned for but I am surprised that 
the .deb file is not 2MB or more. The .deb file is only 11.7k, so where 
did all these libSDL files come from?

Thanks for the help.    Bill S.
0
bilsch
8/30/2016 12:07:22 PM
bilsch <king621@comcast.net> writes:
> Using your suggestions and tools you showed me, I created a .deb file
> that installs the SDL files and the graf program on a fresh Ubuntu
> 14.04 install.  The ncurses files all come with the Ubuntu install.  I
> made ncurses-base a dependency.  I ran ./configure with some
>   "--with-terminfo-dirs=" options set.
>
> I checked the system for libSDL.bla.bla files and there were none
> before I ran the .deb file - but afterwards there are plenty, and some
> are large, like 1.1 MB.  This is what I planned for but I am surprised
> that the .deb file is not 2MB or more. The .deb file is only 11.7k, so
> where did all these libSDL files come from?

Publish the .deb somewhere, trying to guess what you’ve done from your
descriptions is impractical.

-- 
http://www.greenend.org.uk/rjk/
0
Richard
8/30/2016 12:12:56 PM
On 08/30/2016 05:12 AM, Richard Kettlewell wrote:
> bilsch <king621@comcast.net> writes:
>> Using your suggestions and tools you showed me, I created a .deb file
>> that installs the SDL files and the graf program on a fresh Ubuntu
>> 14.04 install.  The ncurses files all come with the Ubuntu install.  I
>> made ncurses-base a dependency.  I ran ./configure with some
>>   "--with-terminfo-dirs=" options set.
>>
>> I checked the system for libSDL.bla.bla files and there were none
>> before I ran the .deb file - but afterwards there are plenty, and some
>> are large, like 1.1 MB.  This is what I planned for but I am surprised
>> that the .deb file is not 2MB or more. The .deb file is only 11.7k, so
>> where did all these libSDL files come from?
>
> Publish the .deb somewhere, trying to guess what you’ve done from your
> descriptions is impractical.
>

I tried to upload the folder with the automake and debuild files but 
github says they are hidden, so I didn't upload those.  Here's the link 
to the .deb file:

https://github.com/bilsch01/graf0816
0
bilsch
8/30/2016 9:30:39 PM
bilsch <king621@comcast.net> writes:
> On 08/30/2016 05:12 AM, Richard Kettlewell wrote:
>> Publish the .deb somewhere, trying to guess what you’ve done from
>> your descriptions is impractical.
>
> I tried to upload the folder with the automake and debuild files but
> github says they are hidden, so I didn't upload those.  Here's the
> link to the .deb file:
>
> https://github.com/bilsch01/graf0816

  Depends: libc6 (>= 2.7), libncurses5 (>= 5.5-5~), libsdl2-2.0-0 (>= 2.0.0),
           libtinfo5, ncurses-base (>= 5.9)
                      ^^^^^^^^^^^^

There is no need for this, ncurses-base is an essential package and
will always be installed.

  $ objdump  -x usr/bin/graf |grep NEEDED
    NEEDED               libSDL2-2.0.so.0
    NEEDED               libncurses.so.5
    NEEDED               libtinfo.so.5
    NEEDED               libm.so.6
    NEEDED               libc.so.6

That looks right.

As far as I can see you have made a dynamically linked executable which
depends on the right library packages.  If they weren’t installed
previously then I expect you used apt-get to install your package, which
caused them to be installed automatically.  That’s how it’s supposed to
work.

-- 
http://www.greenend.org.uk/rjk/
0
Richard
8/30/2016 10:14:02 PM
Reply: