mudge / re2

Ruby bindings to RE2, a "fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python".
http://mudge.name/re2/
BSD 3-Clause "New" or "Revised" License
129 stars 13 forks source link

mini_portile2 integration tests are failing #158

Closed flavorjones closed 1 month ago

flavorjones commented 1 month ago

Heyo @mudge, I need to ask for your help to diagnose a thing.

I've been running downstream integration tests in mini_portile2's Github Actions suite for a while, and this week the re2 tests started failing and I don't really understand the failure mode, which appears to be in building abseil.

Example: https://github.com/flavorjones/mini_portile/actions/runs/9903843042/job/27429080214#step:7:60

---------- IMPORTANT NOTICE ----------
Building re2 with a packaged version of abseil-20240116.2.
Configuration options: -DCMAKE_SYSTEM_NAME\=Linux -DCMAKE_SYSTEM_PROCESSOR\=x86_64 -DCMAKE_C_COMPILER\=gcc -DCMAKE_CXX_COMPILER\=g++ -DCMAKE_BUILD_TYPE\=Release -DCMAKE_CXX_STANDARD\=14 -DCMAKE_POSITION_INDEPENDENT_CODE\=ON -DCMAKE_INSTALL_LIBDIR\=lib -DCMAKE_CXX_VISIBILITY_PRESET\=hidden -DABSL_PROPAGATE_CXX_STD\=ON
Extracting 20240116.2.tar.gz into tmp/x86_64-pc-linux/ports/abseil/20240116.2... OK
Running 'configure' for abseil 20240116.2... ERROR. Please review logs to see what happened:
----- contents of '/tmp/d20240714-1847-650jmm/tmp/x86_64-pc-linux/ports/abseil/20240116.2/configure.log' -----
-- The CXX compiler identification is GNU 11.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test ABSL_INTERNAL_AT_LEAST_CXX17
-- Performing Test ABSL_INTERNAL_AT_LEAST_CXX17 - Failed
-- Performing Test ABSL_INTERNAL_AT_LEAST_CXX20
-- Performing Test ABSL_INTERNAL_AT_LEAST_CXX20 - Failed
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Configuring done (1.9s)
CMake Error at CMake/AbseilHelpers.cmake:317 (target_link_libraries):
  The link interface of target "test_allocator" contains:

    GTest::gmock

  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):
  absl/container/CMakeLists.txt:206 (absl_cc_library)

-- Generating done (0.3s)
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_C_COMPILER

CMake Generate step failed.  Build files cannot be regenerated correctly.
----- end of file -----

Any ideas what's going on?

flavorjones commented 1 month ago

The workflow in question is https://github.com/flavorjones/mini_portile/actions/runs/9903843042/workflow#L31

mudge commented 1 month ago

Given there have been no changes to Abseil or re2 in the past week that should cause this, I'm not sure what is going on. Looking at your recent downstream runs, there have been changes to the underlying GitHub Actions runner images:

OS Passing version Failing version
Ubuntu 20240630.1.0 20240708.1.0
Windows 20240630.1.0 20240707.1.0
macOS 20240701.9 20240707.1

Looking at the changes to macOS specifically (given the bump is so small), the suspicious thing to me is the upgrade from CMake 3.29 to 3.30.

Perhaps it is a bug in Abseil resolved by https://github.com/abseil/abseil-cpp/commit/cd7f66cab520e99531979b3fd727a25616a1ccbb?

flavorjones commented 1 month ago

Weird, ok. I'll ignore it for now, I guess, and hope that it resolves at some point in the future?

mudge commented 1 month ago

Frustratingly, if Abseil 20240116.2 can't be compiled with CMake 3.30 (which was released on 2 July), it'll be broken until there is a new release of Abseil and I upgrade to it.

flavorjones commented 1 month ago

OK, ignoring for now: https://github.com/flavorjones/mini_portile/pull/148

stanhu commented 1 month ago

Yeah, I reproduced this problem on Homebrew after upgrading to CMake 3.30.

mudge commented 1 month ago

I've raised https://github.com/mudge/re2/pull/159 in an attempt to fix this by patching Abseil 20240116.2 with https://github.com/abseil/abseil-cpp/commit/779a3565ac6c5b69dd1ab9183e500a27633117d5.

mudge commented 1 month ago

Now fixed on main and in re2 2.13.2.

flavorjones commented 1 month ago

Thank you!