Compilation fails in "third_party/re2/re2/walker-inl.h:125" WalkState<T> (C++20, GCC 11/Ubuntu 20.04 x64) #11226
Closed
Description
What happens?
I have linker errors in my C++20 Project with the precompiled binaries. Tried to build from source with SET (CMAKE_CXX_STANDARD 20), but build fails.
Compilation fails in "third_party/re2/re2/walker-inl.h:125"
Edit:
Already fixed here in re2:
google/re2@0ceda87
google/re2#280
To Reproduce
git clone --depth=1 --branch v0.10.1 https://github.com/duckdb/duckdb.git
//Update CMakeLists.txt:
set (CMAKE_CXX_STANDARD 20)
//same problem on master!
GEN=ninja make
mkdir -p ./build/release && \
cd build/release && \
cmake -G "Ninja" -DFORCE_COLORED_OUTPUT=1 -DENABLE_EXTENSION_AUTOLOADING= -DENABLE_EXTENSION_AUTOINSTALL= -DLOCAL_EXTENSION_REPO="" -DOVERRIDE_GIT_DESCRIBE="" -DCMAKE_BUILD_TYPE=Release ../.. && \
cmake --build . --config Release
-- Found Python3: /usr/bin/python3.11 (found version "3.11.8") found components: Interpreter
-- 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 - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Git: /usr/bin/git (found version "2.25.1")
-- GIT_COMMIT_HASH has lenght 7 different than the expected 10
-- git hash 4a89d97, version v0.10.1, extension folder v0.10.1
-- Extensions will be deployed to: duckdb/build/release/repository
-- Load extension 'parquet' from 'duckdb/extensions'
-- Load extension 'jemalloc' from 'duckdb/extensions'
-- Extensions linked into DuckDB: [parquet, jemalloc]
-- Configuring done
-- Generating done
-- Build files have been written to: duckdb/build/release
FAILED: third_party/re2/CMakeFiles/duckdb_re2.dir/re2/mimics_pcre.cc.o
/usr/bin/ccache /usr/bin/c++ -DDUCKDB_BUILD_LIBRARY -Iduckdb/src/include -Iduckdb/third_party/fsst -Iduckdb/third_party/fmt/include -Iduckdb/third_party/hyperloglog -Iduckdb/third_party/fastpforlib -Iduckdb/third_party/skiplist -Iduckdb/third_party/fast_float -Iduckdb/third_party/re2 -Iduckdb/third_party/miniz -Iduckdb/third_party/utf8proc/include -Iduckdb/third_party/miniparquet -Iduckdb/third_party/concurrentqueue -Iduckdb/third_party/pcg -Iduckdb/third_party/tdigest -Iduckdb/third_party/mbedtls/include -Iduckdb/third_party/jaro_winkler -O3 -DNDEBUG -O3 -DNDEBUG -fPIC -fvisibility=hidden -fdiagnostics-color=always -std=c++11 -w -std=c++20 -MD -MT third_party/re2/CMakeFiles/duckdb_re2.dir/re2/mimics_pcre.cc.o -MF third_party/re2/CMakeFiles/duckdb_re2.dir/re2/mimics_pcre.cc.o.d -o third_party/re2/CMakeFiles/duckdb_re2.dir/re2/mimics_pcre.cc.o -c duckdb/third_party/re2/re2/mimics_pcre.cc
In file included from duckdb/third_party/re2/re2/mimics_pcre.cc:28:
duckdb/third_party/re2/re2/walker-inl.h:125:22: error: expected ‘)’ before ‘*’ token
125 | WalkState<T>(Regexp* re, T parent)
| ~ ^
| )
Should most probably be
WalkState(Regexp* re, T parent)
Compiles & links with the aforementioned change.
OS:
Ubuntu 20.04 x64
DuckDB Version:
10.0.1
DuckDB Client:
C++
Full Name:
Christian Heckl
Affiliation:
Private
Have you tried this on the latest nightly build?
I have tested with a release build (and could not test with a nightly build)
Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
- Yes, I have