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

[CI][C++] MinGW jobs failed with GTest::gmock_main related error #43134

Closed
kou opened this issue Jul 3, 2024 · 3 comments
Closed

[CI][C++] MinGW jobs failed with GTest::gmock_main related error #43134

kou opened this issue Jul 3, 2024 · 3 comments

Comments

@kou
Copy link
Member

kou commented Jul 3, 2024

Describe the bug, including details regarding any error messages, version, and platform.

https://github.com/apache/arrow/actions/runs/9775229516/job/26985190635?pr=43133#step:7:1001

FAILED: google_cloud_cpp_ep-prefix/src/google_cloud_cpp_ep-stamp/google_cloud_cpp_ep-configure D:/a/arrow/arrow/build/cpp/google_cloud_cpp_ep-prefix/src/google_cloud_cpp_ep-stamp/google_cloud_cpp_ep-configure 
C:\Windows\system32\cmd.exe /C "cd /D D:\a\arrow\arrow\build\cpp\google_cloud_cpp_ep-prefix\src\google_cloud_cpp_ep-build && D:\a\_temp\msys64\mingw64\bin\cmake.exe -P D:/a/arrow/arrow/build/cpp/google_cloud_cpp_ep-prefix/src/google_cloud_cpp_ep-stamp/google_cloud_cpp_ep-configure-RELEASE.cmake && D:\a\_temp\msys64\mingw64\bin\cmake.exe -E touch D:/a/arrow/arrow/build/cpp/google_cloud_cpp_ep-prefix/src/google_cloud_cpp_ep-stamp/google_cloud_cpp_ep-configure"
CMake Error at D:/a/arrow/arrow/build/cpp/google_cloud_cpp_ep-prefix/src/google_cloud_cpp_ep-stamp/google_cloud_cpp_ep-configure-RELEASE.cmake:37 (message):
  Command failed: 1

   'D:/a/_temp/msys64/mingw64/bin/cmake.exe' '-DCMAKE_C_COMPILER=D:/a/_temp/msys64/mingw64/bin/cc.exe' '-DCMAKE_CXX_COMPILER=D:/a/_temp/msys64/mingw64/bin/c++.exe' '-DCMAKE_AR=D:/a/_temp/msys64/mingw64/bin/ar.exe' '-DCMAKE_RANLIB=D:/a/_temp/msys64/mingw64/bin/ranlib.exe' '-DBUILD_SHARED_LIBS=OFF' '-DBUILD_STATIC_LIBS=ON' '-DBUILD_TESTING=OFF' '-DCMAKE_BUILD_TYPE=RELEASE' '-DCMAKE_CXX_FLAGS= -fdiagnostics-color=always -fPIC' '-DCMAKE_CXX_FLAGS_DEBUG=-g -Werror -O0 -ggdb -g1  -Wno-error' '-DCMAKE_CXX_FLAGS_MISIZEREL=-Os -DNDEBUG ' '-DCMAKE_CXX_FLAGS_RELEASE=-O3 -DNDEBUG -O2 -ftree-vectorize  ' '-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-O2 -g -DNDEBUG -ftree-vectorize -ggdb  ' '-DCMAKE_CXX_STANDARD=17' '-DCMAKE_C_FLAGS= -fPIC' '-DCMAKE_C_FLAGS_DEBUG=-g -Werror -O0 -ggdb -g1  -Wno-error' '-DCMAKE_C_FLAGS_MISIZEREL=-Os -DNDEBUG ' '-DCMAKE_C_FLAGS_RELEASE=-O3 -DNDEBUG -O2 -ftree-vectorize  ' '-DCMAKE_C_FLAGS_RELWITHDEBINFO=-O2 -g -DNDEBUG -ftree-vectorize -ggdb  ' '-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=' '-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=' '-DCMAKE_INSTALL_LIBDIR=lib' '-DCMAKE_OSX_SYSROOT=' '-DCMAKE_VERBOSE_MAKEFILE=OFF' '-DCMAKE_C_COMPILER_LAUNCHER=D:/a/_temp/msys64/mingw64/bin/ccache.exe' '-DCMAKE_CXX_COMPILER_LAUNCHER=D:/a/_temp/msys64/mingw64/bin/ccache.exe' '-DCMAKE_INSTALL_PREFIX=D:/a/arrow/arrow/build/cpp/google_cloud_cpp_ep-install' '-DCMAKE_INSTALL_RPATH=$ORIGIN' '-DCMAKE_PREFIX_PATH=D:/a/arrow/arrow/build/cpp/crc32c_ep-install' '-DGOOGLE_CLOUD_CPP_ENABLE=storage' '-DGOOGLE_CLOUD_CPP_ENABLE_WERROR=OFF' '-DOPENSSL_CRYPTO_LIBRARY=D:/a/_temp/msys64/mingw64/lib/libcrypto.dll.a' '-DOPENSSL_INCLUDE_DIR=D:/a/_temp/msys64/mingw64/include' '-DOPENSSL_SSL_LIBRARY=D:/a/_temp/msys64/mingw64/lib/libssl.dll.a' '-GNinja' '-S' 'D:/a/arrow/arrow/build/cpp/google_cloud_cpp_ep-prefix/src/google_cloud_cpp_ep' '-B' 'D:/a/arrow/arrow/build/cpp/google_cloud_cpp_ep-prefix/src/google_cloud_cpp_ep-build'

  See also

    D:/a/arrow/arrow/build/cpp/google_cloud_cpp_ep-prefix/src/google_cloud_cpp_ep-stamp/google_cloud_cpp_ep-configure-*.log


