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

VCPKG_ROOT not respected #39

Open
buehler opened this issue Apr 13, 2022 · 1 comment
Open

VCPKG_ROOT not respected #39

buehler opened this issue Apr 13, 2022 · 1 comment

Comments

@buehler
Copy link

buehler commented Apr 13, 2022

Hey there

I tried to install diesel-cli and diesel (Windows 11) and I still receive the two common errors with missing libpq.lib and when running missing libpq.dll.

I do not get why the errors occur. I got vcpkg installed with the corresponding vc++ build packages. It worked on the openssl lib. VCPKG_ROOT is set to the correct directory, and vcpkg list results in:

% vcpkg list                                                                                              ~/Development
libpq:x64-windows                                  12.9#1           The official database access API of postgresql
libpq[openssl]:x64-windows                                          support for encrypted client connections and ran...
libpq[zlib]:x64-windows                                             Use zlib (else --without-zlib)
openssl:x64-windows                                1.1.1m#2         OpenSSL is an open source project that provides ...
openssl:x64-windows-static-md                      1.1.1m#2         OpenSSL is an open source project that provides ...
vcpkg-cmake-config:x64-windows                     2022-02-06
vcpkg-cmake:x64-windows                            2022-01-19
zlib:x64-windows                                   1.2.11#13        A compression library

Now when trying to install diesel_cli, without setting PQ_LIB_DIR, it does not compile with the message that the lib is missing. When setting the lib dir, it compiles but does not run since libpq.dll is not in the path.

To solve the issue, I needed to set the PQ_LIB_DIR to the directory in vcpkg where the libs are stored and the bin directory of vcpkg had to be added to the PATH variable.

Is this the way it was intented to go? I thought (or rather: I hoped) that it "just works" with VCPGK_ROOT set since the build step should find the necessary lib and dll.

I know it may not have directly to do with this crate, but I would appreciate any hint in some direction.

Regards
Christoph

@weiznich
Copy link
Collaborator

I fear I cannot really help here as I do not own a windows based computer.

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

2 participants