microsoft / microsoft/vcpkg

[icu] build error on x64-mingw-static (cross-compilation from arm64-osx to x64-mingw-static)

Open
#53,709 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
CMake
Stars
27.5k
Forks
7.7k
Avg merge
2d 19h
Merged PRs (30d)
321

Description

Copy issue body from /Users/frenchyicon/Desktop/velvet/out/build/vcpkg_win_debug/vcpkg_installed/vcpkg/issue_body.md

Package: icu:x64-mingw-static@78.3#1

**Host Environment**

- Host: arm64-osx
- Compiler: GNU 16.2.0
- CMake Version: 4.4.0
- vcpkg-tool version: 2026-07-13-bf04c909169fdbb30821c02c6eb01f1cd1295d05
vcpkg-scripts version: ec62869cdd 2026-07-16 (7 weeks ago)

**To Reproduce**

`vcpkg install `

**Failure logs**

```
-- Using cached icu4c-78.3-sources.tgz
-- Cleaning sources at /Users/frenchyicon/vcpkg/buildtrees/icu/src/icu4c-78-34dc699e15.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /Users/frenchyicon/vcpkg/downloads/icu4c-78.3-sources.tgz
-- Applying patch disable-static-prefix.patch
-- Applying patch fix_bsd_and_solaris.patch
-- Applying patch fix_parallel_build_on_windows.patch
-- Applying patch fix-python-path-with-spaces.patch
-- Applying patch mh-darwin.patch
-- Applying patch mh-mingw.patch
-- Applying patch mh-msys-msvc.patch
-- Applying patch subdirs.patch
-- Applying patch vcpkg-cross-data.patch
-- Using source at /Users/frenchyicon/vcpkg/buildtrees/icu/src/icu4c-78-34dc699e15.clean
-- Getting CMake variables for x64-mingw-static
-- Loading CMake variables from /Users/frenchyicon/vcpkg/buildtrees/icu/cmake-get-vars_C_CXX-x64-mingw-static.cmake.log
-- Configuring x64-mingw-static-dbg
-- Configuring x64-mingw-static-rel
-- Building/Installing x64-mingw-static-dbg
-- Making target 'all' for x64-mingw-static-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
Command failed: /bin/bash -c "CPP='/opt/homebrew/bin/x86_64-w64-mingw32-gcc -E' CC='/opt/homebrew/bin/x86_64-w64-mingw32-gcc' CXX='/opt/homebrew/bin/x86_64-w64-mingw32-g++' CC_FOR_BUILD='/opt/homebrew/bin/x86_64-w64-mingw32-gcc' CPP_FOR_BUILD='/opt/homebrew/bin/x86_64-w64-mingw32-gcc -E' CXX_FOR_BUILD='/opt/homebrew/bin/x86_64-w64-mingw32-g++' RC='/opt/homebrew/bin/x86_64-w64-mingw32-windres' WINDRES='/opt/homebrew/bin/x86_64-w64-mingw32-windres' AR='/opt/homebrew/bin/x86_64-w64-mingw32-ar' LD='/opt/homebrew/bin/x86_64-w64-mingw32-ld -verbose' RANLIB='/opt/homebrew/bin/x86_64-w64-mingw32-ranlib' OBJDUMP='/opt/homebrew/bin/x86_64-w64-mingw32-objdump' STRIP='/opt/homebrew/bin/x86_64-w64-mingw32-strip' NM='/opt/homebrew/bin/x86_64-w64-mingw32-nm' DLLTOOL='/opt/homebrew/bin/x86_64-w64-mingw32-dlltool' CCAS=': CCAS-disabled' AS=': AS-disabled' /opt/homebrew/bin/gmake V=1 -j 9 --trace -f Makefile all DESTDIR=/Users/frenchyicon/vcpkg/packages/icu_x64-mingw-static"
Working Directory: /Users/frenchyicon/vcpkg/buildtrees/icu/x64-mingw-static-dbg
See logs for more information:
/Users/frenchyicon/vcpkg/buildtrees/icu/make-all-x64-mingw-static-dbg-out.log
/Users/frenchyicon/vcpkg/buildtrees/icu/make-all-x64-mingw-static-dbg-err.log

Call Stack (most recent call first):
/Users/frenchyicon/Desktop/velvet/out/build/vcpkg_win_debug/vcpkg_installed/arm64-osx/share/vcpkg-make/vcpkg_make.cmake:68 (vcpkg_execute_build_process)
/Users/frenchyicon/Desktop/velvet/out/build/vcpkg_win_debug/vcpkg_installed/arm64-osx/share/vcpkg-make/vcpkg_make_install.cmake:110 (vcpkg_run_shell_as_build)
/Users/frenchyicon/.cache/vcpkg/registries/git-trees/931a42f3b3b911ba73dbbaead4c1e0037a158efd/portfile.cmake:77 (vcpkg_make_install)
scripts/ports.cmake:206 (include)

```

/Users/frenchyicon/vcpkg/buildtrees/icu/make-all-x64-mingw-static-dbg-err.log

```
stubdata.d:1: *** missing separator. Stop.
gmake: *** [Makefile:153: all-recursive] Error 2
```

/Users/frenchyicon/vcpkg/buildtrees/icu/make-all-x64-mingw-static-dbg-out.log

```
Detected MSYS version: 0
Makefile:254: update target 'config/icucross.mk' due to: target does not exist
echo rebuilding config/icucross.mk
Makefile:265: update target 'config/icucross.inc' due to: target does not exist
echo rebuilding config/icucross.inc
Makefile:347: update target 'config/pkgdata.inc' due to: target does not exist
cd ./config; \
/opt/homebrew/bin/gmake -f pkgdataMakefile
Makefile:355: update target 'config/icu-config' due to: target does not exist
rm -rf config/icu-config
Makefile:275: update target 'config/icu-uc.pc' due to: target does not exist
cat config/icu.pc > config/icu-uc.pc
Makefile:287: update target 'config/icu-i18n.pc' due to: target does not exist
cat config/icu.pc > config/icu-i18n.pc
rebuilding config/icucross.mk
rebuilding config/icucross.inc
(echo "CROSS_ICU_VERSION=78.3" ;\
echo "TOOLEXEEXT=.exe" \
) > config/icucross.mk
(grep '^CURR_FULL_DIR' ./icudefs.mk ; \
grep '^CURR_FULL_DIR' ./../src/icu4c-78-34dc699e15.clean/source/config/mh-mingw64 || echo ""; \
) > config/icucross.inc
Makefile:299: update target 'config/icu-io.pc' due to: target does not exist
cat config/icu.pc > config/icu-io.pc
Makefile:145: update target 'lib' due to: target does not exist
/bin/sh ./../src/icu4c-78-34dc699e15.clean/source/mkinstalldirs lib
Makefile:145: update target 'bin' due to: target does not exist
/bin/sh ./../src/icu4c-78-34dc699e15.clean/source/mkinstalldirs bin
/usr/bin/install -c ./../src/icu4c-78-34dc699e15.clean/source/config/icu-config-top config/icu-config
gmake[1]: Entering directory '/Users/frenchyicon/vcpkg/buildtrees/icu/x64-mingw-static-dbg/config'
chmod u+w config/icu-config
echo "Description: "International Components for Unicode": Common and Data libraries" >> config/icu-uc.pc
Detected MSYS version: 0
echo "Description: "International Components for Unicode": Internationalization library" >> config/icu-i18n.pc
(echo 'TOOLBINDIR=$(cross_buildroot)/bin' ;\
echo 'TOOLLIBDIR=$(cross_buildroot)/lib' ;\
echo "INVOKE=PATH="'$(TOOLLIBDIR):$(cross_buildroot)/stubdata:$(cross_buildroot)/tools/ctestfw:$$'"PATH" ;\
echo "PKGDATA_INVOKE=PATH="'$(cross_buildroot)/stubdata:$(cross_buildroot)/tools/ctestfw:$(TOOLLIBDIR):$$'"PATH " ;\
echo ) >> config/icucross.mk
echo "# Following from icu/icu4c/source/config/Makefile.inc" >> config/icu-config
mkdir lib
mkdir bin
echo "Name: icu-i18n" >> config/icu-i18n.pc
echo "Name: icu-uc" >> config/icu-uc.pc
echo "Description: "International Components for Unicode": Stream and I/O Library" >> config/icu-io.pc
pkgdataMakefile:41: update target 'clean' due to: target does not exist
rm -rf pkgdata.inc
Makefile:153: update target 'all-recursive' due to: target is .PHONY
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
list='stubdata common i18n io data extra '; for subdir in $list; do \
echo "/opt/homebrew/bin/gmake[0]: Making \`$target' in \`$subdir'"; \
if test "$subdir" = "."; then \
dot_seen=yes; \
local_target="$target-local"; \
else \
local_target="$target"; \
fi; \
(cd $subdir && /opt/homebrew/bin/gmake RECURSIVE=YES $local_target) || exit; \
done; \
if test "$dot_seen" = "no"; then \
/opt/homebrew/bin/gmake "$target-local" || exit; \
fi
LC_ALL=C /usr/bin/sed -f ./../src/icu4c-78-34dc699e15.clean/source/config/make2sh.sed < ./config/Makefile.inc | grep -v '#M#' | uniq >> config/icu-config
echo "Requires: icu-uc" >> config/icu-i18n.pc
pkgdataMakefile:22: update target 'all' due to: target does not exist
echo GENCCODE_ASSEMBLY_TYPE=-a gcc-mingw64 >> pkgdata.inc
echo "Libs:" '-L${libdir}' ""-licuucd"" ""-licudtd"" '${baselibs}' >> config/icu-uc.pc
echo "Name: icu-io" >> config/icu-io.pc
echo "Libs:" '-L${libdir}' ""-licuind"" >> config/icu-i18n.pc
echo config/icu-uc.pc updated.
config/icu-uc.pc updated.
echo SO=dll >> pkgdata.inc
/opt/homebrew/bin/gmake[0]: Making `all' in `stubdata'
echo config/icu-i18n.pc updated.
echo "Requires: icu-i18n" >> config/icu-io.pc
echo "# Following from mh-mingw64" >> config/icu-config
config/icu-i18n.pc updated.
gmake[1]: Entering directory '/Users/frenchyicon/vcpkg/buildtrees/icu/x64-mingw-static-dbg/stubdata'
echo SOBJ=dll >> pkgdata.inc
echo "Libs:" '-L${libdir}' ""-licuiod"" >> config/icu-io.pc
Detected MSYS version: 0
LC_ALL=C /usr/bin/sed -f ./../src/icu4c-78-34dc699e15.clean/source/config/make2sh.sed < ./../src/icu4c-78-34dc699e15.clean/source/config/mh-mingw64 | grep -v '#M#' | uniq >> config/icu-config
echo A=a >> pkgdata.inc
echo config/icu-io.pc updated.
config/icu-io.pc updated.
echo LIBPREFIX= >> pkgdata.inc
cat ./../src/icu4c-78-34dc699e15.clean/source/config/icu-config-bottom >> config/icu-config
echo LIB_EXT_ORDER=78.dll >> pkgdata.inc
generating dependency information for .././../src/icu4c-78-34dc699e15.clean/source/stubdata/stubdata.cpp
echo COMPILE="/opt/homebrew/bin/x86_64-w64-mingw32-gcc -DU_DEBUG=1 -DHAVE_DLOPEN=0 -DU_HAVE_MMAP=0 -DU_STATIC_IMPLEMENTATION -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DU_ALL_IMPLEMENTATION -DU_ATTRIBUTE_DEPRECATED= -g -std=c11 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -mthreads -c" >> pkgdata.inc
chmod u-w config/icu-config
echo LIBFLAGS="-I/Users/frenchyicon/Desktop/velvet/out/build/vcpkg_win_debug/vcpkg_installed/x64-mingw-static/debug/include -DPIC " >> pkgdata.inc
echo GENLIB="/opt/homebrew/bin/x86_64-w64-mingw32-gcc -g -std=c11 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -mthreads -L/Users/frenchyicon/Desktop/velvet/out/build/vcpkg_win_debug/vcpkg_installed/x64-mingw-static/debug/lib -shared -Wl,--enable-auto-import -Wl,--out-implib=./liball.dll.a" >> pkgdata.inc
echo LDICUDTFLAGS= >> pkgdata.inc
echo LD_SONAME= >> pkgdata.inc
echo RPATH_FLAGS= >> pkgdata.inc
echo BIR_LDFLAGS= >> pkgdata.inc
echo AR=/opt/homebrew/bin/x86_64-w64-mingw32-ar >> pkgdata.inc
echo ARFLAGS=r >> pkgdata.inc
echo RANLIB=/opt/homebrew/bin/x86_64-w64-mingw32-ranlib >> pkgdata.inc
echo INSTALL_CMD=/usr/bin/install -c >> pkgdata.inc
gmake[1]: Leaving directory '/Users/frenchyicon/vcpkg/buildtrees/icu/x64-mingw-static-dbg/config'
Makefile:174: update target 'all-local' due to: target is .PHONY
echo "Note: rebuild with \"/opt/homebrew/bin/gmake VERBOSE=1 all\" to show all compiler parameters."
Note: rebuild with "/opt/homebrew/bin/gmake VERBOSE=1 all" to show all compiler parameters.
Detected MSYS version: 0
gmake[1]: Leaving directory '/Users/frenchyicon/vcpkg/buildtrees/icu/x64-mingw-static-dbg/stubdata'
```

**Additional context**

vcpkg.json

```
{
"name": "velvet",
"version": "0.0.1",
"dependencies": [
{
"name": "glfw3",
"version>=": "3.4"
},
{
"name": "icu",
"version>=": "78.3"
},
"cglm"
]
}

```

Contributor guide

Open the contributing guide

Research direction

Start with the ICU portfile.cmake around line 77 and reproduce the x64-mingw-static build from arm64-osx. Inspect make-all-x64-mingw-static-dbg-err.log and the generated stubdata.d failure, along with the listed ICU patches. Done means the ICU package builds and installs successfully for this triplet.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.