Skip to content

Bugfix/issue 914 clang 19 #916

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

Merged
merged 13 commits into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/manual_trigger_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ jobs:
docker run --name static-server -p 8080:80 -v $GITHUB_WORKSPACE/output:/usr/share/nginx/html:ro -d nginx
cd $GITHUB_WORKSPACE/docker/server

# prepare files to be copied to the image
mkdir -p resources/protos/google/protobuf
cp -r $GITHUB_WORKSPACE/contrib/google-protobuf/src/google/protobuf/*.proto ./resources/protos/google/protobuf/
rm -rf resources/protos/google/protobuf/unittest_*

# build docker image
docker build . --network host --build-arg single_binary_location_url=http://localhost:8080/proton -t ghcr.io/timeplus-io/proton:$TAG

Expand Down Expand Up @@ -107,6 +112,11 @@ jobs:
docker run --name static-server -p 8080:80 -v $GITHUB_WORKSPACE/output:/usr/share/nginx/html:ro -d nginx
cd $GITHUB_WORKSPACE/docker/server

# prepare files to be copied to the image
mkdir -p resources/protos/google/protobuf
cp -r $GITHUB_WORKSPACE/contrib/google-protobuf/src/google/protobuf/*.proto ./resources/protos/google/protobuf/
rm -rf resources/protos/google/protobuf/unittest_*

# build docker image
docker build . --network host --build-arg single_binary_location_url=http://localhost:8080/proton -t ghcr.io/timeplus-io/proton:$TAG

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/manual_trigger_delete_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.7
- name: Generate Python ENV
uses: actions/setup-python@v4
uses: actions/setup-python@v5.4.0
with:
python-version: '3.10'
- name: pip install requests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual_trigger_mark_stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
env:
TAG: ${{ github.event.inputs.tag }}
- name: Add tag to image
uses: shrink/actions-docker-registry-tag@v3
uses: shrink/actions-docker-registry-tag@v4.0.0
with:
registry: ghcr.io
repository: ${{ github.repository }}
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/nightly_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ jobs:
docker run --name static-server -p 8080:80 -v $GITHUB_WORKSPACE/output:/usr/share/nginx/html:ro -d nginx
cd $GITHUB_WORKSPACE/docker/server

# prepare files to be copied to the image
mkdir -p resources/protos/google/protobuf
cp -r $GITHUB_WORKSPACE/contrib/google-protobuf/src/google/protobuf/*.proto ./resources/protos/google/protobuf/
rm -rf resources/protos/google/protobuf/unittest_*

docker build . --network host --build-arg single_binary_location_url=http://localhost:8080/proton -t ghcr.io/timeplus-io/proton:testing-$SANITIZER-$ARCH-$GITHUB_SHA
docker push ghcr.io/timeplus-io/proton:testing-$SANITIZER-$ARCH-$GITHUB_SHA
steps:
Expand Down Expand Up @@ -193,6 +198,11 @@ jobs:
docker run --name static-server -p 8080:80 -v $GITHUB_WORKSPACE/output:/usr/share/nginx/html:ro -d nginx
cd $GITHUB_WORKSPACE/docker/server

# prepare files to be copied to the image
mkdir -p resources/protos/google/protobuf
cp -r $GITHUB_WORKSPACE/contrib/google-protobuf/src/google/protobuf/*.proto ./resources/protos/google/protobuf/
rm -rf resources/protos/google/protobuf/unittest_*

docker build . --network host --build-arg single_binary_location_url=http://localhost:8080/proton -t ghcr.io/timeplus-io/proton:testing-$ARCH-$GITHUB_SHA
docker push ghcr.io/timeplus-io/proton:testing-$ARCH-$GITHUB_SHA
steps:
Expand Down Expand Up @@ -314,6 +324,11 @@ jobs:
docker run --name static-server -p 8080:80 -v $GITHUB_WORKSPACE/output:/usr/share/nginx/html:ro -d nginx
cd $GITHUB_WORKSPACE/docker/server

# prepare files to be copied to the image
mkdir -p resources/protos/google/protobuf
cp -r $GITHUB_WORKSPACE/contrib/google-protobuf/src/google/protobuf/*.proto ./resources/protos/google/protobuf/
rm -rf resources/protos/google/protobuf/unittest_*

docker build . --network host --build-arg single_binary_location_url=http://localhost:8080/proton -t ghcr.io/timeplus-io/proton:testing-$SANITIZER-$ARCH-$GITHUB_SHA
docker push ghcr.io/timeplus-io/proton:testing-$SANITIZER-$ARCH-$GITHUB_SHA
steps:
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/proton_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ on: # yamllint disable-line rule:truthy
- 'utils/check-style/aspell-ignore/**'
- 'examples/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
verify:
name: Labels check
Expand All @@ -27,7 +31,7 @@ jobs:
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
steps:
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v4.2.2
with:
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
submodules: false
Expand Down Expand Up @@ -81,6 +85,11 @@ jobs:
docker run --name static-server -p 8080:80 -v $GITHUB_WORKSPACE/output:/usr/share/nginx/html:ro -d nginx
cd $GITHUB_WORKSPACE/docker/server

# prepare files to be copied to the image
mkdir -p resources/protos/google/protobuf
cp -r $GITHUB_WORKSPACE/contrib/google-protobuf/src/google/protobuf/*.proto ./resources/protos/google/protobuf/
rm -rf resources/protos/google/protobuf/unittest_*

# build docker image
docker build . --network host --build-arg single_binary_location_url=http://localhost:8080/proton -t ghcr.io/timeplus-io/proton:testing-$SANITIZER-$ARCH-$GITHUB_SHA

Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ jobs:
docker run --name static-server -p 8080:80 -v $GITHUB_WORKSPACE/output:/usr/share/nginx/html:ro -d nginx
cd $GITHUB_WORKSPACE/docker/server

# prepare files to be copied to the image
mkdir -p resources/protos/google/protobuf
cp -r $GITHUB_WORKSPACE/contrib/google-protobuf/src/google/protobuf/*.proto ./resources/protos/google/protobuf/
rm -rf resources/protos/google/protobuf/unittest_*

# build docker image
docker build . --network host --build-arg single_binary_location_url=http://localhost:8080/proton -t ghcr.io/timeplus-io/proton:$GITHUB_SHA-amd64

Expand Down Expand Up @@ -105,6 +110,11 @@ jobs:
docker run --name static-server -p 8080:80 -v $GITHUB_WORKSPACE/output:/usr/share/nginx/html:ro -d nginx
cd $GITHUB_WORKSPACE/docker/server

# prepare files to be copied to the image
mkdir -p resources/protos/google/protobuf
cp -r $GITHUB_WORKSPACE/contrib/google-protobuf/src/google/protobuf/*.proto ./resources/protos/google/protobuf/
rm -rf resources/protos/google/protobuf/unittest_*

# build docker image
docker build . --network host --build-arg single_binary_location_url=http://localhost:8080/proton -t ghcr.io/timeplus-io/proton:$GITHUB_SHA-arm64v8

Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/run_command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4.1.0
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down Expand Up @@ -131,24 +131,24 @@ jobs:
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
steps:
- name: Configure AWS credentials from Test account
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4.1.0
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Login to ghcr.io
uses: docker/login-action@v2
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: proton_robot
password: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v4.2.2
with:
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
submodules: ${{ inputs.submodules }}
- name: Checkout quark
uses: actions/checkout@v3
uses: actions/checkout@v4.2.2
with:
repository: timeplus-io/quark
path: quark
Expand All @@ -162,7 +162,7 @@ jobs:
${{ inputs.command }}
- name: Release binary
if: ${{ inputs.upload_files != '' }}
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2.2.1
with:
files: ${{ inputs.upload_files }}
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
Expand All @@ -177,7 +177,7 @@ jobs:
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4.1.0
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
21 changes: 11 additions & 10 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
[submodule "contrib/jemalloc"]
path = contrib/jemalloc
url = https://github.com/jemalloc/jemalloc.git
[submodule "contrib/protobuf"]
path = contrib/protobuf
url = https://github.com/ClickHouse-Extras/protobuf.git
branch = v3.13.0.1
[submodule "contrib/boost"]
path = contrib/boost
url = https://github.com/ClickHouse-Extras/boost.git
Expand Down Expand Up @@ -79,13 +75,13 @@
[submodule "contrib/aws"]
path = contrib/aws
url = https://github.com/ClickHouse-Extras/aws-sdk-cpp.git
[submodule "aws-c-event-stream"]
[submodule "contrib/aws-c-event-stream"]
path = contrib/aws-c-event-stream
url = https://github.com/awslabs/aws-c-event-stream.git
[submodule "aws-c-common"]
[submodule "contrib/aws-c-common"]
path = contrib/aws-c-common
url = https://github.com/ClickHouse/aws-c-common.git
[submodule "aws-checksums"]
[submodule "contrib/aws-checksums"]
path = contrib/aws-checksums
url = https://github.com/awslabs/aws-checksums.git
[submodule "contrib/curl"]
Expand Down Expand Up @@ -142,10 +138,9 @@
[submodule "contrib/xz"]
path = contrib/xz
url = https://github.com/xz-mirror/xz
[submodule "contrib/abseil-cpp"]
[submodule "contrib/abseil"]
path = contrib/abseil-cpp
url = https://github.com/abseil/abseil-cpp.git
branch = lts_2021_11_02
url = https://github.com/ClickHouse/abseil-cpp.git
[submodule "contrib/dragonbox"]
path = contrib/dragonbox
url = https://github.com/ClickHouse-Extras/dragonbox.git
Expand Down Expand Up @@ -280,9 +275,15 @@
[submodule "contrib/google-benchmark"]
path = contrib/google-benchmark
url = https://github.com/google/benchmark.git
[submodule "contrib/libdivide"]
path = contrib/libdivide
url = https://github.com/ridiculousfish/libdivide.git
[submodule "contrib/c-ares"]
path = contrib/c-ares
url = https://github.com/c-ares/c-ares.git
[submodule "contrib/pulsar-cmake/pulsar-client-cpp"]
path = contrib/pulsar-cmake/pulsar-client-cpp
url = https://github.com/apache/pulsar-client-cpp.git
[submodule "contrib/google-protobuf"]
path = contrib/google-protobuf
url = https://github.com/ClickHouse/google-protobuf
10 changes: 8 additions & 2 deletions PreLoad.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,14 @@ if (NOT "$ENV{CFLAGS}" STREQUAL ""
endif()

# Default toolchain - this is needed to avoid dependency on OS files.
execute_process(COMMAND uname -s OUTPUT_VARIABLE OS)
execute_process(COMMAND uname -m OUTPUT_VARIABLE ARCH)
execute_process(COMMAND uname -s
OUTPUT_VARIABLE OS
COMMAND_ERROR_IS_FATAL ANY
)
execute_process(COMMAND uname -m
OUTPUT_VARIABLE ARCH
COMMAND_ERROR_IS_FATAL ANY
)

# By default, prefer clang on Linux
# But note, that you still may change the compiler with -DCMAKE_C_COMPILER/-DCMAKE_CXX_COMPILER.
Expand Down
4 changes: 2 additions & 2 deletions base/poco/JSON/src/pdjson.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,13 @@ static int read_unicode(json_stream *json)

if (l < 0xdc00 || l > 0xdfff) {
json_error(json, "invalid surrogate pair continuation \\u%04lx out "
"of range (dc00-dfff)", l);
"of range (dc00-dfff)", (unsigned long)l);
return -1;
}

cp = ((h - 0xd800) * 0x400) + ((l - 0xdc00) + 0x10000);
} else if (cp >= 0xdc00 && cp <= 0xdfff) {
json_error(json, "dangling surrogate \\u%04lx", cp);
json_error(json, "dangling surrogate \\u%04lx", (unsigned long)cp);
return -1;
}

Expand Down
12 changes: 10 additions & 2 deletions cmake/freebsd/default_libs.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
set (DEFAULT_LIBS "-nodefaultlibs")

if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "amd64")
execute_process (COMMAND ${CMAKE_CXX_COMPILER} --print-file-name=libclang_rt.builtins-x86_64.a OUTPUT_VARIABLE BUILTINS_LIBRARY OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND
${CMAKE_CXX_COMPILER} --print-file-name=libclang_rt.builtins-x86_64.a
OUTPUT_VARIABLE BUILTINS_LIBRARY
COMMAND_ERROR_IS_FATAL ANY
OUTPUT_STRIP_TRAILING_WHITESPACE)
else ()
execute_process (COMMAND ${CMAKE_CXX_COMPILER} --print-file-name=libclang_rt.builtins-${CMAKE_SYSTEM_PROCESSOR}.a OUTPUT_VARIABLE BUILTINS_LIBRARY OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND
${CMAKE_CXX_COMPILER} --print-file-name=libclang_rt.builtins-${CMAKE_SYSTEM_PROCESSOR}.a
OUTPUT_VARIABLE BUILTINS_LIBRARY
COMMAND_ERROR_IS_FATAL ANY
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif ()

set (DEFAULT_LIBS "${DEFAULT_LIBS} ${BUILTINS_LIBRARY} ${COVERAGE_OPTION} -lc -lm -lrt -lpthread")
Expand Down
6 changes: 5 additions & 1 deletion cmake/linux/default_libs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ set (DEFAULT_LIBS "-nodefaultlibs")
# We need builtins from Clang's RT even without libcxx - for ubsan+int128.
# See https://bugs.llvm.org/show_bug.cgi?id=16404
if (COMPILER_CLANG)
execute_process (COMMAND ${CMAKE_CXX_COMPILER} --target=${CMAKE_CXX_COMPILER_TARGET} --print-libgcc-file-name --rtlib=compiler-rt OUTPUT_VARIABLE BUILTINS_LIBRARY OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND
${CMAKE_CXX_COMPILER} --target=${CMAKE_CXX_COMPILER_TARGET} --print-libgcc-file-name --rtlib=compiler-rt
OUTPUT_VARIABLE BUILTINS_LIBRARY
COMMAND_ERROR_IS_FATAL ANY
OUTPUT_STRIP_TRAILING_WHITESPACE)

if (NOT EXISTS "${BUILTINS_LIBRARY}")
set (BUILTINS_LIBRARY "-lgcc")
Expand Down
6 changes: 5 additions & 1 deletion cmake/tools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ else ()
endif ()

# Print details to output
execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE COMPILER_SELF_IDENTIFICATION OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
OUTPUT_VARIABLE COMPILER_SELF_IDENTIFICATION
COMMAND_ERROR_IS_FATAL ANY
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message (STATUS "Using compiler:\n${COMPILER_SELF_IDENTIFICATION}")

# Require minimum compiler versions
Expand Down
6 changes: 3 additions & 3 deletions contrib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ add_contrib (dragonbox-cmake dragonbox)
add_contrib (vectorscan-cmake vectorscan)
add_contrib (jemalloc-cmake jemalloc)
add_contrib (libcpuid-cmake libcpuid)
add_contrib (libdivide)
add_contrib (libdivide-cmake)
add_contrib (libmetrohash)
add_contrib (lz4-cmake lz4)
add_contrib (murmurhash)
Expand All @@ -79,7 +79,7 @@ add_contrib (thrift-cmake thrift)
# parquet/arrow/orc
add_contrib (arrow-cmake arrow) # requires: snappy, thrift, double-conversion
add_contrib (avro-cmake avro) # requires: snappy
add_contrib (protobuf-cmake protobuf)
add_contrib (google-protobuf-cmake google-protobuf)
add_contrib (openldap-cmake openldap)
add_contrib (grpc-cmake grpc)
add_contrib (msgpack-c-cmake msgpack-c)
Expand Down Expand Up @@ -136,7 +136,7 @@ add_contrib (fmtlib-cmake fmtlib)
add_contrib (krb5-cmake krb5)
add_contrib (cyrus-sasl-cmake cyrus-sasl) # for krb5
add_contrib (libgsasl-cmake libgsasl) # requires krb5
add_contrib (libhdfs3-cmake libhdfs3) # requires: protobuf, krb5
add_contrib (libhdfs3-cmake libhdfs3) # requires: google-protobuf, krb5
add_contrib (librdkafka-cmake librdkafka) # requires: libgsasl
add_contrib (libpqxx-cmake libpqxx)
add_contrib (libpq-cmake libpq)
Expand Down
2 changes: 1 addition & 1 deletion contrib/abseil-cpp
Submodule abseil-cpp updated 932 files
Loading
Loading