Skip to content

Commit dd85d40

Browse files
Update mac build doc to reflect main branch: Qt6+VFX CY2024 (#770)
### Update macOS build instructions to reflect main branch: Qt6+VFX CY2024 ### Linked issues NA ### Summarize your change. This commit updates the the macOS build instructions to reflect main branch: Qt6+VFX CY2024 ### Describe the reason for the change. Build instructions were stale ### Describe what you have tested and on which operating system. ### Add a list of changes, and note any that might need special attention during the review. ### If possible, provide screenshots. Signed-off-by: Bernard Laberge <bernard.laberge@autodesk.com>
1 parent 3b8d2e6 commit dd85d40

File tree

2 files changed

+21
-158
lines changed

2 files changed

+21
-158
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
[![Open RV](docs/images/OpenRV_icon.png)](https://github.com/AcademySoftwareFoundation/OpenRV.git)
44
---
55

6-
![Supported Versions](https://img.shields.io/badge/python-3.10-blue)
7-
[![Supported VFX Platform Versions](https://img.shields.io/badge/vfx%20platform-2023-lightgrey.svg)](http://www.vfxplatform.com/)
6+
![Supported Versions](https://img.shields.io/badge/python-3.11-blue)
7+
[![Supported VFX Platform Versions](https://img.shields.io/badge/vfx%20platform-2024-lightgrey.svg)](http://www.vfxplatform.com/)
88
[![docs](https://readthedocs.org/projects/aswf-openrv/badge/?version=latest)](https://aswf-openrv.readthedocs.io/en/latest)
99

1010
## Overview

docs/build_system/config_macos.md

+19-156
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,17 @@
55

66
- [Summary](summary)
77
- [Allow Terminal to update or delete other applications](allow_terminal)
8-
- [Install XCode](install_xcode)
8+
- [Install Xcode](install_xcode)
99
- [Install Homebrew](install_homebrew)
1010
- [Install tools and build dependencies](install_tools_and_build_dependencies)
1111
- [Install Qt](install_qt)
1212
- [Build Open RV](build_openrv)
1313

14-
````{warning}
15-
**Qt Open Source version 5.15.2** is the latest with publicly available binaries, but it lacks *arm64* libraries.
16-
Therefore, OpenRV builds using **Qt 5.15.2** are limited to *x86_64* architecture. To build natively on *arm64*, you will
17-
have to build a recent version of Qt 5 from source or use the commercial version.
18-
19-
See [Qt](install_qt) section for more information
20-
````
21-
2214
````{note}
23-
OpenRV can be build for *x86_64* by changing the architecture of the terminal to *x86_64* with the following command:
15+
OpenRV can be built for *x86_64* by changing the architecture of the terminal to *x86_64* using the following command:
16+
```bash
17+
arch -x86_64 $SHELL
18+
```
2419
````arch -x86_64 $SHELL````
2520
2621
**It is important to use that *x86_64* terminal for all the subsequent steps.**
@@ -29,28 +24,21 @@ OpenRV can be build for *x86_64* by changing the architecture of the terminal to
2924
(allow_terminal)=
3025
## Allow Terminal to update or delete other applications
3126

32-
From the macOS System Settings/Privacy & Security/App Management, allow Terminal to update or delete other applications.
27+
From macOS System Settings > Privacy & Security > App Management, allow Terminal to update or delete other applications.
3328

3429
(install_xcode)=
35-
## Install XCode
30+
## Install Xcode
3631

37-
From the App Store, download XCode 14.3.1. Make sure that it's the source of the active developer directory.
38-
Note that using an XCode version more recent than 14.3.1 will result in an FFmpeg build break.
32+
From the App Store, download Xcode. Make sure that it is the source of the active developer directory.
3933

40-
`xcode-select -p` should return `/Applications/Xcode.app/Contents/Developer`. If it's not the case, run `sudo xcode-select -s /Applications/Xcode.app`
41-
42-
Note that XCode 15 is not compatible with Boost 1.80. If XCode 15 is installed, RV will automatically default to using Boost 1.81 instead.
43-
Install XCode 14.3.1 if you absolutely want to use Boost version 1.80 as per VFX reference platform CY2023.
44-
45-
Please reference [this workaround](https://forums.developer.apple.com/forums/thread/734709) to use XCode 14.3.1 on Sonoma, as it is no longer
46-
compatible by default.
34+
`xcode-select -p` should return `/Applications/Xcode.app/Contents/Developer`. If that is not the case, run `sudo xcode-select -s /Applications/Xcode.app`
4735

4836
(install_homebrew)=
4937
## Install Homebrew
5038

51-
Homebrew is the one stop shop providing all the build requirements. You can install it following the instructions on the [Homebrew page](https://brew.sh).
39+
Homebrew is the one-stop shop providing all the build requirements. You can install it by following the instructions on the [Homebrew page](https://brew.sh).
5240

53-
Make sure Homebrew's binary directory is in your PATH and that `brew` is resolved from your terminal.
41+
Make sure Homebrew's binary directory is in your PATH and that `brew` can be resolved from your terminal.
5442

5543
(install_tools_and_build_dependencies)=
5644
## Install tools and build dependencies
@@ -61,147 +49,22 @@ Most of the build requirements can be installed by running the following brew in
6149
brew install cmake ninja readline sqlite3 xz zlib tcl-tk@8 autoconf automake libtool python yasm clang-format black meson nasm pkg-config glew
6250
```
6351

64-
Make sure `python` resolves in your terminal. In some case, depending on how the python formula is built, there's no `python` symbolic link.
52+
Make sure `python` resolves in your terminal. In some cases, depending on how the python formula is built, there is no `python` symbolic link.
6553
In that case, you can create one with this command `ln -s python3 $(dirname $(which python3))/python`.
6654

6755
(install_qt)=
6856
## Install Qt
6957

70-
````{warning}
71-
For arm64, Qt must be compiled from source because the latest version is needed. Qt 5.15.2 does not have arm64 support.
72-
73-
For x86_64, Qt 5.15.2 can be used - but OpenRV must be built within a x86_64 terminal. You can change the architecture
74-
of the terminal with this command: ````arch -x86_64 $SHELL````
75-
76-
````
77-
78-
Download the last version of Qt 5.15.x that you can get using the online installer on the [Qt page](https://www.qt.io/download-open-source). Logs, Android, iOS and WebAssembly are not required to build OpenRV.
79-
80-
81-
WARNING: If you fetch Qt from another source, make sure to build it with SSL support, that it contains everything required to build PySide2, and that the file structure is similar to the official package.
82-
83-
Note: Qt5 from homebrew is known to not work well with OpenRV.
84-
85-
86-
### Quick guide to build Qt from source
87-
88-
````{warning}
89-
If you really do not need a arm64 build, it is **recommended** to build OpenRV for **x86_64** and use **Qt 5.15.2**. \
90-
\
91-
Building Qt from source is **difficult** even for developpers, and takes some times depending on your machine.
92-
````
93-
94-
````{note}
95-
The quick guide provided here is based
96-
on the [OpenRV GitHub Action workflow](https://github.com/AcademySoftwareFoundation/OpenRV/blob/main/.github/actions/build-qt5-for-arm64/action.yml) that OpenRV uses to build Qt from source for
97-
arm64.
98-
99-
Quick list of the dependencies: \
100-
XCode 14, homebrew and a multiple of packages, Ninja 1.11.1, Python2 and Python3.
101-
````
102-
103-
Here is the quick guide on how to build the latest Qt for arm64:
104-
````bash
105-
# Adapt the version for the XCode present on your machine.
106-
# XCode 14 must be used.
107-
sudo xcode-select -switch /Applications/Xcode_14.3.1.app
108-
````
109-
110-
````bash
111-
# Install all the homebrew pacakges
112-
brew install --quiet --formula libiconv libpng libpq libtool libuv libxau libxcb libxdmcp
113-
brew install --quiet --formula autoconf automake cmake pcre2 harfbuzz freetype node@18 nspr nss
114-
brew install --quiet --formula xcb-proto xcb-util xcb-util-cursor xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm
115-
brew install --quiet --formula brotli bzip2 dbus glew icu4c jpeg md4c openssl@1.1 pkg-config sqlite xorgproto zlib zstd
116-
````
117-
118-
````bash
119-
# Install Ninja 1.11.1
120-
wget https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-mac.zip
121-
unzip ninja-mac.zip -d ./ninja
122-
# Add Ninja to the PATH environment variable.
123-
echo 'export PATH=$(pwd)/ninja:$PATH' >> ~/.zprofile
124-
````
58+
Download the last version of Qt 6.5.x using the online installer on the [Qt page](https://www.qt.io/download-open-source). Qt logs, Android, iOS, and WebAssembly are not required to build OpenRV.
12559

126-
````bash
127-
# Install and use pyenv to manage python2 and python3.
128-
curl https://pyenv.run | bash
129-
echo 'export PYENV_ROOT=$HOME/.pyenv' >> ~/.zprofile
130-
echo 'export PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH' >> ~/.zprofile
13160

132-
source ~/.zprofile
133-
pyenv install 3.10.13 2.7.18
134-
pyenv global 3.10.13 2.7.18
135-
````
61+
WARNING: If you fetch Qt from another source, make sure it is built with SSL support, contains everything required to build PySide6, and that the file structure is similar to the official package.
13662

137-
````bash
138-
# Download Qt 5.15.15 source. A more recent version can be used as well.
139-
curl https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/official_releases/qt/5.15/5.15.15/single/qt-everywhere-opensource-src-5.15.15.tar.xz -o qt.tar.xz
140-
tar xf qt.tar.xz
141-
mv qt-everywhere-src-5.15.15 qt-src
142-
````
143-
144-
````bash
145-
# Create a folder for the build
146-
mkdir -p qt-build
147-
````
148-
149-
````bash
150-
# Change to the qt-build directory.
151-
cd qt-build
152-
153-
# Configure Qt build.
154-
# Make sure that /opt/homebrew/Cellar/openssl@1.1/1.1.1w and /opt/homebrew/Cellar/icu4c/74.2 exists.
155-
../qt-src/configure \
156-
--prefix="../myQt" \
157-
-no-strip \
158-
-no-rpath \
159-
-opensource \
160-
-plugin-sql-sqlite \
161-
-openssl \
162-
-verbose \
163-
-opengl desktop \
164-
-no-warnings-are-errors \
165-
-no-libudev \
166-
-no-egl \
167-
-nomake examples \
168-
-nomake tests \
169-
-c++std c++14 \
170-
-confirm-license \
171-
-no-use-gold-linker \
172-
-release \
173-
-no-sql-mysql \
174-
-no-xcb \
175-
-qt-libjpeg \
176-
-qt-libpng \
177-
-bundled-xcb-xinput \
178-
-sysconfdir /etc/xdg \
179-
-qt-pcre \
180-
-qt-harfbuzz \
181-
-R . \
182-
-icu \
183-
-skip qtnetworkauth \
184-
-skip qtpurchasing \
185-
-skip qtlocation \
186-
-I /opt/homebrew/Cellar/openssl@1.1/1.1.1w/include -L /opt/homebrew/Cellar/openssl@1.1/1.1.1w/lib \
187-
-I /opt/homebrew/Cellar/icu4c/74.2/include -L /opt/homebrew/Cellar/icu4c/74.2/lib
188-
189-
# Start the build
190-
make -j$(python -c 'import os; print(os.cpu_count())')
191-
192-
# Install Qt to the folder specified with the --prefix options previously.
193-
make install -j$(python -c 'import os; print(os.cpu_count())')
194-
````
195-
196-
Final step is to set the QT_HOME environment variable for OpenRV build system:
197-
````bash
198-
# Change the path based on the location of the myQt folder that was created previously.
199-
echo "export QT_HOME=<path to...>/myQt/Qt/5.15.15/clang_64" >> ~/.zprofile
200-
source ~/.zprofile
201-
````
63+
Note: Qt6 from homebrew is known to not work well with OpenRV.
64+
Note: The CI build agents are currently using Qt 6.5.3
20265

20366
(build_openrv)=
204-
## 8. Build Open RV
67+
## Build Open RV
20568

20669
(build_openrv1)=
20770
### Before executing any commands
@@ -240,8 +103,8 @@ source rvcmds.sh
240103
### Install Python dependencies
241104

242105
````{note}
243-
This section need to be done only one time when a fresh Open RV repository is cloned.
244-
The first time the `rvsetup` is executed, it will create a Python virtual environment in the current directory under `.venv`.
106+
This section needs to be done only once when a fresh Open RV repository is cloned.
107+
The first time `rvsetup` is executed, it will create a Python virtual environment in the current directory under `.venv`.
245108
````
246109

247110
From the Open RV directory, the following command will download and install the Python dependencies.

0 commit comments

Comments
 (0)