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

[libiconv] Build error #28896

Closed
asdetycv1zzc opened this issue Jan 12, 2023 · 12 comments · Fixed by #28919
Closed

[libiconv] Build error #28896

asdetycv1zzc opened this issue Jan 12, 2023 · 12 comments · Fixed by #28919
Assignees
Labels
category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly

Comments

@asdetycv1zzc
Copy link

asdetycv1zzc commented Jan 12, 2023

Package: libiconv[core]:x86-windows -> 1.17

Host Environment

  • OS: Windows
  • Compiler: MSVC 19.34.31937.0
  • vcpkg-tool version: 2022-12-14-7ae0d8527fb488fde10a89c2813802dc9b03b6f9
  • vcpkg-scripts version: 036769f 2023-01-11 (4 hours ago)

To Reproduce

./vcpkg install libiconv

Failure logs

-- Using cached libiconv-1.17.tar.gz.
-- Cleaning sources at C:/Program Files (x86)/vcpkg/buildtrees/libiconv/src/1.17-e2a53830aa.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Program Files (x86)/vcpkg/downloads/libiconv-1.17.tar.gz
-- Applying patch 0002-Config-for-MSVC.patch
-- Applying patch 0003-Add-export.patch
-- Applying patch 0004-ModuleFileName.patch
-- Using source at C:/Program Files (x86)/vcpkg/buildtrees/libiconv/src/1.17-e2a53830aa.clean
-- Found external ninja('1.11.0').
-- Getting CMake variables for x86-windows
CMake Warning at scripts/cmake/vcpkg_configure_make.cmake:198 (message):
  Detected whitespace in root directory.  Please move the path to one without
  whitespaces! The required tools do not handle whitespaces correctly and the
  build will most likely fail
Call Stack (most recent call first):
  ports/libiconv/portfile.cmake:29 (vcpkg_configure_make)
  scripts/ports.cmake:147 (include)


-- Using cached msys-gzip-1.11-1-x86_64.pkg.tar.zst.
-- Using cached msys-bash-5.1.008-1-x86_64.pkg.tar.zst.
-- Using cached msys-autoconf-2.71-3-any.pkg.tar.zst.
-- Using cached msys-diffutils-3.8-2-x86_64.pkg.tar.zst.
-- Using cached msys-binutils-2.37-5-x86_64.pkg.tar.zst.
-- Downloading https://repo.msys2.org/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz;https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz;https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz;https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz;https://mirrors.ustc.edu.cn/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz;https://mirror.bit.edu.cn/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz;https://mirror.selfnet.de/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz;https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz -> msys-libtool-2.4.6-9-x86_64.pkg.tar.xz...
[DEBUG] To include the environment variables in debug output, pass --debug-env
[DEBUG] Feature flag 'binarycaching' unset
[DEBUG] Feature flag 'compilertracking' unset
[DEBUG] Feature flag 'registries' unset
[DEBUG] Feature flag 'versions' unset
Downloading https://repo.msys2.org/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz
Downloading https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz
Downloading https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz
Downloading https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz
Downloading https://mirrors.ustc.edu.cn/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz
Downloading https://mirror.bit.edu.cn/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz
warning: Download failed -- retrying after 1000ms
warning: Download failed -- retrying after 2000ms
warning: Download failed -- retrying after 4000ms
Downloading https://mirror.selfnet.de/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz
Downloading https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz
error: Failed to download from mirror set
error: https://repo.msys2.org/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz: failed: status code 404
error: https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz: failed: status code 404
error: https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz: failed: status code 404
error: https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz: failed: status code 404
error: https://mirrors.ustc.edu.cn/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz: failed: status code 404
error: https://mirror.bit.edu.cn/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz: WinHttpSendRequest failed with exit code 12030
error: https://mirror.bit.edu.cn/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz: WinHttpSendRequest failed with exit code 12030
error: https://mirror.bit.edu.cn/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz: WinHttpSendRequest failed with exit code 12030
error: https://mirror.bit.edu.cn/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz: WinHttpSendRequest failed with exit code 12030
error: https://mirror.selfnet.de/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz: failed: status code 404
error: https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz: failed: status code 404
[DEBUG] D:\a\_work\1\s\src\vcpkg\base\downloads.cpp(956): 
[DEBUG] Time in subprocesses: 0 us
[DEBUG] Time in parsing JSON: 3 us
[DEBUG] Time in JSON reader: 0 us
[DEBUG] Time in filesystem: 1248 us
[DEBUG] Time in loading ports: 0 us
[DEBUG] Exiting after 15.16 s (15163717 us)

CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:32 (message):
      
      Failed to download file with error: 1
      If you use a proxy, please check your proxy setting. Possible causes are:
      
      1. You are actually using an HTTP proxy, but setting HTTPS_PROXY variable
         to `https://address:port`. This is not correct, because `https://` prefix
         claims the proxy is an HTTPS proxy, while your proxy (v2ray, shadowsocksr
         , etc..) is an HTTP proxy. Try setting `http://address:port` to both
         HTTP_PROXY and HTTPS_PROXY instead.
      
      2. You are using Fiddler. Currently a bug (https://github.com/microsoft/vcpkg/issues/17752)
         will set HTTPS_PROXY to `https://fiddler_address:port` which lead to problem 1 above.
         Workaround is open Windows 10 Settings App, and search for Proxy Configuration page,
         Change `http=address:port;https=address:port` to `address`, and fill the port number.
      
      3. Your proxy's remote server is out of service.
      
      In future vcpkg releases, if you are using Windows, you no longer need to set
      HTTP(S)_PROXY environment variables. Vcpkg will simply apply Windows IE Proxy
      Settings set by your proxy software. See (https://github.com/microsoft/vcpkg-tool/pull/49)
      and (https://github.com/microsoft/vcpkg-tool/pull/77)
      
      Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues

Call Stack (most recent call first):
  scripts/cmake/vcpkg_download_distfile.cmake:273 (z_vcpkg_download_distfile_show_proxy_and_fail)
  scripts/cmake/vcpkg_acquire_msys.cmake:26 (vcpkg_download_distfile)
  scripts/cmake/vcpkg_acquire_msys.cmake:67 (z_vcpkg_acquire_msys_download_package)
  scripts/cmake/vcpkg_acquire_msys.cmake:186 (z_vcpkg_acquire_msys_declare_package)
  scripts/cmake/vcpkg_configure_make.cmake:207 (vcpkg_acquire_msys)
  ports/libiconv/portfile.cmake:29 (vcpkg_configure_make)
  scripts/ports.cmake:147 (include)



=========================================

Running on Windows 10 Professional Edition.

Have already tried to update vcpkg & use proxy to download but still, it failed.

@asdetycv1zzc asdetycv1zzc added the category:port-bug The issue is with a library, which is something the port should already support label Jan 12, 2023
@limhoyeon
Copy link

I have the same issue.
"libtool-2.4.6-9-x86_64.pkg.tar.xz" is not in any msys2 repositories.

@dp-69
Copy link

dp-69 commented Jan 12, 2023

updating file vcpkg\scripts\cmake\vcpkg_acquire_msys.cmake with

z_vcpkg_acquire_msys_declare_package(
        URL "https://repo.msys2.org/msys/x86_64/libtool-2.4.6-10-x86_64.pkg.tar.zst"
        SHA512 a88953c3f2044094cd9f607dea8c5555b011a1c56976745edda83540328bd424026bedf34cbfad29532f985abba29228b974a2ba0b49be2cfae4285d3102dc8b
        DEPS grep sed coreutils file findutils
    )

solved the issue for me. It looks like that libtool-2.4.6-9-x86_64.pkg.tar.xz is no longer available at https://repo.msys2.org/msys/x86_64/

@stevecotton
Copy link

Thanks for reporting this, but please would you change the title to include [libtool]?

@pango3001
Copy link

Changing it to libtool-2.4.6-10 worked for me, came here to mention it but looks like someone beat me to it.

@asdetycv1zzc
Copy link
Author

Thanks for reporting this, but please would you change the title to include [libtool]?

Well I think the problem has something to do with libiconv simply because I cannot directly install libtool but well, thanks and I will do so.

@asdetycv1zzc asdetycv1zzc changed the title [libiconv] Build error [libtool] Build error Jan 13, 2023
@asdetycv1zzc asdetycv1zzc reopened this Jan 13, 2023
@asdetycv1zzc
Copy link
Author

updating file vcpkg\scripts\cmake\vcpkg_acquire_msys.cmake with

z_vcpkg_acquire_msys_declare_package(
        URL "https://repo.msys2.org/msys/x86_64/libtool-2.4.6-10-x86_64.pkg.tar.zst"
        SHA512 a88953c3f2044094cd9f607dea8c5555b011a1c56976745edda83540328bd424026bedf34cbfad29532f985abba29228b974a2ba0b49be2cfae4285d3102dc8b
        DEPS grep sed coreutils file findutils
    )

solved the issue for me. It looks like that libtool-2.4.6-9-x86_64.pkg.tar.xz is no longer available at https://repo.msys2.org/msys/x86_64/

I updated the vcpkg_acquire_msys.cmake and it is now encountering with a compile error.

`The following packages will be built and installed:
libiconv[core]:x86-windows -> 1.17
Detecting compiler hash for triplet x86-windows...
Restored 0 package(s) from C:\Users\John\AppData\Local\vcpkg\archives in 147.9 us. Use --debug to see more details.
Installing 1/1 libiconv:x86-windows...
Building libiconv[core]:x86-windows...
-- Using cached libiconv-1.17.tar.gz.
-- Cleaning sources at C:/Program Files (x86)/vcpkg/buildtrees/libiconv/src/1.17-e2a53830aa.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Program Files (x86)/vcpkg/downloads/libiconv-1.17.tar.gz
-- Applying patch 0002-Config-for-MSVC.patch
-- Applying patch 0003-Add-export.patch
-- Applying patch 0004-ModuleFileName.patch
-- Using source at C:/Program Files (x86)/vcpkg/buildtrees/libiconv/src/1.17-e2a53830aa.clean
-- Found external ninja('1.11.0').
-- Getting CMake variables for x86-windows
CMake Warning at scripts/cmake/vcpkg_configure_make.cmake:198 (message):
Detected whitespace in root directory. Please move the path to one without
whitespaces! The required tools do not handle whitespaces correctly and the
build will most likely fail
Call Stack (most recent call first):
ports/libiconv/portfile.cmake:29 (vcpkg_configure_make)
scripts/ports.cmake:147 (include)

-- Using cached msys-gzip-1.11-1-x86_64.pkg.tar.zst.
-- Using cached msys-bash-5.1.008-1-x86_64.pkg.tar.zst.
-- Using cached msys-autoconf-2.71-3-any.pkg.tar.zst.
-- Using cached msys-diffutils-3.8-2-x86_64.pkg.tar.zst.
-- Using cached msys-binutils-2.37-5-x86_64.pkg.tar.zst.
-- Using cached msys-libtool-2.4.6-10-x86_64.pkg.tar.zst.
-- Using cached msys-file-5.41-2-x86_64.pkg.tar.zst.
-- Using cached msys-zlib-1.2.11-1-x86_64.pkg.tar.xz.
-- Using cached msys-libbz2-1.0.8-3-x86_64.pkg.tar.zst.
-- Using cached msys-coreutils-8.32-2-x86_64.pkg.tar.zst.
-- Using cached msys-grep-3.0-2-x86_64.pkg.tar.xz.
-- Using cached msys-sed-4.8-2-x86_64.pkg.tar.zst.
-- Using cached msys-libpcre-8.45-1-x86_64.pkg.tar.zst.
-- Using cached msys-m4-1.4.19-2-x86_64.pkg.tar.zst.
-- Using cached msys-automake-wrapper-11-4-any.pkg.tar.zst.
-- Using cached msys-gawk-5.1.0-2-x86_64.pkg.tar.zst.
-- Using cached msys-mpfr-4.1.0-1-x86_64.pkg.tar.zst.
-- Using cached msys-gmp-6.2.1-1-x86_64.pkg.tar.zst.
-- Using cached msys-libreadline-8.1.001-1-x86_64.pkg.tar.zst.
-- Using cached msys-ncurses-6.2-2-x86_64.pkg.tar.zst.
-- Using cached msys-automake1.16-1.16.3-3-any.pkg.tar.zst.
-- Using cached msys-perl-5.32.1-2-x86_64.pkg.tar.zst.
-- Using cached msys-libcrypt-2.1-3-x86_64.pkg.tar.zst.
-- Using cached msys-pkg-config-0.29.2-4-x86_64.pkg.tar.zst.
-- Using cached msys-make-4.3-3-x86_64.pkg.tar.zst.
-- Using cached msys-findutils-4.8.0-1-x86_64.pkg.tar.zst.
-- Using cached msys-libintl-0.21-1-x86_64.pkg.tar.zst.
-- Using cached msys-libiconv-1.16-2-x86_64.pkg.tar.zst.
-- Using cached msys-gcc-libs-11.2.0-3-x86_64.pkg.tar.zst.
-- Using cached msys-msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst.
-- Using cached msys-which-2.21-4-x86_64.pkg.tar.zst.
-- Using msys root at C:/Program Files (x86)/vcpkg/downloads/tools/msys2/bab58158ff1f6af1
-- Using cached msys-mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst.
-- Using msys root at C:/Program Files (x86)/vcpkg/downloads/tools/msys2/9a1ec3f33446b195
-- Configuring x86-windows-dbg
-- Configuring x86-windows-rel
-- Building x86-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
Command failed: "C:/Program Files (x86)/vcpkg/downloads/tools/msys2/bab58158ff1f6af1/usr/bin/make.exe" -j 9 --trace -f Makefile all
Working Directory: C:/Program Files (x86)/vcpkg/buildtrees/libiconv/x86-windows-dbg/
See logs for more information:
C:\Program Files (x86)\vcpkg\buildtrees\libiconv\build-x86-windows-dbg-out.log
C:\Program Files (x86)\vcpkg\buildtrees\libiconv\build-x86-windows-dbg-err.log

Call Stack (most recent call first):
scripts/cmake/vcpkg_build_make.cmake:149 (vcpkg_execute_build_process)
scripts/cmake/vcpkg_install_make.cmake:2 (vcpkg_build_make)
ports/libiconv/portfile.cmake:39 (vcpkg_install_make)
scripts/ports.cmake:147 (include)

error: building libiconv:x86-windows failed with: BUILD_FAILED
error: 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?template=report-package-build-failure.md&title=[libiconv]+Build+error
Include '[libiconv] Build error' in your bug report title, the following version information in your bug description, and attach any relevant failure logs from above.
vcpkg-tool version: 2022-12-14-7ae0d8527fb488fde10a89c2813802dc9b03b6f9
vcpkg-scripts version: 92225e6 2023-01-12 (5 hours ago)`

/bin/sh: -c: line 1: syntax error near unexpected token /vcpkg/installed/x86-windows/debug/lib'
/bin/sh: -c: line 1: /bin/sh ../libtool --mode=link compile cl.exe -Xlinker -Xlinker -Xlinker -LC:/Program;Files;(x86)/vcpkg/installed/x86-windows/debug/lib -Xlinker -Xlinker -Xlinker -machine:X86 -Xlinker -Xlinker -Xlinker -nologo -Xlinker -Xlinker -Xlinker -debug -Xlinker -Xlinker -Xlinker -INCREMENTAL -Xcompiler -nologo -Xcompiler -W3 -Xcompiler -utf-8 -Xcompiler -MP -Xcompiler -MDd -Xcompiler -Z7 -Xcompiler -Ob0 -Xcompiler -Od -Xcompiler -RTC1 -o libcharset.la -rpath /C/Program Files (x86)/vcpkg/installed/x86-windows/debug/lib -version-info 1:0:0 -no-undefined localcharset.lo relocatable-stub.lo' make[2]: *** [Makefile:55: libcharset.la] Error 2 make[1]: *** [Makefile:34: all] Error 2 make: *** [Makefile:41: lib/localcharset.h] Error 2

@asdetycv1zzc
Copy link
Author

And now the title should be changed back to [libiconv] lol.

@asdetycv1zzc asdetycv1zzc changed the title [libtool] Build error [libiconv] Build error Jan 13, 2023
@dg0yt
Copy link
Contributor

dg0yt commented Jan 13, 2023

-LC:/Program;Files;(x86)/vcpkg/installed/x86-windows/debug/lib

But now there is an easy answer: Don't build in paths with spaces. The autotools buildsystems doesn't handle this well.

@asdetycv1zzc
Copy link
Author

-LC:/Program;Files;(x86)/vcpkg/installed/x86-windows/debug/lib

But now there is an easy answer: Don't build in paths with spaces. The autotools buildsystems doesn't handle this well.

Thanks and I will try to change it to another folder
(My fault for not mentioning it before)

@JonLiu1993
Copy link
Member

Wait for PR #28919 to be merged before closing.

@JonLiu1993 JonLiu1993 added category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly and removed category:port-bug The issue is with a library, which is something the port should already support labels Jan 16, 2023
@yanggaome
Copy link

following...

@rspeir
Copy link

rspeir commented Jan 16, 2023

updating file vcpkg\scripts\cmake\vcpkg_acquire_msys.cmake with

z_vcpkg_acquire_msys_declare_package(
        URL "https://repo.msys2.org/msys/x86_64/libtool-2.4.6-10-x86_64.pkg.tar.zst"
        SHA512 a88953c3f2044094cd9f607dea8c5555b011a1c56976745edda83540328bd424026bedf34cbfad29532f985abba29228b974a2ba0b49be2cfae4285d3102dc8b
        DEPS grep sed coreutils file findutils
    )

solved the issue for me. It looks like that libtool-2.4.6-9-x86_64.pkg.tar.xz is no longer available at https://repo.msys2.org/msys/x86_64/

I tried updating my cmake file with this, but it appears that the libtool-2.4.6-10 has also been removed from the msys2 repo.

I had to update it to 2.4.6-11:

z_vcpkg_acquire_msys_declare_package(
        URL "https://repo.msys2.org/msys/x86_64/libtool-2.4.6-11-x86_64.pkg.tar.zst"
        SHA512 143ef494cef2efbc52aeb4940d9bbe2ffa8c3c674d3d25d65e47dbbebd59d62c07fe5ff3859a46ec53a9449bb87777661e668597ff4aef68207cf017c6f7b79d
        DEPS grep sed coreutils file findutils
    )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants