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

liciconv build failure #14780

Closed
tester0077 opened this issue Nov 25, 2020 · 9 comments
Closed

liciconv build failure #14780

tester0077 opened this issue Nov 25, 2020 · 9 comments
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team.

Comments

@tester0077
Copy link

Host Environment

  • OS: Windows 10
  • Compiler: MSVC 2019

To Reproduce
Steps to reproduce the behavior:
./vcpkg install libiconv:x86-windows-static-md

Failure logs
Computing installation plan...
The following packages will be built and installed:
libiconv[core]:x86-windows-static-md
Detecting compiler hash for triplet x86-windows-static-md...
Using cached binary package: C:\Users\arnold\AppData\Local\vcpkg\archives\2a\2a5497fe3ac887a09da00fe027594b8b50fa53c2.zip
Starting package 1/1: libiconv:x86-windows-static-md
Building package libiconv[core]:x86-windows-static-md...
Building package libiconv[core]:x86-windows-static-md... done
Installing package libiconv[core]:x86-windows-static-md...
Installing package libiconv[core]:x86-windows-static-md... done
Elapsed time for package libiconv:x86-windows-static-md: 1.815 s

Total elapsed time: 12.97 s

PS D:\pkg\vcpkg>

the libraries in D:\pkg\vcpkg\installed\x86-windows-static-md\debug\lib end up as libiconv.la & libcharset-d.la; expected libiconv.lib
Additional context
Add any other context about the problem here, such as what you have already tried to resolve the issue.

@NancyLi1013 NancyLi1013 added the category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. label Nov 26, 2020
@StarGate-One
Copy link
Contributor

StarGate-One commented Nov 26, 2020

This is also true on triplet x64-windows:

  1. Port: fontconfig:
    ->vcpkg owns libfontconfig.la
    fontconfig:x64-windows: x64-windows/debug/lib/libfontconfig.la
    fontconfig:x64-windows: x64-windows/lib/libfontconfig.la

  2. Port: libiconv:
    ->vcpkg owns libcharset.la
    libiconv:x64-windows: x64-windows/debug/lib/libcharset.la
    libiconv:x64-windows: x64-windows/lib/libcharset.la
    ->vcpkg owns libiconv.la
    libiconv:x64-windows: x64-windows/debug/lib/libiconv.la
    libiconv:x64-windows: x64-windows/lib/libiconv.la

May be related to PR [intl/gettext/fontconfig] update to native build system (#11776) 3a26eb3

@StarGate-One
Copy link
Contributor

StarGate-One commented Nov 26, 2020

The corresponding dll files are also missing their symbol files.

  1. Port fontconfig
    ->vcpkg owns fontconfig-1.dll (no symbol pdb files)
    fontconfig:x64-windows: x64-windows/bin/fontconfig-1.dll
    fontconfig:x64-windows: x64-windows/debug/bin/fontconfig-1.dll
  2. Port libiconv
    ->vcpkg owns charset-1.dll (no symbol pdb files)
    libiconv:x64-windows: x64-windows/bin/charset-1.dll
    libiconv:x64-windows: x64-windows/debug/bin/charset-1.dll
    ->vcpkg owns iconv-2.dll (no symbol pdb files)
    glib:x64-windows: x64-windows/tools/glib/iconv-2.dll
    libiconv:x64-windows: x64-windows/bin/iconv-2.dll
    libiconv:x64-windows: x64-windows/debug/bin/iconv-2.dll
    libiconv:x64-windows: x64-windows/tools/libiconv/bin/iconv-2.dll
    libiconv:x64-windows: x64-windows/tools/libiconv/debug/bin/iconv-2.dll
  3. Port gettext (no symbol pdb files)
    glib:x64-windows: x64-windows/tools/glib/intl-8.dll
    gettext:x64-windows: x64-windows/bin/intl-8.dll
    gettext:x64-windows: x64-windows/debug/bin/intl-8.dll
  4. This is just from the ports I have installed, a list of other files missing symbols (both the release and debug versions):
    allegro-5.2.dll symbol file named allegro.pdb
    cudnn64-7.dll
    discord_game_sdk.dll
    git2.dll
    gl2ps.dll
    icudt67.dll
    libmodpbase64.dll
    lua.dll
    mgl.dll
    mgl-fltk.dll
    mgl-glut.dll
    mimalloc-redirect.dll
    MSPCoordinateConversionService.dll
    MSPdtcc.dll
    pthreadVC3.dll
    pthreadVCE3.dll
    pthreadVSE3.dll
    squish.dll
    yasm.dll
    yasmstd.dll
    Zydis.dll
    zziplib.dll
  5. Port PhysX has symbol files without a corresponding dll - they all have _static_64 in there filenames?

Should an issue be opened on each missing symbol file or could it be a common issue?

@Neumann-A
Copy link
Contributor

To be clear .la files are libtool helper scripts. Since the libraries are now correctly compiled with /Z7 with the default toolchain the debug info is embedded into the library. vcpkg_copy_pdb is a bit too stupid since it does not account for the flags in the toolchain and thus issues warnings if pdb files are missing although you never expected them to be generated. (but that is not the issue dicussed here)

also (from git bash)

neumann@heineken MINGW64 /g/vcpkg_test/master/packages/libiconv_x86-windows-static-md/lib (master)
$ ls
charset.lib  iconv.lib  libcharset.la  libiconv.la

So this issue requires repro or can be closed.

The correct upstream library names for libiconv on windows are:
charset.lib iconv.lib

@perara
Copy link
Contributor

perara commented Nov 27, 2020

On a similar note, previously I could previously define:

find_package( unofficial-iconv CONFIG REQUIRED )

# then later

target_link_libraries(zbar PRIVATE unofficial::iconv::libiconv unofficial::iconv::libcharset)

which provided me both the iconv.h and the correct links. Now I'm not able to link, not getting the header.
I've tried various variations of find_package( **iconv CONFIG REQUIRED )
with variations of the above link.

Also there's no longer any instructions on how to utilize this after installing (vcpkg install)

@Neumann-A
Copy link
Contributor

@dennisameling
Copy link

dennisameling commented Nov 29, 2020

Can reproduce this on Windows while installing for arm64-windows (same for x64-windows though) while working on this PR: git-for-windows/git#2915

Notice the "Could not find a matching pdb file for" warning in the log below:

Computing installation plan...
 The following packages will be built and installed:
     libiconv[core]:arm64-windows
 Detecting compiler hash for triplet arm64-windows...
 Could not locate cached archive: C:\Users\runneradmin\AppData\Local\vcpkg\archives\7b\7b87a76a038c73306c0acb120a016aee61fb5ddc.zip
 Starting package 1/1: libiconv:arm64-windows
 Building package libiconv[core]:arm64-windows...
 -- Downloading https://ftp.gnu.org/gnu/libiconv/libiconv-1.16.tar.gz...
 -- Extracting source D:/a/git/git/compat/vcbuild/vcpkg/downloads/libiconv-1.16.tar.gz
 -- Applying patch 0002-Config-for-MSVC.patch
 -- Applying patch 0003-Add-export.patch
 -- Using source at D:/a/git/git/compat/vcbuild/vcpkg/buildtrees/libiconv/src/1.16-de9101a181.clean
 -- Configuring arm64-windows
 -- Downloading https://repo.msys2.org/msys/x86_64/bash-4.4.023-2-x86_64.pkg.tar.xz...
===== Several other msys2 downloads here... ======
 -- Using msys root at D:/a/git/git/compat/vcbuild/vcpkg/downloads/tools/msys2/827af5fc5a9ac05f
 -- Using msys root at D:/a/git/git/compat/vcbuild/vcpkg/downloads/tools/msys2/c809757c94447846
 -- Configuring arm64-windows-dbg
 -- Configuring arm64-windows-rel
 -- Using msys root at D:/a/git/git/compat/vcbuild/vcpkg/downloads/tools/msys2/b1b4e6089ab84adb
 -- Building arm64-windows-dbg
 -- Installing arm64-windows-dbg
 -- Building arm64-windows-rel
 -- Installing arm64-windows-rel
 -- Warning: Could not find a matching pdb file for:
     D:/a/git/git/compat/vcbuild/vcpkg/packages/libiconv_arm64-windows/bin/charset-1.dll
     D:/a/git/git/compat/vcbuild/vcpkg/packages/libiconv_arm64-windows/bin/iconv-2.dll
     D:/a/git/git/compat/vcbuild/vcpkg/packages/libiconv_arm64-windows/debug/bin/charset-1.dll
     D:/a/git/git/compat/vcbuild/vcpkg/packages/libiconv_arm64-windows/debug/bin/iconv-2.dll
 
 -- Installing: D:/a/git/git/compat/vcbuild/vcpkg/packages/libiconv_arm64-windows/share/libiconv/copyright
 -- Performing post-build validation
 -- Performing post-build validation done
 Stored binary cache: C:\Users\runneradmin\AppData\Local\vcpkg\archives\7b\7b87a76a038c73306c0acb120a016aee61fb5ddc.zip
 Building package libiconv[core]:arm64-windows... done
 Installing package libiconv[core]:arm64-windows...
 Installing package libiconv[core]:arm64-windows... done
 Elapsed time for package libiconv:arm64-windows: 5.39 min
 
 Total elapsed time: 5.431 min
 
     Finished libiconv

This results in the following output files:

image

Until recently, the folder structure looked like this:

image

This results in problems when building the main project:

"D:\a\git\git\git.sln" (default target) (1) ->
"D:\a\git\git\git-http-fetch.vcxproj.metaproj" (default target) (7) ->
"D:\a\git\git\git-http-fetch.vcxproj" (default target) (38) ->
  LINK : fatal error LNK1181: cannot open input file 'compat\vcbuild\vcpkg\installed\arm64-windows\lib\libiconv.lib' [D:\a\git\git\git-http-fetch.vcxproj]
 
 
"D:\a\git\git\git.sln" (default target) (1) ->
"D:\a\git\git\git-http-push.vcxproj.metaproj" (default target) (8) ->
"D:\a\git\git\git-http-push.vcxproj" (default target) (37) ->
  LINK : fatal error LNK1181: cannot open input file 'compat\vcbuild\vcpkg\installed\arm64-windows\lib\libiconv.lib' [D:\a\git\git\git-http-push.vcxproj]
 
 
"D:\a\git\git\git.sln" (default target) (1) ->
"D:\a\git\git\git.vcxproj.metaproj" (default target) (4) ->
"D:\a\git\git\git.vcxproj" (default target) (29) ->
  LINK : fatal error LNK1181: cannot open input file 'compat\vcbuild\vcpkg\installed\arm64-windows\lib\libiconv.lib' [D:\a\git\git\git.vcxproj]

When I rename iconv.lib manually to libiconv.lib, I can finish the build, but then the created executable says it can't find iconv-2.dll, which makes sense given the logs above:

image

Please let me know if I can provide more logs. The repo from the PR I mentioned (git-for-windows/git#2915) is quite big, but I hope the logs/screenshots above suffice.

@Neumann-A
Copy link
Contributor

@dennisameling just fix the CI script to no longer pass the CMake variables for those libraries explicitly.... It now works without that....
The DLL issue is complelty separate from that and depends on how the executable is deploy

@dennisameling
Copy link

dennisameling commented Nov 29, 2020

@Neumann-A thanks so much for the hint - that worked! 🚀

dscho pushed a commit to dscho/git that referenced this issue Dec 4, 2020
Something changed in `vcpkg` (which we use in our Visual C++ build to
provide the dependencies such as libcurl) and our `vc-build` job started
failing in CI. The reason is that we had a work-around in place to help
CMake find iconv, and this work-around is neither needed nor does it
work anymore.

For the full discussion with the vcpkg project, see this comment:
microsoft/vcpkg#14780 (comment)

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho pushed a commit to dscho/git that referenced this issue Dec 4, 2020
Something changed in `vcpkg` (which we use in our Visual C++ build to
provide the dependencies such as libcurl) and our `vs-build` job started
failing in CI. The reason is that we had a work-around in place to help
CMake find iconv, and this work-around is neither needed nor does it
work anymore.

For the full discussion with the vcpkg project, see this comment:
microsoft/vcpkg#14780 (comment)

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit to git-for-windows/git that referenced this issue Dec 4, 2020
Something changed in `vcpkg` (which we use in our Visual C++ build to
provide the dependencies such as libcurl) and our `vs-build` job started
failing in CI. The reason is that we had a work-around in place to help
CMake find iconv, and this work-around is neither needed nor does it
work anymore.

For the full discussion with the vcpkg project, see this comment:
microsoft/vcpkg#14780 (comment)

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit to git-for-windows/git that referenced this issue Dec 4, 2020
Something changed in `vcpkg` (which we use in our Visual C++ build to
provide the dependencies such as libcurl) and our `vs-build` job started
failing in CI. The reason is that we had a work-around in place to help
CMake find iconv, and this work-around is neither needed nor does it
work anymore.

For the full discussion with the vcpkg project, see this comment:
microsoft/vcpkg#14780 (comment)

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit to git-for-windows/git that referenced this issue Dec 4, 2020
Something changed in `vcpkg` (which we use in our Visual C++ build to
provide the dependencies such as libcurl) and our `vs-build` job started
failing in CI. The reason is that we had a work-around in place to help
CMake find iconv, and this work-around is neither needed nor does it
work anymore.

For the full discussion with the vcpkg project, see this comment:
microsoft/vcpkg#14780 (comment)

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit to git-for-windows/git that referenced this issue Dec 4, 2020
Something changed in `vcpkg` (which we use in our Visual C++ build to
provide the dependencies such as libcurl) and our `vs-build` job started
failing in CI. The reason is that we had a work-around in place to help
CMake find iconv, and this work-around is neither needed nor does it
work anymore.

For the full discussion with the vcpkg project, see this comment:
microsoft/vcpkg#14780 (comment)

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho pushed a commit to dscho/git that referenced this issue Dec 4, 2020
Something changed in `vcpkg` (which we use in our Visual C++ build to
provide the dependencies such as libcurl) and our `vs-build` job started
failing in CI. The reason is that we had a work-around in place to help
CMake find iconv, and this work-around is neither needed nor does it
work anymore.

For the full discussion with the vcpkg project, see this comment:
microsoft/vcpkg#14780 (comment)

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho pushed a commit to dscho/git that referenced this issue Dec 4, 2020
Something changed in `vcpkg` (which we use in our Visual C++ build to
provide the dependencies such as libcurl) and our `vs-build` job started
failing in CI. The reason is that we had a work-around in place to help
CMake find iconv, and this work-around is neither needed nor does it
work anymore.

For the full discussion with the vcpkg project, see this comment:
microsoft/vcpkg#14780 (comment)

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit to git-for-windows/git that referenced this issue Dec 4, 2020
Something changed in `vcpkg` (which we use in our Visual C++ build to
provide the dependencies such as libcurl) and our `vs-build` job started
failing in CI. The reason is that we had a work-around in place to help
CMake find iconv, and this work-around is neither needed nor does it
work anymore.

For the full discussion with the vcpkg project, see this comment:
microsoft/vcpkg#14780 (comment)

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit to git-for-windows/git that referenced this issue Dec 4, 2020
Something changed in `vcpkg` (which we use in our Visual C++ build to
provide the dependencies such as libcurl) and our `vs-build` job started
failing in CI. The reason is that we had a work-around in place to help
CMake find iconv, and this work-around is neither needed nor does it
work anymore.

For the full discussion with the vcpkg project, see this comment:
microsoft/vcpkg#14780 (comment)

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit to git-for-windows/git that referenced this issue Dec 4, 2020
Something changed in `vcpkg` (which we use in our Visual C++ build to
provide the dependencies such as libcurl) and our `vs-build` job started
failing in CI. The reason is that we had a work-around in place to help
CMake find iconv, and this work-around is neither needed nor does it
work anymore.

For the full discussion with the vcpkg project, see this comment:
microsoft/vcpkg#14780 (comment)

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit to git-for-windows/git that referenced this issue Dec 4, 2020
Something changed in `vcpkg` (which we use in our Visual C++ build to
provide the dependencies such as libcurl) and our `vs-build` job started
failing in CI. The reason is that we had a work-around in place to help
CMake find iconv, and this work-around is neither needed nor does it
work anymore.

For the full discussion with the vcpkg project, see this comment:
microsoft/vcpkg#14780 (comment)

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
gitster pushed a commit to git/git that referenced this issue Dec 4, 2020
Something changed in `vcpkg` (which we use in our Visual C++ build to
provide the dependencies such as libcurl) and our `vs-build` job started
failing in CI. The reason is that we had a work-around in place to help
CMake find iconv, and this work-around is neither needed nor does it
work anymore.

For the full discussion with the vcpkg project, see this comment:
microsoft/vcpkg#14780 (comment)

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-for-windows-ci pushed a commit to git-for-windows/git that referenced this issue Dec 9, 2020
Something changed in `vcpkg` (which we use in our Visual C++ build to
provide the dependencies such as libcurl) and our `vs-build` job started
failing in CI. The reason is that we had a work-around in place to help
CMake find iconv, and this work-around is neither needed nor does it
work anymore.

For the full discussion with the vcpkg project, see this comment:
microsoft/vcpkg#14780 (comment)

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho pushed a commit to git-for-windows/git that referenced this issue Dec 10, 2020
Something changed in `vcpkg` (which we use in our Visual C++ build to
provide the dependencies such as libcurl) and our `vs-build` job started
failing in CI. The reason is that we had a work-around in place to help
CMake find iconv, and this work-around is neither needed nor does it
work anymore.

For the full discussion with the vcpkg project, see this comment:
microsoft/vcpkg#14780 (comment)

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
matheustavares pushed a commit to matheustavares/git that referenced this issue May 28, 2021
Something changed in `vcpkg` (which we use in our Visual C++ build to
provide the dependencies such as libcurl) and our `vs-build` job started
failing in CI. The reason is that we had a work-around in place to help
CMake find iconv, and this work-around is neither needed nor does it
work anymore.

For the full discussion with the vcpkg project, see this comment:
microsoft/vcpkg#14780 (comment)

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
@JonLiu1993
Copy link
Member

@tester0077 ,Thanks for posting this issue ,I can successfully install liciconv:x64-windows-static-md with the latest vcpkg, I temporarily close this issue, if it is still an issue, please reopen this issue.

-- Performing post-build validation done
Stored binary cache: C:\Users\vzhli17\AppData\Local\vcpkg\archives\66\66c09edd644f28bdb78dba6129fc4773aeba2fda02a2ed08889c92370dcb9587.zip
Installing package libiconv[core]:x86-windows-static-md...
Elapsed time for package libiconv:x86-windows-static-md: 3.922 min

Total elapsed time: 3.966 min

The package libiconv provides CMake targets:

    find_package(iconv CONFIG REQUIRED)
    target_link_libraries(main PRIVATE Iconv::Charset)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team.
Projects
None yet
Development

No branches or pull requests

7 participants