Skip to content

Commit

Permalink
Qt6 feature branch - Various fix for all platforms and VFX 2024 CI (E…
Browse files Browse the repository at this point in the history
…xcept Windows) (#618)

### Qt6 feature branch - Various fix for all platforms and VFX 2024 CI
(Except Windows)

### Linked issues
#366 

### Summarize your change.

Here's are the changes:

- Added VFX 2024 CI (except for Windows) without ci-openrv from
aswf-docker for now (Linux only, not tested yet)
- Code changes to fix issues on Windows
- Code changes to fix issues on MacOS
- Added OpenSSL 3 for VFX2024
- Added some logic to all `.wrapper` to detect which VFX platform is
active (using Python version) and then use the right OpenSSL version.
- FIx issue with Python not finding Tkinter on MacOS. The issue was with
VFX2024, but the fix make sense for VFX2023 too.

**There are a lot of reformatting because of the pre-commit hook.
Windows is not included in the VFX 2024 CI because of issues with
PySide6 in the CI.**




### Describe what you have tested and on which operating system.
- [x] Rocky linux 8/9
- [x] MacOS
- [ ] Windows (partial, can compile with my windows, but not in CI
because of pyside6 issue)

---------

Signed-off-by: Cédrik Fuoco <[email protected]>
  • Loading branch information
cedrik-fuoco-adsk authored Nov 11, 2024
1 parent f484962 commit 0cb14d8
Show file tree
Hide file tree
Showing 42 changed files with 1,262 additions and 483 deletions.
17 changes: 13 additions & 4 deletions .github/actions/build-qt5-for-arm64/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ inputs:
qt-version:
description: 'Qt version to build'
required: true
qt-version-short:
description: 'Qt version to build major.minor'
required: true
python3-version:
description: 'Python 3 version'
required: true
Expand Down Expand Up @@ -48,7 +51,13 @@ 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 [email protected] 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'
run: |
brew install --quiet --formula [email protected]
brew list [email protected]
shell: bash

Expand Down Expand Up @@ -95,7 +104,7 @@ runs:
- name: Download Qt ${{ inputs.qt-version }} source
if: steps.arm64-qt.outputs.cache-hit != 'true'
run: |
curl https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/official_releases/qt/5.15/${{ inputs.qt-version }}/single/qt-everywhere-opensource-src-${{ inputs.qt-version }}.tar.xz -o qt.tar.xz
curl https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/official_releases/qt/${{ inputs.qt-version-short }}/${{ inputs.qt-version }}/single/qt-everywhere-opensource-src-${{ inputs.qt-version }}.tar.xz -o qt.tar.xz
tar xf qt.tar.xz
mv qt-everywhere-src-${{ inputs.qt-version }} qt-src
shell: bash
Expand All @@ -106,7 +115,7 @@ runs:
mkdir -p qt-build
shell: bash

- name: Configure Qt ${{ inputs.qt-version }}
- name: Configure Qt ${{ inputs.qt-version }} for CY2023
if: steps.arm64-qt.outputs.cache-hit != 'true'
run: |
../qt-src/configure \
Expand All @@ -115,7 +124,7 @@ runs:
-no-rpath \
-opensource \
-plugin-sql-sqlite \
-openssl \
-openssl-linked \
-verbose \
-opengl desktop \
-no-warnings-are-errors \
Expand Down
255 changes: 238 additions & 17 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

43 changes: 28 additions & 15 deletions cmake/defaults/cxx_defaults.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,33 +62,46 @@ ENDIF()
# VFX Platform option
#

# Add preprocessor variable for use in the code and cmake variable to
# decide the version of an external dependencies based on the VFX platform.
# Note that the macro in rv_vfx.cmake are dependant on those RV_VFX_CY20XX.
# Add preprocessor variable for use in the code and cmake variable to decide the version of an external dependencies based on the VFX platform. Note that the
# macro in rv_vfx.cmake are dependant on those RV_VFX_CY20XX.
IF(RV_VFX_PLATFORM STREQUAL CY2024)
SET(RV_VFX_CY2024 ON)
SET(RV_VFX_CY2024
ON
)
ADD_COMPILE_DEFINITIONS(RV_VFX_CY2024)
SET(RV_QT_PACKAGE_NAME "Qt6")
SET(RV_QT_MU_TARGET "MuQt6")
SET(RV_QT_PACKAGE_NAME
"Qt6"
)
SET(RV_QT_MU_TARGET
"MuQt6"
)
ELSEIF(RV_VFX_PLATFORM STREQUAL CY2023)
SET(RV_VFX_CY2023 ON)
SET(RV_VFX_CY2023
ON
)
ADD_COMPILE_DEFINITIONS(RV_VFX_CY2023)
SET(RV_QT_PACKAGE_NAME "Qt5")
SET(RV_QT_MU_TARGET "MuQt5")
SET(RV_QT_PACKAGE_NAME
"Qt5"
)
SET(RV_QT_MU_TARGET
"MuQt5"
)
ENDIF()

#
# FFmpeg option
#

# Add preprocessor variable for use in code and
# cmake to determine the current version of FFmpeg.
# Current version must be one of the supported
# versions, as defined in ffmpeg.cmake.
# Add preprocessor variable for use in code and cmake to determine the current version of FFmpeg. Current version must be one of the supported versions, as
# defined in ffmpeg.cmake.
IF(RV_FFMPEG STREQUAL 6)
SET(RV_FFMPEG_6 ON)
SET(RV_FFMPEG_6
ON
)
ADD_COMPILE_DEFINITIONS(RV_FFMPEG_6)
ELSEIF(RV_FFMPEG STREQUAL 7)
SET(RV_FFMPEG_7 ON)
SET(RV_FFMPEG_7
ON
)
ADD_COMPILE_DEFINITIONS(RV_FFMPEG_7)
ENDIF()
87 changes: 52 additions & 35 deletions cmake/dependencies/openssl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -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
Expand All @@ -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"
)
Expand All @@ -86,59 +97,65 @@ 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

RV_VFX_SET_VARIABLE(_dot_version CY2023 ".1.1" CY2024 ".3")
RV_VFX_SET_VARIABLE(_underscore_version CY2023 "1_1" CY2024 "3")

IF(RV_TARGET_LINUX)
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-${_underscore_version}-x64${CMAKE_SHARED_LIBRARY_SUFFIX}
)
SET(_ssl_lib_name
libssl-1_1-x64${CMAKE_SHARED_LIBRARY_SUFFIX}
libssl-${_underscore_version}-x64${CMAKE_SHARED_LIBRARY_SUFFIX}
)
ELSE()
SET(_crypto_lib_name
${CMAKE_SHARED_LIBRARY_PREFIX}crypto.1.1${CMAKE_SHARED_LIBRARY_SUFFIX}
${CMAKE_SHARED_LIBRARY_PREFIX}crypto${_dot_version}${CMAKE_SHARED_LIBRARY_SUFFIX}
)
SET(_ssl_lib_name
${CMAKE_SHARED_LIBRARY_PREFIX}ssl.1.1${CMAKE_SHARED_LIBRARY_SUFFIX}
${CMAKE_SHARED_LIBRARY_PREFIX}ssl${_dot_version}${CMAKE_SHARED_LIBRARY_SUFFIX}
)
ENDIF()

Expand Down Expand Up @@ -304,4 +321,4 @@ ENDIF()
SET_PROPERTY(
GLOBAL APPEND
PROPERTY "RV_FFMPEG_EXTERNAL_LIBS" "--enable-openssl"
)
)
6 changes: 3 additions & 3 deletions cmake/dependencies/patch/python.3.11.get_externals.bat.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat
index b4362a5a25..5deb59828f 100644
index b4362a5a259..2b17da6ae5e 100644
--- a/PCbuild/get_externals.bat
+++ b/PCbuild/get_externals.bat
@@ -53,7 +53,7 @@ echo.Fetching external libraries...
set libraries=
set libraries=%libraries% bzip2-1.0.8
if NOT "%IncludeLibffiSrc%"=="false" set libraries=%libraries% libffi-3.4.4
-if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-3.0.13
+if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-1.1.1u
+if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-3.4.0
set libraries=%libraries% sqlite-3.45.1.0
if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.12.1
if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-8.6.12.1
Expand All @@ -16,7 +16,7 @@ index b4362a5a25..5deb59828f 100644
set binaries=
if NOT "%IncludeLibffi%"=="false" set binaries=%binaries% libffi-3.4.4
-if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-3.0.13
+if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-1.1.1u
+if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-3.4.0
if NOT "%IncludeTkinter%"=="false" set binaries=%binaries% tcltk-8.6.12.1
if NOT "%IncludeSSLSrc%"=="false" set binaries=%binaries% nasm-2.11.06

6 changes: 3 additions & 3 deletions cmake/dependencies/patch/python.3.11.python.props.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/PCbuild/python.props b/PCbuild/python.props
index d85fe4ab2a..ff2224251f 100644
index d85fe4ab2a3..977cf19e57f 100644
--- a/PCbuild/python.props
+++ b/PCbuild/python.props
@@ -74,8 +74,8 @@
Expand All @@ -8,8 +8,8 @@ index d85fe4ab2a..ff2224251f 100644
<libffiIncludeDir Condition="$(libffiIncludeDir) == ''">$(libffiOutDir)include</libffiIncludeDir>
- <opensslDir Condition="$(opensslDir) == ''">$(ExternalsDir)openssl-3.0.13\</opensslDir>
- <opensslOutDir Condition="$(opensslOutDir) == ''">$(ExternalsDir)openssl-bin-3.0.13\$(ArchName)\</opensslOutDir>
+ <opensslDir Condition="$(opensslDir) == ''">$(ExternalsDir)openssl-1.1.1u\</opensslDir>
+ <opensslOutDir Condition="$(opensslOutDir) == ''">$(ExternalsDir)openssl-bin-1.1.1u\$(ArchName)\</opensslOutDir>
+ <opensslDir Condition="$(opensslDir) == ''">$(ExternalsDir)openssl-3.4.0\</opensslDir>
+ <opensslOutDir Condition="$(opensslOutDir) == ''">$(ExternalsDir)openssl-bin-3.4.0\$(ArchName)\</opensslOutDir>
<opensslIncludeDir Condition="$(opensslIncludeDir) == ''">$(opensslOutDir)include</opensslIncludeDir>
<nasmDir Condition="$(nasmDir) == ''">$(ExternalsDir)\nasm-2.11.06\</nasmDir>
<zlibDir Condition="$(zlibDir) == ''">$(ExternalsDir)\zlib-1.3.1\</zlibDir>
Loading

0 comments on commit 0cb14d8

Please sign in to comment.