Blender build data
This commit is contained in:
135
blender-build/build_environment/linux/linux_rocky8_setup.sh
Normal file
135
blender-build/build_environment/linux/linux_rocky8_setup.sh
Normal file
@@ -0,0 +1,135 @@
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# This script is part of the official build environment, see wiki page for details.
|
||||
# https://wiki.blender.org/wiki/Building_Blender/Other/Rocky8ReleaseEnvironment
|
||||
|
||||
set -e
|
||||
|
||||
if [ `id -u` -ne 0 ]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Required by: config manager command below to enable powertools.
|
||||
dnf install 'dnf-command(config-manager)'
|
||||
|
||||
# Packages `ninja-build` and `meson` are not available unless CBR or PowerTools repositories are enabled.
|
||||
# See: https://wiki.rockylinux.org/rocky/repo/#notes-on-unlisted-repositories
|
||||
dnf config-manager --set-enabled powertools
|
||||
|
||||
# Required by: epel-release has the patchelf and rubygem-asciidoctor packages
|
||||
dnf install epel-release
|
||||
|
||||
# `yum-config-manager` does not come in the default minimal install,
|
||||
# so make sure it is installed and available.
|
||||
yum -y update
|
||||
yum -y install yum-utils
|
||||
|
||||
# Install all the packages needed for a new tool-chain.
|
||||
#
|
||||
# NOTE: Keep this separate from the packages install, since otherwise
|
||||
# older tool-chain will be installed.
|
||||
yum -y update
|
||||
yum -y install scl-utils
|
||||
yum -y install scl-utils-build
|
||||
|
||||
# Currently this is defined by the VFX platform (CY2023), see: https://vfxplatform.com
|
||||
yum -y install gcc-toolset-11
|
||||
|
||||
# Install packages needed for Blender's dependencies.
|
||||
PACKAGES_FOR_LIBS=(
|
||||
# Used to checkout Blender's code.
|
||||
git
|
||||
git-lfs
|
||||
# Used to checkout Blender's `../lib/` directory.
|
||||
subversion
|
||||
# Used to extract packages.
|
||||
bzip2
|
||||
# Used to extract packages.
|
||||
tar
|
||||
# Blender and some dependencies use `cmake`.
|
||||
cmake3
|
||||
# Apply patches from Blender's: `./build_files/build_environment/patches`
|
||||
patch
|
||||
# Use by `cmake` and `autoconf`.
|
||||
make
|
||||
|
||||
# Required by: `external_nasm` which uses an `autoconf` build-system.
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
|
||||
# Used to set rpath on shared libraries
|
||||
patchelf
|
||||
|
||||
# Builds generated by meson use Ninja for the actual build.
|
||||
ninja-build
|
||||
|
||||
# Required by Blender build option: `WITH_GHOST_WAYLAND`.
|
||||
mesa-libEGL-devel
|
||||
# Required by: Blender & `external_opensubdiv` (probably others).
|
||||
mesa-libGL-devel
|
||||
mesa-libGLU-devel
|
||||
|
||||
# Required by: `external_ispc`.
|
||||
zlib-devel
|
||||
# TODO: dependencies build without this, consider removal.
|
||||
rubygem-asciidoctor
|
||||
# TODO: dependencies build without this, consider removal.
|
||||
wget
|
||||
# Required by: `external_sqlite` as a build-time dependency (needed for the `tclsh` command).
|
||||
tcl
|
||||
# Required by: `external_aom`.
|
||||
# TODO: Blender is already building `external_nasm` which is listed as an alternative to `yasm`.
|
||||
# Why are both needed?
|
||||
yasm
|
||||
|
||||
# NOTE(@campbellbarton): while `python39` is available, the default Python version is 3.6.
|
||||
# This is used for the `python3-mako` package for e.g.
|
||||
# So use the "default" system Python since it means it's most compatible with other packages.
|
||||
python3
|
||||
# Required by: `external_mesa`.
|
||||
python3-mako
|
||||
|
||||
# Required by: `external_mesa`.
|
||||
expat-devel
|
||||
|
||||
# Required by: `external_igc` & `external_osl` as a build-time dependency.
|
||||
bison
|
||||
# Required by: `external_osl` as a build-time dependency.
|
||||
flex
|
||||
|
||||
# Required by: `external_ispc`.
|
||||
ncurses-devel
|
||||
# Required by: `external_ispc` (when building with CLANG).
|
||||
libstdc++-static
|
||||
|
||||
# Required by: `external_ssl` (build dependencies).
|
||||
perl-IPC-Cmd
|
||||
perl-Pod-Html
|
||||
)
|
||||
|
||||
# Additional packages needed for building Blender.
|
||||
PACKAGES_FOR_BLENDER=(
|
||||
# Required by Blender build option: `WITH_GHOST_WAYLAND`.
|
||||
libxkbcommon-devel
|
||||
|
||||
# Required by Blender build option: `WITH_GHOST_X11`.
|
||||
libX11-devel
|
||||
libXcursor-devel
|
||||
libXi-devel
|
||||
libXinerama-devel
|
||||
libXrandr-devel
|
||||
libXt-devel
|
||||
libXxf86vm-devel
|
||||
)
|
||||
|
||||
yum -y install -y ${PACKAGES_FOR_LIBS[@]} ${PACKAGES_FOR_BLENDER[@]}
|
||||
|
||||
# Dependencies for pip (needed for `buildbot-worker`), uses Python3.6.
|
||||
yum -y install python3 python3-pip python3-devel
|
||||
|
||||
# Dependencies for asound.
|
||||
yum -y install -y \
|
||||
alsa-lib-devel pulseaudio-libs-devel
|
||||
74
blender-build/build_environment/linux/make_deps_wrapper.sh
Executable file
74
blender-build/build_environment/linux/make_deps_wrapper.sh
Executable file
@@ -0,0 +1,74 @@
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# This script ensures:
|
||||
# - One dependency is built at a time.
|
||||
# - That dependency uses all available cores.
|
||||
#
|
||||
# Without this, simply calling `make -j$(nproc)` from the `${CMAKE_BUILD_DIR}/deps/`
|
||||
# directory will build many projects at once.
|
||||
#
|
||||
# This is undesirable for the following reasons:
|
||||
#
|
||||
# - The output from projects is mixed together,
|
||||
# making it difficult to track down the cause of a build failure.
|
||||
#
|
||||
# - Larger dependencies such as LLVM can bottleneck the build process,
|
||||
# making it necessary to cancel the build and manually run build commands in each directory.
|
||||
#
|
||||
# - Building many projects at once means canceling (Control-C) can lead to the build being in an undefined state.
|
||||
# It's possible canceling happens as a patch is being applied or files are being copied.
|
||||
# (steps that aren't part of the compilation process where it's typically safe to cancel).
|
||||
|
||||
if [[ -z "$MY_MAKE_CALL_LEVEL" ]]; then
|
||||
export MY_MAKE_CALL_LEVEL=0
|
||||
export MY_MAKEFLAGS=$MAKEFLAGS
|
||||
|
||||
# Extract the jobs argument (`-jN`, `-j N`, `--jobs=N`).
|
||||
add_next=0
|
||||
for i in "$@"; do
|
||||
case $i in
|
||||
-j*)
|
||||
export MY_JOBS_ARG=$i
|
||||
if [ "$MY_JOBS_ARG" = "-j" ]; then
|
||||
add_next=1
|
||||
fi
|
||||
;;
|
||||
--jobs=*)
|
||||
shift # past argument=value
|
||||
MY_JOBS_ARG=$i
|
||||
;;
|
||||
*)
|
||||
if (( add_next == 1 )); then
|
||||
MY_JOBS_ARG="$MY_JOBS_ARG $i"
|
||||
add_next=0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
unset i add_next
|
||||
|
||||
if [[ -z "$MY_JOBS_ARG" ]]; then
|
||||
MY_JOBS_ARG="-j$(nproc)"
|
||||
fi
|
||||
export MY_JOBS_ARG
|
||||
# Support user defined `MAKEFLAGS`.
|
||||
export MAKEFLAGS="$MY_MAKEFLAGS -j1"
|
||||
else
|
||||
export MY_MAKE_CALL_LEVEL=$(( MY_MAKE_CALL_LEVEL + 1 ))
|
||||
if (( MY_MAKE_CALL_LEVEL == 1 )); then
|
||||
# Important to set jobs to 1, otherwise user defined jobs argument is used.
|
||||
export MAKEFLAGS="$MY_MAKEFLAGS -j1"
|
||||
elif (( MY_MAKE_CALL_LEVEL == 2 )); then
|
||||
# This is the level used by each sub-project.
|
||||
export MAKEFLAGS="$MY_MAKEFLAGS $MY_JOBS_ARG"
|
||||
fi
|
||||
# Else leave `MY_MAKEFLAGS` flags as-is, avoids setting a high number of jobs on recursive
|
||||
# calls (which may easily run out of memory). Let the job-server handle the rest.
|
||||
fi
|
||||
|
||||
# Useful for troubleshooting the wrapper.
|
||||
# echo "Call level: $MY_MAKE_CALL_LEVEL, args=$@".
|
||||
|
||||
# Call actual make but ensure recursive calls run via this script.
|
||||
exec make MAKE="$0" "$@"
|
||||
Reference in New Issue
Block a user