Tiny Core Linux
Tiny Core Base => Corepure64 => Topic started by: nurbles on July 26, 2023, 10:04:56 AM
-
I'm trying to get some programs that have worked for a decade on TC 5, 6 & 7 (32 bit) moved up to TC 14.0 (64 bit) and I'm running into difficulty tracking down these libraries that ldd shows these libraries as 'not found' so my programs won't load:
- libncurses.so.6
- libtinfo.so.6
- libEApi.so.1
I created a symlink so that /lib64 points to /lib so that ld-linux is found. I have also found libncursesw.so.6, but the old code I'm tasked with getting working doesn't use the wide ncurses. Are any of these available for TC 14, or will I need to try to find their source and hopefully build working copies on my own? He asked, dreading the likely answer.
EDIT: I found libEApi.so.1. I had forgotten that it was a library specific to the hardware platform we're using and I had both 32 and 64 bit versions of the library on a CDROM that came with the device.
I'm also finding things that are hinting to me that TC may have discontinued any support for libncurses in favor of libncursesw. Unfortunately, I'm having terrible luck finding any articles that might help me find out how difficult it will be to port my old projects over from ncurses to ncursesw -- I'm only finding comments that they are generally compatible or something like that.
-
FWIW, I tried switching to static linking, but that fails with:
/usr/bin/ld: attempted static link of dynamic object `libEApiDFI.so.1.0'
So I need to figure out where to find libtinfo, which seems like it should have been part of ncursesw, but was not. I also need to start using ncursesw with my plain ASCII program and see what happens. Again, if anyone knows of a link where I can read about changes to the compiler (gcc) switches and/or to my code to safely move from ncurses to ncursesw, I would really appreciate it. Or just hints for improving my own searches!
-
Sometime ago ncurses installed libtinfo as a separate library - these days its functions are included in libncurses.
As libncursesw provides libncurses functions, it was decided to only provide the ncursesw extension to avoid an additional extension and confusion.
-
I had the same problem. My workaround was to use ncurses.tcz from the 10.x repository, which also includes libtinfo
-
@CardealRusso: I think that might work for me, but I don't know how to find/install extensions from other versions of TC ... yet. Could you provide some tips to get me started? Please?
-
I may be wrong but it seems to me that standard TC utilities doesn't propose loading extensions from another release repository. I guess one of the reasons not to write such utility is that manual loading is extremely easy. But it will demand entering some commands in command-line. Another way is to use written by Rich FetchExt.sh script from http://forum.tinycorelinux.net/index.php/topic,23034.msg164745.html#msg164745. But it will demand editing some variables, exactly pointing the extension name, architecture and release You need.
PS. By the way, have You succeeded with TC installation?
-
after browsing this thread went poking around.
enjoyed a few links enough to share:
https://invisible-island.net/ncurses/
https://invisible-island.net/ncurses/tctest.html
https://www.c-for-dummies.com/ncurses/
-
So far I have:
- changed -lncurses to -lncursesw in my project make files
- added the TC extensions necessary to build my projects directly on the target machine
- fixed the code to account for slightly different header locations than the Ubuntu where I was previously building
Now my projects build with no errors or warnings and ldd shows that all libraries are satisfied. Unfortunately, the programs SEGFAULT immediately when I try to load them, before the first line of my code executes (I added a printf as the first line of main()). For references, here's the output of uname, ldd and file for one of the programs:
evi@box:/mnt/sda1/evi/checknet/Release$ uname -a
Linux box 6.1.2-tinycore64 #612 SMP Mon Jan 2 17:24:30 UTC 2023 x86_64 GNU/Linux
evi@box:/mnt/sda1/evi/checknet/Release$ file checknet
checknet: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-x86-64.so.2, for GNU/Linux 5.4.3, not stripped
evi@box:/mnt/sda1/evi/checknet/Release$ ldd checknet
linux-vdso.so.1 (0x00007ffe3db6d000)
libncursesw.so.6 => /usr/local/lib/libncursesw.so.6 (0x00007f55235e1000)
libc.so.6 => /lib/libc.so.6 (0x00007f552344b000)
/lib/ld-linux-x86-64.so.2 (0x00007f5523657000)
Will try to use gdb to track the SEGFAULT. Hopefully, I can make it on my own from here.
-
Thanks for the comments, they helped! I've got my ten year old (originally 32 bit) code rebuilt as 64 bit and running on TC 14.0!
Now we can start working on the updates that are needed.
Thanks again to everyone who helped me get here! 8)
-
That is Wonderful! Great to Hear! Keep us Posted!
-
@CardealRusso: I think that might work for me, but I don't know how to find/install extensions from other versions of TC ... yet. Could you provide some tips to get me started? Please?
I know you managed to solve your problem, but I'll leave it here as I did so that maybe it can help someone in the future.
Just download ncurse.tcz from the 10.x repository, save it anywhere and manually load it with tce-load. (I leave this ncurse.tcz in the optional folder, since ncurse.tcz no longer exists in current versions of TinyCore and there are no dependencies either)
http://tinycorelinux.net/10.x/x86_64/tcz/ncurses.tcz
http://tinycorelinux.net/10.x/x86/tcz/ncurses.tcz
http://tinycorelinux.net/10.x/armv7/tcz/ncurses.tcz
http://tinycorelinux.net/10.x/armv6/tcz/ncurses.tcz