[SOLVED] Installing Qt via vcpkg on macOS


While trying to install Qt5 on macOS Monterey I got stuck on the following:

 % ./vcpkg install qt5                                                     
Computing installation plan...
The following packages will be built and installed:
  * icu[core]:x64-osx -> 69.1#18
  * jasper[core,opengl]:x64-osx -> 2.0.33#3
  * libjpeg-turbo[core]:x64-osx -> 2.1.3#1
  * liblzma[core]:x64-osx -> 5.2.5#5
  * libwebp[core,nearlossless,simd]:x64-osx -> 1.2.1
  * opengl[core]:x64-osx -> 2022-03-14
  * openssl[core]:x64-osx -> 1.1.1n
  * pcre2[core]:x64-osx -> 10.39#2
  * pkgconf[core]:x64-osx -> 1.8.0#2
    qt5[activeqt,core,declarative,essentials,imageformats,multimedia,networkauth,quickcontrols2,svg,tools]:x64-osx -> 5.15.3#1
  * qt5-base[core]:x64-osx -> 5.15.3#2
  * qt5-declarative[core]:x64-osx -> 5.15.3
  * qt5-imageformats[core]:x64-osx -> 5.15.3
  * qt5-multimedia[core]:x64-osx -> 5.15.3
  * qt5-networkauth[core]:x64-osx -> 5.15.3
  * qt5-quickcontrols2[core]:x64-osx -> 5.15.3
  * qt5-svg[core]:x64-osx -> 5.15.3
  * qt5-tools[core]:x64-osx -> 5.15.3
  * sqlite3[core]:x64-osx -> 3.37.2#1
  * tiff[core,jpeg,lzma,zip]:x64-osx -> 4.3.0#6
  * vcpkg-pkgconfig-get-modules[core]:x64-osx -> 2022-02-10
  * zstd[core]:x64-osx -> 1.5.2#1
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-osx...
Restored 0 packages from /Users/user/.cache/vcpkg/archives in 93.27 us. Use --debug to see more details.
Starting package 1/22: icu:x64-osx
Building package icu[core]:x64-osx...
-- Using cached icu4c-69_1-src.tgz.
-- Cleaning sources at /Users/user/vcpkg/buildtrees/icu/src/c-69_1-src-b48be0c7ce.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /Users/user/vcpkg/downloads/icu4c-69_1-src.tgz
-- Applying patch disable-escapestr-tool.patch
-- Applying patch remove-MD-from-configure.patch
-- Applying patch fix_parallel_build_on_windows.patch
-- Applying patch fix-extra.patch
-- Applying patch mingw-dll-install.patch
-- Applying patch disable-static-prefix.patch
-- Applying patch fix-win-build.patch
-- Using source at /Users/user/vcpkg/buildtrees/icu/src/c-69_1-src-b48be0c7ce.clean
-- Getting CMake variables for x64-osx-dbg
-- Getting CMake variables for x64-osx-rel
-- Generating configure for x64-osx
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:128 (message):
    Command failed: /usr/local/bin/autoreconf -vfi
    Working Directory: /Users/user/vcpkg/buildtrees/icu/src/c-69_1-src-b48be0c7ce.clean/source
    Error code: 2
    See logs for more information:

Call Stack (most recent call first):
  scripts/cmake/vcpkg_configure_make.cmake:629 (vcpkg_execute_required_process)
  ports/icu/portfile.cmake:51 (vcpkg_configure_make)
  scripts/ports.cmake:145 (include)

Error: Building package icu:x64-osx failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `git pull` and `./vcpkg update`.
Then check for known issues at:
You can submit a new issue at:
  package: icu[core]:x64-osx -> 69.1#18
    vcpkg-tool version: 2022-03-09-1affd32f93b299d5a907816c328ca3ededb73a7e
    vcpkg-scripts version: 6b6a35335 2022-03-21 (5 hours ago)

Additionally, attach any relevant sections from the log files above.
user@users-MBP vcpkg % which make
user@users-MBP vcpkg % ./vcpkg install libtool
Computing installation plan...
Error: while loading libtool:
The port directory (/Users/user/vcpkg/ports/libtool) does not exist
Error: failed to load port from /Users/user/vcpkg/ports/libtool
note: updating vcpkg by rerunning bootstrap-vcpkg may resolve this failure.
user@users-MBP vcpkg % ./bootstrap-vcpkg.sh 
Downloading vcpkg-macos...
vcpkg collects usage data in order to help us improve your experience.
The data collected by Microsoft is anonymous.
You can opt-out of telemetry by re-running the bootstrap-vcpkg script with -disableMetrics,
passing --disable-metrics to vcpkg on the command line,
or by setting the VCPKG_DISABLE_METRICS environment variable.

Read more about vcpkg telemetry at docs/about/privacy.md
user@users-MBP vcpkg % 

On /Users/user/vcpkg/buildtrees/icu/autoconf-x64-osx-err.log I see:

autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
Can't exec "aclocal": No such file or directory at /usr/local/Cellar/autoconf/2.71/share/autoconf/Autom4te/FileUtils.pm line 274.
autoreconf: error: aclocal failed with exit status: 2

Any suggestion on how to proceed?


The file:

contains a list of system dependencies which need to be installed by you before vcpkg will cleanly work on osx. You probably can leave out mono though.

Answered By – Alexander Neumann

Answer Checked By – Candace Johnson (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *