Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ICU] build failure #32711

Closed
YunchengLiu opened this issue Jul 23, 2023 · 11 comments · Fixed by #32750
Closed

[ICU] build failure #32711

YunchengLiu opened this issue Jul 23, 2023 · 11 comments · Fixed by #32750
Assignees
Labels
requires:repro The issue is not currently repro-able

Comments

@YunchengLiu
Copy link

YunchengLiu commented Jul 23, 2023

Operating system

Windows 11 Pro

Compiler

MSVC 17.6.5

Steps to reproduce the behavior

`.\vcpkg.exe install icu:x64-windows`

vcpkg is updated to date.

Failure logs

  .\vcpkg.exe install icu:x64-windows
Computing installation plan...
The following packages will be built and installed:
    icu[core,tools]:x64-windows -> 73.1
Detecting compiler hash for triplet x64-windows...
Restored 0 package(s) from E:\_DevEnv\vcpkg_bin_caches in 106 us. Use --debug to see more details.
Installing 1/1 icu:x64-windows...
Building icu[core,tools]:x64-windows...
-- Using cached icu4c-73_1-src.tgz.
-- Cleaning sources at E:/_DevEnv/vcpkg/buildtrees/icu/src/c-73_1-src-3575e21c7c.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source E:/_DevEnv/vcpkg/downloads/icu4c-73_1-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
-- Using source at E:/_DevEnv/vcpkg/buildtrees/icu/src/c-73_1-src-3575e21c7c.clean
-- Getting CMake variables for x64-windows
-- Using cached msys2-autoconf-wrapper-20221207-1-any.pkg.tar.zst.
-- Using cached msys2-automake-wrapper-20221207-1-any.pkg.tar.zst.
-- Using cached msys2-binutils-2.40-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-1.9.4-1-x86_64.pkg.tar.zst.
-- Using cached msys2-which-2.21-4-x86_64.pkg.tar.zst.
-- Using cached msys2-autoconf-archive-2022.09.03-1-any.pkg.tar.zst.
-- Using cached msys2-bash-5.2.015-1-x86_64.pkg.tar.zst.
-- Using cached msys2-coreutils-8.32-5-x86_64.pkg.tar.zst.
-- Using cached msys2-file-5.44-5-x86_64.pkg.tar.zst.
-- Using cached msys2-gawk-5.2.1-2-x86_64.pkg.tar.zst.
-- Using cached msys2-grep-1~3.0-6-x86_64.pkg.tar.zst.
-- Using cached msys2-gzip-1.12-2-x86_64.pkg.tar.zst.
-- Using cached msys2-diffutils-3.9-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.6-1-x86_64.pkg.tar.zst.
-- Using cached msys2-autoconf2.71-2.71-1-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.21-2-x86_64.pkg.tar.zst.
-- Using cached msys2-zlib-1.2.13-1-x86_64.pkg.tar.zst.
-- Using cached msys2-tar-1.34-3-x86_64.pkg.tar.zst.
-- Using cached msys2-findutils-4.9.0-3-x86_64.pkg.tar.zst.
-- Using cached msys2-gmp-6.2.1-2-x86_64.pkg.tar.zst.
-- Using cached msys2-gcc-libs-11.3.0-3-x86_64.pkg.tar.zst.
-- Using cached msys2-libbz2-1.0.8-4-x86_64.pkg.tar.zst.
-- Using cached msys2-liblzma-5.4.1-1-x86_64.pkg.tar.zst.
-- Using cached msys2-libzstd-1.5.4-1-x86_64.pkg.tar.zst.
-- Using cached msys2-libreadline-8.2.001-3-x86_64.pkg.tar.zst.
-- Using cached msys2-mpfr-4.2.0-2-x86_64.pkg.tar.zst.
-- Using cached msys2-libpcre-8.45-3-x86_64.pkg.tar.zst.
-- Using cached msys2-m4-1.4.19-2-x86_64.pkg.tar.zst.
-- Using cached msys2-perl-5.36.0-1-x86_64.pkg.tar.zst.
-- Using cached msys2-ncurses-6.4-1-x86_64.pkg.tar.zst.
-- Using cached msys2-libcrypt-2.1-4-x86_64.pkg.tar.zst.
-- Using msys root at E:/_DevEnv/vcpkg/downloads/tools/msys2/87962f0d86055c95
CMake Warning at scripts/cmake/vcpkg_configure_make.cmake:264 (message):
  Unable to find system dir in the PATH variable! Appending required msys
  paths!
Call Stack (most recent call first):
  ports/icu/portfile.cmake:54 (vcpkg_configure_make)
  scripts/ports.cmake:147 (include)


-- Generating configure for x64-windows
-- Finished generating configure for x64-windows
-- Using cached mingw-w64-i686-pkgconf-1~1.8.0-2-any.pkg.tar.zst.
-- Using cached msys2-msys2-runtime-3.4.6-1-x86_64.pkg.tar.zst.
-- Using msys root at E:/_DevEnv/vcpkg/downloads/tools/msys2/6f3fa1a12ef85a6f
-- Configuring x64-windows-dbg
-- Configuring x64-windows-rel
-- Building x64-windows-dbg
-- Installing x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: E:/_DevEnv/vcpkg/downloads/tools/msys2/87962f0d86055c95/usr/bin/make.exe -j 9 --trace -f Makefile install DESTDIR=/E/_DevEnv/vcpkg/packages/icu_x64-windows
    Working Directory: E:/_DevEnv/vcpkg/buildtrees/icu/x64-windows-dbg/
    See logs for more information:
      E:\_DevEnv\vcpkg\buildtrees\icu\install-x64-windows-dbg-out.log
      E:\_DevEnv\vcpkg\buildtrees\icu\install-x64-windows-dbg-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_build_make.cmake:168 (vcpkg_execute_build_process)
  scripts/cmake/vcpkg_install_make.cmake:2 (vcpkg_build_make)
  ports/icu/portfile.cmake:144 (vcpkg_install_make)
  scripts/ports.cmake:147 (include)


error: building icu:x64-windows failed with: BUILD_FAILED
Elapsed time to handle icu:x64-windows: 4.8 min
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+icu
You can submit a new issue at:
    https://github.com/microsoft/vcpkg/issues/new?title=[icu]+Build+error&body=Copy+issue+body+from+E%3A%2F_DevEnv%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md

log files
install-x64-windows-dbg-out.log
install-x64-windows-dbg-err.log

Additional context

No response

@YunchengLiu YunchengLiu added the category:port-bug The issue is with a library, which is something the port should already support label Jul 23, 2023
@JonLiu1993
Copy link
Member

JonLiu1993 commented Jul 24, 2023

cannot create regular file 'E:/_DevEnv/vcpkg/packages/icu_x64-windows/E/_DevEnv/vcpkg/installed/x64-windows/debug/lib/icudtd73.dll': No such file or directory

Thanks for posting this issue, I can't reproduce your issue locally, the path reported above looks very strange, the path is long, could you choose a short path to try? For example E:/vcpkg?

@JonLiu1993 JonLiu1993 added category:question This issue is a question and removed category:port-bug The issue is with a library, which is something the port should already support labels Jul 24, 2023
@YunchengLiu
Copy link
Author

I moved vcpkg directory to E:/vcpkg and re-run vcpkg.exe install icu:x64-windows, i got the same error message as below.

/usr/bin/install: cannot create regular file 'E:/vcpkg/packages/icu_x64-windows/E/vcpkg/installed/x64-windows/debug/lib/icudtd73.dll': No such file or directory
-- return status = 1
Error installing library. Failed command: cd ../lib/ && /usr/bin/install -c icudtd73.dll E:/vcpkg/packages/icu_x64-windows/E/vcpkg/installed/x64-windows/debug/lib/icudtd73.dll
make[1]: *** [Makefile:185: install-local] Error 1
make: *** [Makefile:153: install-recursive] Error 2

It seems a wrong path have been made by build system or compiler.

I tried a total new vcpkg environment to reproduce, and solved this error. But my previous vcpkg has installed many packages, so rebuilding all packages maybe cost many time.

How about clearing possible cache contents to clean up some potential accumulated errors? Which folders can I delete to keep the previous installation, but clean the cache?

Thanks!

@JonLiu1993
Copy link
Member

Try this command ./vcpkg install icu:x64-windows --clean-after-build:
After each library is built, clean up the source files of the library under buildtrees, and the library-related files under packages and downloads. Specifically, only the relevant files of the currently installed library are deleted under the buildtrees and packages folders, but not files of other installed libraries, while only the tools folder is kept under the downloads folder, and all other installation packages are deleted

@YunchengLiu
Copy link
Author

YunchengLiu commented Jul 25, 2023

Sorry, that command didn't work in my old vcpkg directory, still getting the same error.

I deleted the current vcpkg instance (including the binary cache, I located other locations through environment variables, and I deleted the contents of this directory), redeployed, and still got the same error. But on another brand new pc (with the same version of msvc), trying multiple times always succeeds in installing icu.

On my current PC, relocated to a new location, deployed a new instance of vcpkg, I get the same error, and I don't understand why the previous attempt was successful.

Where should I troubleshoot my current dev machine to try to fix the problem? I noticed that the error appeared after -- Installing x64-windows-dbg, did some configuration related to the install happen to have some conflict or magic with some content of my local machine?

The error seems to be that when calculating the path, the absolute path is directly concatenated without being converted into a relative path.

@Neumann-A
Copy link
Contributor

can you please paste your PATH environment variable. Could be solved by #32750 due to:

CMake Warning at scripts/cmake/vcpkg_configure_make.cmake:264 (message):
  Unable to find system dir in the PATH variable! Appending required msys
  paths!

@JonLiu1993 JonLiu1993 added requires:repro The issue is not currently repro-able and removed category:question This issue is a question labels Jul 26, 2023
@dweckmann
Copy link
Contributor

dweckmann commented Jul 26, 2023

I can confirm that I have the same problem here.

I've manually patched scripts\cmake\vcpkg_configure_make.cmake just to test :

diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake
index 3ff6742..6e13aae 100644
--- a/scripts/cmake/vcpkg_configure_make.cmake
+++ b/scripts/cmake/vcpkg_configure_make.cmake
@@ -253,7 +253,8 @@ function(vcpkg_configure_make)
         set(index 0)
         set(appending TRUE)
         foreach(item IN LISTS path_list)
-            if(item IN_LIST find_system_dirs OR item IN_LIST find_system_dirs_upper)
+            string(TOUPPER "${item}" item_upper)
+            if(item IN_LIST find_system_dirs OR item_upper IN_LIST find_system_dirs_upper)
                 set(appending FALSE)
                 break()
             endif()

After reading @Neumann-A comments, I think I was not far from right ;)

Anyway, I can confirm that the problem is solved when dealing with Windows filesystem case insensitivity.

@JonLiu1993 JonLiu1993 added category:port-bug The issue is with a library, which is something the port should already support and removed requires:repro The issue is not currently repro-able labels Jul 26, 2023
@BillyONeal BillyONeal reopened this Jul 26, 2023
@JonLiu1993 JonLiu1993 added requires:repro The issue is not currently repro-able and removed category:port-bug The issue is with a library, which is something the port should already support labels Jul 27, 2023
@PhoebeHui
Copy link
Contributor

@YunchengLiu, does PR # 32750 fix the problem, could you help test it?

@YunchengLiu
Copy link
Author

@PhoebeHui @Neumann-A @JonLiu1993
I'd be more than happy to help with the testing, but due to urgent assignments, it may take me until this Saturday to get back to work and use the broken computer. I will test it as soon as I return, so sorry!

@YunchengLiu
Copy link
Author

Sorry for late, my PATH environment variables(including system and user),export by

$env:PATH -split ';' | Out-File -FilePath path.txt
C:\Program Files\PowerShell\7
C:\Program Files\Microsoft MPI\Bin\
C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64_win\compiler
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\Windows\System32\OpenSSH\
C:\Program Files\Microsoft SQL Server\130\Tools\Binn\
C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
C:\Program Files\Microsoft SQL Server\120\Tools\Binn\
C:\Program Files\dotnet\
C:\Program Files\Microsoft SQL Server\150\Tools\Binn\
C:\Program Files\IVI Foundation\VISA\Win64\Bin\
C:\Program Files\Common Files\Autodesk Shared\
C:\Program Files\MATLAB\MATLAB Runtime\v95\runtime\win64
C:\Program Files\MATLAB\R2022b\bin
C:\Program Files\Nanoscribe\DeScribe\
C:\Program Files (x86)\Paragon Software\LinuxFS for Windows\
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\WINDOWS\System32\WindowsPowerShell\v1.0\
C:\WINDOWS\System32\OpenSSH\
C:\Program Files\PowerShell\7\
C:\Users\YunchengLiu\scoop\shims
C:\Users\YunchengLiu\AppData\Local\Microsoft\WindowsApps
C:\Users\YunchengLiu\AppData\Local\GitHubDesktop\bin
C:\Users\YunchengLiu\.dotnet\tools
C:\Users\YunchengLiu\AppData\Local\Programs\Microsoft VS Code\bin
%CLion%
C:\Program Files\Bandizip\
C:\Users\YunchengLiu\AppData\Local\JetBrains\Toolbox\scripts
C:\Users\YunchengLiu\.dotnet\tools
C:\Users\YunchengLiu\AppData\Local\Microsoft\WindowsApps

@Neumann-A Thanks!

@JonLiu1993
Copy link
Member

@YunchengLiu, does PR #32750 fix the problem?

@YunchengLiu
Copy link
Author

@JonLiu1993 Seems to be solved. I've tried multiple times and it seems to be working fine on my PC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires:repro The issue is not currently repro-able
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants