-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Impossible to install successfully new ports after a custom port has been installed #10119
Comments
cc @pattacini |
At a first glance, this seems to be related to #9895, fyi @ras0219-msft |
Looks like after the changes in #9895 you have to specify the |
Hi @traversaro |
Hi @NancyLi1013, what you mean by "this"? Specifying Jokes apart, probably this problem could mitigated if there was a way to specify overlay-ports not through the command line but with a way that can be done only once, for example with a config file added in the |
To provide an additional data point, I just come across another repo containing instructions are broken by this change: https://github.com/qis/toolchains#compiler . |
Workaround for microsoft/vcpkg#10119
* Add GitHub Actions support with workaround for microsoft/vcpkg#10119
Hi @vicroms @NancyLi1013 , this issue is kind of preventing us to update our internal vcpkg version. If you could let us know which kind of solution or mitigation (see #10119 (comment)) it would make sense to implement for you, I would be happy to submit a PR. |
I remember this bug has been fixed, you can update and rebuild vcpkg to remove the wrong port using the remove command as prompted. |
Hi @JackBoosY, I am not sure what you mean, I created a new build in robotology/robotology-vcpkg-ports#9 and apparently the problem is still present in the latest commit on the master branch, while everything is fine in 2019.10 and 2020.1 . Just to clarify, the problem was exactly that before February 2020 it was possible to install new ports after a custom port has been installed without removing the custom port. |
I investigated a bit the issue. The root cause is that in vcpkg/toolsrc/src/vcpkg/dependencies.cpp Line 593 in 941d546
install action a complete graph of the installed ports and their source CONTROL file is constructed, and that is where it fails for ports that are installed via overlay-ports . Note that this information is then not used if the installed package is not related to the missing port. However, modifying this part to build a graph of just the ports connected to the port that is being installed seems to be a non-trivial modification.
Furthermore, more in general I think that if after #9895 the assumption is that the available sources For these reasons, I think the best solution to be able to use the
is actually equivalent to the call:
In this way, adding an overlay port can be done permanently with a few commands (in Powershell or bash):
If this seems a reasonable solution I would be happy to provide a PR. |
To validate this feature, I tried to implement it in https://github.com/traversaro/vcpkg/tree/fix/10119 . While it still needs to be completed (the relative paths in the files are now resolved as the relative paths passed to the |
In particular: * Use a recent commit of vcpkg, microsoft/vcpkg@28ab0b1 that contains microsoft/vcpkg#10644 * Update qt5 to build with the `latest` feature, that install qt 5.14 that should be the first version of qt completely relocatable ( https://www.qt.io/blog/qt-is-relocatable ) * Substitute opencv3 with opencv, that install opencv4 * Install also `asio`, `boost-asio`, `boost-process`, `boost-dll`, `boost-filesystem` and `boost-system`, to fix #7 * As the newer version of vcpkg are affected by the bug microsoft/vcpkg#10119, clone the `robotology-vcpkg-binary-ports` repo in `C:/robotology`, so that it will be contained in the same archive used to distribute the vcpkg dependencies .
* Update to recent vcpkg version In particular: * Use a recent commit of vcpkg, microsoft/vcpkg@28ab0b1 that contains microsoft/vcpkg#10644 * Update qt5 to build with the `latest` feature, that install qt 5.14 that should be the first version of qt completely relocatable ( https://www.qt.io/blog/qt-is-relocatable ) * Substitute opencv3 with opencv, that install opencv4 * Install also `asio`, `boost-asio`, `boost-process`, `boost-dll`, `boost-filesystem` and `boost-system`, to fix #7 * As the newer version of vcpkg are affected by the bug microsoft/vcpkg#10119, clone the `robotology-vcpkg-binary-ports` repo in `C:/robotology`, so that it will be contained in the same archive used to distribute the vcpkg dependencies .
In particular: * Use a recent commit of vcpkg, microsoft/vcpkg@28ab0b1 that contains microsoft/vcpkg#10644 * Update qt5 to build with the `latest` feature, that install qt 5.14 that should be the first version of qt completely relocatable ( https://www.qt.io/blog/qt-is-relocatable ) * Substitute opencv3 with opencv, that install opencv4 * Install also `asio`, `boost-asio`, `boost-process`, `boost-dll`, `boost-filesystem` and `boost-system`, to fix robotology#7 * As the newer version of vcpkg are affected by the bug microsoft/vcpkg#10119, clone the `robotology-vcpkg-binary-ports` repo in `C:/robotology`, so that it will be contained in the same archive used to distribute the vcpkg dependencies .
Could we, or should we open an issue to deal with implementing a mechanism to persist |
Hi @michaelkonecny ! I proposed such a mechanism in the previous comments, but unfortunately it did not received any feedback. If you are interested in this, feel free to continue to work on it (I do not currently plan to work on that), I suspect that if we open a PR with a concrete proposal it would be much easier to get feedback rather then opening another issue with just abstract discussions. |
Note that I also saw mentioned in the Roadmap (https://github.com/microsoft/vcpkg/wiki/Roadmap) that upstream is working on a Feature called "Package federation" that should allow "Vcpkg will allow you to easily install packages from multiple sources". I do not have any further info on this, but it may be possible that this new feature will render |
@traversaro what about the new environment variable |
Thanks, that is indeed a convenient feature. For some corner use cases (such as distributing a ready to use archive with vcpkg + some repo of custom ports) the file variant was more convenient, but the env variable can be used instead with some tricks. In any case, before closing this issue it could make sense to explicitly document that once you install a port from a overlay you need to always keep the overlay directory in |
If I understand correctly, this issue should be fixed by #13231 . |
Fixed in #13231 :D |
Thanks a lot to everyone that contributed to fixing this bug! |
As microsoft/vcpkg#10119 has been merged, there is no need to specify overlay-ports every time.
Back in time I set up a regression test to check if this bug ever emerged again, and this night it failed with the latest vcpkg master version, see robotology/robotology-vcpkg-ports#18 . I will investigate a bit, and open a new issue if this is confirmed. |
The issue has been confirmed, I have opened a new one for visibility at #15836 . |
Describe the bug
With the current
master
branch (commit 1be75a2) the use of custom ports at some point prevents to install any further non-custom port from vcpkg.Environment
To Reproduce
The last command will fail with the following error:
Expected behavior
The
asio
port should be installed correctly, even if the custom portipopt-binary
had been installed before.Failure logs
See robotology/robotology-vcpkg-ports#5 for a CI script that is working fine in 2020.01 and 2019.12, and failing in master due to this bug.
The text was updated successfully, but these errors were encountered: