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

antlr4 C++ runtime builds fail on cmake 4.0.0 #4807

Open
0xENDER opened this issue Mar 29, 2025 · 2 comments · May be fixed by #4808
Open

antlr4 C++ runtime builds fail on cmake 4.0.0 #4807

0xENDER opened this issue Mar 29, 2025 · 2 comments · May be fixed by #4808

Comments

@0xENDER
Copy link

0xENDER commented Mar 29, 2025

So, my builds started to fail because of the googletest-src CMake project. It says in the logs: "Compatibility with CMake < 3.5 has been removed from CMake."

[ 58%] Performing patch step for 'antlr4_runtime'
patching file '/home/oxender/הורדות/frankie-main (1)/frankie-main/transpiler/build/antlr4_runtime/src/antlr4_runtime/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.cpp'
patching file '/home/oxender/הורדות/frankie-main (1)/frankie-main/transpiler/build/antlr4_runtime/src/antlr4_runtime/runtime/Cpp/runtime/antlrcpp.xcodeproj/project.pbxproj'
patching file '/home/oxender/הורדות/frankie-main (1)/frankie-main/transpiler/build/antlr4_runtime/src/antlr4_runtime/runtime/Cpp/runtime/CMakeLists.txt'
[ 61%] Performing configure step for 'antlr4_runtime'
loading initial cache file /home/oxender/הורדות/frankie-main (1)/frankie-main/transpiler/build/antlr4_runtime/tmp/antlr4_runtime-cache-Release.cmake
-- Building without demo. To enable demo build use: -DWITH_DEMO=True
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - 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
CMake Warning (dev) at /usr/share/cmake-4.0/Modules/FetchContent.cmake:1373 (message):
  The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
  not set.  The policy's OLD behavior will be used.  When using a URL
  download, the timestamps of extracted files should preferably be that of
  the time of extraction, otherwise code that depends on the extracted
  contents might not be rebuilt if the URL changes.  The OLD behavior
  preserves the timestamps from the archive instead, but this is usually not
  what you want.  Update your project to the NEW behavior or specify the
  DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
  robustness issue.
Call Stack (most recent call first):
  runtime/CMakeLists.txt:71 (FetchContent_Declare)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at _deps/googletest-src/CMakeLists.txt:4 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


-- Configuring incomplete, errors occurred!
gmake[2]: *** [CMakeFiles/antlr4_runtime.dir/build.make:96: antlr4_runtime/src/antlr4_runtime-stamp/antlr4_runtime-configure] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:164: CMakeFiles/antlr4_runtime.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
@0xENDER
Copy link
Author

0xENDER commented Mar 29, 2025

The used googletest version is 1.11.0 (google/googletest@e2239ee)

@0xENDER
Copy link
Author

0xENDER commented Mar 29, 2025

So I added a local patch to my project that updates the googletest cmake project to the latest release, and it works just fine after that.

Ender-ing/frankie@46ab178#diff-5a25dbb7efa812702320f5d7b96287bf2ecb9994a02cb107575cc495bd87cb8fR3-R12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant