elm-repl icon indicating copy to clipboard operation
elm-repl copied to clipboard

REPL won't open with 6.0-3 of ncurses

Open thunklife opened this issue 10 years ago • 5 comments

I'm running an Arch based distro that has version 6.0-3 of ncurses installed. When I attempt to open the REPL, I get the following:

/home/wilhelmson/Elm-Platform/0.15.1/.cabal-sandbox/bin/elm-repl: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory

thunklife avatar Oct 17 '15 02:10 thunklife

I know this issue is a year old, but in case anyone runs into it:

  • elm-repl seems to link to libtinfo now. You need to install the libtinfo package from AUR.
  • And for the same reason it was not working before (Arch is on version 6 of ncurses, not version 5) you need to link /usr/lib/libtinfo.so.6 to /usr/lib/libtinfo.so.5.

The joys of pre-built binaries. I imagine that other distros will be running into this problem before long...

ygt-mikekchar avatar Oct 08 '16 07:10 ygt-mikekchar

I hit this today (on arch). This workaround isn't great. Symlinking a library between versions is begging for segfaults.

bukzor avatar Nov 20 '16 22:11 bukzor

Agreed. I can't think what you could do about it, though. Upgrading the library will break other (arguably more popular) distros. In the end, I just built elm myself and decided not to use the NPM version.

ygt-mikekchar avatar Nov 21 '16 00:11 ygt-mikekchar

What you could do about it:

  1. Ensure that libtinfo is statically linked during elm-repl's build. This will be reliable, and should be fairly easy to implement.
  2. Figure out what npm supports with respect to shipping different binaries for different distros. Surely they don't expect that a single binary will work for all linux? This depends entirely on whether the nodejs community supports differentiating linuxen.

bukzor avatar Nov 21 '16 22:11 bukzor

Arch users can install ncurses5-compat-libs from the aur. This package creates /usr/lib/libtinfo.so.5 and solved the error on my machine.

boxofrox avatar Jan 14 '17 02:01 boxofrox