Skip to content
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

Installation instructions/UX utterly frustrating; "trusted" install fails on macOS #415

Open
tgrushka opened this issue Dec 4, 2024 · 0 comments

Comments

@tgrushka
Copy link

tgrushka commented Dec 4, 2024

EDIT: Finally got it working.

Turns out, rustup default 1.72.0 is definitely required. Does not work without plrustc. Instructions are so convoluted. Should not have to change default system rust version. Please make the instructions more clear.


After a few hours going back and forth between the README and the two different doc pages, I almost gave up. These docs were obviously not written for someone who is not a contributor/maintainer to this project, and surprisingly convoluted for a Rust project. I recall installation about 8 months ago to be far simpler, at least on Linux... what in Crustacia happened?

  1. Requiring a minimum Rust version is normal. However, requiring a specific system default Rust version is just really bad. Rust is backwards-compatible. There is no reason for requiring switching the system default, especially because pgrx now depends on a later version of rust and won't even compile with 1.72.0 anymore (it now requires a feature that was experimental in that version).
  2. The plrust/plrust/build script "clobbers my configuration" (even though a comment inside acknowledges that it shouldn't!), even following your instructions to a tee. Once it runs and fails, the rust standard library and everything else is gone. Only a rustup self uninstall && rm -rf ~/.pgrx followed by clean install of rustup fixes it. Tried several times with same result. I've never seen a Rust crate build process that kills Rust itself! cargo pgrx install ... really should be sufficient for either trusted or untrusted version. It should just be a feature flag issue with the proper crates being imported in Cargo.toml.
  • My evidence for this is that nothing else compiles again after running it, even cargo install ... commands. Instead of green compiling messages, I get a whole slew of build errors that something in std or core is not found.
  1. It seems the only real difference between untrusted and trusted is an extra crate (postgrestd -- which itself won't even compile for me with rustup config specified in docs) that trusted uses to prevent system calls. This could be summarized in a sentence on the installation instructions page.
  2. Link to installation instructions skips whole prerequisites page. It's totally unclear what the prerequisites are for, but they seem only really necessary for trusted installation.
    Is there any way to simplify the README and docs for those of us who are not plrust hackers (most of us)?

To reproduce failure, just try installing trusted version on an Apple Silicon Mac following README and docs, with a clean install of rustup/rustc.

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

No branches or pull requests

1 participant