You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pegasus.apache.org by la...@apache.org on 2023/02/14 09:35:08 UTC

[incubator-pegasus] branch support_ubuntu2204_clang14 updated (5f1d1bf1a -> 3c56b4e6a)

This is an automated email from the ASF dual-hosted git repository.

laiyingchun pushed a change to branch support_ubuntu2204_clang14
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git


 discard 5f1d1bf1a revert non
 discard c3964c016 fix
 discard a2af49b32 build: Support Ubuntu 22.04 and clang 14
     new 3c56b4e6a build: Support Ubuntu 22.04 and clang 14

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (5f1d1bf1a)
            \
             N -- N -- N   refs/heads/support_ubuntu2204_clang14 (3c56b4e6a)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pegasus.apache.org
For additional commands, e-mail: commits-help@pegasus.apache.org


[incubator-pegasus] 01/01: build: Support Ubuntu 22.04 and clang 14

Posted by la...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

laiyingchun pushed a commit to branch support_ubuntu2204_clang14
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git

commit 3c56b4e6ad811d2e25f8b92b0abf88e1ffdd0fdd
Author: Yingchun Lai <la...@apache.org>
AuthorDate: Tue Feb 14 14:42:34 2023 +0800

    build: Support Ubuntu 22.04 and clang 14
---
 .github/workflows/build-push-env-docker.yml    |  1 +
 .github/workflows/regular-build.yml            |  4 ++
 .github/workflows/thirdparty-regular-push.yml  |  2 +
 cmake_modules/BaseFunctions.cmake              |  2 +-
 docker/README.md                               |  2 +
 docker/pegasus-build-env/ubuntu2204/Dockerfile | 72 ++++++++++++++++++++++++++
 thirdparty/CMakeLists.txt                      |  3 +-
 thirdparty/fix_prometheus-cpp_limits.patch     | 10 ++++
 8 files changed, 94 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/build-push-env-docker.yml b/.github/workflows/build-push-env-docker.yml
index 756ebad07..4693429b3 100644
--- a/.github/workflows/build-push-env-docker.yml
+++ b/.github/workflows/build-push-env-docker.yml
@@ -42,6 +42,7 @@ jobs:
           - ubuntu1604
           - ubuntu1804
           - ubuntu2004
+          - ubuntu2204
           - centos6
           - centos7
     steps:
diff --git a/.github/workflows/regular-build.yml b/.github/workflows/regular-build.yml
index 4eb4849d1..08dc3edd4 100644
--- a/.github/workflows/regular-build.yml
+++ b/.github/workflows/regular-build.yml
@@ -58,11 +58,15 @@ jobs:
           - ubuntu1604
           - ubuntu1804
           - ubuntu2004
+          - ubuntu2204
           - centos6
           - centos7
         compiler-family:
           - gcc
         include:
+          - compiler-family: clang
+            compiler: "clang-14,clang++-14"
+            os: ubuntu2204
           - compiler-family: clang
             compiler: "clang-10,clang++-10"
             os: ubuntu2004
diff --git a/.github/workflows/thirdparty-regular-push.yml b/.github/workflows/thirdparty-regular-push.yml
index 3a591b06a..685a7932e 100644
--- a/.github/workflows/thirdparty-regular-push.yml
+++ b/.github/workflows/thirdparty-regular-push.yml
@@ -74,6 +74,7 @@ jobs:
           - ubuntu1604
           - ubuntu1804
           - ubuntu2004
+          - ubuntu2204
           - centos6
           - centos7
     steps:
@@ -111,6 +112,7 @@ jobs:
           - ubuntu1604
           - ubuntu1804
           - ubuntu2004
+          - ubuntu2204
           - centos6
           - centos7
     steps:
diff --git a/cmake_modules/BaseFunctions.cmake b/cmake_modules/BaseFunctions.cmake
index 359e7a79a..79aba27cb 100644
--- a/cmake_modules/BaseFunctions.cmake
+++ b/cmake_modules/BaseFunctions.cmake
@@ -204,7 +204,7 @@ function(dsn_setup_compiler_flags)
   # We want access to the PRI* print format macros.
   add_definitions(-D__STDC_FORMAT_MACROS)
 
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y" CACHE STRING "" FORCE)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -gdwarf-4" CACHE STRING "" FORCE)
 
   #  -Wall: Enable all warnings.
   add_compile_options(-Wall)
diff --git a/docker/README.md b/docker/README.md
index 102150439..5ff4fa743 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -39,6 +39,7 @@ Github Actions automatically rebuilds and publishes build-env for every commit.
 - `apache/pegasus:build-env-ubuntu1604`
 - `apache/pegasus:build-env-ubuntu1804`
 - `apache/pegasus:build-env-ubuntu2004`
+- `apache/pegasus:build-env-ubuntu2204`
 
 DockerHub: https://hub.docker.com/r/apache/pegasus
 
@@ -62,3 +63,4 @@ so jobs based on this image can skip building third-parties.
 - `apache/pegasus:thirdparties-bin-ubuntu1604-master`
 - `apache/pegasus:thirdparties-bin-ubuntu1804-master`
 - `apache/pegasus:thirdparties-bin-ubuntu2004-master`
+- `apache/pegasus:thirdparties-bin-ubuntu2204-master`
diff --git a/docker/pegasus-build-env/ubuntu2204/Dockerfile b/docker/pegasus-build-env/ubuntu2204/Dockerfile
new file mode 100644
index 000000000..bab697c78
--- /dev/null
+++ b/docker/pegasus-build-env/ubuntu2204/Dockerfile
@@ -0,0 +1,72 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+FROM ubuntu:22.04
+
+ENV TZ=Asia/Shanghai
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+
+RUN apt-get update -y; \
+    apt-get install -y --no-install-recommends \
+                       build-essential \
+                       software-properties-common \
+                       clang-14 \
+                       libclang-14-dev \
+                       llvm-14-dev \
+                       openjdk-8-jdk \
+                       pkg-config \
+                       python3-pip \
+                       libaio-dev \
+                       libsnappy-dev \
+                       libbz2-dev \
+                       libzstd-dev \
+                       liblz4-dev \
+                       zlib1g \
+                       zlib1g.dev \
+                       patch \
+                       netcat \
+                       wget \
+                       ccache \
+                       git \
+                       curl \
+                       zip \
+                       unzip \
+                       gdb \
+                       vim \
+                       automake \
+                       libtool \
+                       libssl-dev \
+                       bison \
+                       maven \
+                       flex; \
+    rm -rf /var/lib/apt/lists/*
+
+RUN pip3 install --no-cache-dir --upgrade pip
+RUN pip3 install --no-cache-dir cmake
+
+RUN wget --progress=dot:giga https://github.com/apache/thrift/archive/refs/tags/0.11.0.tar.gz -P /opt/thrift && \
+    cd /opt/thrift && tar xzf 0.11.0.tar.gz && cd thrift-0.11.0 && ./bootstrap.sh && \
+    ./configure --enable-libs=no && \
+    make -j$(($(nproc)/2+1)) && make install && cd - && \
+    rm -rf thrift-0.11.0 0.11.0.tar.gz
+
+ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
+ENV CLASSPATH=$JAVA_HOME/lib/
+ENV PATH=$JAVA_HOME/bin:$PATH
+ENV LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64/server:$LD_LIBRARY_PATH
+
+WORKDIR /root/apache
diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt
index 33bac0dbc..3a98df212 100644
--- a/thirdparty/CMakeLists.txt
+++ b/thirdparty/CMakeLists.txt
@@ -340,7 +340,8 @@ ExternalProject_Add(prometheus-cpp
         https://codeload.github.com/jupp0r/prometheus-cpp/tar.gz/v0.7.0
         URL_MD5 dc75c31ceaefd160e978365bdca8eb01
         DEPENDS civetweb curl
-        PATCH_COMMAND rm -rf 3rdparty/civetweb && cp -R ${civetweb_SRC} 3rdparty/civetweb # replace the submodule
+        # TODO(yingchun): replace the submodule
+        PATCH_COMMAND rm -rf 3rdparty/civetweb && cp -R ${civetweb_SRC} 3rdparty/civetweb && patch -p0 < ${TP_DIR}/fix_prometheus-cpp_limits.patch
         CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${TP_OUTPUT}
         -DENABLE_TESTING=OFF
         -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
diff --git a/thirdparty/fix_prometheus-cpp_limits.patch b/thirdparty/fix_prometheus-cpp_limits.patch
new file mode 100644
index 000000000..065b04f67
--- /dev/null
+++ b/thirdparty/fix_prometheus-cpp_limits.patch
@@ -0,0 +1,10 @@
+--- core/src/histogram.cc	2023-02-13 13:56:03.678985601 +0800
++++ core/src/histogram_fix_limits.cc	2023-02-13 13:55:55.303966447 +0800
+@@ -4,6 +4,7 @@
+ #include <cassert>
+ #include <iterator>
+ #include <numeric>
++#include <limits>
+ 
+ namespace prometheus {
+ 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pegasus.apache.org
For additional commands, e-mail: commits-help@pegasus.apache.org