[Bf-blender-cvs] [2c22795dfdc] master: Build: upgrade pre-built libraries for Linux

Campbell Barton noreply at git.blender.org
Fri Dec 16 00:49:52 CET 2022


Commit: 2c22795dfdceed35b2c9d95da3f92f4ce9129025
Author: Campbell Barton
Date:   Thu Dec 15 18:09:40 2022 +1100
Branches: master
https://developer.blender.org/rB2c22795dfdceed35b2c9d95da3f92f4ce9129025

Build: upgrade pre-built libraries for Linux

Replace ../lib/linux_centos7_x86_64 with ../lib/linux_x86_64_glibc_228,
built with Rocky8 Linux, compatible with the VFX platform CY2023,
see: T99618.

- Update build-bot configuration.
- Remove unnecessary check for Blosc, this is part of OpenVDB lib now.
- Remove WITH_CXX11_ABI, always use new C++11 ABI now
- Replace centos7 by glibc_228 everywhere

Note that existing builds with cached paths pointing to
"../lib/linux_centos7_x86_64" will need to be updated.

Includes contributions by Brecht.

===================================================================

M	CMakeLists.txt
M	GNUmakefile
M	build_files/buildbot/config/blender_linux.cmake
M	build_files/cmake/platform/platform_unix.cmake
M	build_files/config/pipeline_config.yaml
M	build_files/utils/make_update.py
M	intern/cycles/kernel/CMakeLists.txt

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4de2454cfd8..74bfb23a3a4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -749,11 +749,6 @@ if("${CMAKE_GENERATOR}" MATCHES "Ninja")
   mark_as_advanced(WITH_NINJA_POOL_JOBS)
 endif()
 
-if(UNIX AND NOT APPLE)
-  option(WITH_CXX11_ABI "Use native C++11 ABI of compiler" ON)
-  mark_as_advanced(WITH_CXX11_ABI)
-endif()
-
 # Installation process.
 set(POSTINSTALL_SCRIPT "" CACHE FILEPATH "Run given CMake script after installation process")
 mark_as_advanced(POSTINSTALL_SCRIPT)
@@ -1721,12 +1716,6 @@ if(
   string(APPEND CMAKE_C_FLAGS " -std=gnu11")
 endif()
 
-if(UNIX AND NOT APPLE)
-  if(NOT WITH_CXX11_ABI)
-    string(APPEND PLATFORM_CFLAGS " -D_GLIBCXX_USE_CXX11_ABI=0")
-  endif()
-endif()
-
 if(WITH_COMPILER_SHORT_FILE_MACRO)
   # Use '-fmacro-prefix-map' for Clang and GCC (MSVC doesn't support this).
   add_check_c_compiler_flag(C_PREFIX_MAP_FLAGS C_MACRO_PREFIX_MAP -fmacro-prefix-map=foo=bar)
diff --git a/GNUmakefile b/GNUmakefile
index 439b435f5f4..ba9ee978817 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -211,7 +211,7 @@ endif
 # Set the LIBDIR, an empty string when not found.
 LIBDIR:=$(wildcard ../lib/${OS_NCASE}_${CPU})
 ifeq (, $(LIBDIR))
-	LIBDIR:=$(wildcard ../lib/${OS_NCASE}_centos7_${CPU})
+	LIBDIR:=$(wildcard ../lib/${OS_NCASE}_${CPU}_glibc_228)
 endif
 ifeq (, $(LIBDIR))
 	LIBDIR:=$(wildcard ../lib/${OS_NCASE})
diff --git a/build_files/buildbot/config/blender_linux.cmake b/build_files/buildbot/config/blender_linux.cmake
index 3f3695ed481..ae7849002f7 100644
--- a/build_files/buildbot/config/blender_linux.cmake
+++ b/build_files/buildbot/config/blender_linux.cmake
@@ -4,10 +4,9 @@
 
 include("${CMAKE_CURRENT_LIST_DIR}/../../cmake/config/blender_release.cmake")
 
-message(STATUS "Building in CentOS 7 64bit environment")
+message(STATUS "Building in Rocky 8 Linux 64bit environment")
 
-set(LIBDIR_NAME "linux_centos7_x86_64")
-set(WITH_CXX11_ABI           OFF CACHE BOOL "" FORCE)
+set(LIBDIR_NAME "linux_x86_64_glibc_228")
 
 # ######## Linux-specific build options ########
 # Options which are specific to Linux-only platforms
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index bcc90cef7c2..cfb3ecc564b 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -10,16 +10,15 @@ if(NOT DEFINED LIBDIR)
   string(TOLOWER ${LIBDIR_NAME} LIBDIR_NAME)
   set(LIBDIR_NATIVE_ABI ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_NAME})
 
-  # Path to precompiled libraries with known CentOS 7 ABI.
-  set(LIBDIR_CENTOS7_ABI ${CMAKE_SOURCE_DIR}/../lib/linux_centos7_x86_64)
+  # Path to precompiled libraries with known glibc 2.28 ABI.
+  set(LIBDIR_GLIBC228_ABI ${CMAKE_SOURCE_DIR}/../lib/linux_x86_64_glibc_228)
 
   # Choose the best suitable libraries.
   if(EXISTS ${LIBDIR_NATIVE_ABI})
     set(LIBDIR ${LIBDIR_NATIVE_ABI})
     set(WITH_LIBC_MALLOC_HOOK_WORKAROUND True)
-  elseif(EXISTS ${LIBDIR_CENTOS7_ABI})
-    set(LIBDIR ${LIBDIR_CENTOS7_ABI})
-    set(WITH_CXX11_ABI OFF)
+  elseif(EXISTS ${LIBDIR_GLIBC228_ABI})
+    set(LIBDIR ${LIBDIR_GLIBC228_ABI})
     if(WITH_MEM_JEMALLOC)
       # jemalloc provides malloc hooks.
       set(WITH_LIBC_MALLOC_HOOK_WORKAROUND False)
@@ -30,7 +29,7 @@ if(NOT DEFINED LIBDIR)
 
   # Avoid namespace pollustion.
   unset(LIBDIR_NATIVE_ABI)
-  unset(LIBDIR_CENTOS7_ABI)
+  unset(LIBDIR_GLIBC228_ABI)
 endif()
 
 # Support restoring this value once pre-compiled libraries have been handled.
@@ -330,10 +329,8 @@ if(WITH_OPENVDB)
   find_package(OpenVDB)
   set_and_warn_library_found("OpenVDB" OPENVDB_FOUND WITH_OPENVDB)
 
-  if(OPENVDB_FOUND)
-  add_bundled_libraries(openvdb/lib)
-  find_package_wrapper(Blosc)
-    set_and_warn_library_found("Blosc" BLOSC_FOUND WITH_OPENVDB_BLOSC)
+  if(WITH_OPENVDB)
+    add_bundled_libraries(openvdb/lib)
   endif()
 endif()
 
@@ -667,8 +664,7 @@ if(WITH_GHOST_WAYLAND)
     pkg_check_modules(wayland-protocols wayland-protocols>=1.15)
     pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
   else()
-    # CentOS 7 packages have too old a version, a newer version exist in the
-    # precompiled libraries.
+    # Rocky8 packages have too old a version, a newer version exist in the pre-compiled libraries.
     find_path(WAYLAND_PROTOCOLS_DIR
       NAMES unstable/xdg-decoration/xdg-decoration-unstable-v1.xml
       PATH_SUFFIXES share/wayland-protocols
diff --git a/build_files/config/pipeline_config.yaml b/build_files/config/pipeline_config.yaml
index d344b88f255..653c5eeb3b2 100644
--- a/build_files/config/pipeline_config.yaml
+++ b/build_files/config/pipeline_config.yaml
@@ -30,7 +30,7 @@ update-code:
             linux-x86_64:
                 branch: trunk
                 commit_id: HEAD
-                path: lib/linux_centos7_x86_64
+                path: lib/linux_x86_64_glibc_228
             windows-amd64:
                 branch: trunk
                 commit_id: HEAD
diff --git a/build_files/utils/make_update.py b/build_files/utils/make_update.py
index 93820ee994a..fbadeecd597 100755
--- a/build_files/utils/make_update.py
+++ b/build_files/utils/make_update.py
@@ -41,7 +41,7 @@ def parse_arguments() -> argparse.Namespace:
     parser.add_argument("--svn-command", default="svn")
     parser.add_argument("--svn-branch", default=None)
     parser.add_argument("--git-command", default="git")
-    parser.add_argument("--use-centos-libraries", action="store_true")
+    parser.add_argument("--use-linux-libraries", action="store_true")
     return parser.parse_args()
 
 
@@ -71,8 +71,8 @@ def svn_update(args: argparse.Namespace, release_version: Optional[str]) -> None
         # this script is bundled as part of the precompiled libraries. However it
         # is used by the buildbot.
         lib_platform = "win64_vc15"
-    elif args.use_centos_libraries:
-        lib_platform = "linux_centos7_x86_64"
+    elif args.use_linux_libraries:
+        lib_platform = "linux_x86_64_glibc_228"
     else:
         # No precompiled libraries for Linux.
         lib_platform = None
diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt
index 22c52a5802f..dd0de5120fd 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -860,8 +860,9 @@ if(WITH_CYCLES_DEVICE_ONEAPI)
   else()
     list(APPEND sycl_compiler_flags -fPIC)
 
-    # We avoid getting __FAST_MATH__ to be defined when building on CentOS 7 until the compilation
+    # We avoid getting __FAST_MATH__ to be defined when building on CentOS-7 until the compilation
     # crash it triggers at either AoT or JIT stages gets fixed.
+    # TODO: check if this is still needed on Rocky-8.
     list(APPEND sycl_compiler_flags -fhonor-nans)
 
     # add $ORIGIN to cycles_kernel_oneapi.so rpath so libsycl.so and



More information about the Bf-blender-cvs mailing list