-- stdout output is:
-- The CXX compiler identification is GNU 14.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/a/_temp/msys64/mingw64/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test GOOGLE_CLOUD_CPP_COMPILER_SUPPORTS_WALL
-- Performing Test GOOGLE_CLOUD_CPP_COMPILER_SUPPORTS_WALL - Success
-- Performing Test GOOGLE_CLOUD_CPP_COMPILER_SUPPORTS_WEXTRA
-- Performing Test GOOGLE_CLOUD_CPP_COMPILER_SUPPORTS_WEXTRA - Success
-- Performing Test GOOGLE_CLOUD_CPP_COMPILER_SUPPORTS_WCONVERSION
-- Performing Test GOOGLE_CLOUD_CPP_COMPILER_SUPPORTS_WCONVERSION - Success
-- Performing Test GOOGLE_CLOUD_CPP_COMPILER_SUPPORTS_WNO_SIGN_CONVERSION
-- Performing Test GOOGLE_CLOUD_CPP_COMPILER_SUPPORTS_WNO_SIGN_CONVERSION - Success
-- Performing Test GOOGLE_CLOUD_CPP_COMPILER_SUPPORTS_WERROR
-- Performing Test GOOGLE_CLOUD_CPP_COMPILER_SUPPORTS_WERROR - Success
-- Found OpenSSL: D:/a/_temp/msys64/mingw64/lib/libcrypto.dll.a (found version "3.3.1")
-- CURL found using via CONFIG module
-- CURL found using via CONFIG module
-- Found ZLIB: D:/a/_temp/msys64/mingw64/lib/libz.dll.a (found version "1.3.1")
-- Configuring done (2.5s)
-- Generating done (0.1s)

-- stderr output is:
CMake Error at google/cloud/google_cloud_cpp_common.cmake:271 (target_link_libraries):
  The link interface of target "google_cloud_cpp_mocks" contains:

    GTest::gmock_main

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  google/cloud/CMakeLists.txt:50 (include)


CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_STATIC_LIBS
    CMAKE_CXX_FLAGS_MISIZEREL
    CMAKE_C_COMPILER
    CMAKE_C_FLAGS
    CMAKE_C_FLAGS_DEBUG
    CMAKE_C_FLAGS_MISIZEREL
    CMAKE_C_FLAGS_RELEASE
    CMAKE_C_FLAGS_RELWITHDEBINFO
    CMAKE_EXPORT_NO_PACKAGE_REGISTRY


CMake Generate step failed.  Build files cannot be regenerated correctly.

CMake Error at D:/a/arrow/arrow/build/cpp/google_cloud_cpp_ep-prefix/src/google_cloud_cpp_ep-stamp/google_cloud_cpp_ep-configure-RELEASE.cmake:47 (message):
  Stopping after outputting logs.

Component(s)

C++, Continuous Integration

@kou
Copy link
Member Author

kou commented Jul 3, 2024

CMake version may be related.

Success:

https://github.com/apache/arrow/actions/runs/9752783251/job/26916919495#step:7:87

-- Building using CMake version: 3.29.6

Failure:

https://github.com/apache/arrow/actions/runs/9775229516/job/26985190635?pr=43133#step:7:95

-- Building using CMake version: 3.30.0

@raulcd
Copy link
Member

raulcd commented Jul 4, 2024

This probably can be added to 17.0.0 (marking it with the 17.0.0 milestone)

@raulcd raulcd added this to the 17.0.0 milestone Jul 4, 2024
kou added a commit that referenced this issue Jul 5, 2024
### Rationale for this change

`google_cloud_cpp_mocks` depends on `GTest::gmock_main` but it's built without `BUILD_TESTING`. google-cloud-cpp finds GoogleTest only with `BUILD_TESTING`.

### What changes are included in this PR?

The recent google-cloud-cpp doesn't build `google_cloud_cpp_mocks` without `BUILD_TESTING`.

Note that we can't use 2.23.0 or later because they can't be built with MinGW-w64. See also:
* mingw-w64/mingw-w64#49
* googleapis/google-cloud-cpp#14436

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
* GitHub Issue: #43134

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@kou
Copy link
Member Author

kou commented Jul 5, 2024

Issue resolved by pull request 43136
#43136

@kou kou closed this as completed Jul 5, 2024
raulcd pushed a commit that referenced this issue Jul 5, 2024
### Rationale for this change

`google_cloud_cpp_mocks` depends on `GTest::gmock_main` but it's built without `BUILD_TESTING`. google-cloud-cpp finds GoogleTest only with `BUILD_TESTING`.

### What changes are included in this PR?

The recent google-cloud-cpp doesn't build `google_cloud_cpp_mocks` without `BUILD_TESTING`.

Note that we can't use 2.23.0 or later because they can't be built with MinGW-w64. See also:
* mingw-w64/mingw-w64#49
* googleapis/google-cloud-cpp#14436

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
* GitHub Issue: #43134

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
zanmato1984 pushed a commit to zanmato1984/arrow that referenced this issue Jul 9, 2024
…che#43136)

### Rationale for this change

`google_cloud_cpp_mocks` depends on `GTest::gmock_main` but it's built without `BUILD_TESTING`. google-cloud-cpp finds GoogleTest only with `BUILD_TESTING`.

### What changes are included in this PR?

The recent google-cloud-cpp doesn't build `google_cloud_cpp_mocks` without `BUILD_TESTING`.

Note that we can't use 2.23.0 or later because they can't be built with MinGW-w64. See also:
* mingw-w64/mingw-w64#49
* googleapis/google-cloud-cpp#14436

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
* GitHub Issue: apache#43134

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants