Tiny Core Linux

Tiny Core Base => CorePlus => Topic started by: t18 on May 13, 2025, 04:18:38 AM

Title: Applications requiring ncurses
Post by: t18 on May 13, 2025, 04:18:38 AM
Hello,

I'm trying to run older software requiring the ncurses package.

Wordperfect 8 works fine if setting LD_LIBRARY_PATH to the separate directory where the ncurses is installed.

Lotus 123 doesn't.

What to do in these cases?

Many thanks.
Title: Re: Applications requiring ncurses
Post by: Rich on May 13, 2025, 08:57:27 AM
Hi t18
Saying "It doesn't work" and not providing any error
messages (clues) makes it difficult to provide an answer.

This is strictly guesswork, but if you are using a command
with this basic format:
Code: [Select]
LD_LIBRARY_PATH=/Your/Path/To/ncurses; lotus123
Try changing it to:
Code: [Select]
export LD_LIBRARY_PATH=/Your/Path/To/ncurses
lotus123

It is also possible  LD_LIBRARY_PATH  is the wrong tool for the job.
Maybe  LD_PRELOAD  is what you need.

Without more information, any answers are only guesses.
Title: Re: Applications requiring ncurses
Post by: Juanito on May 13, 2025, 09:23:30 AM
Often you need to search the configure script to see how it tests for ncurses:

The include path often needs changing to /usr/local/include/ncursesw
The library test often needs changing to ncursesw, formw, etc
LIBS="-L /usr/local/lib lncursesw" sometimes helps
Title: Re: Applications requiring ncurses
Post by: t18 on May 13, 2025, 11:21:44 AM
The error is just "error while loading shared libraries: libncurses.so.6: no such file or dir".

Although is is installed but in a separate directory.
Title: Re: Applications requiring ncurses
Post by: Juanito on May 13, 2025, 11:26:17 AM
The file is called libncursesw.so.6 in tinycore
Title: Re: Applications requiring ncurses
Post by: patrikg on May 13, 2025, 12:07:47 PM
I think, I saw in the ncursesw in the install stage they make a link to the old ncurses lib.
Maybe the tce don't do that.
Title: Re: Applications requiring ncurses
Post by: Rich on May 13, 2025, 12:21:01 PM
Hi t18
The current ncurses doesn't provide links to the old names.
I presume you are running TC16, so try:
Code: [Select]
sudo ln -s /usr/local/lib/libncursesw.so /usr/local/lib/libncurses.so
sudo ln -s /usr/local/lib/libncursesw.so.6 /usr/local/lib/libncurses.so.6
sudo ln -s /usr/local/lib/libncursesw.so.6.5 /usr/local/lib/libncurses.so.6.5
Title: Re: Applications requiring ncurses
Post by: t18 on May 13, 2025, 01:10:48 PM
Hi Rich,

I'm running TC 15.

The links seems to work but now the program requires libtinfo.so.6 (and maybe lm, please see the post below) that I can't find anywhere.
Title: Re: Applications requiring ncurses
Post by: t18 on May 13, 2025, 01:19:34 PM
Often you need to search the configure script to see how it tests for ncurses:

The include path often needs changing to /usr/local/include/ncursesw
The library test often needs changing to ncursesw, formw, etc
LIBS="-L /usr/local/lib lncursesw" sometimes helps

No configure, just 3 Makefiles in which there are the following references:

1)
Code: [Select]
LDLIBS = -lncurses -ltinfo -lm
2)
Code: [Select]
LDLIBS = -lncurses -ltinfo
3)
Code: [Select]
LDLIBS=-lncurses -ltinfo
Title: Re: Applications requiring ncurses
Post by: Rich on May 13, 2025, 02:01:15 PM
Hi t18
libtinfo.so  was last available in  ncurses.tcz  from  TC10.
Title: Re: Applications requiring ncurses
Post by: t18 on May 13, 2025, 02:43:21 PM
Hi t18
libtinfo.so  was last available in  ncurses.tcz  from  TC10.

Hasn't it be replaced with anything else to link to?
Title: Re: Applications requiring ncurses
Post by: Rich on May 13, 2025, 03:22:47 PM
Hi t18
According to this:
https://forum.tinycorelinux.net/index.php/topic,17553.msg105304.html#msg105304

You can symlink libtinfo to libncurses:
Code: [Select]
sudo ln -s /usr/local/lib/libncursesw.so.6 /usr/local/lib/libtinfo.so.6
Title: Re: Applications requiring ncurses
Post by: Juanito on May 13, 2025, 04:01:18 PM
No configure, just 3 Makefiles in which there are the following references:

I’m not sure if you’re building the app or using an already built app, but if you’re compiling it, you could try this:

1)
Code: [Select]
LDLIBS = -lncursesw -lm
2)
Code: [Select]
LDLIBS = -lncursesw
3)
Code: [Select]
LDLIBS = -lncursesw
-lm refers to libm in the base.
Title: Re: Applications requiring ncurses
Post by: t18 on May 13, 2025, 04:18:07 PM
Hi t18
According to this:
https://forum.tinycorelinux.net/index.php/topic,17553.msg105304.html#msg105304

You can symlink libtinfo to libncurses:
Code: [Select]
sudo ln -s /usr/local/lib/libncursesw.so.6 /usr/local/lib/libtinfo.so.6

Doing so, it can't find libncurses anymore either.
Title: Re: Applications requiring ncurses
Post by: t18 on May 13, 2025, 04:21:45 PM
No configure, just 3 Makefiles in which there are the following references:

I’m not sure if you’re building the app or using an already built app, but if you’re compiling it, you could try this:

1)
Code: [Select]
LDLIBS = -lncursesw -lm
2)
Code: [Select]
LDLIBS = -lncursesw
3)
Code: [Select]
LDLIBS = -lncursesw
-lm refers to libm in the base.

This guy: "taviso/123elf: A native port of Lotus 1-2-3 to Linux" has made the code to run Lotus per Unix on Linux. https://github.com/taviso/123elf (https://github.com/taviso/123elf)
So I'm compiling it.

I'll try to omit libtinfo as you stated.


Title: Re: Applications requiring ncurses
Post by: t18 on May 14, 2025, 03:19:16 AM
So, there are a bunch of files containing the instruction:

Code: [Select]
#include <curses.h>
that I replaced with

Code: [Select]
#include <cursesw.h>
but unsuccessfully:

Code: [Select]
fatal error: cursesw.h: no such file or directory
These are my settings:

Code: [Select]
PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
CPPFLAGS="-I/usr/local/include/ncursesw" LIBS="-lncursesw" CC="gcc -march=i486 -mtune=i686 -Os -pipe -fomit-frame-pointer"
CXX="g++ -march=i486 -mtune=i686 -Os -pipe -fomit-frame-pointer"

make

Where am I mistaken?

Title: Re: Applications requiring ncurses
Post by: patrikg on May 14, 2025, 04:22:59 AM
I think only "n".

#include <ncurses.h>
Title: Re: Applications requiring ncurses
Post by: t18 on May 14, 2025, 07:05:01 AM
I think only "n".

#include <ncurses.h>

ok, added "n" but:

Code: [Select]
mv 123.tmp.o 123.o
objcopy -I coff-i386 -O coff-i386 --wildcard --localize-symbols=localize.lst --g                                                                                       0x6e530,function,local orig/dl_init.o dl_init.o
cc -freg-struct-return -W -Wall -m32 -O2 -fno-stack-protector -I. -D_FILE_OFFSET                                                                                       -o main.o main.c
cc -freg-struct-return -W -Wall -m32 -O2 -fno-stack-protector -I. -D_FILE_OFFSET                                                                                       -o wrappers.o wrappers.c
wrappers.c: In function '__unix_uname':
wrappers.c:317:5: warning: 'strncpy' output may be truncated copying 8 bytes fro
  317 |     strncpy(unixname->version, name.release, 8);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc -freg-struct-return -W -Wall -m32 -O2 -fno-stack-protector -I. -D_FILE_OFFSET                                                                                       -o patch.o patch.c
patch.c:5:10: fatal error: ncursesw.h: No such file or directory
    5 | #include <ncursesw.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make: *** [<builtin>: patch.o] Error 1


UPDATE: none among "curses.h" "ncurses.h" "ncursesw.h" works.
Title: Re: Applications requiring ncurses
Post by: Juanito on May 14, 2025, 08:11:55 AM
You need something like #include <ncursesw/ncurses.h>
Title: Re: Applications requiring ncurses
Post by: t18 on May 14, 2025, 03:01:13 PM
You need something like #include <ncursesw/ncurses.h>

STRONG HELP! I'M SO GRATEFUL! MUCHAS GRACIAS!

It works!  :)