mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Added script for build environment preparation [#METRIQA-1369].
This commit is contained in:
parent
7744b24658
commit
9a1207be87
@ -18,7 +18,7 @@ Install Git and CMake
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo apt-get install git cmake
|
||||
sudo apt-get install git cmake3
|
||||
|
||||
|
||||
Detect number of threads
|
||||
|
@ -18,7 +18,7 @@ Install Git and CMake
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo apt-get install git cmake
|
||||
sudo apt-get install git cmake3
|
||||
|
||||
|
||||
Detect number of threads
|
||||
|
@ -8,7 +8,7 @@ BRANCH=trunk
|
||||
THREADS=$(grep -c ^processor /proc/cpuinfo)
|
||||
|
||||
cd ~
|
||||
sudo apt-get install subversion
|
||||
sudo apt-get install -y subversion cmake3
|
||||
mkdir llvm
|
||||
cd llvm
|
||||
svn co "http://llvm.org/svn/llvm-project/llvm/${BRANCH}" llvm
|
||||
|
35
utils/prepare-environment/install-gcc.sh
Executable file
35
utils/prepare-environment/install-gcc.sh
Executable file
@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
sudo apt-get install -y curl
|
||||
|
||||
VERSION=$(curl -sSL https://ftpmirror.gnu.org/gcc/ | grep -oE 'gcc-[0-9]+(\.[0-9]+)+' | sort -Vr | head -n1) #'
|
||||
#VERSION=gcc-7.1.0
|
||||
|
||||
VERSION_SHORT=$(echo "$VERSION" | grep -oE '[0-9]')
|
||||
|
||||
echo "Will download ${VERSION} (short version: $VERSION_SHORT)."
|
||||
|
||||
THREADS=$(grep -c ^processor /proc/cpuinfo)
|
||||
|
||||
cd ~
|
||||
|
||||
wget https://ftpmirror.gnu.org/gcc/${VERSION}/${VERSION}.tar.bz2
|
||||
tar xf ${VERSION}.tar.bz2
|
||||
cd ${VERSION}
|
||||
./contrib/download_prerequisites
|
||||
cd ..
|
||||
mkdir gcc-build
|
||||
cd gcc-build
|
||||
../${VERSION}/configure --enable-languages=c,c++
|
||||
make -j $THREADS
|
||||
sudo make install
|
||||
|
||||
sudo ln -s /usr/local/bin/gcc /usr/local/bin/gcc-${VERSION_SHORT}
|
||||
sudo ln -s /usr/local/bin/g++ /usr/local/bin/g++-${VERSION_SHORT}
|
||||
sudo ln -s /usr/local/bin/gcc /usr/local/bin/cc
|
||||
sudo ln -s /usr/local/bin/g++ /usr/local/bin/c++
|
||||
|
||||
hash gcc g++
|
||||
gcc --version
|
Loading…
Reference in New Issue
Block a user