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

Update vcpkg baseline to latest released tags/2022.10.19 #4100

Merged
merged 3 commits into from
Nov 19, 2022

Conversation

ahsonkhan
Copy link
Member

This is now in-sync with Embedded C as well.

@ahsonkhan ahsonkhan added Azure.Core EngSys This issue is impacting the engineering system. labels Nov 9, 2022
@ahsonkhan ahsonkhan added this to the 2022-12 milestone Nov 9, 2022
@ahsonkhan ahsonkhan self-assigned this Nov 9, 2022
@ahsonkhan
Copy link
Member Author

Follow-up to #4036

@ahsonkhan
Copy link
Member Author

On Ubuntu 18, we are facing the same issue as the one in Embedded C:
Azure/azure-sdk-for-c#2400 (comment)

The build machines seem to have already defined VCPKG_ROOT env var and have a clone of the vcpkg repo at the particular commit which is different than the baseline we are trying to establish:
https://dev.azure.com/azure-sdk/public/_build/results?buildId=1975640&view=logs&j=ec4a1e72-3a6c-5a5c-62dd-ba3b2af5e922&t=8b674492-739a-52a8-fd22-e508fedd8826&l=36

Generating script.
Script contents:
CC=/usr/bin/gcc-5 CXX=/usr/bin/g++-5  cmake   ..
========================== Starting Command Output ===========================
/bin/bash --noprofile --norc /mnt/vss/_work/_temp/9ac8cfc7-356d-4daf-808e-09d93ec5fe86.sh
No transport adapter was selected, using libcurl as the default option for POSIX.
-- Running vcpkg install
Error: while checking out baseline from commit '94ce0dab56f4d8ba6bd631ba59ed682b02d45c46' at subpath 'versions/baseline.json':
error: git failed with exit code: (128).
fatal: path 'versions/baseline.json' exists on disk, but not in '94ce0dab56f4d8ba6bd631ba59ed682b02d45c46'

This may be fixed by updating vcpkg to the latest master via `git pull` or fetching commits via `git fetch`.

You can use the current commit as a baseline, which is:
    "builtin-baseline": "ce99c947b64ea3c0e274e18cc3035ca727681089"
-- Running vcpkg install - failed
CMake Error at /usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake:868 (message):
  vcpkg install failed.  See logs for more information:
  /mnt/vss/_work/1/s/build/vcpkg-manifest-install.log
Call Stack (most recent call first):
  /usr/local/share/cmake-3.24/Modules/CMakeDetermineSystem.cmake:124 (include)
  CMakeLists.txt:26 (project)


CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
##[error]Bash exited with code '1'.
Finishing: cmake generate

cc @BillyONeal, @danieljurek

@BillyONeal
Copy link
Collaborator

The vcpkg tool change to ignore the VCPKG_ROOT environment variable when we detect that the binary is within a valid root went out in tool release 2022-10-12, which was included in catalog release 2022.10.19.

@ahsonkhan
Copy link
Member Author

So, the reason why this was failing only on Ubuntu 18.04 before was because the build machine images define VCPKG_ROOT and VCPKG_INSTALLATION_ROOT, with a pre-installed copy of vcpkg at the commit sha that is older than what we need (coincidentally just a day older, Oct 18):
microsoft/vcpkg@ce99c94
https://github.com/actions/runner-images/blob/6ef9c61220d9712317731cbdaa53bb0b25e73f94/images/linux/Ubuntu1804-Readme.md#package-management

Vcpkg (build from master <ce99c947b>)

The CI was passing on other build machines (such as in Ubuntu 20), even though they too define VCPKG_INSTALLATION_ROOT (but not VCPKG_ROOT) because it has a newer vcpkg commit sha (from Oct 27), which contains the vcpkg baseline we are looking for (i.e. tags/2022.10.19):
microsoft/vcpkg@48cc0c7
https://github.com/actions/runner-images/blob/6ef9c61220d9712317731cbdaa53bb0b25e73f94/images/linux/Ubuntu2004-Readme.md#package-management

Vcpkg (build from master <48cc0c71e>)

We, now, no longer rely on VCPKG_ROOT or VCPKG_INSTALLATION_ROOT environment variables set or look at the system-level vcpkg clone, and just clone the vcpkg repo locally, within the sub-directory of the azure-sdk-for-cpp repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core EngSys This issue is impacting the engineering system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants