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

Update pinned build versions for boost and llvm-src #1118

Merged
merged 9 commits into from
May 2, 2023
Merged
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ set(Boost_USE_MULTITHREADED ON)
set( Boost_USE_STATIC_LIBS ON CACHE STRING "ON or OFF" )
# Most boost deps get implictly picked up via fc, as just about everything links to fc. In addition we pick up
# the pthread dependency through fc.
find_package(Boost 1.70 REQUIRED COMPONENTS program_options unit_test_framework system)
find_package(Boost 1.71 REQUIRED COMPONENTS program_options unit_test_framework system)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, Boost 1.71 does not work with C++20 at least for clang++16. Does this need to be 1.74 at least?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed, when we enable c++20 we're going to need to do.. something else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we'll have to change the boost minimum version when we enable c++20.
I personally would like us to use boost 1.82 always. Maybe add boost as a submodule (I talked with Areg about it already).
I think we would benefit to use a common version of boost regardless of how (pinned vs unpinned) or on what system leap is built on.

This would also allow us to use newer libraries such as boost::json.


if( APPLE AND UNIX )
# Apple Specific Options Here
Expand Down
89 changes: 0 additions & 89 deletions scripts/0001-beast-fix-moved-from-executor.patch

This file was deleted.

11 changes: 5 additions & 6 deletions scripts/pinned_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ DEP_DIR="$(realpath "$1")"
LEAP_DIR="$2"
JOBS="$3"
CLANG_VER=11.0.1
BOOST_VER=1.70.0
LLVM_VER=7.1.0
BOOST_VER=1.82.0
LLVM_VER=11.0.1
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";
START_DIR="$(pwd)"

Expand Down Expand Up @@ -107,11 +107,10 @@ install_boost() {
if [ ! -d "${BOOST_DIR}" ]; then
echo "Installing Boost ${BOOST_VER} @ ${BOOST_DIR}"
try wget -O "boost_${BOOST_VER//\./_}.tar.gz" "https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VER}/source/boost_${BOOST_VER//\./_}.tar.gz"
try tar --transform="s:^boost_${BOOST_VER//\./_}:boost_${BOOST_VER//\./_}patched:" -xvzf "boost_${BOOST_VER//\./_}.tar.gz" -C "${DEP_DIR}"
try tar -xvzf "boost_${BOOST_VER//\./_}.tar.gz" -C "${DEP_DIR}"
pushdir "${BOOST_DIR}"
patch -p1 < "${SCRIPT_DIR}/0001-beast-fix-moved-from-executor.patch"
try ./bootstrap.sh -with-toolset=clang --prefix="${BOOST_DIR}/bin"
./b2 toolset=clang cxxflags="-stdlib=libc++ -D__STRICT_ANSI__ -nostdinc++ -I\${CLANG_DIR}/include/c++/v1 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIE" linkflags='-stdlib=libc++ -pie' link=static threading=multi --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j "${JOBS}" install
./b2 toolset=clang cxxflags="-stdlib=libc++ -D__STRICT_ANSI__ -nostdinc++ -I\${CLANG_DIR}/include/c++/v1 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIE" linkflags='-stdlib=libc++ -pie' link=static threading=multi --with-iostreams --with-date_time --with-system --with-program_options --with-chrono --with-test -q -j "${JOBS}" install
popdir "${DEP_DIR}"
rm "boost_${BOOST_VER//\./_}.tar.gz"
fi
Expand All @@ -122,7 +121,7 @@ pushdir "${DEP_DIR}"

install_clang "${DEP_DIR}/clang-${CLANG_VER}"
install_llvm "${DEP_DIR}/llvm-${LLVM_VER}"
install_boost "${DEP_DIR}/boost_${BOOST_VER//\./_}patched"
install_boost "${DEP_DIR}/boost_${BOOST_VER//\./_}"

# go back to the directory where the script starts
popdir "${START_DIR}"
Expand Down