From: Tim Serong Date: Fri, 8 Apr 2022 06:24:49 +0000 (+1000) Subject: ceph.spec.in: openSUSE: require gcc11-c++, disable parquet X-Git-Tag: v18.0.0~955^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8ab5d7eea077cb65e472631aa89c6bd607f1dfa0;p=ceph.git ceph.spec.in: openSUSE: require gcc11-c++, disable parquet This commit also explicilty sets the toolset when calling boost's bootstrap.sh, because the latter is only capable of autodetecting gcc if you have an unversioned `g++` in the path, which may not be the case if only gcc11-c++ is installed (the unversioned gcc-c++ package includes the /usr/bin/g++ symlink, but depending on which version of openSUSE we build on, that might point to a different gcc version, so we don't want to use that). Fixes: https://tracker.ceph.com/issues/55237 Signed-off-by: Tim Serong --- diff --git a/ceph.spec.in b/ceph.spec.in index f705b879e8fe..1aa58f4e5fcf 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -188,8 +188,12 @@ BuildRequires: fuse-devel %if 0%{with seastar} && 0%{?rhel} BuildRequires: gcc-toolset-10-gcc-c++ >= 10.3.1-1.2 %else +%if 0%{?suse_version} +BuildRequires: gcc11-c++ +%else BuildRequires: gcc-c++ %endif +%endif %if 0%{with tcmalloc} # libprofiler did not build on ppc64le until 2.7.90 %if 0%{?fedora} || 0%{?rhel} >= 8 @@ -1274,6 +1278,10 @@ env | sort mkdir -p %{_vpath_builddir} pushd %{_vpath_builddir} cmake .. \ +%if 0%{?suse_version} + -DCMAKE_C_COMPILER=gcc-11 \ + -DCMAKE_CXX_COMPILER=g++-11 \ +%endif -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \ -DCMAKE_INSTALL_LIBEXECDIR:PATH=%{_libexecdir} \ @@ -1286,6 +1294,9 @@ cmake .. \ -DWITH_MANPAGE:BOOL=ON \ -DWITH_PYTHON3:STRING=%{python3_version} \ -DWITH_MGR_DASHBOARD_FRONTEND:BOOL=OFF \ +%if 0%{?suse_version} + -DWITH_RADOSGW_SELECT_PARQUET:BOOL=OFF \ +%endif %if 0%{without ceph_test_package} -DWITH_TESTS:BOOL=OFF \ %endif diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake index 4a1aee88d0aa..5fdb6a38ef4c 100644 --- a/cmake/modules/BuildBoost.cmake +++ b/cmake/modules/BuildBoost.cmake @@ -80,10 +80,20 @@ function(do_build_boost root_dir version) endforeach() list_replace(boost_with_libs "unit_test_framework" "test") string(REPLACE ";" "," boost_with_libs "${boost_with_libs}") + + if(CMAKE_CXX_COMPILER_ID STREQUAL GNU) + set(toolset gcc) + elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang) + set(toolset clang) + else() + message(SEND_ERROR "unknown compiler: ${CMAKE_CXX_COMPILER_ID}") + endif() + # build b2 and prepare the project-config.jam for boost set(configure_command ./bootstrap.sh --prefix= - --with-libraries=${boost_with_libs}) + --with-libraries=${boost_with_libs} + --with-toolset=${toolset}) set(b2 ./b2) if(BOOST_J) @@ -93,14 +103,6 @@ function(do_build_boost root_dir version) # suppress all debugging levels for b2 list(APPEND b2 -d0) - if(CMAKE_CXX_COMPILER_ID STREQUAL GNU) - set(toolset gcc) - elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang) - set(toolset clang) - else() - message(SEND_ERROR "unknown compiler: ${CMAKE_CXX_COMPILER_ID}") - endif() - set(user_config ${CMAKE_BINARY_DIR}/user-config.jam) # edit the user-config.jam so b2 will be able to use the specified # toolset and python