mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Builder fixes. Fix unbundled cctz
This commit is contained in:
parent
61e5b0476f
commit
a2c3eae315
18
debian/.pbuilderrc
vendored
18
debian/.pbuilderrc
vendored
@ -1,3 +1,6 @@
|
||||
#
|
||||
# sudo apt install pbuilder fakeroot debhelper debian-archive-keyring debian-keyring
|
||||
#
|
||||
# ubuntu:
|
||||
# prepare old (trusty or earlier) host system:
|
||||
# sudo ln -s gutsy /usr/share/debootstrap/scripts/artful
|
||||
@ -58,7 +61,8 @@ DEBIAN_MIRROR="deb.debian.org"
|
||||
UBUNTU_MIRROR="mirror.yandex.ru"
|
||||
|
||||
# Set a default distribution if none is used. Note that you can set your own default (i.e. ${DIST:="unstable"}).
|
||||
: ${DIST:="$(lsb_release --short --codename)"}
|
||||
HOST_DIST=`lsb_release --short --codename`
|
||||
: ${DIST:="$HOST_DIST"}
|
||||
|
||||
# Optionally change Debian codenames in $DIST to their aliases.
|
||||
case "$DIST" in
|
||||
@ -100,8 +104,16 @@ if $(echo ${DEBIAN_SUITES[@]} | grep -q $DIST); then
|
||||
OTHERMIRROR="$OTHERMIRROR | deb $MIRRORSITE $STABLE_BACKPORTS_SUITE $COMPONENTS"
|
||||
fi
|
||||
# APTKEYRINGS=/usr/share/keyrings/debian-archive-keyring.gpg
|
||||
# sudo apt install debian-archive-keyring
|
||||
DEBOOTSTRAPOPTS+=( '--keyring' '/usr/share/keyrings/debian-archive-keyring.gpg' )
|
||||
|
||||
case "$HOST_DIST" in
|
||||
"trusty" )
|
||||
DEBOOTSTRAPOPTS+=( '--no-check-gpg' )
|
||||
;;
|
||||
*)
|
||||
DEBOOTSTRAPOPTS+=( '--keyring' '/usr/share/keyrings/debian-archive-keyring.gpg' )
|
||||
# DEBOOTSTRAPOPTS+=( '--keyring' '/usr/share/keyrings/debian-keyring.gpg' )
|
||||
esac
|
||||
|
||||
elif $(echo ${UBUNTU_SUITES[@]} | grep -q $DIST); then
|
||||
# Ubuntu configuration
|
||||
OSNAME=ubuntu
|
||||
|
@ -2,18 +2,19 @@ option (USE_INTERNAL_CCTZ_LIBRARY "Set to FALSE to use system cctz library inste
|
||||
|
||||
if (USE_INTERNAL_CCTZ_LIBRARY AND NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/cctz/include/cctz/time_zone.h")
|
||||
message (WARNING "submodule contrib/cctz is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
set (MISSING_INTERNAL_CCTZ_LIBRARY 1)
|
||||
set (USE_INTERNAL_CCTZ_LIBRARY 0)
|
||||
endif ()
|
||||
|
||||
if (NOT USE_INTERNAL_CCTZ_LIBRARY)
|
||||
find_library (CCTZ_LIBRARY cctz)
|
||||
find_path (CCTZ_INCLUDE_DIR NAMES civil_time.h PATHS ${CCTZ_INCLUDE_PATHS})
|
||||
find_path (CCTZ_INCLUDE_DIR NAMES cctz/civil_time.h PATHS ${CCTZ_INCLUDE_PATHS})
|
||||
endif ()
|
||||
|
||||
if (CCTZ_LIBRARY AND CCTZ_INCLUDE_DIR)
|
||||
else ()
|
||||
elseif (NOT MISSING_INTERNAL_CCTZ_LIBRARY)
|
||||
set (USE_INTERNAL_CCTZ_LIBRARY 1)
|
||||
set (CCTZ_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/cctz/include/cctz")
|
||||
set (CCTZ_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/cctz/include")
|
||||
set (CCTZ_LIBRARY cctz)
|
||||
endif ()
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <civil_time.h>
|
||||
#include <time_zone.h>
|
||||
#include <cctz/civil_time.h>
|
||||
#include <cctz/time_zone.h>
|
||||
|
||||
#include <common/DateLUTImpl.h>
|
||||
#include <Poco/Exception.h>
|
||||
|
14
release
14
release
@ -37,6 +37,10 @@ do
|
||||
elif [[ $1 == '--pbuilder' ]]; then
|
||||
USE_PBUILDER=1
|
||||
shift
|
||||
elif [[ $1 == '--fast' ]]; then
|
||||
# Wrong but fast pbuilder mode: create base package with all depends
|
||||
EXTRAPACKAGES+=" debhelper cmake gcc-7 g++-7 libc6-dev libmariadbclient-dev libicu-dev libltdl-dev libreadline-dev libssl-dev unixodbc-dev psmisc gdb bash expect python python-lxml python-termcolor curl perl sudo"
|
||||
shift
|
||||
else
|
||||
echo "Unknown option $1"
|
||||
exit 2
|
||||
@ -54,7 +58,7 @@ then
|
||||
# GLIBC_COMPATIBILITY отключен по умолчанию
|
||||
export DEB_CC=clang-5.0
|
||||
export DEB_CXX=clang++-5.0
|
||||
export EXTRAPACKAGES=clang-5.0
|
||||
EXTRAPACKAGES+=" clang-5.0 "
|
||||
elif [[ $BUILD_TYPE == 'valgrind' ]]; then
|
||||
LIBTCMALLOC_OPTS="-DENABLE_TCMALLOC=0"
|
||||
VERSION_POSTFIX+=-$BUILD_TYPE
|
||||
@ -70,6 +74,7 @@ fi
|
||||
|
||||
CMAKE_FLAGS=" $LIBTCMALLOC_OPTS -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DUSE_EMBEDDED_COMPILER=1 $CMAKE_FLAGS"
|
||||
export CMAKE_FLAGS
|
||||
export EXTRAPACKAGES
|
||||
|
||||
REVISION+=$VERSION_POSTFIX
|
||||
echo -e "\nCurrent revision is $REVISION"
|
||||
@ -86,7 +91,12 @@ else
|
||||
export SET_BUILDRESULT=${SET_BUILDRESULT:=$CURDIR/..}
|
||||
. $CURDIR/debian/.pbuilderrc
|
||||
if [[ -n "$FORCE_PBUILDER_CREATE" || ! -e "$BASETGZ" ]] ; then
|
||||
sudo --preserve-env pbuilder create --configfile $CURDIR/debian/.pbuilderrc
|
||||
sudo --preserve-env pbuilder create --configfile $CURDIR/debian/.pbuilderrc $PBUILDER_OPT
|
||||
fi
|
||||
|
||||
if [[ -n "$PBUILDER_UPDATE" ]] ; then
|
||||
sudo --preserve-env pbuilder update --configfile $CURDIR/debian/.pbuilderrc $PBUILDER_OPT
|
||||
fi
|
||||
|
||||
pdebuild --configfile $CURDIR/debian/.pbuilderrc -- $PBUILDER_OPT
|
||||
fi
|
||||
|
@ -8,7 +8,7 @@
|
||||
# install compiler and libs
|
||||
sudo apt install -y git bash cmake gcc-7 g++-7 libicu-dev libreadline-dev libmysqlclient-dev unixodbc-dev libltdl-dev libssl-dev
|
||||
# for -DUNBUNDLED=1 mode:
|
||||
#sudo apt install -y libboost-dev zlib1g-dev liblz4-dev libdouble-conversion-dev libzstd-dev libre2-dev libzookeeper-mt-dev libsparsehash-dev librdkafka-dev libcapnp-dev libpoco-dev libsparsehash-dev libgoogle-perftools-dev libunwind-dev
|
||||
#sudo apt install -y libboost-dev zlib1g-dev liblz4-dev libdouble-conversion-dev libzstd-dev libre2-dev libzookeeper-mt-dev libsparsehash-dev librdkafka-dev libcapnp-dev libpoco-dev libsparsehash-dev libgoogle-perftools-dev libunwind-dev libgtest-dev libcctz-dev
|
||||
|
||||
# install testing only stuff if you want:
|
||||
sudo apt install -y python python-lxml python-termcolor curl perl
|
||||
|
25
utils/build/build_debian_unbundled.sh
Executable file
25
utils/build/build_debian_unbundled.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd ../.. && pwd)
|
||||
|
||||
DIST=${DIST:="unstable"}
|
||||
export DIST
|
||||
|
||||
cd $ROOT_DIR
|
||||
. $ROOT_DIR/debian/.pbuilderrc
|
||||
if [[ -n "$FORCE_PBUILDER_CREATE" || ! -e "$BASETGZ" ]] ; then
|
||||
sudo --preserve-env pbuilder create --configfile $ROOT_DIR/debian/.pbuilderrc $PBUILDER_OPT
|
||||
fi
|
||||
|
||||
env TEST_RUN=1 \
|
||||
`# Skip tests:` \
|
||||
`# 00281 requires internal compiler` \
|
||||
`# 00416 requires patched poco from contrib/` \
|
||||
TEST_OPT="--no-long --skip 00281 00416" \
|
||||
TEST_TRUE=false \
|
||||
CMAKE_FLAGS="-DUNBUNDLED=1" \
|
||||
`# Use all possible contrib libs from system` \
|
||||
`# psmisc - killall` \
|
||||
`# gdb - symbol test in pbuilder` \
|
||||
EXTRAPACKAGES="psmisc gdb clang-5.0 libc++abi-dev libc++-dev libboost-dev libboost-program-options-dev zlib1g-dev liblz4-dev libdouble-conversion-dev libzookeeper-mt-dev libsparsehash-dev librdkafka-dev libpoco-dev libsparsehash-dev libgoogle-perftools-dev libzstd-dev libre2-dev libunwind-dev libgtest-dev libcctz-dev" \
|
||||
pdebuild --configfile $ROOT_DIR/debian/.pbuilderrc
|
Loading…
Reference in New Issue
Block a user