libncurses

393 views
Skip to first unread message

ashughes

unread,
Feb 12, 2010, 3:57:48 AM2/12/10
to Android-x86
I'm trying to run a program that uses ncurses. I got the program to
work this past summer when libncurses was included in the android-x86
project such that it was actually compiled into the output image. I
did have to copy the library binary libncursesw.so.5 to libncurses.so.
5 in order for my program to find the library. Since then ncurses for
android-x86 had been left behind and is no longer automatically
compiled into the output image, though it is still in the source at
bootable/newinstaller/install/lib/libncursesw.so.5.

I figured out that if I copy this library to bootable/newinstaller/
initrd/lib/libncurses.so.5 it will be compiled into the output image.
This allows my program to not complain about not being able to access
ncurses, however the program will not run. I get an error: "Error
opening terminal: linux." I figured out that this is due to ncurses
dying in initscr(). It grabs the value in the environment variable
TERM and tries to open a new terminal. I thought maybe the terminal
running in android cannot support ncurses for some reason, but I did
get this working this past summer, so I'm not sure exactly what has
changed, if anything.

My only other thought is that maybe this ncurses binary is linked
against some other older libraries not included or now upgraded in
android-x86. If so, is there a way to recompile ncurses against the
current state of the system and include it in the output image? Since
I'm already asking, is there a specific way to do this for ANY library
that I might want to include in android?

Thanks,
Andrew

Ben Wiley Sittler

unread,
Feb 12, 2010, 1:15:19 PM2/12/10
to andro...@googlegroups.com
Maybe you are missing the terminfo database? It's just a guess...

> --
> You received this message because you are subscribed to the Google Groups "Android-x86" group.
> To post to this group, send email to andro...@googlegroups.com.
> To unsubscribe from this group, send email to android-x86...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/android-x86?hl=en.
>
>

ashughes

unread,
Feb 12, 2010, 3:11:13 PM2/12/10
to Android-x86
Sounds possible. Or the compiled version of libncurses is looking for
terminfo in the wrong place? What would I do to add terminfo if it's
missing, or recompile libncurses? Any ideas?

Andrew

Ben Wiley Sittler

unread,
Feb 12, 2010, 6:49:33 PM2/12/10
to andro...@googlegroups.com
just as a test, you could probably copy over a compiled terminfo file
from a linux box and put it in ~/.terminfo/l/linux (where ~ is
whatever $HOME points to when your app is running); however i am still
very ignorant about android and there may well be some reason this
won't work there.

Chih-Wei Huang

unread,
Feb 14, 2010, 8:25:38 AM2/14/10
to andro...@googlegroups.com
You just need to copy the dir
bootable/newinstaller/install/lib/terminfo

libncurses is not used by Android-x86, except the installer.
So it is moved to the install dir.

2010/2/13 ashughes <ashu...@gmail.com>:


> Sounds possible. Or the compiled version of libncurses is looking for
> terminfo in the wrong place? What would I do to add terminfo if it's
> missing, or recompile libncurses? Any ideas?
>

Android-x86 project
http://www.android-x86.org

Reply all
Reply to author
Forward
0 new messages