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

[gettext] build failure #19337

Closed
SchaichAlonso opened this issue Aug 3, 2021 · 12 comments · Fixed by #19361
Closed

[gettext] build failure #19337

SchaichAlonso opened this issue Aug 3, 2021 · 12 comments · Fixed by #19361
Assignees
Labels
category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly

Comments

@SchaichAlonso
Copy link
Contributor

Host Environment

  • OS: Windows 10 Build 19041.110
  • Compiler: MSVC 2019 19.29.30038.1

To Reproduce
Steps to reproduce the behavior:

git clone https://github.com/microsoft/vcpkg.git
.\vcpkg\bootstrap-vcpkg.bat
.\vcpkg\vcpkg.exe install gettext

Failure logs

PS C:\src> git clone https://github.com/microsoft/vcpkg.git
Cloning into 'vcpkg'...
remote: Enumerating objects: 116935, done.
remote: Counting objects: 100% (486/486), done.
remote: Compressing objects: 100% (236/236), done.
remote: Total 116935 (delta 288), reused 387 (delta 250), pack-reused 116449
Receiving objects: 100% (116935/116935), 37.07 MiB | 12.05 MiB/s, done.
Resolving deltas: 100% (72618/72618), done.
Checking connectivity... done.
Checking out files: 100% (7897/7897), done.
PS C:\src> .\vcpkg\bootstrap-vcpkg.bat
Downloading https://github.com/microsoft/vcpkg-tool/releases/download/2021-07-26/vcpkg.exe -> C:\src\vcpkg\vcpkg.exe
Done.

Telemetry
---------
vcpkg collects usage data in order to help us improve your experience.
The data collected by Microsoft is anonymous.
You can opt-out of telemetry by re-running the bootstrap-vcpkg script with -disableMetrics,
passing --disable-metrics to vcpkg on the command line,
or by setting the VCPKG_DISABLE_METRICS environment variable.

Read more about vcpkg telemetry at docs/about/privacy.md
PS C:\src> .\vcpkg\vcpkg.exe install gettext
Computing installation plan...
A suitable version of cmake was not found (required v3.20.2). Downloading portable cmake v3.20.2...
Downloading cmake...
  https://github.com/Kitware/CMake/releases/download/v3.20.2/cmake-3.20.2-windows-i386.zip -> C:\src\vcpkg\downloads\cmake-3.20.2-windows-i386.zip
Extracting cmake...
A suitable version of 7zip was not found (required v18.1.0). Downloading portable 7zip v18.1.0...
Downloading 7zip...
  https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0 -> C:\src\vcpkg\downloads\7-zip.commandline.18.1.0.nupkg
Extracting 7zip...
A suitable version of nuget was not found (required v5.10.0). Downloading portable nuget v5.10.0...
Downloading nuget...
  https://dist.nuget.org/win-x86-commandline/v5.10.0/nuget.exe -> C:\src\vcpkg\downloads\c4b7375e-nuget.exe
The following packages will be built and installed:
    gettext[core]:x86-windows -> 0.21#4
  * libiconv[core]:x86-windows -> 1.16#9
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x86-windows...
A suitable version of git was not found (required v2.32.0). Downloading portable git v2.32.0...
Downloading git...
  https://github.com/git-for-windows/git/releases/download/v2.32.0.windows.2/PortableGit-2.32.0.2-32-bit.7z.exe -> C:\src\vcpkg\downloads\PortableGit-2.32.0.2-32-bit.7z.exe
Extracting git...
A suitable version of powershell-core was not found (required v7.1.3). Downloading portable powershell-core v7.1.3...
Downloading powershell-core...
  https://github.com/PowerShell/PowerShell/releases/download/v7.1.3/PowerShell-7.1.3-win-x86.zip -> C:\src\vcpkg\downloads\PowerShell-7.1.3-win-x86.zip
