]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.spec.in: openSUSE: require gcc11-c++, disable parquet 45845/head
authorTim Serong <tserong@suse.com>
Fri, 8 Apr 2022 06:24:49 +0000 (16:24 +1000)
committerTim Serong <tserong@suse.com>
Fri, 29 Apr 2022 05:13:20 +0000 (15:13 +1000)
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 <tserong@suse.com>
ceph.spec.in
cmake/modules/BuildBoost.cmake

index f705b879e8fe2d6a69320a22bcd46b1bf2d26c62..1aa58f4e5fcfc45dfa78c7bc59551b370b510a4d 100644 (file)
@@ -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
index 4a1aee88d0aa23c126579b0c7d69d266d083bb55..5fdb6a38ef4cf78ffbfc53ca71c6eb92bb1441d0 100644 (file)
@@ -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=<INSTALL_DIR>
-    --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