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

Undocumented build command does not perform dependency resolution. #73

Closed
Telokis opened this issue Sep 22, 2016 · 6 comments
Closed

Undocumented build command does not perform dependency resolution. #73

Telokis opened this issue Sep 22, 2016 · 6 comments

Comments

@Telokis
Copy link
Contributor

Telokis commented Sep 22, 2016

.\vcpkg.exe build libpng fails.

From the logfile:

Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)

From the console log of the command, vcpkg doesn't try to install zlib before configuring libpng.

@Telokis
Copy link
Contributor Author

Telokis commented Sep 22, 2016

Same issue with libwebsockets. This is strange but it won't download the dependencies.

@ras0219-msft
Copy link
Contributor

This is an issue with the (currently undocumented) build command. vcpkg install handles dependency resolution before delegating to the build command.

@ras0219-msft ras0219-msft changed the title Error building libpng Undocumented build command does not perform dependency resolution. Sep 22, 2016
@alexkaratarakis
Copy link
Contributor

Dependencies must be installed to get picked up during dependency resolution, and build does not install packages automatically, whereas install does

Currently the behavior is:
vcpkg install libpng will result in: zlib==installed and libpng==installed.
vcpkg build libpng will fail if zlib!=installed
vcpkg build libpng will result in zlib==installed (if it already was) and libpng==built-but-not-installed

This can also be achieved unconditionally via:
vcpkg install libpng
vcpkg remove libpng

Do you think it would be intuitive to have vcpkg build package-x install all dependencies of package-x and then build package-x without installing it?

@Telokis
Copy link
Contributor Author

Telokis commented Sep 22, 2016

No, I definitely agree that this behavior seems to be the proper one.
But without any kind of error message, I was kinda surprised, my bad.

@alexkaratarakis
Copy link
Contributor

However, you are right that the error message used to be unhelpful. Fixed after: 5b89712
Modified the command so that it doesn't start building if the dependencies are not already installed, as opposed to the previous behavior where it would fail during the build. It will now display something like this:

C:\path\to\vcpkg>vcpkg build opencv
The build command requires all dependencies to be already installed.
The following dependencies are missing:

    zlib
    libpng
    libjpeg-turbo

Thanks for reporting!

@alexkaratarakis
Copy link
Contributor

alexkaratarakis commented Sep 23, 2016

0b59e6c changes the output to show the triplet along with the missing package name, i.e:

C:\path\to\vcpkg> vcpkg build opencv
The build command requires all dependencies to be already installed.
The following dependencies are missing:

    libjpeg-turbo:x86-windows

dempo93 pushed a commit to dempo93/vcpkg that referenced this issue Aug 23, 2022
JoergAtGithub added a commit to JoergAtGithub/vcpkg that referenced this issue Jul 15, 2023
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

3 participants