Package: rtags Version: 2.38-9 Severity: serious Tags: patch
Hello maintainer, I fixed a FTBFS on armhf due to time64_t. The regex was causing "=64" to be stripped from _FILE_OFFSET_BITS, causing cmake to fail to build test code. With this regex the example test code of clang fails in cmake, causing an error. this is due to -I/usr/lib/llvm-18/include -std=c++17 -fno-exceptions -funwind-tables -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS becoming: -I/usr/lib/llvm-18/include;-D_GNU_SOURCE;-D_FILE_OFFSET_BITS;-D_LARGEFILE_SOURCE;-D_FILE_OFFSET_BITS;-D__STDC_CONSTANT_MACROS;-D__STDC_FORMAT_MACROS;-D__STDC_LIMIT_MACROS If you undefine _FILE_OFFSET_BITS and you enable _TIME_BITS=64 you get a FTBFS /usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64" 26 | # error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64" * Fix regex on find clang without stripping defines content. Thanks for considering the patch. diff -Nru rtags-2.38/debian/patches/fix-regex.patch rtags-2.38/debian/patches/fix-regex.patch --- rtags-2.38/debian/patches/fix-regex.patch 1970-01-01 01:00:00.000000000 +0100 +++ rtags-2.38/debian/patches/fix-regex.patch 2024-04-15 08:50:11.000000000 +0200 @@ -0,0 +1,18 @@ +Description: + * Add -D_FILE_OFFSET_BITS=64 to fix FTBFS on armhf + (bad regex on find clang making build fail) +Author: Gianfranco Costamagna <locutusofb...@debian.org> +Forwarded: https://github.com/Andersbakken/rtags/pull/1439 +Last-Update: 2024-04-15 + +--- rtags-2.38.orig/cmake/FindLibClang.cmake ++++ rtags-2.38/cmake/FindLibClang.cmake +@@ -88,7 +88,7 @@ if (NOT LIBCLANG_CXXFLAGS) + endif () + set(LIBCLANG_CXXFLAGS "-I${LIBCLANG_CXXFLAGS}") + endif () +- string(REGEX MATCHALL "-(D__?[a-zA-Z_]*|I([^\" ]+|\"[^\"]+\"))" LIBCLANG_CXXFLAGS "${LIBCLANG_CXXFLAGS}") ++ string(REGEX MATCHALL "-(D__?[a-zA-Z_=0-9]*|I([^\" ]+|\"[^\"]+\"))" LIBCLANG_CXXFLAGS "${LIBCLANG_CXXFLAGS}") + string(REGEX REPLACE ";" " " LIBCLANG_CXXFLAGS "${LIBCLANG_CXXFLAGS}") + set(LIBCLANG_CXXFLAGS ${LIBCLANG_CXXFLAGS} CACHE STRING "The LLVM C++ compiler flags needed to compile LLVM based applications.") + unset(LIBCLANG_CXXFLAGS_HACK_CMAKECACHE_DOT_TEXT_BULLSHIT CACHE) diff -Nru rtags-2.38/debian/patches/series rtags-2.38/debian/patches/series --- rtags-2.38/debian/patches/series 2023-08-29 19:36:08.000000000 +0200 +++ rtags-2.38/debian/patches/series 2024-04-15 08:49:15.000000000 +0200 @@ -15,3 +15,4 @@ 0015-expand-range-of-llvm-versions.patch 0016-always-finish-the-connection.patch 0017-Add-when-argument-to-define-obsolete-function-alias.patch +fix-regex.patch
OpenPGP_signature.asc
Description: OpenPGP digital signature