Extracting powershell-core...
Could not locate cached archive: C:\Users\schaical\AppData\Local\vcpkg\archives\f1\f131771992b28c24e631cba861094e96b3e9a30f52f31f6ac67319f4cd94b85c.zip
Could not locate cached archive: C:\Users\schaical\AppData\Local\vcpkg\archives\91\91b29c33f8a9e68817f8205aa7169c6293f0a4104b6db6fe60871ddfb7d33595.zip
Starting package 1/2: libiconv:x86-windows
Building package libiconv[core]:x86-windows...
-- Downloading https://ftp.gnu.org/gnu/libiconv/libiconv-1.16.tar.gz;https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/libiconv/libiconv-1.16.tar.gz -> libiconv-1.16.tar.gz...
-- Extracting source C:/src/vcpkg/downloads/libiconv-1.16.tar.gz
-- Applying patch 0002-Config-for-MSVC.patch
-- Applying patch 0003-Add-export.patch
-- Applying patch 0004-ModuleFileName.patch
-- Using source at C:/src/vcpkg/buildtrees/libiconv/src/1.16-b0c41d3469.clean
-- Found external ninja('1.10.2').
-- Getting CMake variables for x86-windows
-- Using msys root at C:/src/vcpkg/downloads/tools/msys2/703e5aa15d402568
-- Using msys root at C:/src/vcpkg/downloads/tools/msys2/aa5af7b2aa7e90e8
-- Configuring x86-windows-dbg
-- Configuring x86-windows-rel
-- Using msys root at C:/src/vcpkg/downloads/tools/msys2/aaafe87dcead272e
-- Building x86-windows-dbg
-- Installing x86-windows-dbg
-- Building x86-windows-rel
-- Installing x86-windows-rel
CMake Warning at scripts/cmake/vcpkg_copy_pdbs.cmake:70 (message):
  Could not find a matching pdb file for:

      C:/src/vcpkg/packages/libiconv_x86-windows/bin/charset-1.dll
      C:/src/vcpkg/packages/libiconv_x86-windows/bin/iconv-2.dll
      C:/src/vcpkg/packages/libiconv_x86-windows/debug/bin/charset-1.dll
      C:/src/vcpkg/packages/libiconv_x86-windows/debug/bin/iconv-2.dll

Call Stack (most recent call first):
  ports/libiconv/portfile.cmake:40 (vcpkg_copy_pdbs)
  scripts/ports.cmake:141 (include)


-- Installing: C:/src/vcpkg/packages/libiconv_x86-windows/share/libiconv/copyright
-- Performing post-build validation
-- Performing post-build validation done
Building package libiconv[core]:x86-windows... done
Installing package libiconv[core]:x86-windows...
Installing package libiconv[core]:x86-windows... done
Elapsed time for package libiconv:x86-windows: 8.312 min
Starting package 2/2: gettext:x86-windows
Building package gettext[core]:x86-windows...
-- Downloading https://ftp.gnu.org/pub/gnu/gettext/gettext-0.21.tar.gz;https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gettext/gettext-0.21.tar.gz -> gettext-0.21.tar.gz...
-- Extracting source C:/src/vcpkg/downloads/gettext-0.21.tar.gz
-- Applying patch 0002-Fix-uwp-build.patch
-- Applying patch 0003-Fix-win-unicode-paths.patch
-- Applying patch rel_path.patch
-- Applying patch android.patch
-- Using source at C:/src/vcpkg/buildtrees/gettext/src/0.21-d3cbdc875d.clean
-- Downloading https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download;https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download?use_mirror=cfhcable;https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download?use_mirror=pilotfiber;https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download?use_mirror=gigenet;https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download?use_mirror=versaweb;https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download?use_mirror=ayera;https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download?use_mirror=netactuate;https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download?use_mirror=phoenixnap;https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download?use_mirror=astuteinternet;https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download?use_mirror=freefr;https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download?use_mirror=netcologne;https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download?use_mirror=deac-riga;https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download?use_mirror=excellmedia;https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download?use_mirror=iweb;https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download?use_mirror=jaist;https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download?use_mirror=jztkft;https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download?use_mirror=managedway;https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download?use_mirror=nchc;https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download?use_mirror=netix;https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download?use_mirror=ufpr;https://sourceforge.net/projects/winflexbison//files/winflexbison-2.5.16.zip/download?use_mirror=tenet -> winflexbison-2.5.16.zip...
-- Extracting source C:/src/vcpkg/downloads/winflexbison-2.5.16.zip
-- Using source at C:/src/vcpkg/downloads/tools/winflexbison/0a14154bff-a8cf65db07
-- Found external ninja('1.10.2').
-- Getting CMake variables for x86-windows
-- Using msys root at C:/src/vcpkg/downloads/tools/msys2/703e5aa15d402568
-- Using msys root at C:/src/vcpkg/downloads/tools/msys2/aa5af7b2aa7e90e8
-- Configuring x86-windows-dbg
-- Configuring x86-windows-rel
-- Using msys root at C:/src/vcpkg/downloads/tools/msys2/aaafe87dcead272e
-- Building x86-windows-dbg
CMake Error at scripts/cmake/vcpkg_build_make.cmake:201 (message):
  libtool could not find a file being linked against!
Call Stack (most recent call first):
  scripts/cmake/vcpkg_install_make.cmake:26 (vcpkg_build_make)
  ports/gettext/portfile.cmake:96 (vcpkg_install_make)
  ports/gettext/portfile.cmake:138 (build_libintl_only)
  scripts/ports.cmake:141 (include)


Error: Building package gettext:x86-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: gettext:x86-windows
  Vcpkg version: 2021-07-26-9425cf5f512f242c0bcbabac31f08832825aee81

Additionally, attach any relevant sections from the log files above.

build-x86-windows-dbg-out.log
cmake-vars-x86-windows-rel.cmake.log
cmake-vars-x86-windows.cmake.log
config-x86-windows-rel-out.log
config.log-x86-windows-rel.log
get-cmake-vars-x86-windows-out.log
stdout-x86-windows.log

@JackBoosY
Copy link
Contributor

CMake Error at scripts/cmake/vcpkg_build_make.cmake:201 (message):
  libtool could not find a file being linked against!

@JackBoosY
Copy link
Contributor

cc @dg0yt I also noticed I couldn't build gettext on my machine successfully, can you please take a look?

@dg0yt
Copy link
Contributor

dg0yt commented Aug 4, 2021

@JackBoosY I saw this yesterday and already looked at the logs. (Thanks for posting them all @SchaichAlonso) But I don't have an idea. I'm not even sure if we need to look at the changes to port gettext or the changes to scripts.
I don't have MSVC, but I can dig through build logs. Unfortunately, CI doesn't provide logs of successful builds.

@JackBoosY
Copy link
Contributor

@dg0yt Here is my log when building genttext[tools]:x64-windows:
gettext.zip

@dg0yt
Copy link
Contributor

dg0yt commented Aug 4, 2021

Successful PR CI runs: 20210719.30 for #18159, merged 10 days ago.

In CI runs for master, it failed yesterday (a863c84), but succeeded on Saturday (261c458). So this is the set of changes to look at:
261c458...a863c84

@dg0yt
Copy link
Contributor

dg0yt commented Aug 4, 2021

The mentioned set includes one PR by me: #19164. @JackBoosY Can you try with this change reverted?

The point is: There is no CI run for this PR which actually rebuild gettext. Note the portfile doesn't use vcpkg_build_make directly, but only vcpkg_install_make. Does ABI/CI look at recursive usage? If not, then there is a significant CI gap.

@dg0yt
Copy link
Contributor

dg0yt commented Aug 4, 2021

Here is my log when building genttext[tools]:x64-windows:

@JackBoosY Note that the original report does not include feature tools, and this is a significant difference for gettext. Let's focus on core first.

@JackBoosY
Copy link
Contributor

@dg0yt I think the core should be good in master branch, only the feature tool was broken.

@dg0yt
Copy link
Contributor

dg0yt commented Aug 4, 2021

