forked from bartvdbraak/blender
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.
This commit is contained in:
parent
3d29bbcc38
commit
2c22795dfd
@ -749,11 +749,6 @@ if("${CMAKE_GENERATOR}" MATCHES "Ninja")
|
|||||||
mark_as_advanced(WITH_NINJA_POOL_JOBS)
|
mark_as_advanced(WITH_NINJA_POOL_JOBS)
|
||||||
endif()
|
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.
|
# Installation process.
|
||||||
set(POSTINSTALL_SCRIPT "" CACHE FILEPATH "Run given CMake script after installation process")
|
set(POSTINSTALL_SCRIPT "" CACHE FILEPATH "Run given CMake script after installation process")
|
||||||
mark_as_advanced(POSTINSTALL_SCRIPT)
|
mark_as_advanced(POSTINSTALL_SCRIPT)
|
||||||
@ -1721,12 +1716,6 @@ if(
|
|||||||
string(APPEND CMAKE_C_FLAGS " -std=gnu11")
|
string(APPEND CMAKE_C_FLAGS " -std=gnu11")
|
||||||
endif()
|
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)
|
if(WITH_COMPILER_SHORT_FILE_MACRO)
|
||||||
# Use '-fmacro-prefix-map' for Clang and GCC (MSVC doesn't support this).
|
# 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)
|
add_check_c_compiler_flag(C_PREFIX_MAP_FLAGS C_MACRO_PREFIX_MAP -fmacro-prefix-map=foo=bar)
|
||||||
|
@ -211,7 +211,7 @@ endif
|
|||||||
# Set the LIBDIR, an empty string when not found.
|
# Set the LIBDIR, an empty string when not found.
|
||||||
LIBDIR:=$(wildcard ../lib/${OS_NCASE}_${CPU})
|
LIBDIR:=$(wildcard ../lib/${OS_NCASE}_${CPU})
|
||||||
ifeq (, $(LIBDIR))
|
ifeq (, $(LIBDIR))
|
||||||
LIBDIR:=$(wildcard ../lib/${OS_NCASE}_centos7_${CPU})
|
LIBDIR:=$(wildcard ../lib/${OS_NCASE}_${CPU}_glibc_228)
|
||||||
endif
|
endif
|
||||||
ifeq (, $(LIBDIR))
|
ifeq (, $(LIBDIR))
|
||||||
LIBDIR:=$(wildcard ../lib/${OS_NCASE})
|
LIBDIR:=$(wildcard ../lib/${OS_NCASE})
|
||||||
|
@ -4,10 +4,9 @@
|
|||||||
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/../../cmake/config/blender_release.cmake")
|
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(LIBDIR_NAME "linux_x86_64_glibc_228")
|
||||||
set(WITH_CXX11_ABI OFF CACHE BOOL "" FORCE)
|
|
||||||
|
|
||||||
# ######## Linux-specific build options ########
|
# ######## Linux-specific build options ########
|
||||||
# Options which are specific to Linux-only platforms
|
# Options which are specific to Linux-only platforms
|
||||||
|
@ -10,16 +10,15 @@ if(NOT DEFINED LIBDIR)
|
|||||||
string(TOLOWER ${LIBDIR_NAME} LIBDIR_NAME)
|
string(TOLOWER ${LIBDIR_NAME} LIBDIR_NAME)
|
||||||
set(LIBDIR_NATIVE_ABI ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_NAME})
|
set(LIBDIR_NATIVE_ABI ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_NAME})
|
||||||
|
|
||||||
# Path to precompiled libraries with known CentOS 7 ABI.
|
# Path to precompiled libraries with known glibc 2.28 ABI.
|
||||||
set(LIBDIR_CENTOS7_ABI ${CMAKE_SOURCE_DIR}/../lib/linux_centos7_x86_64)
|
set(LIBDIR_GLIBC228_ABI ${CMAKE_SOURCE_DIR}/../lib/linux_x86_64_glibc_228)
|
||||||
|
|
||||||
# Choose the best suitable libraries.
|
# Choose the best suitable libraries.
|
||||||
if(EXISTS ${LIBDIR_NATIVE_ABI})
|
if(EXISTS ${LIBDIR_NATIVE_ABI})
|
||||||
set(LIBDIR ${LIBDIR_NATIVE_ABI})
|
set(LIBDIR ${LIBDIR_NATIVE_ABI})
|
||||||
set(WITH_LIBC_MALLOC_HOOK_WORKAROUND True)
|
set(WITH_LIBC_MALLOC_HOOK_WORKAROUND True)
|
||||||
elseif(EXISTS ${LIBDIR_CENTOS7_ABI})
|
elseif(EXISTS ${LIBDIR_GLIBC228_ABI})
|
||||||
set(LIBDIR ${LIBDIR_CENTOS7_ABI})
|
set(LIBDIR ${LIBDIR_GLIBC228_ABI})
|
||||||
set(WITH_CXX11_ABI OFF)
|
|
||||||
if(WITH_MEM_JEMALLOC)
|
if(WITH_MEM_JEMALLOC)
|
||||||
# jemalloc provides malloc hooks.
|
# jemalloc provides malloc hooks.
|
||||||
set(WITH_LIBC_MALLOC_HOOK_WORKAROUND False)
|
set(WITH_LIBC_MALLOC_HOOK_WORKAROUND False)
|
||||||
@ -30,7 +29,7 @@ if(NOT DEFINED LIBDIR)
|
|||||||
|
|
||||||
# Avoid namespace pollustion.
|
# Avoid namespace pollustion.
|
||||||
unset(LIBDIR_NATIVE_ABI)
|
unset(LIBDIR_NATIVE_ABI)
|
||||||
unset(LIBDIR_CENTOS7_ABI)
|
unset(LIBDIR_GLIBC228_ABI)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Support restoring this value once pre-compiled libraries have been handled.
|
# Support restoring this value once pre-compiled libraries have been handled.
|
||||||
@ -330,10 +329,8 @@ if(WITH_OPENVDB)
|
|||||||
find_package(OpenVDB)
|
find_package(OpenVDB)
|
||||||
set_and_warn_library_found("OpenVDB" OPENVDB_FOUND WITH_OPENVDB)
|
set_and_warn_library_found("OpenVDB" OPENVDB_FOUND WITH_OPENVDB)
|
||||||
|
|
||||||
if(OPENVDB_FOUND)
|
if(WITH_OPENVDB)
|
||||||
add_bundled_libraries(openvdb/lib)
|
add_bundled_libraries(openvdb/lib)
|
||||||
find_package_wrapper(Blosc)
|
|
||||||
set_and_warn_library_found("Blosc" BLOSC_FOUND WITH_OPENVDB_BLOSC)
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -667,8 +664,7 @@ if(WITH_GHOST_WAYLAND)
|
|||||||
pkg_check_modules(wayland-protocols wayland-protocols>=1.15)
|
pkg_check_modules(wayland-protocols wayland-protocols>=1.15)
|
||||||
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
|
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
|
||||||
else()
|
else()
|
||||||
# CentOS 7 packages have too old a version, a newer version exist in the
|
# Rocky8 packages have too old a version, a newer version exist in the pre-compiled libraries.
|
||||||
# precompiled libraries.
|
|
||||||
find_path(WAYLAND_PROTOCOLS_DIR
|
find_path(WAYLAND_PROTOCOLS_DIR
|
||||||
NAMES unstable/xdg-decoration/xdg-decoration-unstable-v1.xml
|
NAMES unstable/xdg-decoration/xdg-decoration-unstable-v1.xml
|
||||||
PATH_SUFFIXES share/wayland-protocols
|
PATH_SUFFIXES share/wayland-protocols
|
||||||
|
@ -30,7 +30,7 @@ update-code:
|
|||||||
linux-x86_64:
|
linux-x86_64:
|
||||||
branch: trunk
|
branch: trunk
|
||||||
commit_id: HEAD
|
commit_id: HEAD
|
||||||
path: lib/linux_centos7_x86_64
|
path: lib/linux_x86_64_glibc_228
|
||||||
windows-amd64:
|
windows-amd64:
|
||||||
branch: trunk
|
branch: trunk
|
||||||
commit_id: HEAD
|
commit_id: HEAD
|
||||||
|
@ -41,7 +41,7 @@ def parse_arguments() -> argparse.Namespace:
|
|||||||
parser.add_argument("--svn-command", default="svn")
|
parser.add_argument("--svn-command", default="svn")
|
||||||
parser.add_argument("--svn-branch", default=None)
|
parser.add_argument("--svn-branch", default=None)
|
||||||
parser.add_argument("--git-command", default="git")
|
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()
|
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
|
# this script is bundled as part of the precompiled libraries. However it
|
||||||
# is used by the buildbot.
|
# is used by the buildbot.
|
||||||
lib_platform = "win64_vc15"
|
lib_platform = "win64_vc15"
|
||||||
elif args.use_centos_libraries:
|
elif args.use_linux_libraries:
|
||||||
lib_platform = "linux_centos7_x86_64"
|
lib_platform = "linux_x86_64_glibc_228"
|
||||||
else:
|
else:
|
||||||
# No precompiled libraries for Linux.
|
# No precompiled libraries for Linux.
|
||||||
lib_platform = None
|
lib_platform = None
|
||||||
|
@ -860,8 +860,9 @@ if(WITH_CYCLES_DEVICE_ONEAPI)
|
|||||||
else()
|
else()
|
||||||
list(APPEND sycl_compiler_flags -fPIC)
|
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.
|
# 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)
|
list(APPEND sycl_compiler_flags -fhonor-nans)
|
||||||
|
|
||||||
# add $ORIGIN to cycles_kernel_oneapi.so rpath so libsycl.so and
|
# add $ORIGIN to cycles_kernel_oneapi.so rpath so libsycl.so and
|
||||||
|
Loading…
Reference in New Issue
Block a user