From 92dd2f977860ab3f11475429c8167cd884c543ef Mon Sep 17 00:00:00 2001 From: Michael Oliver Date: Fri, 22 Nov 2024 08:50:35 -0800 Subject: [PATCH 1/9] build script for rocky Signed-off-by: Michael Oliver --- docs/build_guides/build_rocky_linux_9_5.sh | 260 +++++++++++++++++++++ 1 file changed, 260 insertions(+) create mode 100644 docs/build_guides/build_rocky_linux_9_5.sh diff --git a/docs/build_guides/build_rocky_linux_9_5.sh b/docs/build_guides/build_rocky_linux_9_5.sh new file mode 100644 index 000000000..5fced1b6b --- /dev/null +++ b/docs/build_guides/build_rocky_linux_9_5.sh @@ -0,0 +1,260 @@ +## Rocky Linux 9.x +#[Download](https://rockylinux.org/download "Download") + +MAKE_JOBS=8 +TMP_XSTUDIO_BUILD_DIR=${HOME}/tmp_build_xstudio +VER_XSTUDIO=main + +VER_ACTOR=0.18.4 +# VER_ACTOR=0.19.6 +# VER_ACTOR=1.0.2 + +VER_AUTOCONF=2.72 + +VER_FDK_AAC=latest + +VER_FFMPEG=5.1.6 +# VER_FFMPEG=6.1.2 + +VER_FMTLIB=8.0.1 +# VER_FMTLIB=11.0.2 + +VER_libGLEW=2.1.0 +#VER_libGLEW=2.2.0 + +VER_NASM=2.16.03 + +VER_NLOHMANN=3.11.2 +#VER_NLOHMANN=3.11.3 + +VER_OCIO2=2.2.0 +#VER_OCIO2=2.4.0 + +VER_OPENEXR=RB-3.1 +#VER_OPENEXR=RB-3.3 + +VER_OpenTimelineIO=0.17.0 + +VER_PYTHON=3.9 + +VER_SPDLOG=1.9.2 +# VER_SPDLOG=1.15.0 + +VER_x264=stable + +VER_x265=4.0 + +VER_YASM=1.3.0 + +mkdir -p ${TMP_XSTUDIO_BUILD_DIR} + +### Distro installs +sudo dnf config-manager --set-enabled crb +sudo dnf update -y +sudo dnf groupinstall "Development Tools" -y +sudo dnf install wget git cmake python-devel pybind11-devel -y +sudo dnf install alsa-lib-devel pulseaudio-libs-devel -y +sudo dnf install freeglut-devel libjpeg-devel libuuid-devel -y +sudo dnf install doxygen python3-sphinx -y +sudo dnf install opus-devel libvpx-devel openjpeg2-devel lame-devel -y +sudo dnf install qt5 qt5-devel -y +sudo dnf install libXmu-devel libXi-devel libGL-devel -y +pip install --user sphinx_rtd_theme breathe + + +### pybind11 +# cd ${TMP_XSTUDIO_BUILD_DIR} +# git clone https://github.com/pybind/pybind11.git +# cd pybind11 +# sudo python setup.py install +# cd ${TMP_XSTUDIO_BUILD_DIR} + +### Qt6 +# sudo dnf install epel-release -y +# sudo dnf install qt6-qtbase-devel -y + +### Local installs +#### libGLEW +cd ${TMP_XSTUDIO_BUILD_DIR} +wget https://github.com/nigels-com/glew/releases/download/glew-${VER_libGLEW}/glew-${VER_libGLEW}.tgz +tar -xf glew-${VER_libGLEW}.tgz +cd glew-${VER_libGLEW} +make -j${MAKE_JOBS} +sudo make install +cd ${TMP_XSTUDIO_BUILD_DIR} + +#### NLOHMANN JSON +cd ${TMP_XSTUDIO_BUILD_DIR} +wget -O json-v${VER_NLOHMANN}.tar.gz https://github.com/nlohmann/json/archive/refs/tags/v${VER_NLOHMANN}.tar.gz +tar -xf json-v${VER_NLOHMANN}.tar.gz +mkdir json-${VER_NLOHMANN}/build +cd json-${VER_NLOHMANN}/build +cmake .. -DJSON_BuildTests=Off +make -j${MAKE_JOBS} +sudo make install +cd ${TMP_XSTUDIO_BUILD_DIR} + +#### OpenEXR +cd ${TMP_XSTUDIO_BUILD_DIR} +git clone https://github.com/AcademySoftwareFoundation/openexr.git +cd openexr/ +git checkout ${VER_OPENEXR} +mkdir build +cd build +cmake .. -DOPENEXR_INSTALL_TOOLS=Off -DBUILD_TESTING=Off +make -j${MAKE_JOBS} +sudo make install +cd ${TMP_XSTUDIO_BUILD_DIR} + +#### ActorFramework +cd ${TMP_XSTUDIO_BUILD_DIR} +wget -O actor-${VER_ACTOR}.tar.gz https://github.com/actor-framework/actor-framework/archive/refs/tags/${VER_ACTOR}.tar.gz +tar -xf actor-${VER_ACTOR}.tar.gz +cd actor-framework-${VER_ACTOR} +./configure +cd build +make -j${MAKE_JOBS} +sudo make install +cd ${TMP_XSTUDIO_BUILD_DIR} + +#### OCIO2 +cd ${TMP_XSTUDIO_BUILD_DIR} +wget -O ocio-v${VER_OCIO2}.tar.gz https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/refs/tags/v${VER_OCIO2}.tar.gz +tar -xf ocio-v${VER_OCIO2}.tar.gz +cd OpenColorIO-${VER_OCIO2}/ +mkdir build +cd build +cmake -DOCIO_BUILD_APPS=OFF -DOCIO_BUILD_TESTS=OFF -DOCIO_BUILD_GPU_TESTS=OFF ../ +make -j${MAKE_JOBS} +sudo make install +cd ${TMP_XSTUDIO_BUILD_DIR} + +#### SPDLOG +cd ${TMP_XSTUDIO_BUILD_DIR} +wget -O spd-v${VER_SPDLOG}.tar.gz https://github.com/gabime/spdlog/archive/refs/tags/v${VER_SPDLOG}.tar.gz +tar -xf spd-v${VER_SPDLOG}.tar.gz +cd spdlog-${VER_SPDLOG} +mkdir build +cd build +cmake .. -DSPDLOG_BUILD_SHARED=On +make -j${MAKE_JOBS} +sudo make install +cd ${TMP_XSTUDIO_BUILD_DIR} + +#### FMTLIB +cd ${TMP_XSTUDIO_BUILD_DIR} +wget -O fmt-${VER_FMTLIB}.tar.gz https://github.com/fmtlib/fmt/archive/refs/tags/${VER_FMTLIB}.tar.gz +tar -xf fmt-${VER_FMTLIB}.tar.gz +cd fmt-${VER_FMTLIB}/ +mkdir build +cd build +cmake .. -DCMAKE_POSITION_INDEPENDENT_CODE=1 -DFMT_DOC=Off -DFMT_TEST=Off +make -j${MAKE_JOBS} +sudo make install +cd ${TMP_XSTUDIO_BUILD_DIR} + +#### OpenTimelineIO +cd ${TMP_XSTUDIO_BUILD_DIR} +git clone https://github.com/AcademySoftwareFoundation/OpenTimelineIO.git +cd OpenTimelineIO +git checkout tags/v${VER_OpenTimelineIO} -b v${VER_OpenTimelineIO} +mkdir build +cd build +cmake -DOTIO_PYTHON_INSTALL=ON -DOTIO_DEPENDENCIES_INSTALL=OFF -DOTIO_FIND_IMATH=ON .. +make -j${MAKE_JOBS} +sudo make install +cd ${TMP_XSTUDIO_BUILD_DIR} + +#### FFMPEG AND DEPS + +##### Autoconf +cd ${TMP_XSTUDIO_BUILD_DIR} +wget https://mirror.us-midwest-1.nexcess.net/gnu/autoconf/autoconf-${VER_AUTOCONF}.tar.gz +tar -xf autoconf-${VER_AUTOCONF}.tar.gz +cd autoconf-${VER_AUTOCONF} +./configure +make -j${MAKE_JOBS} +sudo make install +cd ${TMP_XSTUDIO_BUILD_DIR} + +##### NASM +cd ${TMP_XSTUDIO_BUILD_DIR} +git clone https://github.com/netwide-assembler/nasm.git +cd nasm +git checkout tags/nasm-${VER_NASM} -b nasm-${VER_NASM} +./autogen.sh +./configure +make -j${MAKE_JOBS} +sudo make install +cd ${TMP_XSTUDIO_BUILD_DIR} + +# ##### YASM +# cd ${TMP_XSTUDIO_BUILD_DIR} +# git clone https://github.com/yasm/yasm.git +# cd yasm +# git checkout tags/v${VER_YASM} -b v${VER_YASM} +# ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" +# make -j $JOBS +# sudo make install +# cd ${TMP_XSTUDIO_BUILD_DIR} +sudo dnf --enablerepo=devel install yasm yasm-devel -y + +##### x264 +cd ${TMP_XSTUDIO_BUILD_DIR} +git clone --branch ${VER_x264} --depth 1 https://code.videolan.org/videolan/x264.git +cd x264/ +./configure --enable-shared +make -j $JOBS +sudo make install +cd ${TMP_XSTUDIO_BUILD_DIR} + +##### x265 +cd ${TMP_XSTUDIO_BUILD_DIR} +wget https://bitbucket.org/multicoreware/x265_git/downloads/x265_${VER_x265}.tar.gz +tar -xf x265_${VER_x265}.tar.gz +cd x265_${VER_x265}/build/linux/ +cmake -G "Unix Makefiles" ../../source +make -j $JOBS +sudo make install +cd ${TMP_XSTUDIO_BUILD_DIR} + +##### FDK-AAC +cd ${TMP_XSTUDIO_BUILD_DIR} +git clone --depth 1 https://github.com/mstorsjo/fdk-aac +cd fdk-aac +autoreconf -fiv +./configure +make -j $JOBS +sudo make install +cd ${TMP_XSTUDIO_BUILD_DIR} + +##### FFMPEG +cd ${TMP_XSTUDIO_BUILD_DIR} +wget https://ffmpeg.org/releases/ffmpeg-${VER_FFMPEG}.tar.bz2 +tar -xf ffmpeg-${VER_FFMPEG}.tar.bz2 +cd ffmpeg-${VER_FFMPEG}/ +export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH +./configure --extra-libs=-lpthread --extra-libs=-lm --enable-gpl \ + --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame \ + --enable-libopus --enable-libvpx --enable-libx264 --enable-libx265 \ + --enable-shared --enable-nonfree +make -j $JOBS +sudo make install +cd ${TMP_XSTUDIO_BUILD_DIR} + +### xStudio +cd ${TMP_XSTUDIO_BUILD_DIR} +git clone https://github.com/AcademySoftwareFoundation/xstudio.git +cd xstudio +git checkout ${VER_XSTUDIO} +export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib64/pkgconfig +mkdir build +cd build +cmake .. -DBUILD_DOCS=Off +make -j${MAKE_JOBS} + +export QV4_FORCE_INTERPRETER=1 +export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 +export PYTHONPATH=./bin/python/lib/python${VER_PYTHON}/site-packages:/home/xstudio/.local/lib/python${VER_PYTHON}/site-packages: + +./bin/xstudio.bin From a284f252161c46e153b821c5bbd1e8969c01b8ab Mon Sep 17 00:00:00 2001 From: Michael Oliver Date: Fri, 22 Nov 2024 09:21:28 -0800 Subject: [PATCH 2/9] whoops, missed a few make updates Signed-off-by: Michael Oliver --- docs/build_guides/build_rocky_linux_9_5.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/build_guides/build_rocky_linux_9_5.sh b/docs/build_guides/build_rocky_linux_9_5.sh index 5fced1b6b..f6912dd8e 100644 --- a/docs/build_guides/build_rocky_linux_9_5.sh +++ b/docs/build_guides/build_rocky_linux_9_5.sh @@ -204,7 +204,7 @@ cd ${TMP_XSTUDIO_BUILD_DIR} git clone --branch ${VER_x264} --depth 1 https://code.videolan.org/videolan/x264.git cd x264/ ./configure --enable-shared -make -j $JOBS +make -j${MAKE_JOBS} sudo make install cd ${TMP_XSTUDIO_BUILD_DIR} @@ -214,7 +214,7 @@ wget https://bitbucket.org/multicoreware/x265_git/downloads/x265_${VER_x265}.tar tar -xf x265_${VER_x265}.tar.gz cd x265_${VER_x265}/build/linux/ cmake -G "Unix Makefiles" ../../source -make -j $JOBS +make -j${MAKE_JOBS} sudo make install cd ${TMP_XSTUDIO_BUILD_DIR} @@ -224,7 +224,7 @@ git clone --depth 1 https://github.com/mstorsjo/fdk-aac cd fdk-aac autoreconf -fiv ./configure -make -j $JOBS +make -j${MAKE_JOBS} sudo make install cd ${TMP_XSTUDIO_BUILD_DIR} @@ -238,7 +238,7 @@ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame \ --enable-libopus --enable-libvpx --enable-libx264 --enable-libx265 \ --enable-shared --enable-nonfree -make -j $JOBS +make -j${MAKE_JOBS} sudo make install cd ${TMP_XSTUDIO_BUILD_DIR} @@ -257,4 +257,5 @@ export QV4_FORCE_INTERPRETER=1 export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 export PYTHONPATH=./bin/python/lib/python${VER_PYTHON}/site-packages:/home/xstudio/.local/lib/python${VER_PYTHON}/site-packages: +cd ${TMP_XSTUDIO_BUILD_DIR}/xstudio/build ./bin/xstudio.bin From ebd1e3498439e936cb1d4def39c7c1d4940afef6 Mon Sep 17 00:00:00 2001 From: Michael Oliver Date: Fri, 22 Nov 2024 11:31:23 -0800 Subject: [PATCH 3/9] openexr bump to 3.3--signoff Signed-off-by: Michael Oliver --- docs/build_guides/build_rocky_linux_9_5.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/build_guides/build_rocky_linux_9_5.sh b/docs/build_guides/build_rocky_linux_9_5.sh index f6912dd8e..0756f599d 100644 --- a/docs/build_guides/build_rocky_linux_9_5.sh +++ b/docs/build_guides/build_rocky_linux_9_5.sh @@ -30,8 +30,7 @@ VER_NLOHMANN=3.11.2 VER_OCIO2=2.2.0 #VER_OCIO2=2.4.0 -VER_OPENEXR=RB-3.1 -#VER_OPENEXR=RB-3.3 +VER_OPENEXR=RB-3.3 VER_OpenTimelineIO=0.17.0 From f425eca6cd35292eb436dccd2de278e7d16acff4 Mon Sep 17 00:00:00 2001 From: Michael Oliver Date: Fri, 22 Nov 2024 11:34:50 -0800 Subject: [PATCH 4/9] add launch shortcut--signoff Signed-off-by: Michael Oliver --- docs/build_guides/build_rocky_linux_9_5.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/build_guides/build_rocky_linux_9_5.sh b/docs/build_guides/build_rocky_linux_9_5.sh index 0756f599d..cff39d689 100644 --- a/docs/build_guides/build_rocky_linux_9_5.sh +++ b/docs/build_guides/build_rocky_linux_9_5.sh @@ -251,10 +251,16 @@ mkdir build cd build cmake .. -DBUILD_DOCS=Off make -j${MAKE_JOBS} +cd ${TMP_XSTUDIO_BUILD_DIR} +#Create launch shortcut +cd ${TMP_XSTUDIO_BUILD_DIR} +cat << EOF > start_xstudio.sh export QV4_FORCE_INTERPRETER=1 export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 export PYTHONPATH=./bin/python/lib/python${VER_PYTHON}/site-packages:/home/xstudio/.local/lib/python${VER_PYTHON}/site-packages: cd ${TMP_XSTUDIO_BUILD_DIR}/xstudio/build ./bin/xstudio.bin +EOF +chmod +x start_xstudio.sh From 24e2c48bb6ee5bea0207ed59a7b58b705f63bec5 Mon Sep 17 00:00:00 2001 From: Michael Oliver Date: Fri, 22 Nov 2024 12:13:23 -0800 Subject: [PATCH 5/9] formatting changes Formatting changes Signed-off-by: Michael Oliver --- docs/build_guides/build_rocky_linux_9_5.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/build_guides/build_rocky_linux_9_5.sh b/docs/build_guides/build_rocky_linux_9_5.sh index cff39d689..34f3aa92e 100644 --- a/docs/build_guides/build_rocky_linux_9_5.sh +++ b/docs/build_guides/build_rocky_linux_9_5.sh @@ -60,19 +60,19 @@ sudo dnf install qt5 qt5-devel -y sudo dnf install libXmu-devel libXi-devel libGL-devel -y pip install --user sphinx_rtd_theme breathe +#### Qt6 +# sudo dnf install epel-release -y +# sudo dnf install qt6-qtbase-devel -y + +### Local installs -### pybind11 +#### pybind11 # cd ${TMP_XSTUDIO_BUILD_DIR} # git clone https://github.com/pybind/pybind11.git # cd pybind11 # sudo python setup.py install # cd ${TMP_XSTUDIO_BUILD_DIR} -### Qt6 -# sudo dnf install epel-release -y -# sudo dnf install qt6-qtbase-devel -y - -### Local installs #### libGLEW cd ${TMP_XSTUDIO_BUILD_DIR} wget https://github.com/nigels-com/glew/releases/download/glew-${VER_libGLEW}/glew-${VER_libGLEW}.tgz @@ -241,7 +241,7 @@ make -j${MAKE_JOBS} sudo make install cd ${TMP_XSTUDIO_BUILD_DIR} -### xStudio +##### xStudio cd ${TMP_XSTUDIO_BUILD_DIR} git clone https://github.com/AcademySoftwareFoundation/xstudio.git cd xstudio From d6a6c602745bb2a89f3b019f15436475c9012048 Mon Sep 17 00:00:00 2001 From: Michael Oliver Date: Fri, 22 Nov 2024 12:13:41 -0800 Subject: [PATCH 6/9] create launch shortcut Create a launch shortcut Signed-off-by: Michael Oliver --- docs/build_guides/build_rocky_linux_9_5.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/build_guides/build_rocky_linux_9_5.sh b/docs/build_guides/build_rocky_linux_9_5.sh index 34f3aa92e..1220e58fd 100644 --- a/docs/build_guides/build_rocky_linux_9_5.sh +++ b/docs/build_guides/build_rocky_linux_9_5.sh @@ -253,7 +253,13 @@ cmake .. -DBUILD_DOCS=Off make -j${MAKE_JOBS} cd ${TMP_XSTUDIO_BUILD_DIR} -#Create launch shortcut +##### Ensure /usr/local/lib is in ldconf +cat << EOF | sudo tee /etc/ld.so.conf.d/usr-local-lib.conf +/usr/local/lib +EOF +sudo ldconfig + +##### Create launch shortcut cd ${TMP_XSTUDIO_BUILD_DIR} cat << EOF > start_xstudio.sh export QV4_FORCE_INTERPRETER=1 From c9b7a9eadde69722cd6efa8439a196b69ef911df Mon Sep 17 00:00:00 2001 From: Michael Oliver Date: Fri, 22 Nov 2024 12:14:08 -0800 Subject: [PATCH 7/9] Update build_rocky_linux_9_5.sh log stdout and stderr to build timestamped build log Signed-off-by: Michael Oliver --- docs/build_guides/build_rocky_linux_9_5.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/build_guides/build_rocky_linux_9_5.sh b/docs/build_guides/build_rocky_linux_9_5.sh index 1220e58fd..b831519e6 100644 --- a/docs/build_guides/build_rocky_linux_9_5.sh +++ b/docs/build_guides/build_rocky_linux_9_5.sh @@ -1,3 +1,11 @@ +#!/bin/bash + +#Log stdout and stderr to file +TMP_XSTUDIO_BUILD_TIME=$(date +%Y%m%d%H%M%S) +TMP_XSTUDIO_BUILD_LOG=xstudiobuild-${TMP_XSTUDIO_BUILD_TIME}.log +exec > >(tee -ia ${TMP_XSTUDIO_BUILD_LOG}) +exec 2> >(tee -ia ${TMP_XSTUDIO_BUILD_LOG} >&2) + ## Rocky Linux 9.x #[Download](https://rockylinux.org/download "Download") From 5b82e4c379be726a9d3f3ef356ac2c5df29feeeb Mon Sep 17 00:00:00 2001 From: Michael Oliver Date: Fri, 22 Nov 2024 12:38:16 -0800 Subject: [PATCH 8/9] selinux wreaking havoc Signed-off-by: Michael Oliver --- docs/build_guides/build_rocky_linux_9_5.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/build_guides/build_rocky_linux_9_5.sh b/docs/build_guides/build_rocky_linux_9_5.sh index b831519e6..9083deb81 100644 --- a/docs/build_guides/build_rocky_linux_9_5.sh +++ b/docs/build_guides/build_rocky_linux_9_5.sh @@ -270,6 +270,7 @@ sudo ldconfig ##### Create launch shortcut cd ${TMP_XSTUDIO_BUILD_DIR} cat << EOF > start_xstudio.sh +sudo setenforce 0 export QV4_FORCE_INTERPRETER=1 export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 export PYTHONPATH=./bin/python/lib/python${VER_PYTHON}/site-packages:/home/xstudio/.local/lib/python${VER_PYTHON}/site-packages: From 306fc6bcc5a2bb3fc884fef9993926c1ffc1fe8b Mon Sep 17 00:00:00 2001 From: Michael Oliver Date: Fri, 22 Nov 2024 18:02:40 -0800 Subject: [PATCH 9/9] Update build_rocky_linux_9_5.sh --- docs/build_guides/build_rocky_linux_9_5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/build_guides/build_rocky_linux_9_5.sh b/docs/build_guides/build_rocky_linux_9_5.sh index 9083deb81..7fa954b40 100644 --- a/docs/build_guides/build_rocky_linux_9_5.sh +++ b/docs/build_guides/build_rocky_linux_9_5.sh @@ -35,7 +35,7 @@ VER_NASM=2.16.03 VER_NLOHMANN=3.11.2 #VER_NLOHMANN=3.11.3 -VER_OCIO2=2.2.0 +VER_OCIO2=2.2.1 #VER_OCIO2=2.4.0 VER_OPENEXR=RB-3.3