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

[gtest] build failure while using GCC 11 (trunk) #15617

Closed
PragmaTwice opened this issue Jan 13, 2021 · 3 comments · Fixed by #15661
Closed

[gtest] build failure while using GCC 11 (trunk) #15617

PragmaTwice opened this issue Jan 13, 2021 · 3 comments · Fixed by #15661
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support category:port-update The issue is with a library, which is requesting update new revision

Comments

@PragmaTwice
Copy link
Contributor

Host Environment

  • OS: Linux 5.8.18-1-MANJARO
  • Compiler: g++ (GCC) 11.0.0 20201227 (experimental)

To Reproduce
./vcpkg install gtest

Failure logs

Computing installation plan...
The following packages will be built and installed:
    gtest[core]:x64-linux
Detecting compiler hash for triplet x64-linux...
Starting package 1/1: gtest:x64-linux
Building package gtest[core]:x64-linux...
Could not locate cached archive: /home/twice/.cache/vcpkg/archives/1a/1ac447f4d814709eb219cbfb117dd4a60277c43d.zip
-- Using cached /home/twice/vcpkg/downloads/google-googletest-release-1.10.0.tar.gz
-- Cleaning sources at /home/twice/vcpkg/buildtrees/gtest/src/ase-1.10.0-7231afa423.clean. Use --editable to skip cleaning for the packages you specify.

-- Extracting source /home/twice/vcpkg/downloads/google-googletest-release-1.10.0.tar.gz
-- Applying patch 0002-Fix-z7-override.patch
-- Applying patch fix-main-lib-path.patch
-- Using source at /home/twice/vcpkg/buildtrees/gtest/src/ase-1.10.0-7231afa423.clean
-- Configuring x64-linux-dbg
-- Configuring x64-linux-rel
-- Building x64-linux-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:142 (message):
    Command failed: /home/twice/vcpkg/downloads/tools/cmake-3.18.4-linux/cmake-3.18.4-Linux-x86_64/bin/cmake --build . --config Debug --target install -- -v -j17
    Working Directory: /home/twice/vcpkg/buildtrees/gtest/x64-linux-dbg
    See logs for more information:
      /home/twice/vcpkg/buildtrees/gtest/install-x64-linux-dbg-out.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_build_cmake.cmake:93 (vcpkg_execute_build_process)
  scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
  ports/gtest/portfile.cmake:28 (vcpkg_install_cmake)
  scripts/ports.cmake:135 (include)


Error: Building package gtest:x64-linux failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `./vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: gtest:x64-linux
  Vcpkg version: 2020.06.15-unknownhash

Additionally, attach any relevant sections from the log files above.

install-x64-linux-dbg-out.log

Additional context
The build error is caused by a new warning (something may be used uninitialized) in GCC 11 and -Werror in CMake configuration of gtest.
Master branch of gtest has fixed this compile error, but we cannot expect any releases due to Abseil's Live-at-Head philosophy.
So how about adding a patch for it?

@JackBoosY JackBoosY self-assigned this Jan 13, 2021
@JackBoosY JackBoosY added category:port-bug The issue is with a library, which is something the port should already support depends:upstream-changes Waiting on a change to the upstream project category:port-update The issue is with a library, which is requesting update new revision and removed depends:upstream-changes Waiting on a change to the upstream project labels Jan 13, 2021
@JackBoosY
Copy link
Contributor

Will update gtest to the latest to fix this issue.

@PragmaTwice
Copy link
Contributor Author

PragmaTwice commented Jan 14, 2021

Will update gtest to the latest to fix this issue.

There will be no release after 1.10.0 due to Abseil's Live-at-Head philosophy, and that's the problem, which I already mentioned in the first post and try to solve it by a patch.

@JackBoosY
Copy link
Contributor

@PragmaTwice So can you please open a PR to fix it?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support category:port-update The issue is with a library, which is requesting update new revision
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants