From 3b9fb1b88859fe5aa2657d173c7ffbcab9394cb9 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 15 Jan 2019 18:05:42 +0100 Subject: [PATCH 1/2] ARROW-4281: [CI] Use Ubuntu Xenial VMs on Travis-CI The R build job still uses Trusty, though, as the community-supported R images don't work with Xenial. --- .gitignore | 2 ++ .travis.yml | 24 ++++++------- ci/appveyor-cpp-build.bat | 4 +-- ci/appveyor-cpp-setup.bat | 2 +- ci/appveyor-cpp-test-cmake-script.bat | 8 ++--- ci/cpp-msvc-build-main.bat | 2 +- ci/travis_before_script_c_glib.sh | 4 +-- ci/travis_before_script_cpp.sh | 5 +++ ci/travis_env_common.sh | 10 ++++++ ci/travis_install_clang_tools.sh | 5 ++- ci/travis_install_linux.sh | 34 ++++++++++++------- ci/travis_install_toolchain.sh | 18 ++++++++-- ci/travis_script_cpp.sh | 4 +-- ci/travis_script_gandiva_java.sh | 4 +-- ci/travis_script_integration.sh | 8 ++--- ci/travis_script_java.sh | 6 ++-- ci/travis_script_javadoc.sh | 4 ++- ci/travis_script_manylinux.sh | 2 +- ci/travis_script_plasma_java_client.sh | 5 ++- ci/travis_script_python.sh | 15 ++++---- cpp/CMakeLists.txt | 6 ---- cpp/src/arrow/python/serialize.cc | 4 +-- cpp/src/arrow/util/bit-util-benchmark.cc | 6 ++-- cpp/src/gandiva/jni/symbols.map | 2 +- cpp/thirdparty/README.md | 2 +- cpp/thirdparty/versions.txt | 2 +- dev/release/verify-release-candidate.sh | 2 +- .../pyarrow/tests/pyarrow_cython_example.pyx | 1 + 28 files changed, 116 insertions(+), 75 deletions(-) diff --git a/.gitignore b/.gitignore index 61440bb50466..6bb237af98ec 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,8 @@ arrow-src.tar.gz .build_cache_dir dependency-reduced-pom.xml MANIFEST +compile_commands.json +build.ninja # Generated Visual Studio files *.vcxproj diff --git a/.travis.yml b/.travis.yml index c57c473c041f..de0bb7843d02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ # under the License. sudo: required -dist: trusty +dist: xenial services: - docker @@ -38,7 +38,6 @@ before_install: - | if [ $TRAVIS_OS_NAME == "linux" ]; then sudo bash -c "echo -e 'Acquire::Retries 10; Acquire::http::Timeout \"20\";' > /etc/apt/apt.conf.d/99-travis-retry" - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test sudo apt-get update -qq fi - eval `python $TRAVIS_BUILD_DIR/ci/detect-changes.py` @@ -72,10 +71,10 @@ matrix: - ARROW_TRAVIS_PARQUET=1 - ARROW_TRAVIS_GANDIVA=1 - ARROW_BUILD_WARNING_LEVEL=CHECKIN - - CC="clang-6.0" - - CXX="clang++-6.0" before_script: - if [ $ARROW_CI_CPP_AFFECTED != "1" ]; then exit; fi + - export CC="clang-6.0" + - export CXX="clang++-6.0" - $TRAVIS_BUILD_DIR/ci/travis_install_linux.sh - $TRAVIS_BUILD_DIR/ci/travis_install_clang_tools.sh # If either C++ or Python changed, we must install the C++ libraries @@ -84,7 +83,7 @@ matrix: script: - $TRAVIS_BUILD_DIR/ci/travis_script_cpp.sh || travis_terminate 1 # Separating Valgrind and C++ coverage makes individual jobs shorter - - name: "C++ unit tests w/ gcc 4.8, coverage" + - name: "C++ unit tests w/ gcc 5.4, coverage" compiler: gcc language: cpp os: linux @@ -109,7 +108,7 @@ matrix: - $TRAVIS_BUILD_DIR/ci/travis_script_cpp.sh || travis_terminate 1 - $TRAVIS_BUILD_DIR/ci/travis_script_gandiva_java.sh || travis_terminate 1 - $TRAVIS_BUILD_DIR/ci/travis_upload_cpp_coverage.sh || travis_terminate 1 - - name: "Python 2.7 and 3.6 unit tests w/ Valgrind, gcc 4.8, coverage" + - name: "Python 2.7 and 3.6 unit tests w/ Valgrind, gcc 5.4, coverage" compiler: gcc language: cpp os: linux @@ -171,10 +170,10 @@ matrix: script: - $TRAVIS_BUILD_DIR/ci/travis_script_cpp.sh || travis_terminate 1 - $TRAVIS_BUILD_DIR/ci/travis_script_gandiva_java.sh - - name: "[OS X] Python w/ XCode 6.4" + - name: "[OS X] Python w/ XCode 7.3" compiler: clang language: cpp - osx_image: xcode6.4 + osx_image: xcode7.3 os: osx cache: addons: @@ -182,6 +181,7 @@ matrix: - ARROW_TRAVIS_USE_TOOLCHAIN=1 - ARROW_BUILD_WARNING_LEVEL=CHECKIN - ARROW_TRAVIS_OPTIONAL_INSTALL=1 + - MACOSX_DEPLOYMENT_TARGET="10.9" before_script: script: - if [ $ARROW_CI_PYTHON_AFFECTED != "1" ]; then exit; fi @@ -224,10 +224,10 @@ matrix: env: - ARROW_TRAVIS_PLASMA=1 - ARROW_TRAVIS_PLASMA_JAVA_CLIENT=1 - - CC="clang-6.0" - - CXX="clang++-6.0" before_script: - if [ $ARROW_CI_INTEGRATION_AFFECTED != "1" ]; then exit; fi + - export CC="clang-6.0" + - export CXX="clang++-6.0" - $TRAVIS_BUILD_DIR/ci/travis_install_linux.sh - $TRAVIS_BUILD_DIR/ci/travis_install_clang_tools.sh - nvm install 11.6 @@ -247,7 +247,7 @@ matrix: - $TRAVIS_BUILD_DIR/ci/travis_before_script_js.sh script: - $TRAVIS_BUILD_DIR/ci/travis_script_js.sh - - name: "C++ & GLib & Ruby w/ gcc 4.9" + - name: "C++ & GLib & Ruby w/ gcc 5.4" compiler: gcc language: cpp os: linux @@ -257,7 +257,6 @@ matrix: - ARROW_TRAVIS_USE_VENDORED_BOOST=1 - ARROW_TRAVIS_PARQUET=1 - ARROW_TRAVIS_PLASMA=1 - - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9" before_script: - if [ $ARROW_CI_RUBY_AFFECTED != "1" ]; then exit; fi - $TRAVIS_BUILD_DIR/ci/travis_install_linux.sh @@ -327,6 +326,7 @@ matrix: language: r cache: packages latex: false + dist: trusty env: - ARROW_TRAVIS_PARQUET=1 before_install: diff --git a/ci/appveyor-cpp-build.bat b/ci/appveyor-cpp-build.bat index 5b653a905089..78f5e419289c 100644 --- a/ci/appveyor-cpp-build.bat +++ b/ci/appveyor-cpp-build.bat @@ -95,7 +95,7 @@ if "%JOB%" == "Build_Debug" ( exit /B 0 ) -conda create -n arrow -q -y -c conda-forge/label/cf201901 ^ +conda create -n arrow -q -y -c conda-forge ^ --file=ci\conda_env_python.yml ^ python=%PYTHON% ^ numpy=1.14 ^ @@ -110,7 +110,7 @@ set BOOST_LIBRARYDIR=%CONDA_PREFIX%\Library\lib if "%JOB%" == "Toolchain" ( @rem Install pre-built "toolchain" packages for faster builds - conda install -q -y -c conda-forge/label/cf201901 ^ + conda install -q -y -c conda-forge ^ --file=ci\conda_env_cpp.yml ^ python=%PYTHON% diff --git a/ci/appveyor-cpp-setup.bat b/ci/appveyor-cpp-setup.bat index 2a46d130ead2..4cae2cb1eaec 100644 --- a/ci/appveyor-cpp-setup.bat +++ b/ci/appveyor-cpp-setup.bat @@ -39,7 +39,7 @@ if defined need_vcvarsall ( ) ) -if "%GENERATOR%"=="Ninja" conda install -y -q ninja -c conda-forge/label/cf201901 +if "%GENERATOR%"=="Ninja" conda install -y -q ninja if "%USE_CLCACHE%" == "true" ( @rem Use clcache for faster builds diff --git a/ci/appveyor-cpp-test-cmake-script.bat b/ci/appveyor-cpp-test-cmake-script.bat index d55a24dccfaf..415406c4ac36 100644 --- a/ci/appveyor-cpp-test-cmake-script.bat +++ b/ci/appveyor-cpp-test-cmake-script.bat @@ -19,8 +19,8 @@ @rem Validate cmake script behaviour on missed lib in toolchain set CONDA_ENV=arrow-cmake-tests-libs -conda create -n %CONDA_ENV% -q -y -c conda-forge/label/cf201901 -conda install -n %CONDA_ENV% -q -y -c conda-forge/label/cf201901 boost-cpp +conda create -n %CONDA_ENV% -q -y +conda install -n %CONDA_ENV% -q -y -c conda-forge boost-cpp call activate %CONDA_ENV% set BUILD_DIR=cpp\build-cmake-test @@ -161,8 +161,8 @@ call deactivate @rem Validate libs availability in conda toolchain set CONDA_ENV=arrow-cmake-tests-toolchain -conda create -n %CONDA_ENV% -q -y -c conda-forge/label/cf201901 -conda install -n %CONDA_ENV% -q -y -c conda-forge/label/cf201901 ^ +conda create -n %CONDA_ENV% -q -y +conda install -n %CONDA_ENV% -q -y -c conda-forge ^ --file=ci\conda_env_cpp.yml call activate %CONDA_ENV% diff --git a/ci/cpp-msvc-build-main.bat b/ci/cpp-msvc-build-main.bat index 6629060a477d..d9d7e548dd79 100644 --- a/ci/cpp-msvc-build-main.bat +++ b/ci/cpp-msvc-build-main.bat @@ -105,7 +105,7 @@ popd call deactivate -conda create -n wheel_test -q -y -c conda-forge/label/cf201901 python=%PYTHON% || exit /B +conda create -n wheel_test -q -y python=%PYTHON% || exit /B call activate wheel_test diff --git a/ci/travis_before_script_c_glib.sh b/ci/travis_before_script_c_glib.sh index 8507f779b3e9..e8dd0cdc80d2 100755 --- a/ci/travis_before_script_c_glib.sh +++ b/ci/travis_before_script_c_glib.sh @@ -23,7 +23,7 @@ source $TRAVIS_BUILD_DIR/ci/travis_env_common.sh source $TRAVIS_BUILD_DIR/ci/travis_install_conda.sh -conda create -n meson -y -q -c conda-forge/label/cf201901 python=3.6 +conda create -n meson -y -q python=3.6 conda activate meson pip install meson @@ -36,7 +36,7 @@ else autoconf-archive \ gtk-doc-tools \ libgirepository1.0-dev - conda install -q -y ninja -c conda-forge/label/cf201901 + conda install -q -y ninja fi gem install test-unit gobject-introspection diff --git a/ci/travis_before_script_cpp.sh b/ci/travis_before_script_cpp.sh index 8ddc98691015..e35a8b5eb16b 100755 --- a/ci/travis_before_script_cpp.sh +++ b/ci/travis_before_script_cpp.sh @@ -75,9 +75,13 @@ $CMAKE_COMMON_FLAGS \ -DARROW_INSTALL_NAME_RPATH=OFF" fi +ARROW_CXXFLAGS="" + # Use Ninja for faster builds when using toolchain if [ $ARROW_TRAVIS_USE_TOOLCHAIN == "1" ]; then CMAKE_COMMON_FLAGS="$CMAKE_COMMON_FLAGS -GNinja" + # Make sure the toolchain linker (from binutils package) is picked up by clang + ARROW_CXXFLAGS="$ARROW_CXXFLAGS -B$CPP_TOOLCHAIN/bin" fi if [ $ARROW_TRAVIS_PLASMA == "1" ]; then @@ -135,6 +139,7 @@ if [ $TRAVIS_OS_NAME == "linux" ]; then $CMAKE_LINUX_FLAGS \ -DCMAKE_BUILD_TYPE=$ARROW_BUILD_TYPE \ -DBUILD_WARNING_LEVEL=$ARROW_BUILD_WARNING_LEVEL \ + -DARROW_CXXFLAGS="$ARROW_CXXFLAGS" \ $ARROW_CPP_DIR else if [ "$using_homebrew" = "yes" ]; then diff --git a/ci/travis_env_common.sh b/ci/travis_env_common.sh index 636a25fcd748..980252a71d61 100755 --- a/ci/travis_env_common.sh +++ b/ci/travis_env_common.sh @@ -73,3 +73,13 @@ if [ $TRAVIS_OS_NAME == "osx" ]; then fi export PARQUET_TEST_DATA=$TRAVIS_BUILD_DIR/cpp/submodules/parquet-testing/data + +if [ $TRAVIS_OS_NAME == "linux" ]; then + # Use the Ubuntu-provided OpenJDK + unset JAVA_HOME + export TRAVIS_MVN=/usr/bin/mvn + export TRAVIS_JAVA=/usr/bin/java +else + export TRAVIS_MVN=mvn + export TRAVIS_JAVA=java +fi diff --git a/ci/travis_install_clang_tools.sh b/ci/travis_install_clang_tools.sh index 49b2e4776212..60a1aa1a4d6c 100755 --- a/ci/travis_install_clang_tools.sh +++ b/ci/travis_install_clang_tools.sh @@ -17,8 +17,11 @@ # specific language governing permissions and limitations # under the License. +# e.g. "trusty" or "xenial" +DISTRO_CODENAME=`lsb_release -s -c` + wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add - sudo apt-add-repository -y \ - "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-6.0 main" + "deb http://llvm.org/apt/$DISTRO_CODENAME/ llvm-toolchain-$DISTRO_CODENAME-6.0 main" sudo apt-get update -qq sudo apt-get install -q clang-6.0 clang-format-6.0 clang-tidy-6.0 diff --git a/ci/travis_install_linux.sh b/ci/travis_install_linux.sh index 98d9bdd924bf..4af95475d20b 100755 --- a/ci/travis_install_linux.sh +++ b/ci/travis_install_linux.sh @@ -17,25 +17,35 @@ # specific language governing permissions and limitations # under the License. -sudo apt-get install -y -q \ +set -e + +sudo apt-get install -y -qq \ gdb binutils ccache libboost-dev libboost-filesystem-dev \ libboost-system-dev libboost-regex-dev -if [ "$CXX" == "g++-4.9" ]; then - sudo apt-get install -y -q g++-4.9 -fi - if [ "$ARROW_TRAVIS_VALGRIND" == "1" ]; then - sudo apt-get install -y -q valgrind + sudo apt-get install -y -qq valgrind fi if [ "$ARROW_TRAVIS_COVERAGE" == "1" ]; then - sudo apt-get install -y -q lcov + sudo apt-get install -y -qq lcov fi -if [ "$ARROW_TRAVIS_GANDIVA" == "1" -a "$ARROW_USE_TOOLCHAIN" != "1" ]; then - sudo add-apt-repository -y ppa:dluxen/cmake-backports - sudo apt-get update -q - sudo apt-get install -y -q cmake3 - sudo rm -rf /usr/local/cmake-* +if [ "$ARROW_TRAVIS_GANDIVA" == "1" ]; then + sudo apt-get install -y -qq llvm-6.0-dev fi + +set -x + +sudo apt-get install -y -qq maven + +# Remove Travis-specific versions of Java +sudo rm -rf /usr/local/lib/jvm* +sudo rm -rf /usr/local/maven* +hash -r +unset JAVA_HOME + +which java +which mvn +java -version +mvn -v diff --git a/ci/travis_install_toolchain.sh b/ci/travis_install_toolchain.sh index aa50d5966d4b..1d473d292be6 100755 --- a/ci/travis_install_toolchain.sh +++ b/ci/travis_install_toolchain.sh @@ -22,14 +22,26 @@ source $TRAVIS_BUILD_DIR/ci/travis_env_common.sh source $TRAVIS_BUILD_DIR/ci/travis_install_conda.sh if [ ! -e $CPP_TOOLCHAIN ]; then + CONDA_PACKAGES="" + if [ $ARROW_TRAVIS_GANDIVA == "1" ] && [ $TRAVIS_OS_NAME == "osx" ]; then - CONDA_LLVM="llvmdev=6.0.1" + CONDA_PACKAGES="$CONDA_PACKAGES llvmdev=6.0.1" + fi + + if [ $TRAVIS_OS_NAME == "linux" ]; then + # Use newer binutils when linking against conda-provided libraries + CONDA_PACKAGES="$CONDA_PACKAGES binutils" + fi + + if [ $ARROW_TRAVIS_VALGRIND == "1" ]; then + # Use newer Valgrind + CONDA_PACKAGES="$CONDA_PACKAGES valgrind" fi # Set up C++ toolchain from conda-forge packages for faster builds - conda create -y -q -p $CPP_TOOLCHAIN -c conda-forge/label/cf201901 \ + conda create -y -q -p $CPP_TOOLCHAIN \ --file=$TRAVIS_BUILD_DIR/ci/conda_env_cpp.yml \ - ${CONDA_LLVM} \ + $CONDA_PACKAGES \ ccache \ ninja \ nomkl \ diff --git a/ci/travis_script_cpp.sh b/ci/travis_script_cpp.sh index b89e5b73bf00..14529b03160f 100755 --- a/ci/travis_script_cpp.sh +++ b/ci/travis_script_cpp.sh @@ -30,7 +30,7 @@ popd # Capture C++ coverage info (we wipe the build dir in travis_script_python.sh) if [ "$ARROW_TRAVIS_COVERAGE" == "1" ]; then pushd $TRAVIS_BUILD_DIR - lcov --quiet --directory . --capture --no-external --output-file $ARROW_CPP_COVERAGE_FILE \ - 2>&1 | grep -v "WARNING: no data found for /usr/include" + lcov --directory . --capture --no-external --output-file $ARROW_CPP_COVERAGE_FILE \ + 2>&1 | grep -v "ignoring data for external file" popd fi diff --git a/ci/travis_script_gandiva_java.sh b/ci/travis_script_gandiva_java.sh index 1f188e7e91dd..c187184a34c5 100755 --- a/ci/travis_script_gandiva_java.sh +++ b/ci/travis_script_gandiva_java.sh @@ -27,9 +27,9 @@ pushd $JAVA_DIR export MAVEN_OPTS="$MAVEN_OPTS -Dorg.slf4j.simpleLogger.defaultLogLevel=warn" # build with gandiva profile -mvn -P gandiva -B install -DskipTests -Dgandiva.cpp.build.dir=$CPP_BUILD_DIR/debug +$TRAVIS_MVN -P gandiva -B install -DskipTests -Dgandiva.cpp.build.dir=$CPP_BUILD_DIR/debug # run gandiva tests -mvn test -P gandiva -pl gandiva -Dgandiva.cpp.build.dir=$CPP_BUILD_DIR/debug +$TRAVIS_MVN test -P gandiva -pl gandiva -Dgandiva.cpp.build.dir=$CPP_BUILD_DIR/debug popd diff --git a/ci/travis_script_integration.sh b/ci/travis_script_integration.sh index 5571ebc0b07a..02e2eae81509 100755 --- a/ci/travis_script_integration.sh +++ b/ci/travis_script_integration.sh @@ -28,7 +28,7 @@ export ARROW_CPP_EXE_PATH=$ARROW_CPP_BUILD_DIR/debug pushd $ARROW_JAVA_DIR echo "mvn package" -mvn -B clean package 2>&1 > mvn_package.log || (cat mvn_package.log && false) +$TRAVIS_MVN -B clean package 2>&1 > mvn_package.log || (cat mvn_package.log && false) popd @@ -43,14 +43,14 @@ popd pushd $ARROW_INTEGRATION_DIR CONDA_ENV_NAME=arrow-integration-test -conda create -y -q -n $CONDA_ENV_NAME -c conda-forge/label/cf201901 python=3.5 +conda create -y -q -n $CONDA_ENV_NAME python=3.6 conda activate $CONDA_ENV_NAME # faster builds, please -conda install -y nomkl -c conda-forge/label/cf201901 +conda install -y nomkl # Expensive dependencies install from Continuum package repo -conda install -y pip numpy six -c conda-forge/label/cf201901 +conda install -y pip numpy six # ARROW-4008: Create a directory to write temporary files since /tmp can be # unstable in Travis CI diff --git a/ci/travis_script_java.sh b/ci/travis_script_java.sh index 8a71fdc4d006..dd5a6b48d5e5 100755 --- a/ci/travis_script_java.sh +++ b/ci/travis_script_java.sh @@ -19,15 +19,17 @@ set -e +source $TRAVIS_BUILD_DIR/ci/travis_env_common.sh + JAVA_DIR=${TRAVIS_BUILD_DIR}/java pushd $JAVA_DIR export MAVEN_OPTS="$MAVEN_OPTS -Dorg.slf4j.simpleLogger.defaultLogLevel=warn" if [ $ARROW_TRAVIS_JAVA_BUILD_ONLY == "1" ]; then # Save time and make build less verbose by skipping tests and style checks - mvn -DskipTests=true -Dcheckstyle.skip=true -B install + $TRAVIS_MVN -DskipTests=true -Dcheckstyle.skip=true -B install else - mvn -B install + $TRAVIS_MVN -B install fi popd diff --git a/ci/travis_script_javadoc.sh b/ci/travis_script_javadoc.sh index ccfb2dab61d0..755d4628f205 100755 --- a/ci/travis_script_javadoc.sh +++ b/ci/travis_script_javadoc.sh @@ -19,11 +19,13 @@ set -e +source $TRAVIS_BUILD_DIR/ci/travis_env_common.sh + JAVA_DIR=${TRAVIS_BUILD_DIR}/java pushd $JAVA_DIR export MAVEN_OPTS="$MAVEN_OPTS -Dorg.slf4j.simpleLogger.defaultLogLevel=warn" -mvn -B site +$TRAVIS_MVN -B site popd diff --git a/ci/travis_script_manylinux.sh b/ci/travis_script_manylinux.sh index 59b818af69b3..588d0f9a7bbb 100755 --- a/ci/travis_script_manylinux.sh +++ b/ci/travis_script_manylinux.sh @@ -34,7 +34,7 @@ source $TRAVIS_BUILD_DIR/ci/travis_install_conda.sh PYTHON_VERSION=3.6 CONDA_ENV_DIR=$TRAVIS_BUILD_DIR/pyarrow-test-$PYTHON_VERSION -conda create -y -q -p $CONDA_ENV_DIR -c conda-forge/label/cf201901 python=$PYTHON_VERSION +conda create -y -q -p $CONDA_ENV_DIR python=$PYTHON_VERSION conda activate $CONDA_ENV_DIR pip install -q tensorflow diff --git a/ci/travis_script_plasma_java_client.sh b/ci/travis_script_plasma_java_client.sh index 927a2391201c..0b291ed32a56 100755 --- a/ci/travis_script_plasma_java_client.sh +++ b/ci/travis_script_plasma_java_client.sh @@ -23,16 +23,15 @@ source $TRAVIS_BUILD_DIR/ci/travis_env_common.sh PLASMA_JAVA_DIR=${TRAVIS_BUILD_DIR}/java/plasma - pushd $PLASMA_JAVA_DIR -mvn clean install +$TRAVIS_MVN clean install export LD_LIBRARY_PATH=${ARROW_CPP_INSTALL}/lib:$LD_LIBRARY_PATH export PLASMA_STORE=${ARROW_CPP_INSTALL}/bin/plasma_store_server ldd $PLASMA_STORE -java -cp target/test-classes:target/classes -Djava.library.path=${TRAVIS_BUILD_DIR}/cpp-build/debug/ org.apache.arrow.plasma.PlasmaClientTest +$TRAVIS_JAVA -cp target/test-classes:target/classes -Djava.library.path=${TRAVIS_BUILD_DIR}/cpp-build/debug/ org.apache.arrow.plasma.PlasmaClientTest popd diff --git a/ci/travis_script_python.sh b/ci/travis_script_python.sh index 838d9b889e49..5f15d902dd4e 100755 --- a/ci/travis_script_python.sh +++ b/ci/travis_script_python.sh @@ -45,7 +45,7 @@ if [ $ARROW_TRAVIS_PYTHON_JVM == "1" ]; then CONDA_JVM_DEPS="jpype1" fi -conda create -y -q -p $CONDA_ENV_DIR -c conda-forge/label/cf201901 \ +conda create -y -q -p $CONDA_ENV_DIR -c conda-forge \ --file $TRAVIS_BUILD_DIR/ci/conda_env_python.yml \ nomkl \ cmake \ @@ -61,7 +61,7 @@ which python if [ "$ARROW_TRAVIS_PYTHON_DOCS" == "1" ] && [ "$PYTHON_VERSION" == "3.6" ]; then # Install documentation dependencies - conda install -y -c conda-forge/label/cf201901 --file ci/conda_env_sphinx.yml + conda install -y -c conda-forge --file ci/conda_env_sphinx.yml fi # ARROW-2093: PyTorch increases the size of our conda dependency stack @@ -74,7 +74,7 @@ fi # fi if [ $TRAVIS_OS_NAME != "osx" ]; then - conda install -y -c conda-forge/label/cf201901 tensorflow + conda install -y -c conda-forge tensorflow PYARROW_PYTEST_FLAGS="$PYARROW_PYTEST_FLAGS --tensorflow" fi @@ -126,9 +126,8 @@ pushd $ARROW_PYTHON_DIR # Other stuff pip install pip install -r requirements.txt -# FIXME(kszucs): disabled in https://github.com/apache/arrow/pull/3406 if [ "$PYTHON_VERSION" == "3.6" ]; then - pip install -vvv pickle5 || true + pip install -q pickle5 fi if [ "$ARROW_TRAVIS_COVERAGE" == "1" ]; then export PYARROW_GENERATE_COVERAGE=1 @@ -181,8 +180,8 @@ if [ "$ARROW_TRAVIS_COVERAGE" == "1" ]; then coverage xml -i -o $TRAVIS_BUILD_DIR/coverage.xml # Capture C++ coverage info pushd $TRAVIS_BUILD_DIR - lcov --quiet --directory . --capture --no-external --output-file coverage-python-tests.info \ - 2>&1 | grep -v "WARNING: no data found for /usr/include" + lcov --directory . --capture --no-external --output-file coverage-python-tests.info \ + 2>&1 | grep -v "ignoring data for external file" lcov --add-tracefile coverage-python-tests.info \ --output-file $ARROW_CPP_COVERAGE_FILE rm coverage-python-tests.info @@ -204,7 +203,7 @@ if [ "$ARROW_TRAVIS_PYTHON_BENCHMARKS" == "1" ] && [ "$PYTHON_VERSION" == "3.6" # Unfortunately this won't ensure that all benchmarks succeed # (see https://github.com/airspeed-velocity/asv/issues/449) source deactivate - conda create -y -q -n pyarrow_asv python=$PYTHON_VERSION -c conda-forge/label/cf201901 + conda create -y -q -n pyarrow_asv python=$PYTHON_VERSION -c conda-forge conda activate pyarrow_asv pip install -q git+https://github.com/pitrou/asv.git@customize_commands diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 459cb3a613e5..e553d080f5e3 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -518,12 +518,6 @@ if (NOT ARROW_FUZZING) set(NO_FUZZING 1) endif() -if (ARROW_TENSORFLOW) - # TensorFlow uses the old GLIBCXX ABI, so we have to use it too - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0") -endif() - if (MSVC AND ARROW_USE_CLCACHE AND (("${CMAKE_GENERATOR}" STREQUAL "NMake Makefiles") OR ("${CMAKE_GENERATOR}" STREQUAL "Ninja"))) diff --git a/cpp/src/arrow/python/serialize.cc b/cpp/src/arrow/python/serialize.cc index 38ab238e9a2e..ad2636af60c6 100644 --- a/cpp/src/arrow/python/serialize.cc +++ b/cpp/src/arrow/python/serialize.cc @@ -532,13 +532,13 @@ Status Append(PyObject* context, PyObject* elem, SequenceBuilder* builder, #endif } else if (PyBytes_Check(elem)) { auto data = reinterpret_cast(PyBytes_AS_STRING(elem)); - int32_t size; + int32_t size = -1; RETURN_NOT_OK(internal::CastSize(PyBytes_GET_SIZE(elem), &size)); RETURN_NOT_OK(builder->AppendBytes(data, size)); } else if (PyUnicode_Check(elem)) { PyBytesView view; RETURN_NOT_OK(view.FromString(elem)); - int32_t size; + int32_t size = -1; RETURN_NOT_OK(internal::CastSize(view.size, &size)); RETURN_NOT_OK(builder->AppendString(view.bytes, size)); } else if (PyList_CheckExact(elem)) { diff --git a/cpp/src/arrow/util/bit-util-benchmark.cc b/cpp/src/arrow/util/bit-util-benchmark.cc index cc7107888015..00093a2cf7b5 100644 --- a/cpp/src/arrow/util/bit-util-benchmark.cc +++ b/cpp/src/arrow/util/bit-util-benchmark.cc @@ -61,13 +61,15 @@ class NaiveBitmapWriter { void Set() { const int64_t byte_offset = position_ / 8; const int64_t bit_offset = position_ % 8; - bitmap_[byte_offset] |= static_cast(1 << bit_offset); + auto bit_set_mask = (1U << bit_offset); + bitmap_[byte_offset] = static_cast(bitmap_[byte_offset] | bit_set_mask); } void Clear() { const int64_t byte_offset = position_ / 8; const int64_t bit_offset = position_ % 8; - bitmap_[byte_offset] &= 0xFF ^ static_cast(1 << bit_offset); + auto bit_clear_mask = 0xFFU ^ (1U << bit_offset); + bitmap_[byte_offset] = static_cast(bitmap_[byte_offset] & bit_clear_mask); } void Next() { ++position_; } diff --git a/cpp/src/gandiva/jni/symbols.map b/cpp/src/gandiva/jni/symbols.map index a387ae1f5af6..e0f5def41f00 100644 --- a/cpp/src/gandiva/jni/symbols.map +++ b/cpp/src/gandiva/jni/symbols.map @@ -15,6 +15,6 @@ # specific language governing permissions and limitations # under the License. { - global: extern "C++" { gandiva*; Java*; JNI*; }; + global: extern "C++" { gandiva*; }; Java*; JNI*; local: *; }; diff --git a/cpp/thirdparty/README.md b/cpp/thirdparty/README.md index 0353395dfb1f..9be3361e5d54 100644 --- a/cpp/thirdparty/README.md +++ b/cpp/thirdparty/README.md @@ -88,7 +88,7 @@ export ARROW_GLOG_URL=$HOME/arrow-thirdparty/glog-v0.3.5.tar.gz export ARROW_GRPC_URL=$HOME/arrow-thirdparty/grpc-v1.14.1.tar.gz export ARROW_GTEST_URL=$HOME/arrow-thirdparty/gtest-1.8.0.tar.gz export ARROW_LZ4_URL=$HOME/arrow-thirdparty/lz4-v1.7.5.tar.gz -export ARROW_ORC_URL=$HOME/arrow-thirdparty/orc-1.5.1.tar.gz +export ARROW_ORC_URL=$HOME/arrow-thirdparty/orc-1.5.4.tar.gz export ARROW_PROTOBUF_URL=$HOME/arrow-thirdparty/protobuf-v3.6.1.tar.gz export ARROW_RAPIDJSON_URL=$HOME/arrow-thirdparty/rapidjson-v1.1.0.tar.gz export ARROW_RE2_URL=$HOME/arrow-thirdparty/re2-2018-10-01.tar.gz diff --git a/cpp/thirdparty/versions.txt b/cpp/thirdparty/versions.txt index fc539da73945..a2393b6fb3eb 100644 --- a/cpp/thirdparty/versions.txt +++ b/cpp/thirdparty/versions.txt @@ -34,7 +34,7 @@ GRPC_VERSION=v1.14.1 GTEST_VERSION=1.8.0 JEMALLOC_VERSION=17c897976c60b0e6e4f4a365c751027244dada7a LZ4_VERSION=v1.7.5 -ORC_VERSION=1.5.1 +ORC_VERSION=1.5.4 PROTOBUF_VERSION=v3.6.1 RAPIDJSON_VERSION=v1.1.0 RE2_VERSION=2018-10-01 diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index 9ad2b265e571..3694c867dcb2 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -174,7 +174,7 @@ setup_miniconda() { . $MINICONDA/etc/profile.d/conda.sh - conda create -n arrow-test -y -q -c conda-forge/label/cf201901 \ + conda create -n arrow-test -y -q -c conda-forge \ python=3.6 \ nomkl \ numpy \ diff --git a/python/pyarrow/tests/pyarrow_cython_example.pyx b/python/pyarrow/tests/pyarrow_cython_example.pyx index b5e54063df18..4a6f3ca5dea5 100644 --- a/python/pyarrow/tests/pyarrow_cython_example.pyx +++ b/python/pyarrow/tests/pyarrow_cython_example.pyx @@ -16,6 +16,7 @@ # under the License. # distutils: language=c++ +# cython: language_level = 3 from pyarrow.lib cimport * From 7cdc8136fd2389ce9269f643dbb6fc10ecb308b2 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 22 Jan 2019 15:49:47 +0100 Subject: [PATCH 2/2] Remove superfluous conda-forge references --- ci/travis_install_conda.sh | 1 - ci/travis_script_python.sh | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ci/travis_install_conda.sh b/ci/travis_install_conda.sh index ade6392ce24a..49a2f21ef679 100755 --- a/ci/travis_install_conda.sh +++ b/ci/travis_install_conda.sh @@ -67,7 +67,6 @@ else # Help with SSL timeouts to S3 conda config --set remote_connect_timeout_secs 12 - conda config --add channels https://repo.continuum.io/pkgs/free conda config --add channels conda-forge fi diff --git a/ci/travis_script_python.sh b/ci/travis_script_python.sh index 5f15d902dd4e..5732a1762bab 100755 --- a/ci/travis_script_python.sh +++ b/ci/travis_script_python.sh @@ -45,7 +45,7 @@ if [ $ARROW_TRAVIS_PYTHON_JVM == "1" ]; then CONDA_JVM_DEPS="jpype1" fi -conda create -y -q -p $CONDA_ENV_DIR -c conda-forge \ +conda create -y -q -p $CONDA_ENV_DIR \ --file $TRAVIS_BUILD_DIR/ci/conda_env_python.yml \ nomkl \ cmake \ @@ -61,7 +61,7 @@ which python if [ "$ARROW_TRAVIS_PYTHON_DOCS" == "1" ] && [ "$PYTHON_VERSION" == "3.6" ]; then # Install documentation dependencies - conda install -y -c conda-forge --file ci/conda_env_sphinx.yml + conda install -y --file ci/conda_env_sphinx.yml fi # ARROW-2093: PyTorch increases the size of our conda dependency stack @@ -74,7 +74,7 @@ fi # fi if [ $TRAVIS_OS_NAME != "osx" ]; then - conda install -y -c conda-forge tensorflow + conda install -y tensorflow PYARROW_PYTEST_FLAGS="$PYARROW_PYTEST_FLAGS --tensorflow" fi @@ -203,7 +203,7 @@ if [ "$ARROW_TRAVIS_PYTHON_BENCHMARKS" == "1" ] && [ "$PYTHON_VERSION" == "3.6" # Unfortunately this won't ensure that all benchmarks succeed # (see https://github.com/airspeed-velocity/asv/issues/449) source deactivate - conda create -y -q -n pyarrow_asv python=$PYTHON_VERSION -c conda-forge + conda create -y -q -n pyarrow_asv python=$PYTHON_VERSION conda activate pyarrow_asv pip install -q git+https://github.com/pitrou/asv.git@customize_commands