-
Notifications
You must be signed in to change notification settings - Fork 571
Add troubleshooting steps for libtinfo and EACCES errors #3903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
``` | ||
|
||
Another `curses` dependency may be `libtinfo`. If you encounter this error: | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incidentally we can also avoid this entirely by dropping the libtinfo
dependency. See #3696 (comment)
@hdgarrood Applied feedback. Ready for re-review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Dismissing as the libtinfo/libncurses-dev section isn't yet resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)