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

安装 Nimble 依赖包报错:fetch nimble::xxx failed! #4807

Closed
63enjoy opened this issue Mar 7, 2024 · 3 comments
Closed

安装 Nimble 依赖包报错:fetch nimble::xxx failed! #4807

63enjoy opened this issue Mar 7, 2024 · 3 comments
Labels
Milestone

Comments

@63enjoy
Copy link

63enjoy commented Mar 7, 2024

Xmake 版本

2.8.8

操作系统版本和架构

Windows 11 23H2 22631.3235

描述问题

使用 xmake 编译 Nim 项目,安装 Nimble 依赖包时报错。

期待的结果

正常安装依赖包。

工程配置

https://github.com/xmake-io/xmake/tree/dev/tests/projects/nim/nimble_package

附加信息和错误日志

checking for platform ... windows
checking for architecture ... x64
checking for cl.exe ... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\cl.exe
checking for Microsoft Visual Studio (x64) version ... 2022
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:\Program Files\xmake\winenv\bin\7z
checking for git ... ok
checkinfo: cannot runv(gzip.exe --version), No such file or directory
checking for gzip ... no
checking for ping ... ok
pinging the host(gitee.com) ... 18 ms
pinging the host(github.com) ... 114 ms
pinging the host(gitlab.com) ... 266 ms
finding zip from nimble ..
checking for nimble ... ok
checking for nimble::zip ... no
note: install or modify (m) these packages (pass -y to skip confirm)?
in nimble:
  -> nimble::zip >0.3 [runtimes:"MT"]
please input: y (y/n/m)

installing zip from nimble ..
nimble install -y --verbose zip@>0.3
     Info:  Nimble data file "C:\Users\sbl\.nimble\nimbledata2.json" has been loaded.
    Reading official package list
Downloading https://github.com/nim-lang/zip using git
    Cloning latest tagged version: 0.3.1
  Verifying dependencies for [email protected]
 Installing [email protected]
  Warning:  A package "[email protected]" with checksum "747aab3c43ecb7b50671cdd0ec3b2edc2c83494c" already exists the the cache.
     Info:  Nimble data file "C:\Users\sbl\.nimble\nimbledata2.json" has been saved.
finding zip from nimble ..
checking for nimble::zip ... no

error: ...\modules\private\action\require\impl\actions\install.lua:398: fetch nimble::zip->0.3 failed!
stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:957]: in function 'raiselevel'
    [@programdir\core\sandbox\modules\utils.lua:149]: in function 'assert'
    [...\modules\private\action\require\impl\actions\install.lua:398]:

  => install nimble::zip >0.3 .. failed
error: @programdir\core\main.lua:306: @programdir\core\sandbox\modules\import\core\base\task.lua:65: @programdir\modules\async\runjobs.lua:320: ...\modules\private\action\require\impl\actions\install.lua:474: install failed!
stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:957]:
    [...\modules\private\action\require\impl\actions\install.lua:474]: in function 'catch'
    [@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
    [...\modules\private\action\require\impl\actions\install.lua:333]:
    [...modules\private\action\require\impl\install_packages.lua:479]: in function 'jobfunc'
    [@programdir\modules\async\runjobs.lua:237]:

stack traceback:
        [C]: in function 'error'
        @programdir\core\base\os.lua:957: in function 'base/os.raiselevel'
        (...tail calls...)
        @programdir\core\main.lua:306: in upvalue 'cotask'
        @programdir\core\base\scheduler.lua:404: in function <@programdir\core\base\scheduler.lua:397>
@63enjoy 63enjoy added the bug label Mar 7, 2024
@waruqi
Copy link
Member

waruqi commented Mar 7, 2024

checking for nimble::zip ... no

没找到已经安装的 zip 包,导致触发了重装,可以调下这里,看看为什么没找到,然后提个 pr 过来改进下

https://github.com/xmake-io/xmake/blob/master/xmake/modules/package/manager/nimble/find_package.lua

waruqi added a commit that referenced this issue Mar 21, 2024
@waruqi
Copy link
Member

waruqi commented Mar 21, 2024

再试下,应该修复了。xmake update -s dev

@waruqi waruqi added this to the v2.8.9 milestone Mar 21, 2024
@waruqi waruqi closed this as completed Mar 21, 2024
@Issues-translate-bot
Copy link

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


Try again, it should be fixed. xmake update -s dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants