From 5b6c1b38f1ac3d594ad1d6e677cfc26b34844567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9drik=20Fuoco?= Date: Tue, 29 Oct 2024 10:29:47 -0400 Subject: [PATCH] OpenSSL 3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Cédrik Fuoco --- .../actions/build-qt5-for-arm64/action.yml | 64 +++++++++++++- .github/workflows/ci.yml | 2 +- cmake/dependencies/openssl.cmake | 82 +++++++++++------- cmake/dependencies/python3.cmake | 85 +++++++------------ src/bin/apps/rv/rv.wrapper | 23 ++++- src/bin/apps/rvpkg/rvpkg.wrapper | 23 ++++- src/bin/apps/rvprof/rvprof.wrapper | 23 ++++- src/bin/apps/rvpush/rvpush.wrapper | 23 ++++- src/bin/apps/rvshell/rvshell.wrapper | 23 ++++- src/bin/gtotools/gtofilter/gtofilter.wrapper | 23 ++++- src/bin/gtotools/gtoimage/gtoimage.wrapper | 23 ++++- src/bin/gtotools/gtoinfo/gtoinfo.wrapper | 23 ++++- .../makeFBIOformats/makeFBIOformats.wrapper | 23 ++++- .../makeMovieIOformats.wrapper | 23 ++++- .../rmsImageDiff/rmsImageDiff.wrapper | 23 ++++- src/bin/imgtools/rvio/rvio.wrapper | 23 ++++- src/bin/imgtools/rvio_sw/rvio_sw.wrapper | 23 ++++- src/bin/imgtools/rvls/rvls.wrapper | 23 ++++- src/bin/mu/mu-interp/mu-interp.wrapper | 23 ++++- src/bin/python/py-interp/py-interp.wrapper | 23 ++++- src/build/make_openssl.py | 20 +++++ src/build/make_python.py | 60 ++++++++----- .../IPCore/ApplicationTest/CMakeLists.txt | 2 +- .../IPCore/AudioRendererTest/CMakeLists.txt | 2 +- .../LoadingSharedLibrariesTest/CMakeLists.txt | 5 +- 25 files changed, 528 insertions(+), 162 deletions(-) diff --git a/.github/actions/build-qt5-for-arm64/action.yml b/.github/actions/build-qt5-for-arm64/action.yml index b07e840f..bd602418 100644 --- a/.github/actions/build-qt5-for-arm64/action.yml +++ b/.github/actions/build-qt5-for-arm64/action.yml @@ -54,10 +54,23 @@ runs: brew install --quiet --formula libiconv libpng libpq libtool libuv libxau libxcb libxdmcp brew install --quiet --formula autoconf automake cmake pcre2 harfbuzz freetype node@18 nspr nss brew install --quiet --formula xcb-proto xcb-util xcb-util-cursor xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm - brew install --quiet --formula brotli bzip2 dbus glew icu4c jpeg md4c openssl@1.1 pkg-config sqlite xorgproto zlib zstd + brew install --quiet --formula brotli bzip2 dbus glew icu4c jpeg md4c pkg-config sqlite xorgproto zlib zstd + shell: bash + + - name: Install Homebrew dependencies (OpenSSL 1.1.1) + if: steps.arm64-qt.outputs.cache-hit != 'true' && matrix.vfx-platform == 'CY2023' + run: | + brew install --quiet --formula openssl@1.1 brew list openssl@1.1 shell: bash + - name: Install Homebrew dependencies (OpenSSL 3.X.X) + if: steps.arm64-qt.outputs.cache-hit != 'true' && matrix.vfx-platform == 'CY2024' + run: | + brew install --quiet --formula openssl@3 + brew list openssl@3 + shell: bash + # Use Ninja 1.11.1 because Qt need to be patched for Ninja 1.12.1. - name: Install Ninja 1.11.1 if: steps.arm64-qt.outputs.cache-hit != 'true' @@ -120,8 +133,14 @@ runs: mkdir -p qt-build shell: bash - - name: Configure Qt ${{ inputs.qt-version }} - if: steps.arm64-qt.outputs.cache-hit != 'true' + - name: List OpenSSL folder + if: matrix.vfx-platform == 'CY2024' + run: | + ls -al $(brew --prefix openssl@3) + shell: bash + + - name: Configure Qt ${{ inputs.qt-version }} for CY2023 + if: steps.arm64-qt.outputs.cache-hit != 'true' && matrix.vfx-platform == 'CY2023' run: | ../qt-src/configure \ --prefix="../${{ inputs.qt-output }}" \ @@ -159,6 +178,45 @@ runs: working-directory: ${{ github.workspace }}/qt-build shell: bash + - name: Configure Qt ${{ inputs.qt-version }} for CY2024 + if: steps.arm64-qt.outputs.cache-hit != 'true' && matrix.vfx-platform == 'CY2024' + run: | + ../qt-src/configure \ + --prefix="../${{ inputs.qt-output }}" \ + -no-strip \ + -no-rpath \ + -opensource \ + -plugin-sql-sqlite \ + -openssl-linked \ + -verbose \ + -opengl desktop \ + -no-warnings-are-errors \ + -no-libudev \ + -no-egl \ + -nomake examples \ + -nomake tests \ + -c++std c++14 \ + -confirm-license \ + -no-use-gold-linker \ + -release \ + -no-sql-mysql \ + -no-xcb \ + -qt-libjpeg \ + -qt-libpng \ + -bundled-xcb-xinput \ + -sysconfdir /etc/xdg \ + -qt-pcre \ + -qt-harfbuzz \ + -R . \ + -icu \ + -skip qtnetworkauth \ + -skip qtpurchasing \ + -skip qtlocation \ + -I $(brew --prefix openssl@3)/include -L $(brew --prefix openssl@3)/lib \ + -I /opt/homebrew/Cellar/icu4c/74.2/include -L /opt/homebrew/Cellar/icu4c/74.2/lib + working-directory: ${{ github.workspace }}/qt-build + shell: bash + - name: Build Qt ${{ inputs.qt-version }} if: steps.arm64-qt.outputs.cache-hit != 'true' run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33b2540e..18ee5267 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -178,7 +178,7 @@ jobs: dnf install -y epel-release dnf config-manager --set-enabled ${{ matrix.extra_repo }} devel dnf groupinstall "Development Tools" -y - dnf install -y alsa-lib-devel autoconf automake avahi-compat-libdns_sd-devel bison bzip2-devel cmake-gui curl-devel flex gcc gcc-c++ git libXcomposite libXi-devel libaio-devel libffi-devel nasm ncurses-devel nss libtool libxkbcommon libXcomposite libXdamage libXrandr libXtst libXcursor mesa-libOSMesa mesa-libOSMesa-devel meson openssl-devel patch pulseaudio-libs pulseaudio-libs-glib2 ocl-icd ocl-icd-devel opencl-headers python3 python3-devel qt5-qtbase-devel readline-devel sqlite-devel tcl-devel tcsh tk-devel yasm zip zlib-devel wget patchelf pcsc-lite libxkbfile + dnf install -y alsa-lib-devel autoconf automake avahi-compat-libdns_sd-devel bison bzip2-devel cmake-gui curl-devel flex gcc gcc-c++ git libXcomposite libXi-devel libaio-devel libffi-devel nasm ncurses-devel nss libtool libxkbcommon libXcomposite libXdamage libXrandr libXtst libXcursor mesa-libOSMesa mesa-libOSMesa-devel meson openssl-devel patch pulseaudio-libs pulseaudio-libs-glib2 ocl-icd ocl-icd-devel opencl-headers qt5-qtbase-devel readline-devel sqlite-devel tcl-devel tcsh tk-devel yasm zip zlib-devel wget patchelf pcsc-lite libxkbfile perl-IPC-Cmd dnf install -y libX11-devel libXext-devel libXrender-devel libXrandr-devel libXcursor-devel libXi-devel libXxf86vm-devel libxkbcommon-devel dnf install -y xz-devel mesa-libGLU mesa-libGLU-devel diff --git a/cmake/dependencies/openssl.cmake b/cmake/dependencies/openssl.cmake index 472d54e9..ad0d5435 100644 --- a/cmake/dependencies/openssl.cmake +++ b/cmake/dependencies/openssl.cmake @@ -8,7 +8,11 @@ SET(_target "RV_DEPS_OPENSSL" ) -IF(RV_TARGET_IS_RHEL8) +IF(RV_TARGET_IS_RHEL8 + AND RV_VFX_PLATFORM STREQUAL CY2023 +) + # VFX2023: Rocky Linux 8 + FIND_PACKAGE(OpenSSL 1.1.1 REQUIRED) SET(RV_DEPS_OPENSSL_VERSION @@ -25,6 +29,8 @@ IF(RV_TARGET_IS_RHEL8) MESSAGE(STATUS "_lib_dir ${_lib_dir}") ELSE() + # VFX2023: Rocky Linux 9, Windows and MacOS VFX2024: Rocky Linux 8/9, Windows and MacOS + SET(RV_DEPS_WIN_PERL_ROOT "" CACHE STRING "Path to Windows perl root" @@ -34,10 +40,9 @@ ELSE() "RV_DEPS_OPENSSL" ) - SET(_version - "1.1.1u" - ) - string(REPLACE "." "_" _version_underscored ${_version}) + RV_VFX_SET_VARIABLE(_version CY2023 "1.1.1u" CY2024 "3.4.0") + + STRING(REPLACE "." "_" _version_underscored ${_version}) IF(RV_TARGET_WINDOWS AND (NOT RV_DEPS_WIN_PERL_ROOT @@ -61,20 +66,26 @@ ELSE() SET(_build_dir ${RV_DEPS_BASE_DIR}/${_target}/build ) - SET(_lib_dir - ${RV_DEPS_OPENSSL_INSTALL_DIR}/lib - ) + + IF(RHEL_VERBOSE) + RV_VFX_SET_VARIABLE(_lib_dir CY2023 "${RV_DEPS_OPENSSL_INSTALL_DIR}/lib" CY2024 "${RV_DEPS_OPENSSL_INSTALL_DIR}/lib64") + ELSE() + SET(_lib_dir + ${RV_DEPS_OPENSSL_INSTALL_DIR}/lib + ) + ENDIF() + SET(_bin_dir ${RV_DEPS_OPENSSL_INSTALL_DIR}/bin ) - SET(_download_url - "https://github.com/openssl/openssl/releases/download/OpenSSL_${_version_underscored}/openssl-${_version}.tar.gz" - ) - SET(_download_hash - "72f7ba7395f0f0652783ba1089aa0dcc" + RV_VFX_SET_VARIABLE( + _download_url CY2023 "https://github.com/openssl/openssl/releases/download/OpenSSL_${_version_underscored}/openssl-${_version}.tar.gz" CY2024 + "https://github.com/openssl/openssl/releases/download/openssl-${_version}/openssl-${_version}.tar.gz" ) + RV_VFX_SET_VARIABLE(_download_hash CY2023 "72f7ba7395f0f0652783ba1089aa0dcc" CY2024 "34733f7be2d60ecd8bd9ddb796e182af") + SET(_make_command_script "${PROJECT_SOURCE_DIR}/src/build/make_openssl.py" ) @@ -86,52 +97,57 @@ ELSE() LIST(APPEND _make_command ${_source_dir}) LIST(APPEND _make_command "--output-dir") LIST(APPEND _make_command ${RV_DEPS_OPENSSL_INSTALL_DIR}) + + LIST(APPEND _make_command "--vfx_platform") + RV_VFX_SET_VARIABLE(_vfx_platform_ CY2023 "2023" CY2024 "2024") + LIST(APPEND _make_command ${_vfx_platform_}) + IF(RV_TARGET_WINDOWS) LIST(APPEND _make_command "--perlroot") LIST(APPEND _make_command ${RV_DEPS_WIN_PERL_ROOT}) ENDIF() IF(APPLE) - # This is needed because if Rosetta is used to compile for x86_64 from ARM64, - # openssl build system detects it as "linux-x86_64" and it causes issues. + # This is needed because if Rosetta is used to compile for x86_64 from ARM64, openssl build system detects it as "linux-x86_64" and it causes issues. IF(RV_TARGET_APPLE_X86_64) - SET(__openssl_arch__ x86_64) + SET(__openssl_arch__ + x86_64 + ) ELSEIF(RV_TARGET_APPLE_ARM64) - SET(__openssl_arch__ arm64) + SET(__openssl_arch__ + arm64 + ) ENDIF() LIST(APPEND _make_command --arch=-${__openssl_arch__}) ENDIF() - - # On most POSIX platforms, shared libraries are named `libcrypto.so.1.1` - # and `libssl.so.1.1`. - # On Windows build with MSVC or using MingW, shared libraries are named - # `libcrypto-1_1.dll` and `libssl-1_1.dll` for 32-bit Windows, - # `libcrypto-1_1-x64.dll` and `libssl-1_1-x64.dll` for 64-bit x86_64 Windows, - # and `libcrypto-1_1-ia64.dll` and `libssl-1_1-ia64.dll` for IA64 Windows. - # With MSVC, the import libraries are named `libcrypto.lib` and `libssl.lib`, - # while with MingW, they are named `libcrypto.dll.a` and `libssl.dll.a`. + # On most POSIX platforms, shared libraries are named `libcrypto.so.1.1` and `libssl.so.1.1`. + + # On Windows build with MSVC or using MingW, shared libraries are named `libcrypto-1_1.dll` and `libssl-1_1.dll` for 32-bit Windows, `libcrypto-1_1-x64.dll` + # and `libssl-1_1-x64.dll` for 64-bit x86_64 Windows, and `libcrypto-1_1-ia64.dll` and `libssl-1_1-ia64.dll` for IA64 Windows. With MSVC, the import libraries + # are named `libcrypto.lib` and `libssl.lib`, while with MingW, they are named `libcrypto.dll.a` and `libssl.dll.a`. # Ref: https://github.com/openssl/openssl/blob/398011848468c7e8e481b295f7904afc30934217/INSTALL.md?plain=1#L1847-L1858 IF(RV_TARGET_LINUX) + RV_VFX_SET_VARIABLE(_dot_version CY2023 ".1.1" CY2024 ".3") + SET(_crypto_lib_name - ${CMAKE_SHARED_LIBRARY_PREFIX}crypto${CMAKE_SHARED_LIBRARY_SUFFIX}.1.1 + ${CMAKE_SHARED_LIBRARY_PREFIX}crypto${CMAKE_SHARED_LIBRARY_SUFFIX}${_dot_version} ) SET(_ssl_lib_name - ${CMAKE_SHARED_LIBRARY_PREFIX}ssl${CMAKE_SHARED_LIBRARY_SUFFIX}.1.1 + ${CMAKE_SHARED_LIBRARY_PREFIX}ssl${CMAKE_SHARED_LIBRARY_SUFFIX}${_dot_version} ) ELSEIF(RV_TARGET_WINDOWS) - # As stated in the openssl documentation, the names are libcrypto-1_1-x64 and libssl-1_1-x64 - # when OpenSSL is build with MSVC. + # As stated in the openssl documentation, the names are libcrypto-1_1-x64 and libssl-1_1-x64 when OpenSSL is build with MSVC. SET(_crypto_lib_name - libcrypto-1_1-x64${CMAKE_SHARED_LIBRARY_SUFFIX} + libcrypto-1_1-x64${CMAKE_SHARED_LIBRARY_SUFFIX} ) SET(_ssl_lib_name - libssl-1_1-x64${CMAKE_SHARED_LIBRARY_SUFFIX} + libssl-1_1-x64${CMAKE_SHARED_LIBRARY_SUFFIX} ) ELSE() SET(_crypto_lib_name @@ -304,4 +320,4 @@ ENDIF() SET_PROPERTY( GLOBAL APPEND PROPERTY "RV_FFMPEG_EXTERNAL_LIBS" "--enable-openssl" -) \ No newline at end of file +) diff --git a/cmake/dependencies/python3.cmake b/cmake/dependencies/python3.cmake index 2268cd57..ffdbdca4 100644 --- a/cmake/dependencies/python3.cmake +++ b/cmake/dependencies/python3.cmake @@ -4,7 +4,6 @@ # SPDX-License-Identifier: Apache-2.0 # - SET(_python3_target "RV_DEPS_PYTHON3" ) @@ -13,27 +12,15 @@ SET(_opentimelineio_target "RV_DEPS_OPENTIMELINEIO" ) -RV_VFX_SET_VARIABLE( - _pyside_target - CY2023 "RV_DEPS_PYSIDE2" - CY2024 "RV_DEPS_PYSIDE6" -) +RV_VFX_SET_VARIABLE(_pyside_target CY2023 "RV_DEPS_PYSIDE2" CY2024 "RV_DEPS_PYSIDE6") SET(PYTHON_VERSION_MAJOR 3 ) -RV_VFX_SET_VARIABLE( - PYTHON_VERSION_MINOR - CY2023 "10" - CY2024 "11" -) +RV_VFX_SET_VARIABLE(PYTHON_VERSION_MINOR CY2023 "10" CY2024 "11") -RV_VFX_SET_VARIABLE( - PYTHON_VERSION_PATCH - CY2023 "13" - CY2024 "9" -) +RV_VFX_SET_VARIABLE(PYTHON_VERSION_PATCH CY2023 "13" CY2024 "9") SET(_python3_version "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH}" @@ -50,20 +37,12 @@ SET(_opentimelineio_version "0.15" ) -RV_VFX_SET_VARIABLE( - _pyside_version - CY2023 "5.15.10" - CY2024 "6.5.3" -) +RV_VFX_SET_VARIABLE(_pyside_version CY2023 "5.15.10" CY2024 "6.5.3") SET(_python3_download_url "https://github.com/python/cpython/archive/refs/tags/v${_python3_version}.zip" ) -RV_VFX_SET_VARIABLE( - _python3_download_hash - CY2023 "21b32503f31386b37f0c42172dfe5637" - CY2024 "392eccd4386936ffcc46ed08057db3e7" -) +RV_VFX_SET_VARIABLE(_python3_download_hash CY2023 "21b32503f31386b37f0c42172dfe5637" CY2024 "392eccd4386936ffcc46ed08057db3e7") SET(_opentimelineio_download_url "https://github.com/AcademySoftwareFoundation/OpenTimelineIO" @@ -74,15 +53,13 @@ SET(_opentimelineio_git_tag RV_VFX_SET_VARIABLE( _pyside_archive_url - CY2023 "https://mirrors.ocf.berkeley.edu/qt/official_releases/QtForPython/pyside2/PySide2-${_pyside_version}-src/pyside-setup-opensource-src-${_pyside_version}.zip" - CY2024 "https://mirrors.ocf.berkeley.edu/qt/official_releases/QtForPython/pyside6/PySide6-${_pyside_version}-src/pyside-setup-everywhere-src-${_pyside_version}.zip" + CY2023 + "https://mirrors.ocf.berkeley.edu/qt/official_releases/QtForPython/pyside2/PySide2-${_pyside_version}-src/pyside-setup-opensource-src-${_pyside_version}.zip" + CY2024 + "https://mirrors.ocf.berkeley.edu/qt/official_releases/QtForPython/pyside6/PySide6-${_pyside_version}-src/pyside-setup-everywhere-src-${_pyside_version}.zip" ) -RV_VFX_SET_VARIABLE( - _pyside_download_hash - CY2023 "87841aaced763b6b52e9b549e31a493f" - CY2024 "515d3249c6e743219ff0d7dd25b8c8d8" -) +RV_VFX_SET_VARIABLE(_pyside_download_hash CY2023 "87841aaced763b6b52e9b549e31a493f" CY2024 "515d3249c6e743219ff0d7dd25b8c8d8") SET(_install_dir ${RV_DEPS_BASE_DIR}/${_python3_target}/install @@ -130,6 +107,11 @@ LIST(APPEND _python3_make_command "--output-dir") LIST(APPEND _python3_make_command ${_install_dir}) LIST(APPEND _python3_make_command "--temp-dir") LIST(APPEND _python3_make_command ${_build_dir}) + +LIST(APPEND _python3_make_command "--vfx_platform") +RV_VFX_SET_VARIABLE(_vfx_platform_ CY2023 "2023" CY2024 "2024") +LIST(APPEND _python3_make_command ${_vfx_platform_}) + IF(DEFINED RV_DEPS_OPENSSL_INSTALL_DIR) LIST(APPEND _python3_make_command "--openssl-dir") LIST(APPEND _python3_make_command ${RV_DEPS_OPENSSL_INSTALL_DIR}) @@ -141,10 +123,7 @@ IF(RV_TARGET_WINDOWS) LIST(APPEND _python3_make_command "${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}") ENDIF() - -# TODO_QT: Maybe we could use something like NOT CY2023 -# since after 2023, it is Qt6 -# TODO_QT: Below code could be simplified, but for now it is faster to test. +# TODO_QT: Maybe we could use something like NOT CY2023 since after 2023, it is Qt6 TODO_QT: Below code could be simplified, but for now it is faster to test. IF(RV_VFX_PLATFORM STREQUAL CY2023) SET(_pyside_make_command_script "${PROJECT_SOURCE_DIR}/src/build/make_pyside.py" @@ -175,10 +154,10 @@ IF(RV_VFX_PLATFORM STREQUAL CY2023) LIST(APPEND _pyside_make_command "${RV_DEPS_PYTHON_VERSION_SHORT}") ELSEIF(RV_VFX_PLATFORM STREQUAL CY2024) SET(_pyside_make_command_script - "${PROJECT_SOURCE_DIR}/src/build/make_pyside6.py" + "${PROJECT_SOURCE_DIR}/src/build/make_pyside6.py" ) SET(_pyside_make_command - python3 "${_pyside_make_command_script}" + python3 "${_pyside_make_command_script}" ) LIST(APPEND _pyside_make_command "--variant") @@ -278,20 +257,19 @@ SET(_requirements_install_command ) IF(RV_TARGET_WINDOWS) - SET(_patch_python3_11_command + SET(_patch_python3_11_command "patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/patch/python.3.11.openssl.props.patch &&\ patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/patch/python.3.11.python.props.patch &&\ patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/patch/python.3.11.get_externals.bat.patch" ) - RV_VFX_SET_VARIABLE( - _patch_command - CY2023 "" - CY2024 "${_patch_python3_11_command}" - ) + RV_VFX_SET_VARIABLE(_patch_command CY2023 "" CY2024 "${_patch_python3_11_command}") # Split the command into a semi-colon separated list. - separate_arguments(_patch_command) - STRING(REGEX REPLACE ";+" ";" _patch_command "${_patch_command}") + SEPARATE_ARGUMENTS(_patch_command) + STRING( + REGEX + REPLACE ";+" ";" _patch_command "${_patch_command}" + ) ENDIF() EXTERNALPROJECT_ADD( @@ -343,10 +321,7 @@ SET(${_pyside_target}-build-flag ${_install_dir}/${_pyside_target}-build-flag ) - -# TODO_QT: Maybe we could use something like NOT CY2023 -# since after 2023, it is Qt6 -# TODO_QT: Below code could be simplified, but for now it is faster to test. +# TODO_QT: Maybe we could use something like NOT CY2023 since after 2023, it is Qt6 TODO_QT: Below code could be simplified, but for now it is faster to test. IF(RV_VFX_PLATFORM STREQUAL CY2023) ADD_CUSTOM_COMMAND( COMMENT "Building PySide2 using ${_pyside_make_command_script}" @@ -360,7 +335,9 @@ IF(RV_VFX_PLATFORM STREQUAL CY2023) USES_TERMINAL ) - SET(_build_flag_depends ${${_pyside_target}-build-flag}) + SET(_build_flag_depends + ${${_pyside_target}-build-flag} + ) ELSEIF(RV_VFX_PLATFORM STREQUAL CY2024) ADD_CUSTOM_COMMAND( COMMENT "Building PySide6 using ${_pyside_make_command_script}" @@ -371,7 +348,9 @@ ELSEIF(RV_VFX_PLATFORM STREQUAL CY2024) USES_TERMINAL ) - SET(_build_flag_depends ${${_pyside_target}-build-flag}) + SET(_build_flag_depends + ${${_pyside_target}-build-flag} + ) ENDIF() IF(RV_TARGET_WINDOWS) diff --git a/src/bin/apps/rv/rv.wrapper b/src/bin/apps/rv/rv.wrapper index be353ddf..340fc88e 100644 --- a/src/bin/apps/rv/rv.wrapper +++ b/src/bin/apps/rv/rv.wrapper @@ -71,14 +71,31 @@ else setenv LD_LIBRARY_PATH "$RV_HOME/lib" endif +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). +set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` +set minor_version = `echo $python_version | cut -d. -f2` + +set is_python_vfx2023 = 0 # VFX2023 Python 3.10 +set is_python_vfx2024 = 0 # VFX2024 Python 3.11 + +if ($minor_version > 10) then + set is_python_vfx2024 = 1 +else + set is_python_vfx2023 = 1 +endif + # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. # if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - if ( "$required_openssl_found" == "" ) then + set required_openssl_found = "" + if ($is_python_vfx2023) then + set required_openssl_found = "`openssl version | grep 1.1.1`" + endif + + if ( "$required_openssl_found" == "" ) then setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif + endif endif # exec RV diff --git a/src/bin/apps/rvpkg/rvpkg.wrapper b/src/bin/apps/rvpkg/rvpkg.wrapper index 75fad259..7ade453e 100644 --- a/src/bin/apps/rvpkg/rvpkg.wrapper +++ b/src/bin/apps/rvpkg/rvpkg.wrapper @@ -50,14 +50,31 @@ else setenv LD_LIBRARY_PATH "$RV_HOME/lib" endif +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). +set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` +set minor_version = `echo $python_version | cut -d. -f2` + +set is_python_vfx2023 = 0 # VFX2023 Python 3.10 +set is_python_vfx2024 = 0 # VFX2024 Python 3.11 + +if ($minor_version > 10) then + set is_python_vfx2024 = 1 +else + set is_python_vfx2023 = 1 +endif + # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. # if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - if ( "$required_openssl_found" == "" ) then + set required_openssl_found = "" + if ($is_python_vfx2023) then + set required_openssl_found = "`openssl version | grep 1.1.1`" + endif + + if ( "$required_openssl_found" == "" ) then setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif + endif endif # exec RV diff --git a/src/bin/apps/rvprof/rvprof.wrapper b/src/bin/apps/rvprof/rvprof.wrapper index f06d6026..53d7c326 100644 --- a/src/bin/apps/rvprof/rvprof.wrapper +++ b/src/bin/apps/rvprof/rvprof.wrapper @@ -50,14 +50,31 @@ else setenv LD_LIBRARY_PATH "$RV_HOME/lib" endif +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). +set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` +set minor_version = `echo $python_version | cut -d. -f2` + +set is_python_vfx2023 = 0 # VFX2023 Python 3.10 +set is_python_vfx2024 = 0 # VFX2024 Python 3.11 + +if ($minor_version > 10) then + set is_python_vfx2024 = 1 +else + set is_python_vfx2023 = 1 +endif + # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. # if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - if ( "$required_openssl_found" == "" ) then + set required_openssl_found = "" + if ($is_python_vfx2023) then + set required_openssl_found = "`openssl version | grep 1.1.1`" + endif + + if ( "$required_openssl_found" == "" ) then setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif + endif endif # exec bin diff --git a/src/bin/apps/rvpush/rvpush.wrapper b/src/bin/apps/rvpush/rvpush.wrapper index 47aa7c41..c6b51a31 100755 --- a/src/bin/apps/rvpush/rvpush.wrapper +++ b/src/bin/apps/rvpush/rvpush.wrapper @@ -45,14 +45,31 @@ else setenv LD_LIBRARY_PATH "$RV_HOME/lib" endif +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). +set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` +set minor_version = `echo $python_version | cut -d. -f2` + +set is_python_vfx2023 = 0 # VFX2023 Python 3.10 +set is_python_vfx2024 = 0 # VFX2024 Python 3.11 + +if ($minor_version > 10) then + set is_python_vfx2024 = 1 +else + set is_python_vfx2023 = 1 +endif + # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. # if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - if ( "$required_openssl_found" == "" ) then + set required_openssl_found = "" + if ($is_python_vfx2023) then + set required_openssl_found = "`openssl version | grep 1.1.1`" + endif + + if ( "$required_openssl_found" == "" ) then setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif + endif endif # exec binary diff --git a/src/bin/apps/rvshell/rvshell.wrapper b/src/bin/apps/rvshell/rvshell.wrapper index 13087810..0fd33462 100755 --- a/src/bin/apps/rvshell/rvshell.wrapper +++ b/src/bin/apps/rvshell/rvshell.wrapper @@ -45,14 +45,31 @@ else setenv LD_LIBRARY_PATH "$RV_HOME/lib" endif +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). +set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` +set minor_version = `echo $python_version | cut -d. -f2` + +set is_python_vfx2023 = 0 # VFX2023 Python 3.10 +set is_python_vfx2024 = 0 # VFX2024 Python 3.11 + +if ($minor_version > 10) then + set is_python_vfx2024 = 1 +else + set is_python_vfx2023 = 1 +endif + # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. # if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - if ( "$required_openssl_found" == "" ) then + set required_openssl_found = "" + if ($is_python_vfx2023) then + set required_openssl_found = "`openssl version | grep 1.1.1`" + endif + + if ( "$required_openssl_found" == "" ) then setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif + endif endif # exec binary diff --git a/src/bin/gtotools/gtofilter/gtofilter.wrapper b/src/bin/gtotools/gtofilter/gtofilter.wrapper index 2fb32fa8..2215bf77 100755 --- a/src/bin/gtotools/gtofilter/gtofilter.wrapper +++ b/src/bin/gtotools/gtofilter/gtofilter.wrapper @@ -46,14 +46,31 @@ else setenv LD_LIBRARY_PATH "$RV_HOME/lib" endif +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). +set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` +set minor_version = `echo $python_version | cut -d. -f2` + +set is_python_vfx2023 = 0 # VFX2023 Python 3.10 +set is_python_vfx2024 = 0 # VFX2024 Python 3.11 + +if ($minor_version > 10) then + set is_python_vfx2024 = 1 +else + set is_python_vfx2023 = 1 +endif + # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. # if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - if ( "$required_openssl_found" == "" ) then + set required_openssl_found = "" + if ($is_python_vfx2023) then + set required_openssl_found = "`openssl version | grep 1.1.1`" + endif + + if ( "$required_openssl_found" == "" ) then setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif + endif endif # exec binary diff --git a/src/bin/gtotools/gtoimage/gtoimage.wrapper b/src/bin/gtotools/gtoimage/gtoimage.wrapper index 6ba37306..b497d5f9 100755 --- a/src/bin/gtotools/gtoimage/gtoimage.wrapper +++ b/src/bin/gtotools/gtoimage/gtoimage.wrapper @@ -45,14 +45,31 @@ else setenv LD_LIBRARY_PATH "$RV_HOME/lib" endif +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). +set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` +set minor_version = `echo $python_version | cut -d. -f2` + +set is_python_vfx2023 = 0 # VFX2023 Python 3.10 +set is_python_vfx2024 = 0 # VFX2024 Python 3.11 + +if ($minor_version > 10) then + set is_python_vfx2024 = 1 +else + set is_python_vfx2023 = 1 +endif + # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. # if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - if ( "$required_openssl_found" == "" ) then + set required_openssl_found = "" + if ($is_python_vfx2023) then + set required_openssl_found = "`openssl version | grep 1.1.1`" + endif + + if ( "$required_openssl_found" == "" ) then setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif + endif endif # exec binary diff --git a/src/bin/gtotools/gtoinfo/gtoinfo.wrapper b/src/bin/gtotools/gtoinfo/gtoinfo.wrapper index 6684c69d..3628880b 100755 --- a/src/bin/gtotools/gtoinfo/gtoinfo.wrapper +++ b/src/bin/gtotools/gtoinfo/gtoinfo.wrapper @@ -45,14 +45,31 @@ else setenv LD_LIBRARY_PATH "$RV_HOME/lib" endif +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). +set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` +set minor_version = `echo $python_version | cut -d. -f2` + +set is_python_vfx2023 = 0 # VFX2023 Python 3.10 +set is_python_vfx2024 = 0 # VFX2024 Python 3.11 + +if ($minor_version > 10) then + set is_python_vfx2024 = 1 +else + set is_python_vfx2023 = 1 +endif + # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. # if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - if ( "$required_openssl_found" == "" ) then + set required_openssl_found = "" + if ($is_python_vfx2023) then + set required_openssl_found = "`openssl version | grep 1.1.1`" + endif + + if ( "$required_openssl_found" == "" ) then setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif + endif endif # exec binary diff --git a/src/bin/imgtools/makeFBIOformats/makeFBIOformats.wrapper b/src/bin/imgtools/makeFBIOformats/makeFBIOformats.wrapper index 08a73ced..e444d106 100755 --- a/src/bin/imgtools/makeFBIOformats/makeFBIOformats.wrapper +++ b/src/bin/imgtools/makeFBIOformats/makeFBIOformats.wrapper @@ -45,14 +45,31 @@ else setenv LD_LIBRARY_PATH "$RV_HOME/lib" endif +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). +set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` +set minor_version = `echo $python_version | cut -d. -f2` + +set is_python_vfx2023 = 0 # VFX2023 Python 3.10 +set is_python_vfx2024 = 0 # VFX2024 Python 3.11 + +if ($minor_version > 10) then + set is_python_vfx2024 = 1 +else + set is_python_vfx2023 = 1 +endif + # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. # if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - if ( "$required_openssl_found" == "" ) then + set required_openssl_found = "" + if ($is_python_vfx2023) then + set required_openssl_found = "`openssl version | grep 1.1.1`" + endif + + if ( "$required_openssl_found" == "" ) then setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif + endif endif # exec binary diff --git a/src/bin/imgtools/makeMovieIOformats/makeMovieIOformats.wrapper b/src/bin/imgtools/makeMovieIOformats/makeMovieIOformats.wrapper index 3fce4909..56ce42a4 100755 --- a/src/bin/imgtools/makeMovieIOformats/makeMovieIOformats.wrapper +++ b/src/bin/imgtools/makeMovieIOformats/makeMovieIOformats.wrapper @@ -45,14 +45,31 @@ else setenv LD_LIBRARY_PATH "$RV_HOME/lib" endif +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). +set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` +set minor_version = `echo $python_version | cut -d. -f2` + +set is_python_vfx2023 = 0 # VFX2023 Python 3.10 +set is_python_vfx2024 = 0 # VFX2024 Python 3.11 + +if ($minor_version > 10) then + set is_python_vfx2024 = 1 +else + set is_python_vfx2023 = 1 +endif + # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. # if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - if ( "$required_openssl_found" == "" ) then + set required_openssl_found = "" + if ($is_python_vfx2023) then + set required_openssl_found = "`openssl version | grep 1.1.1`" + endif + + if ( "$required_openssl_found" == "" ) then setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif + endif endif # exec binary diff --git a/src/bin/imgtools/rmsImageDiff/rmsImageDiff.wrapper b/src/bin/imgtools/rmsImageDiff/rmsImageDiff.wrapper index 3b082f94..f32ef059 100755 --- a/src/bin/imgtools/rmsImageDiff/rmsImageDiff.wrapper +++ b/src/bin/imgtools/rmsImageDiff/rmsImageDiff.wrapper @@ -45,14 +45,31 @@ else setenv LD_LIBRARY_PATH "$RV_HOME/lib" endif +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). +set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` +set minor_version = `echo $python_version | cut -d. -f2` + +set is_python_vfx2023 = 0 # VFX2023 Python 3.10 +set is_python_vfx2024 = 0 # VFX2024 Python 3.11 + +if ($minor_version > 10) then + set is_python_vfx2024 = 1 +else + set is_python_vfx2023 = 1 +endif + # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. # if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - if ( "$required_openssl_found" == "" ) then + set required_openssl_found = "" + if ($is_python_vfx2023) then + set required_openssl_found = "`openssl version | grep 1.1.1`" + endif + + if ( "$required_openssl_found" == "" ) then setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif + endif endif # exec binary diff --git a/src/bin/imgtools/rvio/rvio.wrapper b/src/bin/imgtools/rvio/rvio.wrapper index 49fe9e90..b636228e 100755 --- a/src/bin/imgtools/rvio/rvio.wrapper +++ b/src/bin/imgtools/rvio/rvio.wrapper @@ -45,14 +45,31 @@ else setenv LD_LIBRARY_PATH "$RV_HOME/lib" endif +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). +set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` +set minor_version = `echo $python_version | cut -d. -f2` + +set is_python_vfx2023 = 0 # VFX2023 Python 3.10 +set is_python_vfx2024 = 0 # VFX2024 Python 3.11 + +if ($minor_version > 10) then + set is_python_vfx2024 = 1 +else + set is_python_vfx2023 = 1 +endif + # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. # if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - if ( "$required_openssl_found" == "" ) then + set required_openssl_found = "" + if ($is_python_vfx2023) then + set required_openssl_found = "`openssl version | grep 1.1.1`" + endif + + if ( "$required_openssl_found" == "" ) then setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif + endif endif # exec binary diff --git a/src/bin/imgtools/rvio_sw/rvio_sw.wrapper b/src/bin/imgtools/rvio_sw/rvio_sw.wrapper index 0fbc3d27..fa5d0f17 100755 --- a/src/bin/imgtools/rvio_sw/rvio_sw.wrapper +++ b/src/bin/imgtools/rvio_sw/rvio_sw.wrapper @@ -45,14 +45,31 @@ else setenv LD_LIBRARY_PATH "$RV_HOME/lib" endif +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). +set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` +set minor_version = `echo $python_version | cut -d. -f2` + +set is_python_vfx2023 = 0 # VFX2023 Python 3.10 +set is_python_vfx2024 = 0 # VFX2024 Python 3.11 + +if ($minor_version > 10) then + set is_python_vfx2024 = 1 +else + set is_python_vfx2023 = 1 +endif + # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. # if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - if ( "$required_openssl_found" == "" ) then + set required_openssl_found = "" + if ($is_python_vfx2023) then + set required_openssl_found = "`openssl version | grep 1.1.1`" + endif + + if ( "$required_openssl_found" == "" ) then setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif + endif endif # exec binary diff --git a/src/bin/imgtools/rvls/rvls.wrapper b/src/bin/imgtools/rvls/rvls.wrapper index 6d5e33a8..32480e77 100755 --- a/src/bin/imgtools/rvls/rvls.wrapper +++ b/src/bin/imgtools/rvls/rvls.wrapper @@ -44,14 +44,31 @@ else setenv LD_LIBRARY_PATH "$RV_HOME/lib" endif +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). +set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` +set minor_version = `echo $python_version | cut -d. -f2` + +set is_python_vfx2023 = 0 # VFX2023 Python 3.10 +set is_python_vfx2024 = 0 # VFX2024 Python 3.11 + +if ($minor_version > 10) then + set is_python_vfx2024 = 1 +else + set is_python_vfx2023 = 1 +endif + # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. # if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - if ( "$required_openssl_found" == "" ) then + set required_openssl_found = "" + if ($is_python_vfx2023) then + set required_openssl_found = "`openssl version | grep 1.1.1`" + endif + + if ( "$required_openssl_found" == "" ) then setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif + endif endif # exec binary diff --git a/src/bin/mu/mu-interp/mu-interp.wrapper b/src/bin/mu/mu-interp/mu-interp.wrapper index b98188da..997857a8 100755 --- a/src/bin/mu/mu-interp/mu-interp.wrapper +++ b/src/bin/mu/mu-interp/mu-interp.wrapper @@ -38,14 +38,31 @@ else setenv LD_LIBRARY_PATH "$RV_HOME/lib" endif +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). +set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` +set minor_version = `echo $python_version | cut -d. -f2` + +set is_python_vfx2023 = 0 # VFX2023 Python 3.10 +set is_python_vfx2024 = 0 # VFX2024 Python 3.11 + +if ($minor_version > 10) then + set is_python_vfx2024 = 1 +else + set is_python_vfx2023 = 1 +endif + # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. # if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - if ( "$required_openssl_found" == "" ) then + set required_openssl_found = "" + if ($is_python_vfx2023) then + set required_openssl_found = "`openssl version | grep 1.1.1`" + endif + + if ( "$required_openssl_found" == "" ) then setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif + endif endif # exec binary diff --git a/src/bin/python/py-interp/py-interp.wrapper b/src/bin/python/py-interp/py-interp.wrapper index 23e26a7d..6dd1d658 100644 --- a/src/bin/python/py-interp/py-interp.wrapper +++ b/src/bin/python/py-interp/py-interp.wrapper @@ -42,14 +42,31 @@ else setenv LD_LIBRARY_PATH "$RV_HOME/lib" endif +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). +set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` +set minor_version = `echo $python_version | cut -d. -f2` + +set is_python_vfx2023 = 0 # VFX2023 Python 3.10 +set is_python_vfx2024 = 0 # VFX2024 Python 3.11 + +if ($minor_version > 10) then + set is_python_vfx2024 = 1 +else + set is_python_vfx2023 = 1 +endif + # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. # if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - if ( "$required_openssl_found" == "" ) then + set required_openssl_found = "" + if ($is_python_vfx2023) then + set required_openssl_found = "`openssl version | grep 1.1.1`" + endif + + if ( "$required_openssl_found" == "" ) then setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif + endif endif # exec RV diff --git a/src/build/make_openssl.py b/src/build/make_openssl.py index 43b73d2f..7570f85f 100644 --- a/src/build/make_openssl.py +++ b/src/build/make_openssl.py @@ -23,6 +23,7 @@ OUTPUT_DIR = "" ARCH = "" PERL_ROOT = "" +LIB_DIR = "" def get_openssl_args(root) -> List[str]: @@ -134,10 +135,16 @@ def test_openssl_distribution() -> None: openssl_bin = get_openssl_args(tmp_openssl_dir) + subprocess_env = os.environ.copy() + subprocess_env.update( + {"LD_LIBRARY_PATH": os.path.join(tmp_openssl_dir, LIB_DIR)} + ) + print(f"Executing {openssl_bin}") subprocess.run( openssl_bin, input=b"exit\n", + env=subprocess_env, ).check_returncode() finally: print(f"Moving {tmp_openssl_dir} to {OUTPUT_DIR}") @@ -238,6 +245,8 @@ def install() -> None: "--perlroot", dest="perlroot", type=str, required=False, default="" ) + parser.add_argument("--vfx_platform", dest="vfx_platform", type=int, required=True) + parser.set_defaults(clean=False, configure=False, build=False, install=False) args = parser.parse_args() @@ -247,6 +256,17 @@ def install() -> None: OUTPUT_DIR = args.output ARCH = args.arch PERL_ROOT = args.perlroot + VFX_PLATFORM = args.vfx_platform + + if platform.system() == "Darwin": + LIB_DIR = "lib" + else: + # Assuming Linux because that variable is not used for Windows. + # TODO: Note: This might not be right on Debian based platform. + if VFX_PLATFORM == 2023: + LIB_DIR = "lib" + elif VFX_PLATFORM == 2024: + LIB_DIR = "lib64" if args.clean: clean() diff --git a/src/build/make_python.py b/src/build/make_python.py index f58f2c64..518b34ce 100755 --- a/src/build/make_python.py +++ b/src/build/make_python.py @@ -34,6 +34,8 @@ ARCH = "" OPENTIMELINEIO_SOURCE_DIR = "" +LIB_DIR = "" + SITECUSTOMIZE_FILE_CONTENT = f''' # # Copyright (c) {datetime.now().year} Autodesk, Inc. All rights reserved. @@ -201,12 +203,12 @@ def patch_python_distribution(python_home: str) -> None: elif platform.system() == "Linux": openssl_libs = glob.glob( - os.path.join(OPENSSL_OUTPUT_DIR, "lib", "lib*.so*") + os.path.join(OPENSSL_OUTPUT_DIR, LIB_DIR, "lib*.so*") ) for lib_path in openssl_libs: print(f"Copying {lib_path} to the python home") - shutil.copy(lib_path, os.path.join(python_home, "lib")) + shutil.copy(lib_path, os.path.join(python_home, LIB_DIR)) elif platform.system() == "Windows": openssl_dlls = glob.glob(os.path.join(OPENSSL_OUTPUT_DIR, "bin", "lib*")) @@ -451,6 +453,12 @@ def configure() -> None: if OPENSSL_OUTPUT_DIR: configure_args.append(f"--with-openssl={OPENSSL_OUTPUT_DIR}") + if platform.system() == "Linux": + # This option prevent Python to build the _ssl module correctly on Darwin. + configure_args.append( + f"--with-openssl-rpath={OPENSSL_OUTPUT_DIR}/{LIB_DIR}" + ) + if VARIANT == "Release": configure_args.append("--enable-optimizations") @@ -495,23 +503,24 @@ def configure() -> None: LDFLAGS = [f"-L{d}" for d in LD_LIBRARY_PATH] - configure_args.append(f'CPPFLAGS={" ".join(CPPFLAGS)}') - configure_args.append(f'LDFLAGS={" ".join(LDFLAGS)}') - - if platform.system() == "Linux": - configure_args.append(f'LD_LIBRARY_PATH={":".join(LD_LIBRARY_PATH)}') + if OPENSSL_OUTPUT_DIR: + if platform.system() == "Darwin": + configure_args.append( + f"LC_RPATH={os.path.join(OPENSSL_OUTPUT_DIR, LIB_DIR)}" + ) + configure_args.append(f'LDFLAGS={" ".join(LDFLAGS)}') + configure_args.append(f'CPPFLAGS={" ".join(CPPFLAGS)}') + configure_args.append( + f"DYLD_LIBRARY_PATH={os.path.join(OPENSSL_OUTPUT_DIR, LIB_DIR)}" + ) + else: + # Linux (NOT Windows was checked before) + configure_args.append(f"LDFLAGS=-L{OPENSSL_OUTPUT_DIR}/{LIB_DIR}") + configure_args.append(f"CPPFLAGS=-I{OPENSSL_OUTPUT_DIR}/include") print(f"Executing {configure_args} from {SOURCE_DIR}") - subprocess_env = {**os.environ} - if OPENSSL_OUTPUT_DIR: - subprocess_env["LC_RPATH"] = os.path.join(OPENSSL_OUTPUT_DIR, "lib") - - subprocess.run( - configure_args, - cwd=SOURCE_DIR, - env=subprocess_env, - ).check_returncode() + subprocess.run(configure_args, cwd=SOURCE_DIR).check_returncode() makefile_path = os.path.join(SOURCE_DIR, "Makefile") old_makefile_path = os.path.join(SOURCE_DIR, "Makefile.old") @@ -585,7 +594,7 @@ def build() -> None: print(f"Executing {make_args} from {SOURCE_DIR}") subprocess_env = {**os.environ} if OPENSSL_OUTPUT_DIR: - subprocess_env["LC_RPATH"] = os.path.join(OPENSSL_OUTPUT_DIR, "lib") + subprocess_env["LC_RPATH"] = os.path.join(OPENSSL_OUTPUT_DIR, LIB_DIR) subprocess.run( make_args, @@ -680,8 +689,6 @@ def install() -> None: os.path.join(dst_dir, python3xx_lib), ) - print(os.listdir(libs_dir)) - # Tcl and Tk DLL are not copied by the main.py script in Debug. # Assuming that Tcl and Tk are not built in debug. # Manually copy the DLL. @@ -697,7 +704,7 @@ def install() -> None: print(f"Executing {make_args} from {SOURCE_DIR}") subprocess_env = {**os.environ} if OPENSSL_OUTPUT_DIR: - subprocess_env["LC_RPATH"] = os.path.join(OPENSSL_OUTPUT_DIR, "lib") + subprocess_env["LC_RPATH"] = os.path.join(OPENSSL_OUTPUT_DIR, LIB_DIR) subprocess.run( make_args, cwd=SOURCE_DIR, @@ -732,6 +739,8 @@ def install() -> None: parser.add_argument("--variant", dest="variant", type=str, required=True) parser.add_argument("--arch", dest="arch", type=str, required=False, default="") + parser.add_argument("--vfx_platform", dest="vfx_platform", type=int, required=True) + parser.add_argument( "--opentimelineio-source-dir", dest="otio_source_dir", @@ -761,6 +770,17 @@ def install() -> None: VARIANT = args.variant ARCH = args.arch OPENTIMELINEIO_SOURCE_DIR = args.otio_source_dir + VFX_PLATFORM = args.vfx_platform + + if platform.system() == "Darwin": + LIB_DIR = "lib" + else: + # Assuming Linux because that variable is not used for Windows. + # TODO: Note: This might not be right on Debian based platform. + if VFX_PLATFORM == 2023: + LIB_DIR = "lib" + elif VFX_PLATFORM == 2024: + LIB_DIR = "lib64" if platform.system() == "Windows": PYTHON_VERSION = args.python_version diff --git a/src/test/IPCore/ApplicationTest/CMakeLists.txt b/src/test/IPCore/ApplicationTest/CMakeLists.txt index 9a5fef83..b1a66d36 100644 --- a/src/test/IPCore/ApplicationTest/CMakeLists.txt +++ b/src/test/IPCore/ApplicationTest/CMakeLists.txt @@ -31,7 +31,7 @@ ENDIF() # Simply assert that the test executable actually works. ADD_TEST( NAME "${_target} - ${_shared_library}" - COMMAND ${CMAKE_COMMAND} -E env LD_LIBRARY_PATH=${RV_STAGE_LIB_DIR} "$" + COMMAND ${CMAKE_COMMAND} -E env LD_LIBRARY_PATH=${RV_STAGE_LIB_DIR}:${RV_STAGE_LIB_DIR}/OpenSSL "$" ) RV_STAGE(TYPE "EXECUTABLE" TARGET ${_target}) diff --git a/src/test/IPCore/AudioRendererTest/CMakeLists.txt b/src/test/IPCore/AudioRendererTest/CMakeLists.txt index 474a2728..22dccac2 100644 --- a/src/test/IPCore/AudioRendererTest/CMakeLists.txt +++ b/src/test/IPCore/AudioRendererTest/CMakeLists.txt @@ -36,7 +36,7 @@ ENDIF() # Simply assert that the test executable actually works. ADD_TEST( NAME "${_target} - ${_shared_library}" - COMMAND ${CMAKE_COMMAND} -E env LD_LIBRARY_PATH=${RV_STAGE_LIB_DIR} "$" + COMMAND ${CMAKE_COMMAND} -E env LD_LIBRARY_PATH=${RV_STAGE_LIB_DIR}:${RV_STAGE_LIB_DIR}/OpenSSL "$" ) RV_STAGE(TYPE "EXECUTABLE_WITH_PLUGINS" TARGET ${_target}) diff --git a/src/test/LoadingSharedLibrariesTest/CMakeLists.txt b/src/test/LoadingSharedLibrariesTest/CMakeLists.txt index ebf48a4f..92021d7d 100644 --- a/src/test/LoadingSharedLibrariesTest/CMakeLists.txt +++ b/src/test/LoadingSharedLibrariesTest/CMakeLists.txt @@ -35,7 +35,7 @@ TARGET_LINK_LIBRARIES( # Simply assert that the test executable actually works. ADD_TEST( NAME "${_target} - ${_shared_library}" - COMMAND ${CMAKE_COMMAND} -E env LD_LIBRARY_PATH=${RV_STAGE_LIB_DIR} "$" + COMMAND ${CMAKE_COMMAND} -E env LD_LIBRARY_PATH=${RV_STAGE_LIB_DIR}:${RV_STAGE_LIB_DIR}/OpenSSL "$" ) FOREACH( @@ -44,7 +44,8 @@ FOREACH( ) ADD_TEST( NAME "${_target} - ${_shared_library}" - COMMAND ${CMAKE_COMMAND} -E env LD_LIBRARY_PATH=${RV_STAGE_LIB_DIR} $ --library $ + COMMAND ${CMAKE_COMMAND} -E env LD_LIBRARY_PATH=${RV_STAGE_LIB_DIR}:${RV_STAGE_LIB_DIR}/OpenSSL $ --library + $ ) ENDFOREACH()