-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Exception: (while loading libncurses.so) /lib/x86_64-linux-gnu/libncurses.so: file too short #26
Comments
Remind me what OS you’re using (at work, where you hit the error) and if you recall having installed anything related to ncurses by hand or just what the system shipped with and I’ll try to reproduce so I can offer actual help. I’ve only got a Mac available, but I can attempt to repro your system via Docker or a vm. |
I'm running Ubuntu jammy. This is what I have installed: $$ dpkg -l '*ncurses*' | grep ^ii
ii libncurses-dev:amd64 6.3-2 amd64 developer's libraries for ncurses
ii libncurses5:amd64 6.3-2 amd64 shared libraries for terminal handling (legacy version)
ii libncurses5-dev:amd64 6.3-2 amd64 transitional package for libncurses-dev
ii libncurses6:amd64 6.3-2 amd64 shared libraries for terminal handling
ii libncursesw6:amd64 6.3-2 amd64 shared libraries for terminal handling (wide character support)
ii ncurses-base 6.3-2 all basic terminal type definitions
ii ncurses-bin 6.3-2 amd64 terminal-related programs and man pages and what's in $$ ls -lh | grep libncur
lrwxrwxrwx 1 root root 12 Jan 17 2022 libcurses.a -> libncurses.a
lrwxrwxrwx 1 root root 13 Jan 17 2022 libcurses.so -> libncurses.so
-rw-r--r-- 1 root root 159K Jan 17 2022 libncurses++.a
-rw-r--r-- 1 root root 310K Jan 17 2022 libncurses.a
-rw-r--r-- 1 root root 31 Jan 17 2022 libncurses.so
lrwxrwxrwx 1 root root 17 Jan 17 2022 libncurses.so.5 -> libncurses.so.5.9
-rw-r--r-- 1 root root 147K Jan 17 2022 libncurses.so.5.9
lrwxrwxrwx 1 root root 17 Jan 17 2022 libncurses.so.6 -> libncurses.so.6.3
-rw-r--r-- 1 root root 155K Jan 17 2022 libncurses.so.6.3
-rw-r--r-- 1 root root 159K Jan 17 2022 libncurses++w.a
-rw-r--r-- 1 root root 430K Jan 17 2022 libncursesw.a
-rw-r--r-- 1 root root 32 Jan 17 2022 libncursesw.so
lrwxrwxrwx 1 root root 18 Jan 17 2022 libncursesw.so.6 -> libncursesw.so.6.3
-rw-r--r-- 1 root root 235K Jan 17 2022 libncursesw.so.6.3
$$ cat libncurses.so
INPUT(libncurses.so.6 -ltinfo) It seems that one version is pulled in by ghc/ocaml, the other by erlang. |
I've just tried on my personal laptop and I have the same problem. $$ dpkg -l '*ncurses*' | grep ^ii
ii libncurses-dev:amd64 6.2+20201114-2 amd64 developer's libraries for ncurses
ii libncurses5-dev:amd64 6.2+20201114-2 amd64 transitional package for libncurses-dev
ii libncurses6:amd64 6.2+20201114-2 amd64 shared libraries for terminal handling
ii libncursesw6:amd64 6.2+20201114-2 amd64 shared libraries for terminal handling (wide character support)
ii ncurses-base 6.2+20201114-2 all basic terminal type definitions
ii ncurses-bin 6.2+20201114-2 amd64 terminal-related programs and man pages
ii ncurses-term 6.2+20201114-2 all additional terminal type definitions |
I haven’t had time to look into this yet today, but if your original comment meant you literally see an error about libncurses.so being too small no matter how you set the version then I think there may be something broken with my build scripts because setting the version should result in the runtime trying to load libncurses5.so (for example) when a version is set. |
No rush! |
Ok, there was definitely a problem with the Makefile's replacement of I fixed that problem and also made the Makefiles for the examples work without having installed The fix is in PR here: #27 If you have the time to check that branch out and see if it works, I'd love to know I am on the right track. Otherwise, I'll probably merge it sometime tomorrow regardless. In my testing in Docker on my mac, I actually hit an even scarier error after fixing the problem you encountered here. I'll be curious to hear if you hit the new error as well or if that's just because I was working in such a poor approximation of your full work setup. The error I hit was |
The new exception I got fits the shape of at least one known issue for Idris 2 (idris-lang/Idris2#1974) but interestingly it is not an issue on my mac. I only hit the error in my Ubunutu docker environment. |
No matter how I compile the library (no option,
NCURSES_VERSION=5
, orNCURSES_VERSION=6
),I systematically get this error when I try to run one of the examples.
I can't remember whether we ever found a way to make it work or whether I ended up
always using my personal laptop rather than my work one when experimenting with this?
Anyway, I have a little project in mind so I'd welcome any hint as to how to get this going.
The text was updated successfully, but these errors were encountered: