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

Getting started guide could be more specific. #85

Open
patxipierce opened this issue Jun 19, 2019 · 8 comments
Open

Getting started guide could be more specific. #85

patxipierce opened this issue Jun 19, 2019 · 8 comments

Comments

@patxipierce
Copy link

When running $ cargo install diesel_cli on a Debian 9 machine I was getting:

= note: /usr/bin/ld: cannot find -lsqlite3
          /usr/bin/ld: cannot find -lpq
          /usr/bin/ld: cannot find -lmysqlclient
          collect2: error: ld returned 1 exit status

It might be useful if the guide mentioned what command to run to solve these issues, instead of "You can resolve this issue by either installing the library (using the usual way to do this depending on your operating system)".

In my case the issue was resolved by installing the following:

sudo apt install libpq-dev libmysqlclient-dev libsqlite3-dev
@weiznich
Copy link
Collaborator

In my opinion we should not do this, because we cannot list the required libs and their install commands for every operation system out there (and keep that up to date).

@patxipierce
Copy link
Author

True, it would be impossible to keep updated. Maybe a link to the issues section, where solutions like the above can be posted by other people.

Loving diesel btw. ^_^

@lp247
Copy link

lp247 commented Dec 11, 2019

I am getting started with diesel and had a lot of trouble setting up diesel_cli (getting the above mentioned errors) when installing everything in the recommended way on a conventional Windows 10 and Ubuntu 18 OS. It was really unpleasant, especially since I found the solutions to problems on both installations only by googling multiple different keywords, and I considered dumping diesel altogether multiple times (having the impression, diesel is just too immature).
Although I can understand, that there can't be solutions for problems on all available operating systems out there, the documentation should be valid for the mostly used operating systems (not just macOS) or should at least provide some kind of help for the reader to guide him to possible solutions. Be it some kind of FAQ or just a link to an issue section like @patxipierce suggested. Otherwise some people using Windows or Linux might be thinking diesel is just a poorly written piece of code, because, well, it can't even be compiled...

@weiznich
Copy link
Collaborator

In my personal opinion the error messages and the help statement are pretty clear, but I've done some c/c++ in the past, so I'm used to linker error messages.
That said: I'm not sure how exactly we could provide more help than saying: You must install the libraries requested by the linker. If you have a concrete suggestion please open a PR.
Putting that as platform specific hint into some kind of FAQ wont solve the original problem of incomplete and probably outdated instructions.

@ryanphillips838
Copy link

I just submitted a pull request that adds the one sentence that helped me get the cli installed. I didn't see anywhere on the getting started where it says you need openssl installed and that's where it kept failing for me. It's short and sweet and contains enough information for a user to go find the tools they need to get started even with little knowledge about linkers.

@nico-abram
Copy link

Would additional note/s on windows specific build instructions for required libraries that require manual compilation/installation be desireable too? (Such as using vcpkg)

@weiznich
Copy link
Collaborator

@nico-abram As already pointed out above multiple times: I'm not willing to keep a list of operating system specific instructions there as I cannot keep that up to date. I do not see what would make windows there be special.

@RKochenderfer
Copy link
Contributor

I believe a simple solution is to just provide a link to https://github.com/diesel-rs/diesel/blob/master/guide_drafts/backend_installation.md would help with the issue. I created a pull request to just add a link to the documents to the diesel_cli installation instructions on the getting started page.

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

6 participants