Compiling SC on macOS QT cmake error

After a longer time, I just tried to compile SC on macOS (fresh build folder).

cmake -G Xcode -DCMAKE_PREFIX_PATH=brew --prefix qt5 -DSUPERNOVA=ON ..

Here is the error message:

CMake Error at /opt/local/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5WebEngine" with
  any of the following names:


  Add the installation prefix of "Qt5WebEngine" to CMAKE_PREFIX_PATH or set
  "Qt5WebEngine_DIR" to a directory containing one of the above files.  If
  "Qt5WebEngine" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  QtCollider/CMakeLists.txt:26 (find_package)
  lang/CMakeLists.txt:184 (include)

This is the latest develop version (ec2dedfda8d6bfa0ee1171158e38023ec6b4a4de). I’ve done a brew upgrade qt5. Any hints?

Hi @julian,

WebEngine is a separate Qt module not included by default, I’m not sure how brew bundles it, but it looks like it’s not installed?


hi @julian - in case you’re trying to build supercollider for an arm architecture, the homebrew installed (native) qt5 lacks Qt5WebEngine, which is necessary for supercollider’s help browser
if you can live without it there’s a compiler flag to ignore qt5 webengine

Thank you both! I’m not on a new processor. But anyway, trying to build without:


Hm, this gives me exactly the same error.

Have you searched for the cmake files of Qt5WebEngine on your mac?

❯ find / -name "Qt5WebEngineConfig.cmake"

Maybe taking a look at

❯ brew info qt5
qt@5: stable 5.15.2 (bottled) [keg-only]
Cross-platform application and UI framework
/usr/local/Cellar/qt@5/5.15.2_1 (10,688 files, 365.9MB)
  Poured from bottle on 2022-01-25 at 13:21:49
/usr/local/Cellar/qt@5/5.15.2_2 (10,688 files, 380MB)
  Poured from bottle on 2022-03-07 at 22:24:28
License: GFDL-1.3-only and GPL-2.0-only and GPL-3.0-only and LGPL-2.1-only and LGPL-3.0-only
==> Dependencies
Build: node ✔, pkg-config ✔
==> Requirements
Build: Xcode ✔
Required: macOS >= 10.12 ✔
==> Caveats
We agreed to the Qt open source license for you.
If this is unacceptable you should uninstall.

qt@5 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

If you need to have qt@5 first in your PATH, run:
  echo 'export PATH="/usr/local/opt/qt@5/bin:$PATH"' >> ~/.zshrc

For compilers to find qt@5 you may need to set:
  export LDFLAGS="-L/usr/local/opt/qt@5/lib"
  export CPPFLAGS="-I/usr/local/opt/qt@5/include"

For pkg-config to find qt@5 you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig"

==> Analytics
install: 63,340 (30 days), 133,646 (90 days), 523,195 (365 days)
install-on-request: 8,061 (30 days), 18,530 (90 days), 65,294 (365 days)
build-error: 30 (30 days)

will may show some necessary steps.

just tried to build it on my machine, works w/o problems but w/ lots of warnings.

edit: also check

❯ ls /usr/local/opt/qt@5/lib/cmake/Qt5WebEngine
Qt5WebEngineConfig.cmake        Qt5WebEngineConfigVersion.cmake

It should work :slight_smile:
I’d try reinstalling qt (brew uninstall followed by brew install --force or something like that).
BTW you are adding backticks around `brew --prefix qt5`, correct?

is useful information, thank you.

But all seems fine, ls /usr/local/opt/qt@5/lib/cmake/Qt5WebEngine gives the same as yours.

I’ve reinstalled qt5, no change …

yes, double checked…

Julian, did you have any luck with this?

In case others see this thread - on an intel mac there never was an issue with qtwebengine in qt5 - it gets installed by default with the rest of the qt in homebrew (qtwebengine is however missing on M1 macs in qt5).

If this is still an issue, I’d try reinstalling XCode command line tools, erasing the contents of the build folder and running cmake again…

no, no luck. It used to work on this computer, maybe half a year ago. Reinstalling xcode wouldn’t change the qt5 install, would it?

I don’t think it would. But in case it did reinstalling qt5 is rather straightforward…

Also, have you run brew doctor?

Which macOS version are you on?

Now I have finally solved it. brew doctor gave me a hint:

Warning: Some installed formulae are missing dependencies.
You should `brew install` the missing dependencies:
  brew install gperftools qt


Warning: Some installed formulae are not readable:
  qt@5.5: unknown or unsupported macOS version: :mountain_lion

so I uninstalled qt5.5 and ran brew install gperftools qt

This solved it. Thank you for your hints!