FindFileSystem fails on OSX for vcpkg
envgap__alandefreitas__matplotplusplus-343
01 / FAILURE SIGNATURE
As reported upstream
Cannot run a simple program using std::filesystem
Not a benchmark task.
- The project already builds and runs before the fix, so there is nothing to repair.
02 / ENVIRONMENT RECIPE
- Base commit
289f757c26c1d93868f77ffc2fdedae862b780fa- Manifest
source/matplot/CMakeLists.txt- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
alandefreitas/matplotplusplus #343 · read the original issue
**Bug category** <!-- Mark the bug category with an x--> - [x] *bug - compilation error* - [ ] *bug - compilation warning* - [ ] *bug - runtime error* - [ ] *bug - runtime warning* - [ ] *bug - logic error* **Describe the bug** Here I have attached the failure logs from the [vcpkg CI](https://dev.azure.com/vcpkg/public/_build/results?buildId=89400&view=logs&jobId=7b75bd19-17d3-53d4-00fd-23f1a49a8ba4&j=7b75bd19-17d3-53d4-00fd-23f1a49a8ba4) If you notice, it doesn't find the includes for filesystem: ``` -- Looking for C++ include filesystem -- Looking for C++ include filesystem - not found -- Looking for C++ include experimental/filesystem -- Looking for C++ include experimental/filesystem - not found ``` [failure logs for x64-osx.zip](https://github.com/alandefreitas/matplotplusplus/files/11456019/failure.logs.for.x64-osx.zip) **Steps to Reproduce** ```bash cmake -S ./ -B ./build ``` **Output** <details> ```console [1/2] "/Users/vagrant/Data/downloads/tools/cmake-3.25.1-osx/cmake-3.25.1-macos-universal/CMake.app/Contents/bin/cmake" -E chdir "../../x64-osx-dbg" "/Users/vagrant/Data/downloads/tools/cmake-3.25.1-osx/cmake-3.25.1-macos-universal/CMake.app/Contents/bin/cmake" "/Users/vagrant/Data/buildtrees/matplotplusplus/src/e7d26435f8-a696d3c322.clean" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=/Users/vagrant/Data/packages/matplotplusplus_x64-osx/debug" "-DFETCHCONTENT_FULLY_DISCONNECTED=ON" "-DMATPLOTPP_BUILD_EXPERIMENTAL_OPENGL_BACKEND=OFF" "-DWITH_JPEG=OFF" "-DWITH_TIFF=OFF" "-DWITH_ZLIB=OFF" "-DWITH_LAPACK=OFF" "-DWITH_BLAS=OFF" "-DWITH_FFTW3=OFF" "-DWITH_OPENCV=OFF" "-DMATPLOTPP_BUILD_EXAMPLES=OFF" "-DMATPLOTPP_BUILD_TESTS=OFF" "-DMATPLOTPP_BUILD_INSTALLER=ON" "-DMATPLOTPP_BUILD_PACKAGE=OFF" "-DMATPLOTPP_BUILD_WITH_PEDANTIC_WARNINGS=OFF" "-DWITH_SYSTEM_CIMG=ON" "-DMATPLOTPP_BUILD_HIGH_RESOLUTION_WORLD_MAP=" "-DCMAKE_MAKE_PROGRAM=/usr/local/bin/ninja" "-DCMAKE_SYSTEM_NAME=Darwin" "-DBUILD_SHARED_LIBS=OFF" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=/Users/vagrant/Data/work/1/s/scripts/toolchains/osx.cmake" "-DVCPKG_TARGET_TRIPLET=x64-osx" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=external" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=/Users/vagrant/Data/work/1/s/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=/Users/vagrant/Data/work/1/s" "-D_VCPKG_INSTALLED_DIR=/Users/vagrant/Data/installed" "-DVCPKG_MANIFEST_INSTALL=OFF" "-DCMAKE_OSX_ARCHITECTURES=x86_64" FAILED: ../../x64-osx-dbg/CMakeCache.txt "/Users/vagrant/Data/downloads/tools/cmake-3.25.1-osx/cmake-3.25.1-macos-universal/CMake.app/Contents/bin/cmake" -E chdir "../../x64-osx-dbg" "/Users/vagrant/Data/downloads/tools/cmake-3.25.1-osx/cmake-3.25.1-macos-universal/CMake.app/Contents/bin/cmake" "/Users/vagrant/Data/buildtrees/matplotplusplus/src/e7d26435f8-a696d3c322.clean" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=/Users/vagrant/Data/packages/matplotplusplus_x64-osx/debug" "-DFETCHCONTENT_FULLY_DISCONNECTED=ON" "-DMATPLOTPP_BUILD_EXPERIMENTAL_OPENGL_BACKEND=OFF" "-DWITH_JPEG=OFF" "-DWITH_TIFF=OFF" "-DWITH_ZLIB=OFF" "-DWITH_LAPACK=OFF" "-DWITH_BLAS=OFF" "-DWITH_FFTW3=OFF" "-DWITH_OPENCV=OFF" "-DMATPLOTPP_BUILD_EXAMPLES=OFF" "-DMATPLOTPP_BUILD_TESTS=OFF" "-DMATPLOTPP_BUILD_INSTALLER=ON" "-DMATPLOTPP_BUILD_PACKAGE=OFF" "-DMATPLOTPP_BUILD_WITH_PEDANTIC_WARNINGS=OFF" "-DWITH_SYSTEM_CIMG=ON" "-DMATPLOTPP_BUILD_HIGH_RESOLUTION_WORLD_MAP=" "-DCMAKE_MAKE_PROGRAM=/usr/local/bin/ninja" "-DCMAKE_SYSTEM_NAME=Darwin" "-DBUILD_SHARED_LIBS=OFF" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=/Users/vagrant/Data/work/1/s/scripts/toolchains/osx.cmake" "-DVCPKG_TARGET_TRIPLET=x64-osx" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=external" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=/Users/vagrant/Data/work/1/s/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=/Users/vagrant/Data/work/1/s" "-D_VCPKG_INSTALLED_DIR=/Users/vagrant/Data/installed" "-DVCPKG_MANIFEST_INSTALL=OFF" "-DCMAKE_OSX_ARCHITECTURES=x86_64" -- The C compiler identification is AppleClang 13.0.0.13000029 -- The CXX compiler identification is AppleClang 13.0.0.13000029 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done Setting CXX flags to default for Debug mode (-fPIC -O0) Setting global options Looking for -fsanitize=address -- Performing Test HAVE_FLAG_SANITIZER -- Performing Test HAVE_FLAG_SANITIZER - Success Adding -fsanitize=address Looking for -fsanitize=leak Adding -fsanitize=leak Looking for -fsanitize=undefined Adding -fsanitize=undefined -- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") -- Looking for C++ include filesystem -- Looking for C++ include filesystem - not found -- Looking for C++ include experimental/filesystem -- Looking for C++ include experimental/filesystem - not found CMake Error at cmake/FindFilesystem.cmake:251 (message): Cannot run a simple program using std::filesystem You need to update your C++ compiler to use this library Call Stack (most recent call first): /Users/vagrant/Data/work/1/s/scripts/buildsystems/vcpkg.cmake:853 (_find_package) source/matplot/CMakeLists.txt:2 (find_package) ``` </details> **Platform** <!-- Mark your platform with an x--> - [ ] *cross-platform issue - linux* - [ ] *cross-platform issue - windows* - [x] *cross-platform issue - macos* **Environment Details:** - OS: MacOS - OS Version: : 'vcpkg-eg-mac-08' - Compiler: AppleClang - Compiler version: 13.0.0.13000029 **Additional context** <!--optional--> Blocks: https://github.com/microsoft/vcpkg/pull/31229
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]