xmake icon indicating copy to clipboard operation
xmake copied to clipboard

x86 arch package, cannot find cl and linker in on_test

Open star-hengxing opened this issue 2 years ago • 2 comments

Xmake Version

v2.8.1+dev.732d60063

Operating System Version and Architecture

Windows 10 22H2

Describe Bug

as title.

Expected Behavior

Success.

Project Configuration

add_requires("zlib", {arch = "x86"})

Additional Information and Error Logs

log

A:/project/xmake/test> xmake f -cyvDplatform ... windows
checking for architecture ... x64
checking for cl.exe ... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\cl.exe
checking for Microsoft Visual Studio (x64) version ... 2022
checking for Microsoft C/C++ Compiler (x64) version ... 19.36.32537
checkinfo: cannot runv(zig.exe version), No such file or directory
checking for zig ... no
checkinfo: cannot runv(zig.exe version), No such file or directory
checking for zig ... no
checkinfo: cannot runv(unzip.exe -v), No such file or directory
checking for unzip ... no
checking for 7z ... C:\Users\star\scoop\apps\xmake\current\winenv\bin\7z
checking for git ... ok
checkinfo: cannot runv(gzip.exe --version), No such file or directory
checking for gzip ... no
git rev-parse HEAD
finding zlib from xmake ..
checking for xmake::zlib ... no
finding zlib from find_zlib ..
finding zlib from vcpkg ..
finding zlib from conan ..
checking for zlib ... no
checking for ping ... ok
pinging for the host(mirrors.ustc.edu.cn) ... 27 ms
pinging for the host(github.com) ... 98 ms
checking for curl ... C:\Users\star\scoop\apps\xmake\current\winenv\bin\curl
C:\Users\star\scoop\apps\xmake\current\winenv\bin\curl -SL -x socks5://127.0.0.1:9030 -A "Xmake/2.8.1+dev.732d60063 (Windows;) curl/7.85.0" https://mirrors.ustc.edu.cn/debian/pool/main/z/zlib/zlib_1.2.13.dfsg.orig.tar.gz -o zlib_1.2.13.dfsg.orig.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   150  100   150    0     0    599      0 --:--:-- --:--:-- --:--:--   600
error: ...modules\private\action\require\impl\actions\download.lua:187: unmatched checksum, current hash(ee1a2717) != original hash(1525952a)
stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:913]:
    [...modules\private\action\require\impl\actions\download.lua:187]: in function '_download'
    [...modules\private\action\require\impl\actions\download.lua:322]:

  => download https://mirrors.ustc.edu.cn/debian/pool/main/z/zlib/zlib_1.2.13.dfsg.orig.tar.gz .. failed
C:\Users\star\scoop\apps\xmake\current\winenv\bin\7z x -y v1.2.13.tar.gz -oC:\Users\star\AppData\Local\Temp\.xmake\230805\_03F93D9ECA8340208D298F858C647020.tar

7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21

Scanning the drive for archives:
1 file, 1556687 bytes (1521 KiB)

Extracting archive: v1.2.13.tar.gz
--
Path = v1.2.13.tar.gz
Type = gzip
Headers Size = 10

Everything is Ok

Size:       4403200
Compressed: 1556687
C:\Users\star\scoop\apps\xmake\current\winenv\bin\7z x -y C:\Users\star\AppData\Local\Temp\.xmake\230805\_03F93D9ECA8340208D298F858C647020.tar\v1.2.13.tar -osource.tmp

7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21

Scanning the drive for archives:
1 file, 4403200 bytes (4300 KiB)

Extracting archive: C:\Users\star\AppData\Local\Temp\.xmake\230805\_03F93D9ECA8340208D298F858C647020.tar\v1.2.13.tar
--
Path = C:\Users\star\AppData\Local\Temp\.xmake\230805\_03F93D9ECA8340208D298F858C647020.tar\v1.2.13.tar
Type = tar
Physical Size = 4403200
Headers Size = 151552
Code Page = UTF-8

Everything is Ok

Folders: 37
Files: 248
Size:       4190071
Compressed: 4403200
xmake f --diagnosis --verbose --yes -y -c --plat=windows --arch=x86 --mode=release --kind=static --vs=2022 --vs_runtime=MT --qt=C:/Qt --buildir=build_01dba5cf
checking for cl.exe ... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\HostX86\x86\cl.exe
checking for Microsoft Visual Studio (x86) version ... 2022
checking for Microsoft C/C++ Compiler (x86) version ... 19.36.32537
checkinfo: cannot runv(zig.exe version), No such file or directory
checking for zig ... no
checkinfo: cannot runv(zig.exe version), No such file or directory
checking for zig ... no
checking for cl.exe ... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\HostX86\x86\cl.exe
checking for the c compiler (cc) ... cl.exe
> "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x86\\cl.exe" -c -nologo-DZ_HAVE_UNISTD_H -FoC:\Users\star\AppData\Local\Temp\.xmake\230805\_D047F06636D1481086096DF564143880.o C:\Users\star\AppData\Local\Temp\.xmake\230805\_06B26C42C6C94ECCB898078100E7B0D0.c
checking for the c compiler (cc) ... cl.exe
> "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x86\\cl.exe" -c -nologo-DHAVE_STDDEF_H -FoC:\Users\star\AppData\Local\Temp\.xmake\230805\_BBD87C71AE8D437083B13200B323D7C0.o C:\Users\star\AppData\Local\Temp\.xmake\230805\_B3FAE03131E84BCF980C567ED51E281A.c
checking for the c compiler (cc) ... cl.exe
> "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x86\\cl.exe" -c -nologo-DHAVE_STDINT_H -FoC:\Users\star\AppData\Local\Temp\.xmake\230805\_43E9A8C25D5149108E914EBD01629D50.o C:\Users\star\AppData\Local\Temp\.xmake\230805\_D8DE1803C59C4770864681C4AE1591AF.c
checking for the c compiler (cc) ... cl.exe
> "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x86\\cl.exe" -c -nologo-DHAVE_SYS_TYPES_H -FoC:\Users\star\AppData\Local\Temp\.xmake\230805\_E5E3892BCE5A46308F00F57EC88BE680.o C:\Users\star\AppData\Local\Temp\.xmake\230805\_83451946B9C94C818D3008591D49D3D1.c
> checking for c includes(sys/types.h)
checking for HAVE_SYS_TYPES_H ... ok
> checking for c includes(stddef.h)
checking for HAVE_STDDEF_H ... ok
> checking for c includes(stdint.h)
checking for HAVE_STDINT_H ... ok
> checking for c includes(unistd.h)
checkinfo: ...amdir\core\sandbox\modules\import\core\tool\compiler.lua:84: @programdir\modules\core\tools\cl.lua:641: _06B26C42C6C94ECCB898078100E7B0D0.c
C:\Users\star\AppData\Local\Temp\.xmake\230805\_06B26C42C6C94ECCB898078100E7B0D0.c(2): fatal error C1083: Cannot open include file:'unistd.h': No such file or directory

stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:913]:
    [@programdir\modules\core\tools\cl.lua:641]: in function 'catch'
    [@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
    [@programdir\modules\core\tools\cl.lua:580]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]:
    [@programdir\core\tool\compiler.lua:278]: in function 'compile'
    [...amdir\core\sandbox\modules\import\core\tool\compiler.lua:82]: in function 'compile'
    [@programdir\modules\lib\detect\check_cxsnippets.lua:246]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\modules\lib\detect\check_cxsnippets.lua:240]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]:
    [@programdir\core\project\option.lua:178]: in function '_do_check_cxsnippets'
    [@programdir\core\project\option.lua:230]:
    [@programdir\core\project\option.lua:278]: in function '_check'
    [@programdir\core\project\option.lua:335]: in function 'check'
    [...dir\core\sandbox\modules\import\core\project\project.lua:107]: in function 'jobfunc'
    [@programdir\modules\private\async\runjobs.lua:232]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\modules\private\async\runjobs.lua:218]: in function 'cotask'
    [@programdir\core\base\scheduler.lua:404]:

checking for Z_HAVE_UNISTD_H ... no
configure
{
    vs = 2022
    kind = static
    ccache = true
    proxy_pac = pac.lua
    qt = C:/Qt
    host = windows
    buildir = build_01dba5cf
    vs_runtime = MT
    clean = true
    proxy = socks5://127.0.0.1:9030
    mingw = C:/Users/star/scoop/apps/mingw/current
    ndk_stdcxx = true
    network = public
    plat = windows
    arch = x86
    mode = release
    theme = default
}
xmake build --diagnosis --verbose --yes
checking for the c compiler (cc) ... cl.exe
checking for C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\HostX86\x86\cl.exe ... ok
checking for flags (-O2 -fp:fast) ... ok
> cl.exe "-O2" "-fp:fast" "-nologo"
checking for flags (-DNDEBUG) ... ok
> cl.exe "-DNDEBUG" "-nologo"
checking for cl.exe ... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\HostX86\x86\cl.exe
checking for the c++ compiler (cxx) ... cl.exe
[  5%]: compiling.release adler32.c
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x86\\cl.exe" -c -nologo -O2 -fp:fast -MT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DHAVE_SYS_TYPES_H -DHAVE_STDINT_H -DHAVE_STDDEF_H /EHsc -DNDEBUG -Fobuild_01dba5cf\.objs\zlib\windows\x86\release\adler32.c.obj adler32.c
checking for the c++ compiler (cxx) ... cl.exe
[  5%]: compiling.release inftrees.c
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x86\\cl.exe" -c -nologo -O2 -fp:fast -MT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DHAVE_SYS_TYPES_H -DHAVE_STDINT_H -DHAVE_STDDEF_H /EHsc -DNDEBUG -Fobuild_01dba5cf\.objs\zlib\windows\x86\release\inftrees.c.obj inftrees.c
checking for the c++ compiler (cxx) ... cl.exe
[  5%]: compiling.release inffast.c
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x86\\cl.exe" -c -nologo -O2 -fp:fast -MT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DHAVE_SYS_TYPES_H -DHAVE_STDINT_H -DHAVE_STDDEF_H /EHsc -DNDEBUG -Fobuild_01dba5cf\.objs\zlib\windows\x86\release\inffast.c.obj inffast.c
checking for the c++ compiler (cxx) ... cl.exe
[  5%]: compiling.release infback.c
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x86\\cl.exe" -c -nologo -O2 -fp:fast -MT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DHAVE_SYS_TYPES_H -DHAVE_STDINT_H -DHAVE_STDDEF_H /EHsc -DNDEBUG -Fobuild_01dba5cf\.objs\zlib\windows\x86\release\infback.c.obj infback.c
checking for the c++ compiler (cxx) ... cl.exe
[  5%]: compiling.release zutil.c
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x86\\cl.exe" -c -nologo -O2 -fp:fast -MT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DHAVE_SYS_TYPES_H -DHAVE_STDINT_H -DHAVE_STDDEF_H /EHsc -DNDEBUG -Fobuild_01dba5cf\.objs\zlib\windows\x86\release\zutil.c.obj zutil.c
checking for the c++ compiler (cxx) ... cl.exe
[  5%]: compiling.release uncompr.c
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x86\\cl.exe" -c -nologo -O2 -fp:fast -MT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DHAVE_SYS_TYPES_H -DHAVE_STDINT_H -DHAVE_STDDEF_H /EHsc -DNDEBUG -Fobuild_01dba5cf\.objs\zlib\windows\x86\release\uncompr.c.obj uncompr.c
checking for the c++ compiler (cxx) ... cl.exe
[  5%]: compiling.release gzwrite.c
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x86\\cl.exe" -c -nologo -O2 -fp:fast -MT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DHAVE_SYS_TYPES_H -DHAVE_STDINT_H -DHAVE_STDDEF_H /EHsc -DNDEBUG -Fobuild_01dba5cf\.objs\zlib\windows\x86\release\gzwrite.c.obj gzwrite.c
checking for the c++ compiler (cxx) ... cl.exe
[  5%]: compiling.release compress.c
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x86\\cl.exe" -c -nologo -O2 -fp:fast -MT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DHAVE_SYS_TYPES_H -DHAVE_STDINT_H -DHAVE_STDDEF_H /EHsc -DNDEBUG -Fobuild_01dba5cf\.objs\zlib\windows\x86\release\compress.c.obj compress.c
checking for the c++ compiler (cxx) ... cl.exe
[  5%]: compiling.release gzlib.c
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x86\\cl.exe" -c -nologo -O2 -fp:fast -MT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DHAVE_SYS_TYPES_H -DHAVE_STDINT_H -DHAVE_STDDEF_H /EHsc -DNDEBUG -Fobuild_01dba5cf\.objs\zlib\windows\x86\release\gzlib.c.obj gzlib.c
checking for the c++ compiler (cxx) ... cl.exe
[  5%]: compiling.release crc32.c
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x86\\cl.exe" -c -nologo -O2 -fp:fast -MT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DHAVE_SYS_TYPES_H -DHAVE_STDINT_H -DHAVE_STDDEF_H /EHsc -DNDEBUG -Fobuild_01dba5cf\.objs\zlib\windows\x86\release\crc32.c.obj crc32.c
checking for the c++ compiler (cxx) ... cl.exe
[  5%]: compiling.release deflate.c
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x86\\cl.exe" -c -nologo -O2 -fp:fast -MT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DHAVE_SYS_TYPES_H -DHAVE_STDINT_H -DHAVE_STDDEF_H /EHsc -DNDEBUG -Fobuild_01dba5cf\.objs\zlib\windows\x86\release\deflate.c.obj deflate.c
checking for the c++ compiler (cxx) ... cl.exe
[  5%]: compiling.release inflate.c
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x86\\cl.exe" -c -nologo -O2 -fp:fast -MT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DHAVE_SYS_TYPES_H -DHAVE_STDINT_H -DHAVE_STDDEF_H /EHsc -DNDEBUG -Fobuild_01dba5cf\.objs\zlib\windows\x86\release\inflate.c.obj inflate.c
checking for the c++ compiler (cxx) ... cl.exe
[  5%]: compiling.release trees.c
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x86\\cl.exe" -c -nologo -O2 -fp:fast -MT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DHAVE_SYS_TYPES_H -DHAVE_STDINT_H -DHAVE_STDDEF_H /EHsc -DNDEBUG -Fobuild_01dba5cf\.objs\zlib\windows\x86\release\trees.c.obj trees.c
checking for the c++ compiler (cxx) ... cl.exe
[  5%]: compiling.release gzclose.c
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x86\\cl.exe" -c -nologo -O2 -fp:fast -MT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DHAVE_SYS_TYPES_H -DHAVE_STDINT_H -DHAVE_STDDEF_H /EHsc -DNDEBUG -Fobuild_01dba5cf\.objs\zlib\windows\x86\release\gzclose.c.obj gzclose.c
checking for the c++ compiler (cxx) ... cl.exe
[  5%]: compiling.release gzread.c
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x86\\cl.exe" -c -nologo -O2 -fp:fast -MT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DHAVE_SYS_TYPES_H -DHAVE_STDINT_H -DHAVE_STDDEF_H /EHsc -DNDEBUG -Fobuild_01dba5cf\.objs\zlib\windows\x86\release\gzread.c.obj gzread.c
checking for flags (cl_sourceDependencies) ... ok
> cl.exe "/sourceDependencies" "C:\Users\star\AppData\Local\Temp\.xmake\230805\_E21BEECCFFB146408981B18817481090.json" "-nologo"
checking for link.exe ... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\HostX86\x86\link.exe
checking for the static library archiver (ar) ... link.exe
[ 88%]: archiving.release zlib.lib
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x86\\link.exe" -lib -nologo -machine:x86 /opt:ref /opt:icf -out:build_01dba5cf\windows\x86\release\zlib.lib build_01dba5cf\.objs\zlib\windows\x86\release\adler32.c.obj build_01dba5cf\.objs\zlib\windows\x86\release\compress.c.obj build_01dba5cf\.objs\zlib\windows\x86\release\crc32.c.obj build_01dba5cf\.objs\zlib\windows\x86\release\deflate.c.obj build_01dba5cf\.objs\zlib\windows\x86\release\gzclose.c.obj build_01dba5cf\.objs\zlib\windows\x86\release\gzlib.c.obj build_01dba5cf\.objs\zlib\windows\x86\release\gzread.c.obj build_01dba5cf\.objs\zlib\windows\x86\release\gzwrite.c.obj build_01dba5cf\.objs\zlib\windows\x86\release\inflate.c.obj build_01dba5cf\.objs\zlib\windows\x86\release\infback.c.obj build_01dba5cf\.objs\zlib\windows\x86\release\inftrees.c.obj build_01dba5cf\.objs\zlib\windows\x86\release\inffast.c.obj build_01dba5cf\.objs\zlib\windows\x86\release\trees.c.obj build_01dba5cf\.objs\zlib\windows\x86\release\uncompr.c.obj build_01dba5cf\.objs\zlib\windows\x86\release\zutil.c.obj

build cache stats:
cache directory: build_01dba5cf\.build_cache
cache hit rate: 0%
cache hit: 0
cache miss: 0
new cached files: 0
remote cache hit: 0
remote new cached files: 0
preprocess failed: 0
compile fallback count: 0

[100%]: build ok, spent 0.703s
xmake install -y --nopkgs -o C:\Users\star\AppData\Local\.xmake\packages\z\zlib\v1.2.13\01dba5cf18044069baac5e77ea4c85fa --diagnosis --verbose --yes
installing zlib ..
installing zlib to C:\Users\star\AppData\Local\.xmake\packages\z\zlib\v1.2.13\01dba5cf18044069baac5e77ea4c85fa ..
> copy build_01dba5cf\windows\x86\release\zlib.lib to C:\Users\star\AppData\Local\.xmake\packages\z\zlib\v1.2.13\01dba5cf18044069baac5e77ea4c85fa\lib
> copy zlib.h to C:\Users\star\AppData\Local\.xmake\packages\z\zlib\v1.2.13\01dba5cf18044069baac5e77ea4c85fa\include\zlib.h
> copy zconf.h to C:\Users\star\AppData\Local\.xmake\packages\z\zlib\v1.2.13\01dba5cf18044069baac5e77ea4c85fa\include\zconf.h
install ok!
finding zlib from xmake ..
checking for xmake::zlib ... zlib v1.2.13
{
  static = true,
  libfiles = {
    "C:\Users\star\AppData\Local\.xmake\packages\z\zlib\v1.2.13\01dba5cf18044069baac5e77ea4c85fa\lib\zlib.lib"
  },
  links = {
    "zlib"
  },
  linkdirs = {
    "C:\Users\star\AppData\Local\.xmake\packages\z\zlib\v1.2.13\01dba5cf18044069baac5e77ea4c85fa\lib"
  },
  version = "v1.2.13",
  sysincludedirs = {
    "C:\Users\star\AppData\Local\.xmake\packages\z\zlib\v1.2.13\01dba5cf18044069baac5e77ea4c85fa\include"
  }
}

patching C:\Users\star\AppData\Local\.xmake\packages\z\zlib\v1.2.13\01dba5cf18044069baac5e77ea4c85fa\lib\pkgconfig\zlib.pc ..
checkinfo: cannot runv(link.exe -lib -out:C:\Users\star\AppData\Local\Temp\.xmake\230805\_14DC6E1FC85D47608178B4A32C7D1590.exe C:\Users\star\AppData\Local\Temp\.xmake\230805\_1EB76C83A6344F508752E428453C6FC0.obj), No such file or directory
checking for link.exe ... no
checking for the linker (ld: link.exe) ... no
checking for clang++ ... ok
checking for the linker (ld) ... clang++
checkinfo: @programdir\core\sandbox\modules\os.lua:273: cannot runv(cl.exe -c -FoC:\Users\star\AppData\Local\Temp\.xmake\230805\_A22C39056FB24640872038C91BA6F180.obj C:\Users\star\AppData\Local\Temp\.xmake\230805\_9322B23525A54E7083A8614D3F23DB80.c), No such fileor directory
stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:913]:
    [@programdir\core\sandbox\modules\os.lua:273]: in function 'runv'
    [@programdir\modules\detect\tools\find_cl.lua:48]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]:
    [...\core\sandbox\modules\import\lib\detect\find_program.lua:68]: in function '_do_check'
    [...\core\sandbox\modules\import\lib\detect\find_program.lua:91]: in function '_check'
    [...\core\sandbox\modules\import\lib\detect\find_program.lua:245]: in function '_find'
    [...\core\sandbox\modules\import\lib\detect\find_program.lua:314]:
    [@programdir\modules\detect\tools\find_cl.lua:55]:
    [@programdir\modules\lib\detect\find_tool.lua:31]: in function '_find_from_modules'
    [@programdir\modules\lib\detect\find_tool.lua:42]: in function '_find_tool'
    [@programdir\modules\lib\detect\find_tool.lua:88]:
    [@programdir\core\tool\toolchain.lua:470]: in function '_checktool'
    [@programdir\core\tool\toolchain.lua:210]: in function 'tool'
    [@programdir\core\tool\toolchain.lua:740]:
    [@programdir\core\tool\compiler.lua:100]: in function '_load_tool'
    [@programdir\core\tool\compiler.lua:118]: in function 'load'
    [...amdir\core\sandbox\modules\import\core\tool\compiler.lua:35]: in function 'load'
    [...amdir\core\sandbox\modules\import\core\tool\compiler.lua:60]: in function 'compargv'
    [...amdir\core\sandbox\modules\import\core\tool\compiler.lua:44]: in function 'compcmd'
    [@programdir\modules\lib\detect\check_cxsnippets.lua:244]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\modules\lib\detect\check_cxsnippets.lua:240]:
    [....xmake\repositories\xmake-repo\packages\z\zlib\xmake.lua:80]: in function 'script'
    [...dir\modules\private\action\require\impl\utils\filter.lua:125]: in function 'call'
    [...dir\modules\private\action\require\impl\actions\test.lua:41]:
    [...\modules\private\action\require\impl\actions\install.lua:407]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [...\modules\private\action\require\impl\actions\install.lua:328]:
    [...modules\private\action\require\impl\install_packages.lua:479]: in function 'jobfunc'
    [@programdir\modules\private\async\runjobs.lua:232]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\modules\private\async\runjobs.lua:218]: in function 'cotask'
    [@programdir\core\base\scheduler.lua:404]:

checking for cl.exe ... no
checking for the c compiler (cc: cl.exe) ... no
checking for clang ... ok
checking for the c compiler (cc) ... clang
> clang -c -Qunused-arguments -m32 -isystem C:\Users\star\AppData\Local\.xmake\packages\z\zlib\v1.2.13\01dba5cf18044069baac5e77ea4c85fa\include -o C:\Users\star\AppData\Local\Temp\.xmake\230805\_B3F3A11DD0AD44408FB4DE4C894171C0.o C:\Users\star\AppData\Local\Temp\.xmake\230805\_7827D115ED544A33BAE7CA61D1263B43.c
checking for clang ... ok
checking for flags (-fdiagnostics-color=always) ... ok
> clang "-fdiagnostics-color=always" "-Qunused-arguments" "-m32"
checkinfo: @programdir\core\sandbox\modules\os.lua:273: cannot runv(cl.exe -c -FoC:\Users\star\AppData\Local\Temp\.xmake\230805\_B489B716302741708098A64CC736E470.obj C:\Users\star\AppData\Local\Temp\.xmake\230805\_E015807FC007487087206D0F669A24A0.c), No such fileor directory
stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:913]:
    [@programdir\core\sandbox\modules\os.lua:273]: in function 'runv'
    [@programdir\modules\detect\tools\find_cl.lua:48]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]:
    [...\core\sandbox\modules\import\lib\detect\find_program.lua:68]: in function '_do_check'
    [...\core\sandbox\modules\import\lib\detect\find_program.lua:91]: in function '_check'
    [...\core\sandbox\modules\import\lib\detect\find_program.lua:245]: in function '_find'
    [...\core\sandbox\modules\import\lib\detect\find_program.lua:314]:
    [@programdir\modules\detect\tools\find_cl.lua:55]:
    [@programdir\modules\lib\detect\find_tool.lua:31]: in function '_find_from_modules'
    [@programdir\modules\lib\detect\find_tool.lua:42]: in function '_find_tool'
    [@programdir\modules\lib\detect\find_tool.lua:88]:
    [@programdir\core\tool\toolchain.lua:470]: in function '_checktool'
    [@programdir\core\tool\toolchain.lua:210]: in function 'tool'
    [@programdir\core\tool\toolchain.lua:740]:
    [@programdir\core\package\package.lua:1160]: in function 'has_tool'
    [@programdir\modules\private\cache\build_cache.lua:74]: in function 'is_enabled'
    [@programdir\modules\core\tools\gcc.lua:625]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\modules\core\tools\gcc.lua:693]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]:
    [@programdir\core\tool\compiler.lua:278]: in function 'compile'
    [...amdir\core\sandbox\modules\import\core\tool\compiler.lua:82]: in function 'compile'
    [@programdir\modules\lib\detect\check_cxsnippets.lua:246]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\modules\lib\detect\check_cxsnippets.lua:240]:
    [....xmake\repositories\xmake-repo\packages\z\zlib\xmake.lua:80]: in function 'script'
    [...dir\modules\private\action\require\impl\utils\filter.lua:125]: in function 'call'
    [...dir\modules\private\action\require\impl\actions\test.lua:41]:
    [...\modules\private\action\require\impl\actions\install.lua:407]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [...\modules\private\action\require\impl\actions\install.lua:328]:
    [...modules\private\action\require\impl\install_packages.lua:479]: in function 'jobfunc'
    [@programdir\modules\private\async\runjobs.lua:232]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\core\base\scheduler.lua:404]:

checking for cl.exe ... no
checking for the c++ compiler (cxx: cl.exe) ... no
checking for clang ... ok
checking for the c++ compiler (cxx) ... clang
> clang++ -o C:\Users\star\AppData\Local\Temp\.xmake\230805\_B3F3A11DD0AD44408FB4DE4C894171C0.b C:\Users\star\AppData\Local\Temp\.xmake\230805\_B3F3A11DD0AD44408FB4DE4C894171C0.o -m32 -LC:\Users\star\AppData\Local\.xmake\packages\z\zlib\v1.2.13\01dba5cf18044069baac5e77ea4c85fa\lib -lzlib -lkernel32 -lntdll
> checking for c includes(zlib.h)
> checking for c funcs(inflate)
> checking for c links(zlib)
> checking for c snippet(has_cfuncs)
  => install zlib v1.2.13 .. ok

star-hengxing avatar Aug 05 '23 09:08 star-hengxing

这块改起来得费点时间,都后面有空再看看吧,先放着

waruqi avatar Aug 07 '23 02:08 waruqi

Bot detected the issue body's language is not English, translate it automatically.


It will take some time to change this piece, let’s take a look later when you have time, let’s put it away for now

Issues-translate-bot avatar Aug 07 '23 02:08 Issues-translate-bot

这个 patch 应该能 work https://github.com/xmake-io/xmake/pull/5076

waruqi avatar May 09 '24 07:05 waruqi

不行,我在修改处加了 print,传进去来的工具链就错了

checking for platform ... windows
checking for architecture ... x64
checking for Microsoft Visual Studio (x64) version ... 2022
checking for Microsoft C/C++ Compiler (x64) version ... 19.39.33523
cc
clang.cflags
cflags
clang.cxflags
cxflags
cxx
ld
clangxx.ldflags
ldflags
clangxx.ldflags
ldflags
  => installing zlib .. (1/xmake.exe) checking for Microsoft Visual Studio (x86) version ... 2022
checking for Microsoft C/C++ Compiler (x86) version ... 19.39.33523
ld
cc
cc
cxx
  => installing zlib .. (1/clang) ⠼ld
  => install zlib v1.3.1 .. ❌

star-hengxing avatar May 09 '24 11:05 star-hengxing

加了 system = false 就成功了,原因未明,但应该是一个排查思路

star-hengxing avatar May 09 '24 12:05 star-hengxing

Bot detected the issue body's language is not English, translate it automatically.


It succeeded after adding system = false. The reason is unknown, but it should be a troubleshooting idea.

Issues-translate-bot avatar May 09 '24 12:05 Issues-translate-bot

不行,我在修改处加了 print,传进去来的工具链就错了

checking for platform ... windows
checking for architecture ... x64
checking for Microsoft Visual Studio (x64) version ... 2022
checking for Microsoft C/C++ Compiler (x64) version ... 19.39.33523
cc
clang.cflags
cflags
clang.cxflags
cxflags
cxx
ld
clangxx.ldflags
ldflags
clangxx.ldflags
ldflags
  => installing zlib .. (1/xmake.exe) checking for Microsoft Visual Studio (x86) version ... 2022
checking for Microsoft C/C++ Compiler (x86) version ... 19.39.33523
ld
cc
cc
cxx
  => installing zlib .. (1/clang) ⠼ld
  => install zlib v1.3.1 .. ❌

其实这个 issues 之前的问题,已经修复了,现在你遇到的是后来 system/find_package 改动导致的另外一个问题。

https://github.com/xmake-io/xmake/pull/5078 等这个 patch 后再试试,我这边本地测试 ok 了

waruqi avatar May 09 '24 14:05 waruqi

再试试,应该可以了

waruqi avatar May 09 '24 15:05 waruqi

Bot detected the issue body's language is not English, translate it automatically.


Try again, it should work

Issues-translate-bot avatar May 09 '24 16:05 Issues-translate-bot