Skip to content

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

Merged
merged 4 commits into from
Aug 20, 2020

Conversation

milesfrain
Copy link
Contributor

milesfrain added a commit to milesfrain/documentation-1 that referenced this pull request Jun 26, 2020
Copy link
Contributor

@hdgarrood hdgarrood left a 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:
```
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

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)

@milesfrain
Copy link
Contributor Author

@hdgarrood Applied feedback. Ready for re-review

hdgarrood
hdgarrood previously approved these changes Jul 11, 2020
Copy link
Contributor

@hdgarrood hdgarrood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@milesfrain milesfrain requested a review from hdgarrood July 12, 2020 17:50
@hdgarrood hdgarrood dismissed their stale review July 13, 2020 03:31

Dismissing as the libtinfo/libncurses-dev section isn't yet resolved

Copy link
Contributor

@hdgarrood hdgarrood left a 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!

@hdgarrood hdgarrood merged commit 5e8bf03 into purescript:master Aug 20, 2020
@milesfrain milesfrain deleted the patch-1 branch August 20, 2020 16:13
hdgarrood pushed a commit to purescript/documentation that referenced this pull request Sep 5, 2020
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants