xmake-io / xmake

🔥 A cross-platform build utility based on Lua
https://xmake.io
Apache License 2.0
10.12k stars 784 forks source link

Fail to fetch system packages with xrepo #2106

Closed xq114 closed 2 years ago

xq114 commented 2 years ago

描述问题

xrepo fetch <package>无法从on_fetch获取系统package

期待的结果

希望可以提供一种方式获取系统package

错误信息

$ xrepo fetch -vD cuda
xmake f -c --require=n -v -D
checking for platform ... windows
checking for architecture ... x64
checking for vswhere.exe ... C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe
checking for cl.exe ... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\cl.exe
checking for Microsoft Visual Studio (x64) version ... 2022
checkinfo: cannot runv(dmd.exe --version), No such file or directory
checking for dmd ... no
checkinfo: cannot runv(ldc2.exe --version), No such file or directory
checking for ldc2 ... no
checkinfo: cannot runv(gdc.exe --version), No such file or directory
checking for gdc ... no
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 link.exe ... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\link.exe
checking for the linker (ld) ... link.exe
configure
{
    pkg_searchdirs = C:/Users/xq114/Downloads
    theme = default
    host = windows
    clean = true
    network = public
    ccache = true
    proxy_pac = github_mirror.lua
    ndk_stdcxx = true
    kind = static
    plat = windows
    buildir = build
    mode = release
    vs = 2022
    arch = x64
}
xmake require --fetch -v -D --extra={system=false} cuda
configure
{
    plat = windows
    buildir = build
    vs = 2022
    host = windows
    ndk_stdcxx = true
    kind = static
    network = public
    pkg_searchdirs = C:/Users/xq114/Downloads
    mode = release
    proxy_pac = github_mirror.lua
    clean = true
    ccache = true
    arch = x64
    theme = default
}
checking for git ... ok
git rev-parse HEAD
checking for Cuda SDK directory ... C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6
finding cuda from xmake ..
checking for xmake::cuda ... no

$ xrepo fetch -vD system::cuda
xmake f -c --require=n -v -D
checking for platform ... windows
checking for architecture ... x64
checking for vswhere.exe ... C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe
checking for cl.exe ... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\cl.exe
checking for Microsoft Visual Studio (x64) version ... 2022
checkinfo: cannot runv(dmd.exe --version), No such file or directory
checking for dmd ... no
checkinfo: cannot runv(ldc2.exe --version), No such file or directory
checking for ldc2 ... no
checkinfo: cannot runv(gdc.exe --version), No such file or directory
checking for gdc ... no
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 link.exe ... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\link.exe
checking for the linker (ld) ... link.exe
configure
{
    proxy_pac = github_mirror.lua
    theme = default
    clean = true
    ndk_stdcxx = true
    buildir = build
    network = public
    host = windows
    ccache = true
    kind = static
    mode = release
    vs = 2022
    plat = windows
    pkg_searchdirs = C:/Users/xq114/Downloads
    arch = x64
}
xmake require --fetch -v -D --extra={system=false} system::cuda
configure
{
    plat = windows
    mode = release
    vs = 2022
    buildir = build
    pkg_searchdirs = C:/Users/xq114/Downloads
    proxy_pac = github_mirror.lua
    ccache = true
    clean = true
    network = public
    theme = default
    host = windows
    arch = x64
    kind = static
    ndk_stdcxx = true
}
finding cuda from system ..
checkinfo: cannot runv(pkg-config.exe --version), No such file or directory
checking for pkg-config ... no
checkinfo: cannot runv(pkgconf.exe --version), No such file or directory
checking for pkgconf ... no
checking for system::cuda ... no

相关环境

请提供编译和运行环境信息,下面是一些必须填写的基础信息,便于我们针对性排查问题:

其他信息

请提供关键的 xmake.lua 配置内容,或者完整 xmake.lua,也可以是其他附加信息帮助我们诊断问题(比如截图,xmake.lua或者可复现的demo),以及你遇到的问题的一些背景信息。

waruqi commented 2 years ago

回头我改进下

waruqi commented 2 years ago

加了个 xrepo fetch --system cuda

xq114 commented 2 years ago

可以了