-
Notifications
You must be signed in to change notification settings - Fork 32
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
pq-sys fails to compile: function not loaded: clang_Type_getNumTemplateArguments #9
Comments
What version of clang do you see when running |
That's the current list of packages I had to install on ubuntu 16.04 for diesel (and rocket) to work: sudo apt-get install sqlite libsqlite3-dev clang libclang-dev Maybe some of them are needed for you to compile successfully. |
I believe I have the CentOS versions of all those packages installed; I'll have to go check once I'm back at work Monday, because I can't get to the machine right now. I want to say clang is version 3.4.2 from the EPEL repository. Is it too old? |
Yes. Bindgen requires clang 3.9 (I've had success with older versions, but not with versions quite that old) |
That's what I get for using CentOS. Though it it were up to me, I wouldn't be. Guess I'll have to try my luck building a newer version of clang from source. It would be nice if Cargo had some kind of method of checking for things like this rather than print a pretty cryptic error message. But that's an issue for another time. |
Bindgen actually could if it wanted to. I think it avoids erroring because somethings do work with older versions. Either way the change to "generate the bindings off the headers on your machine" has been causing a lot of problems, and I'm considering going back to using pre-generated bindings. |
Perhaps rather than erroring out it could print a warning along the lines of, "Hey, Library version x.y.z is ancient, things might not work!" that way it would give a little bit of a lead to people when things explode. I don't have any idea how difficult that would be though. |
Yeah, I've been thinking about doing that from the pq-sys side. The problem is that if it does error, the warning will get completely buried. |
Well that's lame. I'm guessing there's no way to make sure both get printed out in that case? |
They'll both be printed. The problem is that the warning is small and the error is big (and will come after the warning). |
And then the error buries the warning in your history, causing it to be lost forever if your terminal won't scroll back. Being partially visible is at least better than eating it alive, which I have seen other tools do before. |
I think the better solution is to just go back to vendoring pre-generated bindings. |
Whatever you think will work out best. Either way, thanks for helping with my issue. |
Earlier today I attempted to install the diesel_cli tool. In the build process, pq-sys fails to compile with the following output.I am running CentOS 7 and I have ensured that the postgresql drivers are installed for my system (postgresql-devel).
The text was updated successfully, but these errors were encountered: