microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.2k stars 6.16k forks source link

[icu] Build error on wasm32-emscripten #38987

Open nvoronetskiy opened 1 month ago

nvoronetskiy commented 1 month ago

Package: icu:wasm32-emscripten@74.2#2

Host Environment

To Reproduce

vcpkg install

Failure logs

CMake Warning at ports/icu/portfile.cmake:2 (message):
  icu currently requires the following programs from the system package
  manager:

      autoconf automake autoconf-archive

  On Debian and Ubuntu derivatives:

      sudo apt-get install autoconf automake autoconf-archive

  On recent Red Hat and Fedora derivatives:

      sudo dnf install autoconf automake autoconf-archive

  On Arch Linux and derivatives:

      sudo pacman -S autoconf automake autoconf-archive

  On Alpine:

      apk add autoconf automake autoconf-archive

  On macOS:

      brew install autoconf automake autoconf-archive

Call Stack (most recent call first):
  scripts/ports.cmake:175 (include)

-- Using cached icu4c-74_2-src.tgz.
-- Cleaning sources at E:/sandbox/toolchain/vcpkg/buildtrees/icu/src/c-74_2-src-83138cd994.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source E:/sandbox/toolchain/vcpkg/downloads/icu4c-74_2-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
-- Applying patch vcpkg-cross-data.patch
-- Applying patch darwin-rpath.patch
-- Using source at E:/sandbox/toolchain/vcpkg/buildtrees/icu/src/c-74_2-src-83138cd994.clean
-- Getting CMake variables for wasm32-emscripten
-- Using cached msys2-autoconf-wrapper-20221207-1-any.pkg.tar.zst.
-- Using cached msys2-automake-wrapper-20221207-2-any.pkg.tar.zst.
-- Using cached msys2-binutils-2.42-1-x86_64.pkg.tar.zst.
-- Using cached msys2-libtool-2.4.7-3-x86_64.pkg.tar.zst.
-- Using cached msys2-make-4.4.1-1-x86_64.pkg.tar.zst.
-- Using cached msys2-pkgconf-2.1.0-1-x86_64.pkg.tar.zst.
-- Using cached msys2-which-2.21-4-x86_64.pkg.tar.zst.
-- Using cached msys2-autoconf-archive-2023.02.20-1-any.pkg.tar.zst.
-- Using cached msys2-bash-5.2.026-1-x86_64.pkg.tar.zst.
-- Using cached msys2-coreutils-8.32-5-x86_64.pkg.tar.zst.
-- Using cached msys2-file-5.45-1-x86_64.pkg.tar.zst.
-- Using cached msys2-gawk-5.3.0-1-x86_64.pkg.tar.zst.
-- Using cached msys2-grep-1~3.0-6-x86_64.pkg.tar.zst.
-- Using cached msys2-gzip-1.13-1-x86_64.pkg.tar.zst.
-- Using cached msys2-diffutils-3.10-1-x86_64.pkg.tar.zst.
-- Using cached msys2-sed-4.9-1-x86_64.pkg.tar.zst.
-- Using cached msys2-msys2-runtime-3.4.10-4-x86_64.pkg.tar.zst.
-- Using cached msys2-autoconf2.71-2.71-3-any.pkg.tar.zst.
-- Using cached msys2-automake1.16-1.16.5-1-any.pkg.tar.zst.
-- Using cached msys2-libiconv-1.17-1-x86_64.pkg.tar.zst.
-- Using cached msys2-libintl-0.22.4-1-x86_64.pkg.tar.zst.
-- Using cached msys2-zlib-1.3.1-1-x86_64.pkg.tar.zst.
-- Using cached msys2-tar-1.35-2-x86_64.pkg.tar.zst.
-- Using cached msys2-findutils-4.9.0-3-x86_64.pkg.tar.zst.
-- Using cached msys2-gmp-6.3.0-1-x86_64.pkg.tar.zst.
-- Using cached msys2-gcc-libs-13.2.0-2-x86_64.pkg.tar.zst.
-- Using cached msys2-libbz2-1.0.8-4-x86_64.pkg.tar.zst.
-- Using cached msys2-liblzma-5.4.6-2-x86_64.pkg.tar.zst.
-- Using cached msys2-libzstd-1.5.5-1-x86_64.pkg.tar.zst.
-- Using cached msys2-libreadline-8.2.010-1-x86_64.pkg.tar.zst.
-- Using cached msys2-mpfr-4.2.1-1-x86_64.pkg.tar.zst.
-- Using cached msys2-libpcre-8.45-4-x86_64.pkg.tar.zst.
-- Using cached msys2-m4-1.4.19-2-x86_64.pkg.tar.zst.
-- Using cached msys2-perl-5.38.2-1-x86_64.pkg.tar.zst.
-- Using cached msys2-ncurses-6.4-2-x86_64.pkg.tar.zst.
-- Using cached msys2-libxcrypt-4.4.36-1-x86_64.pkg.tar.zst.
-- Using msys root at E:/sandbox/toolchain/vcpkg/downloads/tools/msys2/a4d8db9df5991f31
-- Generating configure for wasm32-emscripten
-- Finished generating configure for wasm32-emscripten
-- Using cached msys2-mingw-w64-x86_64-pkgconf-1~2.2.0-1-any.pkg.tar.zst.
-- Using cached msys2-msys2-runtime-3.4.10-4-x86_64.pkg.tar.zst.
-- Using msys root at E:/sandbox/toolchain/vcpkg/downloads/tools/msys2/d33df895d441a36d
-- Configuring wasm32-emscripten-dbg
-- Configuring wasm32-emscripten-rel
-- Building wasm32-emscripten-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: E:/sandbox/toolchain/vcpkg/downloads/tools/msys2/a4d8db9df5991f31/usr/bin/make.exe "PKGDATA_OPTS=--without-assembly -O ../data/icupkg.inc" -j 33 --trace -f Makefile all
    Working Directory: E:/sandbox/toolchain/vcpkg/buildtrees/icu/wasm32-emscripten-dbg/
    See logs for more information:
      E:\sandbox\toolchain\vcpkg\buildtrees\icu\build-wasm32-emscripten-dbg-out.log
      E:\sandbox\toolchain\vcpkg\buildtrees\icu\build-wasm32-emscripten-dbg-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_build_make.cmake:136 (vcpkg_execute_build_process)
  scripts/cmake/vcpkg_install_make.cmake:2 (vcpkg_build_make)
  ports/icu/portfile.cmake:99 (vcpkg_install_make)
  scripts/ports.cmake:175 (include)
E:\sandbox\toolchain\vcpkg\buildtrees\icu\build-wasm32-emscripten-dbg-err.log ``` make: *** [Makefile:153: all-recursive] Error 2 make: *** Waiting for unfinished jobs.... ```
E:\sandbox\toolchain\vcpkg\buildtrees\icu\build-wasm32-emscripten-dbg-out.log ``` 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:327: update target 'config/pkgdata.inc' due to: target does not exist cd ./config; \ /usr/bin/make -f pkgdataMakefile rebuilding config/icucross.mk rebuilding config/icucross.inc (echo "CROSS_ICU_VERSION=74.2" ;\ echo "TOOLEXEEXT=" \ ) > config/icucross.mk (grep '^CURR_FULL_DIR' ./icudefs.mk ; \ grep '^CURR_FULL_DIR' ./../src/c-74_2-src-83138cd994.clean/source/config/mh-unknown || echo ""; \ ) > config/icucross.inc Makefile:335: 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 make[1]: Entering directory '/e/sandbox/toolchain/vcpkg/buildtrees/icu/wasm32-emscripten-dbg/config' Makefile:283: update target 'config/icu-i18n.pc' due to: target does not exist cat config/icu.pc > config/icu-i18n.pc (echo 'TOOLBINDIR=$(cross_buildroot)/bin' ;\ echo 'TOOLLIBDIR=$(cross_buildroot)/lib' ;\ echo "INVOKE=LD_LIBRARY_PATH="'$(TOOLLIBDIR):$(cross_buildroot)/stubdata:$(cross_buildroot)/tools/ctestfw:$$'"LD_LIBRARY_PATH" ;\ echo "PKGDATA_INVOKE=LD_LIBRARY_PATH="'$(cross_buildroot)/stubdata:$(cross_buildroot)/tools/ctestfw:$(TOOLLIBDIR):$$'"LD_LIBRARY_PATH " ;\ echo ) >> config/icucross.mk /usr/bin/install -c ./../src/c-74_2-src-83138cd994.clean/source/config/icu-config-top config/icu-config Makefile:291: update target 'config/icu-io.pc' due to: target does not exist cat config/icu.pc > config/icu-io.pc echo "Description: "International Components for Unicode": Common and Data libraries" >> config/icu-uc.pc chmod u+w config/icu-config echo "Description: "International Components for Unicode": Internationalization library" >> config/icu-i18n.pc *** ERROR - configure could not detect your platform Makefile:145: update target 'lib' due to: target does not exist /bin/sh ./../src/c-74_2-src-83138cd994.clean/source/mkinstalldirs lib echo "# Following from icu/icu4c/source/config/Makefile.inc" >> config/icu-config echo "Name: icu-uc" >> config/icu-uc.pc echo "Name: icu-i18n" >> config/icu-i18n.pc *** see the readme.html echo "Description: "International Components for Unicode": Stream and I/O Library" >> config/icu-io.pc LC_ALL=C /usr/bin/sed -f ./../src/c-74_2-src-83138cd994.clean/source/config/make2sh.sed < ./config/Makefile.inc | grep -v '#M#' | uniq >> config/icu-config echo "Libs:" '-L${libdir}' "-licuuc" "-licudata" >> config/icu-uc.pc *** or, try copying icu/source/config/mh-linux to mh-unknown echo "Name: icu-io" >> config/icu-io.pc mkdir lib echo "Requires: icu-uc" >> config/icu-i18n.pc Makefile:145: update target 'bin' due to: target does not exist /bin/sh ./../src/c-74_2-src-83138cd994.clean/source/mkinstalldirs bin *** and editing it. echo "Libs.private:" '${baselibs}' >> config/icu-uc.pc echo "Requires: icu-i18n" >> config/icu-io.pc echo "Libs:" "-licui18n" >> config/icu-i18n.pc echo "# Following from mh-unknown" >> config/icu-config exit 1 echo "Libs:" "-licuio" >> config/icu-io.pc echo config/icu-i18n.pc updated. LC_ALL=C /usr/bin/sed -f ./../src/c-74_2-src-83138cd994.clean/source/config/make2sh.sed < ./../src/c-74_2-src-83138cd994.clean/source/config/mh-unknown | grep -v '#M#' | uniq >> config/icu-config mkdir bin config/icu-i18n.pc updated. echo config/icu-uc.pc updated. pkgdataMakefile:41: update target 'clean' due to: target does not exist rm -rf pkgdata.inc echo config/icu-io.pc updated. config/icu-uc.pc updated. 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 '; for subdir in $list; do \ echo "/usr/bin/make[0]: Making \`$target' in \`$subdir'"; \ if test "$subdir" = "."; then \ dot_seen=yes; \ local_target="$target-local"; \ else \ local_target="$target"; \ fi; \ (cd $subdir && /usr/bin/make RECURSIVE=YES $local_target) || exit; \ done; \ if test "$dot_seen" = "no"; then \ /usr/bin/make "$target-local" || exit; \ fi pkgdataMakefile:22: update target 'all' due to: target does not exist echo GENCCODE_ASSEMBLY_TYPE= >> pkgdata.inc config/icu-io.pc updated. echo SO= >> pkgdata.inc cat ./../src/c-74_2-src-83138cd994.clean/source/config/icu-config-bottom >> config/icu-config echo SOBJ= >> pkgdata.inc /usr/bin/make[0]: Making `all' in `stubdata' chmod u-w config/icu-config make[1]: Entering directory '/e/sandbox/toolchain/vcpkg/buildtrees/icu/wasm32-emscripten-dbg/stubdata' echo A=a >> pkgdata.inc echo LIBPREFIX=lib >> pkgdata.inc echo LIB_EXT_ORDER=.74.2 >> pkgdata.inc echo COMPILE="E:/sandbox/toolchain/emsdk/upstream/emscripten/emcc.bat -DU_DEBUG=1 -DU_HAVE_ELF_H=1 -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -DU_HAVE_STRING_VIEW=1 -DU_ATTRIBUTE_DEPRECATED= -pthread -pthread -pthread -pthread -pthread -g -std=c11 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -c" >> pkgdata.inc *** ERROR - configure could not detect your platform echo LIBFLAGS="-I/E/sandbox/_obj-lib-etc-em/vcpkg_installed/wasm32-emscripten/debug/include " >> pkgdata.inc *** see the readme.html echo GENLIB="E:/sandbox/toolchain/emsdk/upstream/emscripten/emcc.bat -pthread -pthread -pthread -pthread -pthread -g -std=c11 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -shared " >> pkgdata.inc *** or, try copying icu/source/config/mh-linux to mh-unknown echo LDICUDTFLAGS= >> pkgdata.inc *** and editing it. echo LD_SONAME= >> pkgdata.inc echo RPATH_FLAGS= >> pkgdata.inc exit 1 echo BIR_LDFLAGS= >> pkgdata.inc make[1]: Leaving directory '/e/sandbox/toolchain/vcpkg/buildtrees/icu/wasm32-emscripten-dbg/stubdata' echo AR=E:/sandbox/toolchain/emsdk/upstream/emscripten/emar.bat >> pkgdata.inc echo ARFLAGS=r >> pkgdata.inc echo RANLIB=E:/sandbox/toolchain/emsdk/upstream/emscripten/emranlib.bat >> pkgdata.inc echo INSTALL_CMD=/usr/bin/install -c >> pkgdata.inc make[1]: Leaving directory '/e/sandbox/toolchain/vcpkg/buildtrees/icu/wasm32-emscripten-dbg/config' ```

Additional context

vcpkg.json ``` { "name": "project", "version": "1.0.0", "dependencies": [ "icu" ] } ```
dg0yt commented 1 month ago

ICU cross builds for non-windows targets do not work on windows hosts.