Skip to content

Commit 6a1cdbc

Browse files
committed
ARROW-9004: [C++][Gandiva] Support building with LLVM 10
LLVM 7 and 8 are still supported. Clang Tools still use 8 because Clang Tools 10 reports an error for RaipdJSON in sanitizer build. We should work on this as a separated task. e.g.: https://github.com/kou/arrow/runs/725786805?check_suite_focus=true /usr/include/rapidjson/internal/stack.h:117:13: runtime error: applying non-zero offset 16 to null pointer #0 0x7f4d336c0e2c in void arrow::rapidjson::internal::Stack<arrow::rapidjson::CrtAllocator>::Reserve<arrow::rapidjson::GenericValue<arrow::rapidjson::UTF8<char>, arrow::rapidjson::MemoryPoolAllocator<arrow::rapidjson::CrtAllocator> > >(unsigned long) /usr/include/rapidjson/internal/stack.h:117:13 Ubuntu 16.04 still use LLVM 8 because LLVM 10 requires C++ 14 but g++ 5 on Ubuntu 16.04 is too old to use cpp/src/arrow/vendored/datetime/date.h. CentOS 8 packages still use LLVM 8 because there are no packages for LLVM 10 on CentOS 8. manylinux1 still use LLVM 8 because g++ 4.8.2 is old to build LLVM 9 or later. Conda package for Windows still use LLVM 8 because llvmdev 9 or later use Visual Studio 2017. We need to use Visual Studio 2017 not 2015 to use llvmdev 9 or later. Closes #7323 from kou/cpp-llvm-10 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
1 parent b039c63 commit 6a1cdbc

33 files changed

Lines changed: 438 additions & 126 deletions

File tree

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ ARCH=amd64
2424
CUDA=9.1
2525
DEBIAN=10
2626
UBUNTU=18.04
27-
FEDORA=30
27+
FEDORA=32
2828
PYTHON=3.6
29-
LLVM=8
29+
LLVM=10
3030
CLANG_TOOLS=8
3131
RUST=nightly-2020-04-22
3232
GO=1.12

.github/workflows/cpp_cron.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
matrix:
4848
name:
4949
- debian-10-cpp
50-
- fedora-30-cpp
50+
- fedora-32-cpp
5151
- ubuntu-16.04-cpp
5252
- ubuntu-18.04-cpp
5353
- ubuntu-18.04-cpp-cmake32
@@ -56,10 +56,10 @@ jobs:
5656
image: debian-cpp
5757
title: AMD64 Debian 10 C++
5858
debian: 10
59-
- name: fedora-30-cpp
59+
- name: fedora-32-cpp
6060
image: fedora-cpp
61-
title: AMD64 Fedora 30 C++
62-
fedora: 30
61+
title: AMD64 Fedora 32 C++
62+
fedora: 32
6363
- name: ubuntu-16.04-cpp
6464
image: ubuntu-cpp
6565
title: AMD64 Ubuntu 16.04 C++
@@ -75,7 +75,7 @@ jobs:
7575
env:
7676
# the defaults here should correspond to the values in .env
7777
DEBIAN: ${{ matrix.debian || 10 }}
78-
FEDORA: ${{ matrix.fedora || 30 }}
78+
FEDORA: ${{ matrix.fedora || 32 }}
7979
UBUNTU: ${{ matrix.ubuntu || 18.04 }}
8080
steps:
8181
- name: Checkout Arrow

.github/workflows/python_cron.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
matrix:
4646
name:
4747
- debian-10-python-3
48-
- fedora-30-python-3
48+
- fedora-32-python-3
4949
- ubuntu-18.04-python-3
5050
- conda-python-3.7-dask-latest
5151
- conda-python-3.7-turbodbc-latest
@@ -59,11 +59,11 @@ jobs:
5959
image: debian-python
6060
title: AMD64 Debian 10 Python 3
6161
debian: 10
62-
- name: fedora-30-python-3
63-
cache: fedora-30-python-3
62+
- name: fedora-32-python-3
63+
cache: fedora-32-python-3
6464
image: fedora-python
65-
title: AMD64 Fedora 30 Python 3
66-
fedora: 30
65+
title: AMD64 Fedora 32 Python 3
66+
fedora: 32
6767
- name: ubuntu-18.04-python-3
6868
cache: ubuntu-18.04-python-3
6969
image: ubuntu-python
@@ -102,7 +102,7 @@ jobs:
102102
env:
103103
# the defaults here should correspond to the values in .env
104104
DEBIAN: ${{ matrix.debian || 10 }}
105-
FEDORA: ${{ matrix.fedora || 30 }}
105+
FEDORA: ${{ matrix.fedora || 32 }}
106106
UBUNTU: ${{ matrix.ubuntu || 18.04 }}
107107
PYTHON: ${{ matrix.python || 3.7 }}
108108
HDFS: ${{ matrix.hdfs || '2.9.2' }}

LICENSE.txt

Lines changed: 219 additions & 53 deletions
Large diffs are not rendered by default.

ci/appveyor-cpp-setup.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ set CONDA_PACKAGES=
5050

5151
if "%ARROW_BUILD_GANDIVA%" == "ON" (
5252
@rem Install llvmdev in the toolchain if building gandiva.dll
53-
set CONDA_PACKAGES=%CONDA_PACKAGES% --file=ci\conda_env_gandiva.yml
53+
set CONDA_PACKAGES=%CONDA_PACKAGES% --file=ci\conda_env_gandiva_win.yml
5454
)
5555
if "%JOB%" == "Toolchain" (
5656
@rem Install pre-built "toolchain" packages for faster builds

ci/conda_env_gandiva.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
clangdev=8
19-
llvmdev=8
18+
clangdev=10
19+
llvmdev=10
2020
re2

ci/conda_env_gandiva_win.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# llvmdev=9 or later require Visual Studio 2017
19+
clangdev=8
20+
llvmdev=8
21+
re2

ci/docker/debian-10-cpp.dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ RUN \
2626

2727
ARG llvm
2828
RUN apt-get update -y -q && \
29+
apt-get install -y -q --no-install-recommends \
30+
apt-transport-https \
31+
ca-certificates \
32+
gnupg \
33+
wget && \
34+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
35+
echo "deb https://apt.llvm.org/buster/ llvm-toolchain-buster-${llvm} main" > \
36+
/etc/apt/sources.list.d/llvm.list && \
37+
apt-get update -y -q && \
2938
apt-get install -y -q --no-install-recommends \
3039
autoconf \
3140
ca-certificates \
@@ -58,8 +67,7 @@ RUN apt-get update -y -q && \
5867
protobuf-compiler \
5968
rapidjson-dev \
6069
tzdata \
61-
zlib1g-dev \
62-
wget && \
70+
zlib1g-dev && \
6371
apt-get clean && \
6472
rm -rf /var/lib/apt/lists/*
6573

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# under the License.
1717

1818
ARG arch
19-
FROM ${arch}/fedora:30
19+
FROM ${arch}/fedora:32
2020

2121
# install dependencies
2222
RUN dnf update -y && \
@@ -25,19 +25,21 @@ RUN dnf update -y && \
2525
boost-devel \
2626
brotli-devel \
2727
bzip2-devel \
28+
c-ares-devel \
2829
ccache \
2930
clang-devel \
3031
cmake \
3132
flatbuffers-devel \
32-
java-openjdk-devel \
33-
java-openjdk-headless \
33+
java-1.8.0-openjdk-devel \
34+
java-1.8.0-openjdk-headless \
3435
gcc \
3536
gcc-c++ \
3637
glog-devel \
3738
gflags-devel \
38-
gtest-devel \
3939
gmock-devel \
4040
google-benchmark-devel \
41+
protobuf-devel \
42+
gtest-devel \
4143
git \
4244
libzstd-devel \
4345
llvm-devel \
@@ -50,17 +52,17 @@ RUN dnf update -y && \
5052
rapidjson-devel \
5153
re2-devel \
5254
snappy-devel \
55+
thrift-devel \
56+
which \
5357
zlib-devel
5458

55-
# * c-ares cmake config is not installed on Fedora but gRPC needs it
56-
# when built via ExternalProject: https://bugzilla.redhat.com/show_bug.cgi?id=1687844
57-
# * protobuf libraries in Fedora 30 are too old for gRPC
59+
# * gRPC 1.26 in Fedora 32 may have a problem. arrow-flight-test is stuck.
5860
ENV ARROW_BUILD_TESTS=ON \
5961
ARROW_DEPENDENCY_SOURCE=SYSTEM \
6062
ARROW_DATASET=ON \
6163
ARROW_FLIGHT=ON \
6264
ARROW_GANDIVA_JAVA=ON \
63-
ARROW_GANDIVA=OFF \
65+
ARROW_GANDIVA=ON \
6466
ARROW_HOME=/usr/local \
6567
ARROW_ORC=ON \
6668
ARROW_PARQUET=ON \
@@ -71,13 +73,10 @@ ENV ARROW_BUILD_TESTS=ON \
7173
ARROW_WITH_SNAPPY=ON \
7274
ARROW_WITH_ZLIB=ON \
7375
ARROW_WITH_ZSTD=ON \
74-
cares_SOURCE=BUNDLED \
7576
CC=gcc \
7677
CXX=g++ \
7778
gRPC_SOURCE=BUNDLED \
7879
ORC_SOURCE=BUNDLED \
7980
PARQUET_BUILD_EXECUTABLES=ON \
8081
PARQUET_BUILD_EXAMPLES=ON \
81-
PATH=/usr/lib/ccache/:$PATH \
82-
Protobuf_SOURCE=BUNDLED \
83-
Thrift_SOURCE=BUNDLED
82+
PATH=/usr/lib/ccache/:$PATH

ci/docker/ubuntu-16.04-cpp.dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
2222

2323
ENV DEBIAN_FRONTEND noninteractive
2424

25-
ARG llvm
25+
# LLVM 10 or later requires C++ 14 but g++-5's C++ 14 support is limited.
26+
# cpp/src/arrow/vendored/datetime/date.h doesn't work.
27+
# ARG llvm
28+
ENV llvm=8
2629
RUN apt-get update -y -q && \
2730
apt-get install -y -q --no-install-recommends \
2831
apt-transport-https \

0 commit comments

Comments
 (0)