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

Library build failing on windows #121

Closed
Virviil opened this Issue Jan 21, 2016 · 5 comments

Comments

Projects
None yet
2 participants
@Virviil

Virviil commented Jan 21, 2016

I'm trying to use diesel in project, developing in windows, pgsql is installed, C compilers probably not.

So my code is

#[macro_use]
extern crate diesel;

fn main() {
    println!("Hello, world!");
}

With cargo:

[dependencies]

diesel = "*"

And after

cargo build

i get this error:
https://gist.github.com/Virviil/79d816aab58822dd9461

@sgrif

This comment has been minimized.

Member

sgrif commented Jan 22, 2016

It looks like pg_config.exe isn't on your PATH. How did you install postgres on your machine? Can you make sure that executable is on your path and try again?

@Virviil

This comment has been minimized.

Virviil commented Jan 22, 2016

I have installed it by the "official" way frm here: http://www.enterprisedb.com/products-services-training/pgdownload#windows
...\PostgreSQL\9.5\bin realy was not in my PATH.

After adding problem is not solved.

@sgrif sgrif closed this Jan 22, 2016

@sgrif sgrif reopened this Jan 22, 2016

@sgrif

This comment has been minimized.

Member

sgrif commented Jan 22, 2016

Can you give the output of where pg_config.exe and also the output of pg_config --libdir?

@sgrif

This comment has been minimized.

Member

sgrif commented Jan 22, 2016

I've set up appveyor to confirm I didn't have anything funky setup locally. The only step required to get it to build was SET PATH=%PATH%;C:\Program Files\PostgreSQL\9.4\bin (note: Make sure you run cargo clean after setting that if it wasn't set before). I'm going to close this issue, as the library does appear to build on Windows just fine.

I'm happy to help you figure out the issue with your setup though, feel free to continue to comment.

@sgrif sgrif closed this Jan 22, 2016

@Virviil

This comment has been minimized.

Virviil commented Jan 22, 2016

Yes, cargo clean solved the problem, thank you. Mb you previous post should be somehow added to readme or faq, i didn't found anything about PATH, and in windows world it's probably not so obvious as in nix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment