[haiku-development] Re: libncurses.so?

On Thu, Sep 29, 2011 at 03:39:47PM -0700, Pete Goodeve wrote:
> On Thu, Sep 29, 2011 at 01:13:52AM -0700, scottmc wrote:
> > > Is getting a shared library as well just a matter of running ./configure
> > > appropriately?
> > 
> > Try this one:
> > http://ports-space.haiku-files.org/sys-libs/
> > get the zip and then extract it to /boot...
> Thanks.  Did that, but strangely I get the same error with the 5.7 .so
> as I do with the BeOS one I tried before:
>   "Error opening terminal: xterm."
> (This is despite /etc/termcap always having been there, and the 5.7
> package has installed terminfo too...)
> When I link in the  .a copy from the Haiku build, it works!
> So maybe I'll try pulling out the code from the Haiku source
> (it seems to be a complete package) and play with it to see if
> I can generate a .so...

I did finally get a working libncurses.so.  I just edited the jamfile from
the trunk source to include a rule for the shared lib as well, and the
resulting file was good.

The general problem was complete confusion  between termcap
and terminfo.  The standard Haiku build has /etc/termcap, but no
installed terminfo.  A simple configure and build of ncurses on the
other hand assumes terminfo *only*.

Turns out that the ncurses_cfg.h existing in the Haiku source *does*
specify termcap use, so that build works.  The moment you do another
configure (without noticing one needs "--enable-termcap") you get
another ncurses_cfg.h without that facility...

As I mentioned above, the 5.7 package from Haiku ports installs the
terminfo files, so I was puzzled for a while as to why it didn't work.
A look at the strings in the binary showed why... It wants
/boot/common/share/terminfo, but installs them into /boot/common/lib/terminfo!
(Actually both strings exist in the binary, but experimentally it just
doesn't find the set in .../lib.  Linking in the .../share path made
things work.  I would guess the original porter had them in both
places, so didn't notice that the package would fail.)

FTR, the configuration in the trunk won't work with terminfo either,
because the path is still specified as /usr/local/share/terminfo.

Not sure where or when others use ncurses, but I guess things
should be sorted a bit -- at least the HaikuPorts package.

        -- Pete --

Other related posts: