Skip to content

[libflac] Build error on arm64-osx #49247

@Henrique194

Description

@Henrique194

Host Environment

  • OS: macOS 26.2
  • Host: arm64-osx
  • Compiler: Clang 16.0.0
  • CMake Version: 3.21
  • vcpkg-tool version: 2025-07-19-b91c3336aee7f32412508f7dd351ae2cabdb8819

Steps to reproduce the behavior

`vcpkg install libflac`

Failure logs

Console Output
-- Running vcpkg install
Detecting compiler hash for triplet arm64-osx...
Compiler found: /usr/bin/c++
The following packages are already installed:
    libogg:[email protected]
  * vcpkg-cmake:arm64-osx@2024-04-23
  * vcpkg-cmake-config:arm64-osx@2024-05-23
The following packages will be built and installed:
    libflac[core,stack-protector]:[email protected]
    libmad[aso,core]:[email protected]#4
    libvorbis:[email protected]#4
    sdl2:[email protected]
    sdl2-net:[email protected]#3
Restored 0 package(s) from /Users/henrique.barateli/.cache/vcpkg/archives in 179 us. Use --debug to see more details.
Installing 1/5 libflac[core,stack-protector]:[email protected]...
Building libflac[core,stack-protector]:[email protected]...
-- Using cached xiph-flac-1.5.0.tar.gz
-- Cleaning sources at /Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/src/1.5.0-5ec0185c23.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/downloads/xiph-flac-1.5.0.tar.gz
-- Applying patch android-cmake.diff
-- Applying patch fix-compile-options.patch
-- Applying patch fix-find-threads.patch
-- Using source at /Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/src/1.5.0-5ec0185c23.clean
-- Configuring arm64-osx
-- Building arm64-osx-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: /opt/homebrew/bin/cmake --build . --config Debug --target install -- -v -j11
    Working Directory: /Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/arm64-osx-dbg
    See logs for more information:
      /Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/install-arm64-osx-dbg-out.log

Call Stack (most recent call first):
/Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/cmake-build-debug/vcpkg_installed/arm64-osx/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
/Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/cmake-build-debug/vcpkg_installed/arm64-osx/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
buildtrees/versioning_/versions/libflac/1b83f01536820e062681fe33109e44bb3f597aca/portfile.cmake:37 (vcpkg_cmake_install)
scripts/ports.cmake:206 (include)

error: building libflac:arm64-osx failed with: BUILD_FAILED
See https://learn.microsoft.com/vcpkg/troubleshoot/build-failures?WT.mc_id=vcpkg_inproduct_cli for more information.
Elapsed time to handle libflac:arm64-osx: 8.3 s
Please ensure you're using the latest port files with git pull and vcpkg update.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+libflac
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?title=[libflac]+Build+error+on+arm64-osx&body=Copy%20issue%20body%20from%20%2FUsers%2Fhenrique.barateli%2FDesktop%2Fq%2Fapps%2Fclion%2Fchocolate-quake%2Fcmake-build-debug%2Fvcpkg_installed%2Fvcpkg%2Fissue_body.md

-- Running vcpkg install - failed
CMake Error at external/vcpkg/scripts/buildsystems/vcpkg.cmake:941 (message):
vcpkg install failed. See logs for more information:
/Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/cmake-build-debug/vcpkg-manifest-install.log
Call Stack (most recent call first):
/opt/homebrew/share/cmake/Modules/CMakeDetermineSystem.cmake:146 (include)
CMakeLists.txt:2 (project)

CMake Error: CMake was unable to find a build program corresponding to "Ninja Multi-Config". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

install-arm64-osx-dbg-out.log
[55/58] /usr/bin/c++ -DFLAC__NO_DLL -DFLAC__OVERFLOW_DETECT -DHAVE_CONFIG_H -D_DARWIN_C_SOURCE -D_FORTIFY_SOURCE=2 -D_POSIX_PTHREAD_SEMANTICS -D_TANDEM_SOURCE -D__STDC_WANT_IEC_60559_BFP_EXT__ -D__STDC_WANT_IEC_60559_DFP_EXT__ -D__STDC_WANT_IEC_60559_FUNCS_EXT__ -D__STDC_WANT_IEC_60559_TYPES_EXT__ -D__STDC_WANT_LIB_EXT2__ -D__STDC_WANT_MATH_SPEC_FUNCS__ -I/Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/src/1.5.0-5ec0185c23.clean/include -I/Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/arm64-osx-dbg -isystem /Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/cmake-build-debug/vcpkg_installed/arm64-osx/include -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef -fPIC -g -arch arm64 -Weffc++ -fstack-protector-strong -MD -MT src/libFLAC++/CMakeFiles/FLAC++.dir/stream_decoder.cpp.o -MF src/libFLAC++/CMakeFiles/FLAC++.dir/stream_decoder.cpp.o.d -o src/libFLAC++/CMakeFiles/FLAC++.dir/stream_decoder.cpp.o -c /Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/src/1.5.0-5ec0185c23.clean/src/libFLAC++/stream_decoder.cpp
FAILED: src/libFLAC++/CMakeFiles/FLAC++.dir/stream_decoder.cpp.o 
/usr/bin/c++ -DFLAC__NO_DLL -DFLAC__OVERFLOW_DETECT -DHAVE_CONFIG_H -D_DARWIN_C_SOURCE -D_FORTIFY_SOURCE=2 -D_POSIX_PTHREAD_SEMANTICS -D_TANDEM_SOURCE -D__STDC_WANT_IEC_60559_BFP_EXT__ -D__STDC_WANT_IEC_60559_DFP_EXT__ -D__STDC_WANT_IEC_60559_FUNCS_EXT__ -D__STDC_WANT_IEC_60559_TYPES_EXT__ -D__STDC_WANT_LIB_EXT2__ -D__STDC_WANT_MATH_SPEC_FUNCS__ -I/Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/src/1.5.0-5ec0185c23.clean/include -I/Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/arm64-osx-dbg -isystem /Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/cmake-build-debug/vcpkg_installed/arm64-osx/include -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef -fPIC -g -arch arm64 -Weffc++ -fstack-protector-strong -MD -MT src/libFLAC++/CMakeFiles/FLAC++.dir/stream_decoder.cpp.o -MF src/libFLAC++/CMakeFiles/FLAC++.dir/stream_decoder.cpp.o.d -o src/libFLAC++/CMakeFiles/FLAC++.dir/stream_decoder.cpp.o -c /Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/src/1.5.0-5ec0185c23.clean/src/libFLAC++/stream_decoder.cpp
In file included from /Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/src/1.5.0-5ec0185c23.clean/src/libFLAC++/stream_decoder.cpp:37:
In file included from /Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/src/1.5.0-5ec0185c23.clean/include/FLAC++/decoder.h:38:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/string:618:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory_resource/polymorphic_allocator.h:22:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/tuple:1433:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/exception:84:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__exception/exception_ptr.h:105:20: error: expected expression
  105 |   auto __cleanup = [](void* __p) { std::__destroy_at(static_cast<_Ep2*>(__p)); };
      |                    ^
1 error generated.
[56/58] /usr/bin/c++ -DFLAC__NO_DLL -DFLAC__OVERFLOW_DETECT -DHAVE_CONFIG_H -D_DARWIN_C_SOURCE -D_FORTIFY_SOURCE=2 -D_POSIX_PTHREAD_SEMANTICS -D_TANDEM_SOURCE -D__STDC_WANT_IEC_60559_BFP_EXT__ -D__STDC_WANT_IEC_60559_DFP_EXT__ -D__STDC_WANT_IEC_60559_FUNCS_EXT__ -D__STDC_WANT_IEC_60559_TYPES_EXT__ -D__STDC_WANT_LIB_EXT2__ -D__STDC_WANT_MATH_SPEC_FUNCS__ -I/Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/src/1.5.0-5ec0185c23.clean/include -I/Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/arm64-osx-dbg -isystem /Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/cmake-build-debug/vcpkg_installed/arm64-osx/include -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef -fPIC -g -arch arm64 -Weffc++ -fstack-protector-strong -MD -MT src/libFLAC++/CMakeFiles/FLAC++.dir/stream_encoder.cpp.o -MF src/libFLAC++/CMakeFiles/FLAC++.dir/stream_encoder.cpp.o.d -o src/libFLAC++/CMakeFiles/FLAC++.dir/stream_encoder.cpp.o -c /Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/src/1.5.0-5ec0185c23.clean/src/libFLAC++/stream_encoder.cpp
FAILED: src/libFLAC++/CMakeFiles/FLAC++.dir/stream_encoder.cpp.o 
/usr/bin/c++ -DFLAC__NO_DLL -DFLAC__OVERFLOW_DETECT -DHAVE_CONFIG_H -D_DARWIN_C_SOURCE -D_FORTIFY_SOURCE=2 -D_POSIX_PTHREAD_SEMANTICS -D_TANDEM_SOURCE -D__STDC_WANT_IEC_60559_BFP_EXT__ -D__STDC_WANT_IEC_60559_DFP_EXT__ -D__STDC_WANT_IEC_60559_FUNCS_EXT__ -D__STDC_WANT_IEC_60559_TYPES_EXT__ -D__STDC_WANT_LIB_EXT2__ -D__STDC_WANT_MATH_SPEC_FUNCS__ -I/Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/src/1.5.0-5ec0185c23.clean/include -I/Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/arm64-osx-dbg -isystem /Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/cmake-build-debug/vcpkg_installed/arm64-osx/include -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef -fPIC -g -arch arm64 -Weffc++ -fstack-protector-strong -MD -MT src/libFLAC++/CMakeFiles/FLAC++.dir/stream_encoder.cpp.o -MF src/libFLAC++/CMakeFiles/FLAC++.dir/stream_encoder.cpp.o.d -o src/libFLAC++/CMakeFiles/FLAC++.dir/stream_encoder.cpp.o -c /Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/src/1.5.0-5ec0185c23.clean/src/libFLAC++/stream_encoder.cpp
In file included from /Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/src/1.5.0-5ec0185c23.clean/src/libFLAC++/stream_encoder.cpp:37:
In file included from /Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/src/1.5.0-5ec0185c23.clean/include/FLAC++/encoder.h:39:
In file included from /Users/henrique.barateli/Desktop/q/apps/clion/chocolate-quake/external/vcpkg/buildtrees/libflac/src/1.5.0-5ec0185c23.clean/include/FLAC++/decoder.h:38:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/string:618:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory_resource/polymorphic_allocator.h:22:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/tuple:1433:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/exception:84:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__exception/exception_ptr.h:105:20: error: expected expression
  105 |   auto __cleanup = [](void* __p) { std::__destroy_at(static_cast<_Ep2*>(__p)); };
      |                    ^
1 error generated.
ninja: build stopped: subcommand failed.

Additional context

The error began occurring after updating to macOS 26.2. I encountered it while attempting to build Chocolate Quake:

vcpkg.json
{
  "name": "chocolate-quake",
  "version-string": "latest",
  "dependencies": [
    {
      "name": "sdl2",
      "version>=": "2.26.5"
    },
    {
      "name": "sdl2-net",
      "version>=": "2.2.0#3"
    },
    {
      "name": "libogg",
      "version>=": "1.3.6"
    },
    {
      "name": "libvorbis",
      "version>=": "1.3.7#4"
    },
    {
      "name": "libmad",
      "version>=": "0.16.4#4"
    },
    {
      "name": "libflac",
      "version>=": "1.5.0"
    }
  ],
  "builtin-baseline": "b91c3336aee7f32412508f7dd351ae2cabdb8819"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:port-bugThe issue is with a library, which is something the port should already support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions