Hi, thanks very much for the awesome work! however I was trying to build openmcx on Windows and encountered several build errors. Most of them were related to missing packages on Windows, such as libxml2 or issues with libiconv building.
Environment Setup
- Operating System: Windows 11 (SDK 10.0.26100.0)
- CMake: 4.3.3
- Generator: Tested with Visual Studio 17 2022 and MinGW Makefiles
- Compiler: MSVC 19.44.35226.0
- Editor: Visual Studio Code with CMake Tools extension
Full Log:
PS C:\Users\chiha.000\Documents\github\openmcx> ./build
The system cannot find the path specified.
C:\Users\chiha.000\Documents\github\openmcx>rem Copyright (c) 2020 AVL List GmbH and others
C:\Users\chiha.000\Documents\github\openmcx>rem
C:\Users\chiha.000\Documents\github\openmcx>rem This program and the accompanying materials are made available under the
C:\Users\chiha.000\Documents\github\openmcx>rem terms of the Apache Software License 2.0 which is available at
C:\Users\chiha.000\Documents\github\openmcx>rem https://www.apache.org/licenses/LICENSE-2.0.
C:\Users\chiha.000\Documents\github\openmcx>rem
C:\Users\chiha.000\Documents\github\openmcx>rem SPDX-License-Identifier: Apache-2.0
C:\Users\chiha.000\Documents\github\openmcx>set VCPKG_DEFAULT_TRIPLET=x64-windows
C:\Users\chiha.000\Documents\github\openmcx>if not exist vcpkg git clone https://github.com/Microsoft/vcpkg.git
C:\Users\chiha.000\Documents\github\openmcx>cd .\vcpkg\
C:\Users\chiha.000\Documents\github\openmcx\vcpkg>rem By default we use the master branch of vcpkg.
C:\Users\chiha.000\Documents\github\openmcx\vcpkg>rem The last successfully tested vcpkg release was 2023.07.21.
C:\Users\chiha.000\Documents\github\openmcx\vcpkg>rem Uncomment the next line to use this specific release of vcpkg (this might help if the current master branch of vcpkg makes problems)
C:\Users\chiha.000\Documents\github\openmcx\vcpkg>rem git checkout 2023.07.21
C:\Users\chiha.000\Documents\github\openmcx\vcpkg>if not exist vcpkg.exe call .\bootstrap-vcpkg.bat
C:\Users\chiha.000\Documents\github\openmcx\vcpkg>call .\vcpkg.exe install libxml2 zlib
Computing installation plan...
The following packages will be built and installed:
* libiconv:x64-windows@1.19
libxml2[core,iconv,zlib]:x64-windows@2.15.3
* vcpkg-cmake-config:x64-windows@2024-05-23
zlib:x64-windows@1.3.2#1
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
Compiler found: C:/Program Files/Microsoft Visual Studio/18/Community/VC/Tools/MSVC/14.51.36231/bin/Hostx64/x64/cl.exe
Restored 0 package(s) from C:\Users\chiha.000\AppData\Local\vcpkg\archives in 110 us. Use --debug to see more details.
Installing 1/4 libiconv:x64-windows@1.19...
libiconv:x64-windows@1.19 package ABI: 33e3085795f86a64e7a67db9b576ebd525f8c55871a0de833d5e90f8ce8d8d8e
Building libiconv:x64-windows@1.19...
-- Using cached libiconv-1.19.tar.gz
-- Cleaning sources at C:/Users/chiha.000/Documents/github/openmcx/vcpkg/buildtrees/libiconv/src/v1.19-81131afe73.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Users/chiha.000/Documents/github/openmcx/vcpkg/downloads/libiconv-1.19.tar.gz
-- Applying patch 0002-Config-for-MSVC.patch
-- Applying patch 0003-Add-export.patch
-- Applying patch 0004-ModuleFileName.patch
-- Using source at C:/Users/chiha.000/Documents/github/openmcx/vcpkg/buildtrees/libiconv/src/v1.19-81131afe73.clean
-- Getting CMake variables for x64-windows
-- Loading CMake variables from C:/Users/chiha.000/Documents/github/openmcx/vcpkg/buildtrees/libiconv/cmake-get-vars_C_CXX-x64-windows.cmake.log
-- Using cached msys2-autoconf-wrapper-20250528-1-any.pkg.tar.zst
-- Using cached msys2-automake-wrapper-20250528-1-any.pkg.tar.zst
-- Using cached msys2-autoconf-archive-2024.10.16-1-any.pkg.tar.zst
-- Using cached msys2-binutils-2.45.1-1-x86_64.pkg.tar.zst
-- Using cached msys2-libtool-2.5.4-4-x86_64.pkg.tar.zst
-- Using cached msys2-make-4.4.1-2-x86_64.pkg.tar.zst
-- Using cached msys2-which-2.23-4-x86_64.pkg.tar.zst
-- Using cached msys2-bash-5.3.009-1-x86_64.pkg.tar.zst
-- Using cached msys2-coreutils-8.32-5-x86_64.pkg.tar.zst
-- Using cached msys2-file-5.46-2-x86_64.pkg.tar.zst
-- Using cached msys2-gawk-5.3.2-1-x86_64.pkg.tar.zst
-- Using cached msys2-grep-1~3.0-7-x86_64.pkg.tar.zst
-- Using cached msys2-gzip-1.14-1-x86_64.pkg.tar.zst
-- Using cached msys2-diffutils-3.12-1-x86_64.pkg.tar.zst
-- Using cached msys2-pkgconf-2.5.1-1-x86_64.pkg.tar.zst
-- Using cached msys2-sed-4.9-1-x86_64.pkg.tar.zst
-- Using cached msys2-msys2-runtime-3.6.5-1-x86_64.pkg.tar.zst
-- Using cached msys2-autoconf2.72-2.72-3-any.pkg.tar.zst
-- Using cached msys2-automake1.16-1.16.5-1-any.pkg.tar.zst
-- Using cached msys2-automake1.17-1.17-1-any.pkg.tar.zst
-- Using cached msys2-automake1.18-1.18.1-1-any.pkg.tar.zst
-- Using cached msys2-libiconv-1.18-1-x86_64.pkg.tar.zst
-- Using cached msys2-libintl-0.22.5-1-x86_64.pkg.tar.zst
-- Using cached msys2-zlib-1.3.1-1-x86_64.pkg.tar.zst
-- Using cached msys2-findutils-4.10.0-2-x86_64.pkg.tar.zst
-- Using cached msys2-tar-1.35-3-x86_64.pkg.tar.zst
-- Using cached msys2-gmp-6.3.0-2-x86_64.pkg.tar.zst
-- Using cached msys2-gcc-libs-15.2.0-1-x86_64.pkg.tar.zst
-- Using cached msys2-libbz2-1.0.8-4-x86_64.pkg.tar.zst
-- Using cached msys2-liblzma-5.8.2-1-x86_64.pkg.tar.zst
-- Using cached msys2-libzstd-1.5.7-1-x86_64.pkg.tar.zst
-- Using cached msys2-libreadline-8.3.003-1-x86_64.pkg.tar.zst
-- Using cached msys2-mpfr-4.2.2-1-x86_64.pkg.tar.zst
-- Using cached msys2-libpcre-8.45-5-x86_64.pkg.tar.zst
-- Using cached msys2-m4-1.4.19-2-x86_64.pkg.tar.zst
-- Using cached msys2-perl-5.40.3-1-x86_64.pkg.tar.zst
-- Using cached msys2-ncurses-6.5.20240831-2-x86_64.pkg.tar.zst
-- Using cached msys2-libxcrypt-4.5.2-1-x86_64.pkg.tar.zst
CMake Error: Problem with archive_read_open_filename(): Can't initialize filter; unable to run program "zstd -d -qq"
CMake Error at scripts/cmake/vcpkg_acquire_msys.cmake:232 (file):
file failed to extract:
C:/Users/chiha.000/Documents/github/openmcx/vcpkg/downloads/msys2-autoconf-wrapper-20250528-1-any.pkg.tar.zst
Call Stack (most recent call first):
installed/x64-windows/share/vcpkg-make/vcpkg_scripts.cmake:59 (vcpkg_acquire_msys)
installed/x64-windows/share/vcpkg-make/vcpkg_make.cmake:157 (vcpkg_insert_msys_into_path)
installed/x64-windows/share/vcpkg-make/vcpkg_make.cmake:166 (vcpkg_make_setup_win_msys)
installed/x64-windows/share/vcpkg-make/vcpkg_make_configure.cmake:62 (vcpkg_make_get_shell)
ports/libiconv/portfile.cmake:43 (vcpkg_make_configure)
scripts/ports.cmake:206 (include)
error: building libiconv:x64-windows 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 libiconv:x64-windows: 3.6 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+libiconv
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?title=%5Blibiconv%5D%20build%20error%20on%20x64-windows&body=Copy%20issue%20body%20from%20C%3A%2FUsers%2Fchiha.000%2FDocuments%2Fgithub%2Fopenmcx%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md
C:\Users\chiha.000\Documents\github\openmcx\vcpkg>cd ..
C:\Users\chiha.000\Documents\github\openmcx>if not exist build mkdir build
C:\Users\chiha.000\Documents\github\openmcx>cd build
C:\Users\chiha.000\Documents\github\openmcx\build>rem Default generator configuration
C:\Users\chiha.000\Documents\github\openmcx\build>set CMAKE_GENERATOR="Visual Studio 16 2019"
C:\Users\chiha.000\Documents\github\openmcx\build>set CMAKE_GENERATOR_PLATFORM=x64
C:\Users\chiha.000\Documents\github\openmcx\build>set VERBOSE=1
C:\Users\chiha.000\Documents\github\openmcx\build>setlocal EnableDelayedExpansion
C:\Users\chiha.000\Documents\github\openmcx\build>rem Check installed Visual Studio versions and choose the newest one
C:\Users\chiha.000\Documents\github\openmcx\build>for %x in ("17 2022" "16 2019" "10 2017" "14 2015") do (for /F "tokens=1,2" %a in (%x) do (
reg query "HKEY_CLASSES_ROOT\VisualStudio.DTE.%a.0" 1>>nul 2>&1
if !ERRORLEVEL! EQU 0 (
echo "Visual Studio %b found"
set CMAKE_GENERATOR=Visual Studio %a %b
goto build
)
) )
C:\Users\chiha.000\Documents\github\openmcx\build>(for /F "tokens=1,2" %a in ("17 2022") do (
reg query "HKEY_CLASSES_ROOT\VisualStudio.DTE.%a.0" 1>>nul 2>&1
if !ERRORLEVEL! EQU 0 (
echo "Visual Studio %b found"
set CMAKE_GENERATOR=Visual Studio %a %b
goto build
)
) )
C:\Users\chiha.000\Documents\github\openmcx\build>(
reg query "HKEY_CLASSES_ROOT\VisualStudio.DTE.17.0" 1>>nul 2>&1
if !ERRORLEVEL! EQU 0 (
echo "Visual Studio 2022 found"
set CMAKE_GENERATOR=Visual Studio 17 2022
goto build
)
)
"Visual Studio 2022 found"
C:\Users\chiha.000\Documents\github\openmcx\build>cmake .. -A x64 -DCMAKE_TOOLCHAIN_FILE=..\vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_INSTALL_PREFIX=C:\Users\chiha.000\Documents\github\openmcx\build\..\install
Re-run cmake no build system arguments
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.26200.
-- The C compiler identification is MSVC 19.44.35226.0
-- The CXX compiler identification is MSVC 19.44.35226.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - 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: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at C:/mingw64/share/cmake-4.3/Modules/FindPackageHandleStandardArgs.cmake:290 (message):
Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
Call Stack (most recent call first):
C:/mingw64/share/cmake-4.3/Modules/FindPackageHandleStandardArgs.cmake:654 (_FPHSA_FAILURE_MESSAGE)
C:/mingw64/share/cmake-4.3/Modules/FindLibXml2.cmake:181 (find_package_handle_standard_args)
vcpkg/scripts/buildsystems/vcpkg.cmake:939 (_find_package)
CMakeLists.txt:28 (find_package)
-- Configuring incomplete, errors occurred!
C:\Users\chiha.000\Documents\github\openmcx\build>cmake --build . --config Release --target INSTALL -- /m
Change Dir: 'C:/Users/chiha.000/Documents/github/openmcx/build'
Run Build Command(s): "C:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/amd64/MSBuild.exe" INSTALL.vcxproj /p:Configuration=Release /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:n /m
MSBuild version 17.14.40+3e7442088 for .NET Framework
MSBUILD : error MSB1009: Project file does not exist.
Switch: INSTALL.vcxproj
Hi, thanks very much for the awesome work! however I was trying to build openmcx on Windows and encountered several build errors. Most of them were related to missing packages on Windows, such as libxml2 or issues with libiconv building.
Environment Setup
Full Log: