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

[zlib] Build error on x64-mingw-dynamic #42025

Open
dongfangZh opened this issue Nov 7, 2024 · 8 comments
Open

[zlib] Build error on x64-mingw-dynamic #42025

dongfangZh opened this issue Nov 7, 2024 · 8 comments
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team.

Comments

@dongfangZh
Copy link

Package: zlib:[email protected]

Host Environment

  • Host: x64-windows
  • Compiler: GNU 7.3.0
  • vcpkg-tool version: 2024-09-30-ab8988503c7cffabfd440b243a383c0a352a023d
    vcpkg-scripts version: 7adc2e4 2024-10-04 (5 weeks ago)

To Reproduce

vcpkg install zlib:x64-mingw-dynamic

Failure logs

-- Using cached madler-zlib-v1.3.1.tar.gz.
-- Cleaning sources at D:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source D:/vcpkg/downloads/madler-zlib-v1.3.1.tar.gz
-- Applying patch 0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch
-- Applying patch 0002-build-static-or-shared-not-both.patch
-- Applying patch 0003-android-and-mingw-fixes.patch
-- Using source at D:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean
-- Configuring x64-mingw-dynamic
-- Building x64-mingw-dynamic-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: D:/vcpkg/downloads/tools/cmake-3.30.1-windows/cmake-3.30.1-windows-i386/bin/cmake.exe --build . --config Debug --target install -- -v -j9
    Working Directory: D:/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg
    See logs for more information:
      D:\vcpkg\buildtrees\zlib\install-x64-mingw-dynamic-dbg-out.log

Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
  ports/zlib/portfile.cmake:26 (vcpkg_cmake_install)
  scripts/ports.cmake:192 (include)



D:\vcpkg\buildtrees\zlib\install-x64-mingw-dynamic-dbg-out.log
Change Dir: 'D:/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg'

Run Build Command(s): D:/vcpkg/downloads/tools/ninja/1.10.2-windows/ninja.exe -v -v -j9 install
[1/18] C:\WINDOWS\system32\cmd.exe /C "cd /D D:\vcpkg\buildtrees\zlib\x64-mingw-dynamic-dbg && C:\Strawberry\c\bin\windres.exe -D GCC_WINDRES -I D:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean -I D:/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg -o D:/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg/zlib1rc.obj -i D:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean/win32/zlib1.rc"
[2/18] D:\DependentLib\QT\5.14.1\Tools\mingw730_64\bin\x86_64-w64-mingw32-gcc.exe -DZLIB_DLL -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_LARGEFILE64_SOURCE=1 -ID:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean -ID:/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg -g -MD -MT CMakeFiles/zlib.dir/adler32.c.obj -MF CMakeFiles\zlib.dir\adler32.c.obj.d -o CMakeFiles/zlib.dir/adler32.c.obj -c D:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean/adler32.c
[3/18] D:\DependentLib\QT\5.14.1\Tools\mingw730_64\bin\x86_64-w64-mingw32-gcc.exe -DZLIB_DLL -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_LARGEFILE64_SOURCE=1 -ID:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean -ID:/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg -g -MD -MT CMakeFiles/zlib.dir/compress.c.obj -MF CMakeFiles\zlib.dir\compress.c.obj.d -o CMakeFiles/zlib.dir/compress.c.obj -c D:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean/compress.c
[4/18] D:\DependentLib\QT\5.14.1\Tools\mingw730_64\bin\x86_64-w64-mingw32-gcc.exe -DZLIB_DLL -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_LARGEFILE64_SOURCE=1 -ID:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean -ID:/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg -g -MD -MT CMakeFiles/zlib.dir/gzclose.c.obj -MF CMakeFiles\zlib.dir\gzclose.c.obj.d -o CMakeFiles/zlib.dir/gzclose.c.obj -c D:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean/gzclose.c
[5/18] D:\DependentLib\QT\5.14.1\Tools\mingw730_64\bin\x86_64-w64-mingw32-gcc.exe -DZLIB_DLL -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_LARGEFILE64_SOURCE=1 -ID:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean -ID:/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg -g -MD -MT CMakeFiles/zlib.dir/crc32.c.obj -MF CMakeFiles\zlib.dir\crc32.c.obj.d -o CMakeFiles/zlib.dir/crc32.c.obj -c D:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean/crc32.c
[6/18] D:\DependentLib\QT\5.14.1\Tools\mingw730_64\bin\x86_64-w64-mingw32-gcc.exe -DZLIB_DLL -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_LARGEFILE64_SOURCE=1 -ID:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean -ID:/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg -g -MD -MT CMakeFiles/zlib.dir/gzread.c.obj -MF CMakeFiles\zlib.dir\gzread.c.obj.d -o CMakeFiles/zlib.dir/gzread.c.obj -c D:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean/gzread.c
[7/18] D:\DependentLib\QT\5.14.1\Tools\mingw730_64\bin\x86_64-w64-mingw32-gcc.exe -DZLIB_DLL -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_LARGEFILE64_SOURCE=1 -ID:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean -ID:/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg -g -MD -MT CMakeFiles/zlib.dir/gzlib.c.obj -MF CMakeFiles\zlib.dir\gzlib.c.obj.d -o CMakeFiles/zlib.dir/gzlib.c.obj -c D:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean/gzlib.c
[8/18] D:\DependentLib\QT\5.14.1\Tools\mingw730_64\bin\x86_64-w64-mingw32-gcc.exe -DZLIB_DLL -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_LARGEFILE64_SOURCE=1 -ID:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean -ID:/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg -g -MD -MT CMakeFiles/zlib.dir/inflate.c.obj -MF CMakeFiles\zlib.dir\inflate.c.obj.d -o CMakeFiles/zlib.dir/inflate.c.obj -c D:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean/inflate.c
[9/18] D:\DependentLib\QT\5.14.1\Tools\mingw730_64\bin\x86_64-w64-mingw32-gcc.exe -DZLIB_DLL -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_LARGEFILE64_SOURCE=1 -ID:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean -ID:/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg -g -MD -MT CMakeFiles/zlib.dir/gzwrite.c.obj -MF CMakeFiles\zlib.dir\gzwrite.c.obj.d -o CMakeFiles/zlib.dir/gzwrite.c.obj -c D:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean/gzwrite.c
[10/18] D:\DependentLib\QT\5.14.1\Tools\mingw730_64\bin\x86_64-w64-mingw32-gcc.exe -DZLIB_DLL -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_LARGEFILE64_SOURCE=1 -ID:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean -ID:/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg -g -MD -MT CMakeFiles/zlib.dir/deflate.c.obj -MF CMakeFiles\zlib.dir\deflate.c.obj.d -o CMakeFiles/zlib.dir/deflate.c.obj -c D:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean/deflate.c
[11/18] D:\DependentLib\QT\5.14.1\Tools\mingw730_64\bin\x86_64-w64-mingw32-gcc.exe -DZLIB_DLL -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_LARGEFILE64_SOURCE=1 -ID:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean -ID:/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg -g -MD -MT CMakeFiles/zlib.dir/inffast.c.obj -MF CMakeFiles\zlib.dir\inffast.c.obj.d -o CMakeFiles/zlib.dir/inffast.c.obj -c D:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean/inffast.c
[12/18] D:\DependentLib\QT\5.14.1\Tools\mingw730_64\bin\x86_64-w64-mingw32-gcc.exe -DZLIB_DLL -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_LARGEFILE64_SOURCE=1 -ID:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean -ID:/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg -g -MD -MT CMakeFiles/zlib.dir/inftrees.c.obj -MF CMakeFiles\zlib.dir\inftrees.c.obj.d -o CMakeFiles/zlib.dir/inftrees.c.obj -c D:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean/inftrees.c
[13/18] D:\DependentLib\QT\5.14.1\Tools\mingw730_64\bin\x86_64-w64-mingw32-gcc.exe -DZLIB_DLL -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_LARGEFILE64_SOURCE=1 -ID:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean -ID:/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg -g -MD -MT CMakeFiles/zlib.dir/uncompr.c.obj -MF CMakeFiles\zlib.dir\uncompr.c.obj.d -o CMakeFiles/zlib.dir/uncompr.c.obj -c D:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean/uncompr.c
[14/18] D:\DependentLib\QT\5.14.1\Tools\mingw730_64\bin\x86_64-w64-mingw32-gcc.exe -DZLIB_DLL -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_LARGEFILE64_SOURCE=1 -ID:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean -ID:/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg -g -MD -MT CMakeFiles/zlib.dir/infback.c.obj -MF CMakeFiles\zlib.dir\infback.c.obj.d -o CMakeFiles/zlib.dir/infback.c.obj -c D:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean/infback.c
[15/18] D:\DependentLib\QT\5.14.1\Tools\mingw730_64\bin\x86_64-w64-mingw32-gcc.exe -DZLIB_DLL -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_LARGEFILE64_SOURCE=1 -ID:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean -ID:/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg -g -MD -MT CMakeFiles/zlib.dir/zutil.c.obj -MF CMakeFiles\zlib.dir\zutil.c.obj.d -o CMakeFiles/zlib.dir/zutil.c.obj -c D:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean/zutil.c
[16/18] D:\DependentLib\QT\5.14.1\Tools\mingw730_64\bin\x86_64-w64-mingw32-gcc.exe -DZLIB_DLL -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_LARGEFILE64_SOURCE=1 -ID:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean -ID:/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg -g -MD -MT CMakeFiles/zlib.dir/trees.c.obj -MF CMakeFiles\zlib.dir\trees.c.obj.d -o CMakeFiles/zlib.dir/trees.c.obj -c D:/vcpkg/buildtrees/zlib/src/v1.3.1-2e5db616bf.clean/trees.c
[17/18] C:\WINDOWS\system32\cmd.exe /C "cd . && D:\DependentLib\QT\5.14.1\Tools\mingw730_64\bin\x86_64-w64-mingw32-gcc.exe -g   -shared -o libzlibd1.dll -Wl,--out-implib,libzlibd.dll.a -Wl,--major-image-version,1,--minor-image-version,3 zlib1rc.obj CMakeFiles/zlib.dir/adler32.c.obj CMakeFiles/zlib.dir/compress.c.obj CMakeFiles/zlib.dir/crc32.c.obj CMakeFiles/zlib.dir/deflate.c.obj CMakeFiles/zlib.dir/gzclose.c.obj CMakeFiles/zlib.dir/gzlib.c.obj CMakeFiles/zlib.dir/gzread.c.obj CMakeFiles/zlib.dir/gzwrite.c.obj CMakeFiles/zlib.dir/inflate.c.obj CMakeFiles/zlib.dir/infback.c.obj CMakeFiles/zlib.dir/inftrees.c.obj CMakeFiles/zlib.dir/inffast.c.obj CMakeFiles/zlib.dir/trees.c.obj CMakeFiles/zlib.dir/uncompr.c.obj CMakeFiles/zlib.dir/zutil.c.obj  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
FAILED: libzlibd1.dll libzlibd.dll.a 
C:\WINDOWS\system32\cmd.exe /C "cd . && D:\DependentLib\QT\5.14.1\Tools\mingw730_64\bin\x86_64-w64-mingw32-gcc.exe -g   -shared -o libzlibd1.dll -Wl,--out-implib,libzlibd.dll.a -Wl,--major-image-version,1,--minor-image-version,3 zlib1rc.obj CMakeFiles/zlib.dir/adler32.c.obj CMakeFiles/zlib.dir/compress.c.obj CMakeFiles/zlib.dir/crc32.c.obj CMakeFiles/zlib.dir/deflate.c.obj CMakeFiles/zlib.dir/gzclose.c.obj CMakeFiles/zlib.dir/gzlib.c.obj CMakeFiles/zlib.dir/gzread.c.obj CMakeFiles/zlib.dir/gzwrite.c.obj CMakeFiles/zlib.dir/inflate.c.obj CMakeFiles/zlib.dir/infback.c.obj CMakeFiles/zlib.dir/inftrees.c.obj CMakeFiles/zlib.dir/inffast.c.obj CMakeFiles/zlib.dir/trees.c.obj CMakeFiles/zlib.dir/uncompr.c.obj CMakeFiles/zlib.dir/zutil.c.obj  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
D:/DependentLib/QT/5.14.1/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: i386 architecture of input file `zlib1rc.obj' is incompatible with i386:x86-64 output
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
@dg0yt
Copy link
Contributor

dg0yt commented Nov 7, 2024

C:\Strawberry\c\bin\windres.exe
D:\DependentLib\QT\5.14.1\Tools\mingw730_64\bin\x86_64-w64-mingw32-gcc.exe

Wrong windres for this gcc? Check you PATH.

@dongfangZh
Copy link
Author

which file's path?the error is occured when vcpkg install pcl:x64-mingw-dynamic. and other libs are installed successfully.

@dongfangZh
Copy link
Author

the path of windres.exe i s right.

@dg0yt
Copy link
Contributor

dg0yt commented Nov 7, 2024

PATH is an environment variable which determines how to look up executables, i.e. locations and order.

Try putting D:\DependentLib\QT\5.14.1\Tools\mingw730_64\bin before C:\Strawberry\c\bin.

@dg0yt
Copy link
Contributor

dg0yt commented Nov 7, 2024

(Or better, get rid of Strawberry in the PATH. It comes with more surprises.)

@dongfangZh
Copy link
Author

(Or better, get rid of Strawberry in the PATH. It comes with more surprises.)

i've adjust the PATH and th e zlib installed,but the problem of flann #42022 is still occored

@WangWeiLin-MV WangWeiLin-MV added the category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. label Nov 8, 2024
@dg0yt
Copy link
Contributor

dg0yt commented Nov 8, 2024

But the problem of flann #42022 is still occored

And that's why the other issue got another comment.

@dg0yt
Copy link
Contributor

dg0yt commented Nov 8, 2024

Nothing to fix in vcpkg here.

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

3 participants