Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build environment script for ubuntu 20.04 #344

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
set(CMAKE_DEBUG_POSTFIX "")
endif ()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")

MESSAGE(STATUS "C++ Compilation flags: " ${CMAKE_CXX_FLAGS})
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc")

Expand Down
69 changes: 69 additions & 0 deletions scripts/infinity-deps-ubuntu2004.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/usr/bin/env bash

echo
echo "running script $0"
echo "current working directory : $PWD"

echo
echo 'step [1/9] : sudo apt update && sudo apt install -y git wget unzip software-properties-common'
echo
sudo apt update && sudo apt install -y git wget unzip software-properties-common

echo
echo 'step [2/9] : download cmake-3.28.1'
echo 'command: wget https://cmake.org/files/v3.28/cmake-3.28.1-linux-x86_64.tar.gz'
echo
wget https://cmake.org/files/v3.28/cmake-3.28.1-linux-x86_64.tar.gz

echo
echo 'step [3/9] : install cmake-3.28.1 into /usr/local/bin and /usr/local/share'
echo 'command: tar zxvf cmake-3.28.1-linux-x86_64.tar.gz'
echo 'command: sudo cp -rf cmake-3.28.1-linux-x86_64/bin/* /usr/local/bin && sudo cp -rf cmake-3.28.1-linux-x86_64/share/* /usr/local/share && rm -rf cmake-3.28.1-linux-x86_64'
echo
tar zxvf cmake-3.28.1-linux-x86_64.tar.gz
sudo cp -rf cmake-3.28.1-linux-x86_64/bin/* /usr/local/bin && sudo cp -rf cmake-3.28.1-linux-x86_64/share/* /usr/local/share && rm -rf cmake-3.28.1-linux-x86_64

echo
echo 'step [4/9] : download ninja-1.11.1'
echo 'command: wget https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip'
echo
wget https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip

echo
echo 'step [5/9] : install ninja-1.11.1 into /usr/local/bin'
echo 'command: unzip ninja-linux.zip && sudo cp ninja /usr/local/bin && rm ninja'
echo
unzip ninja-linux.zip && sudo cp ninja /usr/local/bin && rm ninja

echo
echo 'step [6/9] : add apt source for llvm-17'
echo 'command: sudo echo -e "deb https://apt.llvm.org/focal/ llvm-toolchain-focal-17 main" > /etc/apt/sources.list.d/llvm17.list'
echo 'command: wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc'
echo
sudo echo -e "deb https://apt.llvm.org/focal/ llvm-toolchain-focal-17 main" > /etc/apt/sources.list.d/llvm17.list
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc

echo
echo 'step [7/9] : add apt source for g++-13 gcc-13 libstdc++-13-dev libboost1.81-dev liburing-dev'
echo 'command: sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test'
echo 'command: sudo add-apt-repository -y ppa:mhier/libboost-latest'
echo 'command: sudo add-apt-repository -y ppa:rhansen/qemu'
echo
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo add-apt-repository -y ppa:mhier/libboost-latest
sudo add-apt-repository -y ppa:rhansen/qemu

echo
echo "step [8/9] : sudo apt update && sudo apt install -y g++-13 clang-17 clang-tools-17 flex libboost1.81-dev liblz4-dev libevent-dev liburing-dev libthrift-dev"
echo
sudo apt update && sudo apt install -y g++-13 clang-17 clang-tools-17 flex libboost1.81-dev liblz4-dev libevent-dev liburing-dev libthrift-dev

echo
echo 'step [9/9] : create a symbolic link for clang-scan-deps-17'
echo 'command: sudo ln -s /usr/lib/llvm-17/bin/clang-scan-deps /usr/bin/clang-scan-deps'
echo
sudo ln -s /usr/lib/llvm-17/bin/clang-scan-deps /usr/bin/clang-scan-deps

echo
echo "script $0 finished"
echo
18 changes: 9 additions & 9 deletions scripts/infinity-deps-ubuntu2204.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ wget https://cmake.org/files/v3.28/cmake-3.28.1-linux-x86_64.tar.gz
echo
echo 'step [3/9] : install cmake-3.28.1 into /usr/local/bin and /usr/local/share'
echo 'command: tar zxvf cmake-3.28.1-linux-x86_64.tar.gz'
echo 'command: cp -rf cmake-3.28.1-linux-x86_64/bin/* /usr/local/bin && cp -rf cmake-3.28.1-linux-x86_64/share/* /usr/local/share && rm -rf cmake-3.28.1-linux-x86_64'
echo 'command: sudo cp -rf cmake-3.28.1-linux-x86_64/bin/* /usr/local/bin && sudo cp -rf cmake-3.28.1-linux-x86_64/share/* /usr/local/share && rm -rf cmake-3.28.1-linux-x86_64'
echo
tar zxvf cmake-3.28.1-linux-x86_64.tar.gz
cp -rf cmake-3.28.1-linux-x86_64/bin/* /usr/local/bin && cp -rf cmake-3.28.1-linux-x86_64/share/* /usr/local/share && rm -rf cmake-3.28.1-linux-x86_64
sudo cp -rf cmake-3.28.1-linux-x86_64/bin/* /usr/local/bin && sudo cp -rf cmake-3.28.1-linux-x86_64/share/* /usr/local/share && rm -rf cmake-3.28.1-linux-x86_64

echo
echo 'step [4/9] : download ninja-1.11.1'
Expand All @@ -31,16 +31,16 @@ wget https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.

echo
echo 'step [5/9] : install ninja-1.11.1 into /usr/local/bin'
echo 'command: unzip ninja-linux.zip && cp ninja /usr/local/bin && rm ninja ninja-linux.zip'
echo 'command: unzip ninja-linux.zip && sudo cp ninja /usr/local/bin && rm ninja'
echo
unzip ninja-linux.zip && cp ninja /usr/local/bin && rm ninja ninja-linux.zip
unzip ninja-linux.zip && sudo cp ninja /usr/local/bin && rm ninja

echo
echo 'step [6/9] : add apt source for llvm-17'
echo 'command: echo -e "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" > /etc/apt/sources.list.d/llvm17.list'
echo 'command: sudo echo -e "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" > /etc/apt/sources.list.d/llvm17.list'
echo 'command: wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc'
echo
echo -e "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" > /etc/apt/sources.list.d/llvm17.list
sudo echo -e "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" > /etc/apt/sources.list.d/llvm17.list
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc

echo
Expand All @@ -58,10 +58,10 @@ sudo apt update && sudo apt install -y g++-13 clang-17 clang-tools-17 flex libbo

echo
echo 'step [9/9] : create a symbolic link for clang-scan-deps-17'
echo 'command: ln -s /usr/lib/llvm-17/bin/clang-scan-deps /usr/bin/clang-scan-deps'
echo 'command: sudo ln -s /usr/lib/llvm-17/bin/clang-scan-deps /usr/bin/clang-scan-deps'
echo
ln -s /usr/lib/llvm-17/bin/clang-scan-deps /usr/bin/clang-scan-deps
sudo ln -s /usr/lib/llvm-17/bin/clang-scan-deps /usr/bin/clang-scan-deps

echo
echo "script $0 finished successfully!"
echo "script $0 finished"
echo
10 changes: 5 additions & 5 deletions scripts/infinity-deps-ubuntu2310.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ wget https://cmake.org/files/v3.28/cmake-3.28.1-linux-x86_64.tar.gz
echo
echo 'step [3/5] : install cmake-3.28.1 into /usr/local/bin and /usr/local/share'
echo 'command: tar zxvf cmake-3.28.1-linux-x86_64.tar.gz'
echo 'command: cp -rf cmake-3.28.1-linux-x86_64/bin/* /usr/local/bin && cp -rf cmake-3.28.1-linux-x86_64/share/* /usr/local/share && rm -rf cmake-3.28.1-linux-x86_64'
echo 'command: sudo cp -rf cmake-3.28.1-linux-x86_64/bin/* /usr/local/bin && sudo cp -rf cmake-3.28.1-linux-x86_64/share/* /usr/local/share && rm -rf cmake-3.28.1-linux-x86_64'
echo
tar zxvf cmake-3.28.1-linux-x86_64.tar.gz
cp -rf cmake-3.28.1-linux-x86_64/bin/* /usr/local/bin && cp -rf cmake-3.28.1-linux-x86_64/share/* /usr/local/share && rm -rf cmake-3.28.1-linux-x86_64
sudo cp -rf cmake-3.28.1-linux-x86_64/bin/* /usr/local/bin && sudo cp -rf cmake-3.28.1-linux-x86_64/share/* /usr/local/share && rm -rf cmake-3.28.1-linux-x86_64

echo
echo 'step [4/5] : sudo apt install -y ninja-build clang-17 clang-tools-17 flex libboost1.81-dev liblz4-dev libevent-dev liburing-dev libthrift-dev'
Expand All @@ -30,10 +30,10 @@ sudo apt install -y ninja-build clang-17 clang-tools-17 flex libboost1.81-dev li

echo
echo 'step [5/5] : create a symbolic link for clang-scan-deps-17'
echo 'command: ln -s /usr/lib/llvm-17/bin/clang-scan-deps /usr/bin/clang-scan-deps'
echo 'command: sudo ln -s /usr/lib/llvm-17/bin/clang-scan-deps /usr/bin/clang-scan-deps'
echo
ln -s /usr/lib/llvm-17/bin/clang-scan-deps /usr/bin/clang-scan-deps
sudo ln -s /usr/lib/llvm-17/bin/clang-scan-deps /usr/bin/clang-scan-deps

echo
echo "script $0 finished successfully!"
echo "script $0 finished"
echo
1 change: 1 addition & 0 deletions third_party/iresearch/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ target_link_libraries(iresearch
${SIMD_LIBRARY_STATIC}
text
${LIBURING}
${CMAKE_DL_LIBS}
)

if (CLANG_TIDY_EXE)
Expand Down
Loading