Add troubleshooting steps for libtinfo and EACCES errors#3903
Add troubleshooting steps for libtinfo and EACCES errors#3903hdgarrood merged 4 commits intopurescript:masterfrom
Conversation
| ``` | ||
|
|
||
| Another `curses` dependency may be `libtinfo`. If you encounter this error: | ||
| ``` |
There was a problem hiding this comment.
This makes it sound like it's a different problem from the one listed above, but it's not; libncurses5-dev depends on libtinfo5, so installing libncurses5-dev is enough to fix the issue. Adding the "error while loading shared libraries" message here would be good so that it's easier for people to see whether this is the problem they're running into, but other than that I think this section should be left alone.
There was a problem hiding this comment.
As demonstrated in purescript/npm-installer#26 (comment) libtinfo5 is required. Installing libncurses5-dev will not fix this error.
There was a problem hiding this comment.
This is still the same issue; what's happening here is that libncurses5-dev depends on libtinfo6 in Ubuntu 20.04, whereas it depended on libtinfo5 in previous Ubuntu versions; see https://packages.ubuntu.com/focal/libtinfo6. I still don't want to list two separate fixes here. Since libtinfo5 is the package which provides the actual file we need (specifically /lib/x86_64_linux_gnu/libtinfo.so.5) hopefully we can just instruct users to install that. I'm testing to see whether instructing users to install libtinfo5 will work on all supported Ubuntu versions.
There was a problem hiding this comment.
I've also just remembered that whatever we specify here needs to work for building the compiler from source too. From my testing, it seems libncurses5-dev is needed for compiling the compiler from source (in which case you end up with a purs which depends on libtinfo6), but libtinfo5 is needed for using the prebuilt binaries, since those depend on libtinfo5. I think we could just ask the user to install both:
$ sudo apt install libtinfo5 libncurses5-dev
There was a problem hiding this comment.
Interesting. Nice follow-up investigation.
I still don't want to list two separate fixes here. I think we could just ask the user to install both.
These seem like two separate dependency problems though (stack build versus npm download). I think it's better to only ask users to install the dependencies they actually need.
There was a problem hiding this comment.
Building from source isn't separate from the npm installer though: the npm installer falls back to building from source if the prebuilt binaries fail. Systems where the prebuilt binaries will never work aren't that uncommon; they won't work on any architecture other than x86_64, and they link against glibc which means that they don't work on any Linux distribution not based on glibc, such as Alpine. Additionally, the libncurses5-dev package is only about 1MB when installed.
There was a problem hiding this comment.
Incidentally we can also avoid this entirely by dropping the libtinfo dependency. See #3696 (comment)
|
@hdgarrood Applied feedback. Ready for re-review |
Dismissing as the libtinfo/libncurses-dev section isn't yet resolved
hdgarrood
left a comment
There was a problem hiding this comment.
Looks great, thank you!
* Add troubleshooting section Boosting heading sizes too so they're slightly larger than bold text. * Review feedback - move troubleshooting steps to install guide Related to purescript/purescript#3903 * Simplify installation instructions
See purescript/documentation#323 (comment)