open-telemetry / opentelemetry-cpp

The OpenTelemetry C++ Client
https://opentelemetry.io/
Apache License 2.0
819 stars 392 forks source link

CMake build error - embedded submodule link is still pointing to an older commit of vcpkg #2440

Open tashivani opened 7 months ago

tashivani commented 7 months ago

Hi, I wanted to reach out regarding an issue I encountered while following the instructions to build OpenTelemetry-Cpp using CMake.

In particular, I faced a hiccup at step 2 of the instructions when running the "cmake .." command. It seems that the process attempts to download the mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst package from this link and encounters a 404 error. Even when attempting to open the link directly in the browser, I observe the same error message.

Upon investigating further, I discovered a message in the error suggesting reporting the issue to the vcpkg repository if the problem persists after attempting a direct download. So, I opened an issue on the vcpkg repository (https://github.com/microsoft/vcpkg/issues/35516#issuecomment-1843402590), and one of the contributors kindly explained that the OpenTelemetry-Cpp repository's embedded submodule link is pointing to an older commit of vcpkg. This older commit lacks the necessary msys2/mingw patches, causing the issue.

The suggested solution from the vcpkg contributors was to open a ticket with the OpenTelemetry-Cpp repository to request an update to the embedded submodule link and a reset of the baseline to include the versions required by OpenTelemetry-Cpp. I've attached the CMAKE error and output logs here as well for reference.

If you need any additional information or have further questions about this issue, please feel free to reach out. Thanks!

The following is the error:

-- Building x64-windows-rel -- Fixing pkgconfig file: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/vcpkg/packages/benchmark_x64-windows/lib/pkgconfig/benchmark.pc -- Using cached mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst. -- Downloading https://mirror.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst -> mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst... [DEBUG] To include the environment variables in debug output, pass --debug-env [DEBUG] Trying to load bundleconfig from C:\Github\vcpkg\vcpkg-bundle.json [DEBUG] Failed to open: C:\Github\vcpkg\vcpkg-bundle.json [DEBUG] Bundle config: readonly=false, usegitregistry=false, embeddedsha=nullopt, deployment=Git, vsversion=nullopt [DEBUG] Metrics enabled. [DEBUG] Feature flag 'binarycaching' unset [DEBUG] Feature flag 'compilertracking' unset [DEBUG] Feature flag 'registries' unset [DEBUG] Feature flag 'versions' unset [DEBUG] Feature flag 'dependencygraph' unset Downloading https://mirror.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst Downloading https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst Downloading https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst Downloading https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst Downloading https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst Downloading https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst error: Failed to download from mirror set error: https://mirror.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404 error: https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404 error: https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404 error: https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404 error: https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404 error: https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404

image

marcalff commented 7 months ago

@tashivani

Thanks for the detailed report.

The build logs (found in the vcpkg issue) indicate:

-- OPENTELEMETRY_VERSION=1.12.0

vcpkg has been updated already:

and this fix is available in opentelemetry-cpp release v1.13.0:

Please retry with opentelemetry-cpp 1.13.0, and comment on the outcome.

tashivani commented 7 months ago

Hey, @marcalff! My apologies, I mistakenly attached the wrong file in my previous message. Here's the correct file:

This one I've just generated after running "cmake .." on a git clone I performed yesterday. The version used is 1.13.0 of OpenTelemetry, and unfortunately, I'm still encountering the same error.

ThomsonTan commented 6 months ago

@tashivani can you please try a fresh clone of the latest repo (git clone --recursive) and see if the issue can be reproduced? Just in case there some old version/binaries in the cache.

tashivani commented 6 months ago

@ThomsonTan I've just completed a fresh git clone --recurse-submodules https://github.com/open-telemetry/opentelemetry-cpp, but unfortunately, I'm still encountering the same error. Please let me know if there's any other command I should run along with the one I just mentioned

github-actions[bot] commented 4 months ago

This issue was marked as stale due to lack of activity.

github-actions[bot] commented 2 months ago

This issue was marked as stale due to lack of activity.