@JackBoosY gettext[core]:x86-windows fails in master: https://dev.azure.com/vcpkg/c1ee48cb-0df2-4ab3-8384-b1df5a79fe53/_apis/build/builds/57078/logs/85

I am confused by the messages from libtool:

Makefile:1643: update target 'libintl.la' due to: bindtextdom.lo dcgettext.lo dgettext.lo gettext.lo finddomain.lo hash-string.lo loadmsgcat.lo localealias.lo textdomain.lo l10nflist.lo explodename.lo dcigettext.lo dcngettext.lo dngettext.lo ngettext.lo plural.lo plural-exp.lo localcharset.lo threadlib.lo lock.lo relocatable.lo langprefs.lo localename.lo localename-table.lo log.lo printf.lo setlocale.lo setlocale-lock.lo setlocale_null.lo version.lo xsize.lo osdep.lo intl-compat.lo windows-mutex.lo windows-rwlock.lo windows-recmutex.lo windows-once.lo libintl.res.lo
/bin/sh ../libtool  --tag=CC   --mode=link compile cl.exe  -nologo -W3 -utf-8 -MP -MDd -Z7 -Ob0 -Od -Xcompiler -RTC1 -Wl,--export-all-symbols -liconv  -ladvapi32 -no-undefined -export-symbols-regex '^([^g]|g[^l]|gl[^w]|glw[^t]|glwt[^h]|glwth[^r]|glwthr[^e]|glwthre[^a]|glwthrea[^d]).*' -version-info 10:0:2 -rpath /C/src/vcpkg/installed/x86-windows/debug/lib -LC:/src/vcpkg/installed/x86-windows/debug/lib -LC:/src/vcpkg/installed/x86-windows/debug/lib/manual-link -Wl,--disable-auto-import -o libintl.la  bindtextdom.lo dcgettext.lo dgettext.lo gettext.lo finddomain.lo hash-string.lo loadmsgcat.lo localealias.lo textdomain.lo l10nflist.lo explodename.lo dcigettext.lo dcngettext.lo dngettext.lo ngettext.lo plural.lo plural-exp.lo localcharset.lo threadlib.lo lock.lo relocatable.lo langprefs.lo localename.lo localename-table.lo log.lo printf.lo setlocale.lo setlocale-lock.lo setlocale_null.lo version.lo xsize.lo osdep.lo intl-compat.lo windows-mutex.lo windows-rwlock.lo windows-recmutex.lo windows-once.lo libintl.res.lo -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -lcomdlg32 -ladvapi32

*** Warning: linker path does not have real file for library -liconv.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with iconv and none of the candidates passed a file format test
*** using a file magic. Last file checked: /c/src/vcpkg/downloads/tools/msys2/703e5aa15d402568/usr/bin/iconv.exe

*** Warning: linker path does not have real file for library -lkernel32.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with kernel32 and none of the candidates passed a file format test
*** using a file magic. Last file checked: /c/WINDOWS/system32/kernel32.dll

etc. Why doesn't it pick iconv.lib from vcpkg? Is libtool perhaps looking for mingw's libiconv.dll.a instead?

@JackBoosY JackBoosY added the category:port-bug The issue is with a library, which is something the port should already support label Aug 4, 2021
@JackBoosY
Copy link
Contributor

@dg0yt Now I can confirm your PR #19164 breaks gettext[tools] build.
So I think my PR #19325 need to fix this issue also.

BTW, since it takes a lot of time to build gettext[tools], I personally object to depending on it.

@JackBoosY JackBoosY 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 Aug 4, 2021
@dg0yt
Copy link
Contributor

dg0yt commented Aug 4, 2021

@JackBoosY Most ports don't need gettext[tools].

WRT to #19164: Which MAKE is found without that change, and which with the change? The PR is so simple and should have made a difference at all, or break in CI.

@JackBoosY
Copy link
Contributor

@dg0yt Anyway, I'm fixing this issue in #19325, please see my changes.

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
3 participants