xmake-io / xmake

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

无法安装依赖 #5366

Closed stoodger closed 3 months ago

stoodger commented 3 months ago

Xmake 版本

v2.9.3+master.2412ed94e

操作系统版本和架构

Windows 10 企业版 LTSC

描述问题

找不到依赖,安装不了。 the following packages were not found in any repository (check if they are spelled correctly)

期待的结果

正确安装依赖

工程配置

set_project("VCX-Labs")
set_version("2.0.0")
set_xmakever("2.6.9")
set_languages("cxx20")

add_rules("mode.debug", "mode.release")

add_requires("glad")
add_requires("glfw")
add_requires("glm")
add_requires("imgui")
add_requires("spdlog")
add_requires("stb")
add_requires("fmt")
add_requires("tinyobjloader")
add_requires("yaml-cpp")

target("assets")
    set_kind("phony")
    set_default(true)
    after_build(function (target)
        os.mkdir(path.join(target:targetdir(), "assets"))
        os.cp("assets/*|shaders", path.join(target:targetdir(), "assets"))
        os.mkdir(path.join(target:targetdir(), "assets", "shaders"))
        os.cp("assets/shaders/*", path.join(target:targetdir(), "assets", "shaders"))
    end)
    after_install(function (target)
        os.mkdir(path.join(target:installdir(), "assets"))
        os.cp("assets/*|shaders", path.join(target:installdir(), "assets"))
        os.mkdir(path.join(target:installdir(), "assets", "shaders"))
        os.cp("assets/shaders/*", path.join(target:installdir(), "assets", "shaders"))
    end)
    after_clean(function (target)
        os.rm(path.join(target:targetdir(), "assets"))
    end)

target("engine")
    set_kind("static")
    add_packages("glad"         , { public = true })
    add_packages("glfw"         , { public = true })
    add_packages("glm"          , { public = true })
    add_packages("imgui"        , { public = true })
    add_packages("spdlog"       , { public = true })
    add_packages("stb"          , { public = true })
    add_packages("fmt"          , { public = true })
    add_packages("tinyobjloader", { public = true })
    add_packages("yaml-cpp"     , { public = true })

    add_includedirs("src/3rdparty", { public = true })
    add_includedirs("src/VCX"     , { public = true })
    add_headerfiles("src/3rdparty/**.h")
    add_headerfiles("src/3rdparty/**.hpp")
    add_files      ("src/3rdparty/**.cpp")
    add_headerfiles("src/VCX/Assets/**.h")
    add_headerfiles("src/VCX/Assets/**.hpp")
    add_headerfiles("src/VCX/Engine/**.h")
    add_headerfiles("src/VCX/Engine/**.hpp")
    add_files      ("src/VCX/Engine/**.cpp")

target("lab-common")
    set_kind("static")
    add_deps("engine")
    add_deps("assets")
    add_headerfiles("src/VCX/Labs/Common/*.h")
    add_files      ("src/VCX/Labs/Common/*.cpp")

target("lab0")
    set_kind("binary")
    add_deps("lab-common")
    add_headerfiles("src/VCX/Labs/0-GettingStarted/*.h")
    add_headerfiles("src/VCX/Labs/0-GettingStarted/*.hpp")
    add_files      ("src/VCX/Labs/0-GettingStarted/*.cpp")

附加信息和错误日志

checking for platform ... windows
checking for architecture ... x64
checking for cl.exe ... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\cl.exe
checking for Microsoft Visual Studio (x64) version ... 2022
checking for Microsoft C/C++ Compiler (x64) version ... 19.40.33812
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(nim.exe --version), No such file or directory
checking for nim ... no
checkinfo: cannot runv(nim.exe --version), No such file or directory
checking for nim ... no
checkinfo: cannot runv(unzip.exe -v), No such file or directory
checking for unzip ... no
checking for 7z ... C:\Users\Administrator\xmake\winenv\bin\7z
checking for git ... ok
checkinfo: cannot runv(gzip.exe --version), No such file or directory
checking for gzip ... no
finding glad from xmake ..
checking for xmake::glad ... no
finding glad from vcpkg ..
finding glad from conan ..
finding glad from pkgconfig ..
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
finding glad from system ..
checking for cl.exe ... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\cl.exe
checking for the c compiler (cc) ... cl.exe

"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\cl.exe" -c -nologo -FoC:\Users\Administrator\AppData\Local\Temp.xmake\240720_76CD1C398931407088F7BE9756962C90.o C:\Users\Administrator\AppData\Local\Temp.xmake\240720_775FB00633BC4F66BF87D39CCDE5CF30.c
checking for cl.exe ... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\cl.exe
checking for the c++ compiler (cxx) ... cl.exe
checking for link.exe ... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\link.exe
checking for the linker (ld) ... link.exe
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\link.exe" -nologo -dynamicbase -nxcompat -machine:x64 glad.lib -out:C:\Users\Administrator\AppData\Local\Temp.xmake\240720_76CD1C398931407088F7BE9756962C90.b C:\Users\Administrator\AppData\Local\Temp.xmake\240720_76CD1C398931407088F7BE9756962C90.o
checking for c links(glad)
checking for c snippet(find_package/glad)
checkinfo: ...gramdir\core\sandbox\modules\import\core\tool\linker.lua:75: @programdir\modules\core\tools\link.lua:175: LINK : fatal error LNK1181: 无法打开输入文件“glad.lib”

stack traceback:
[C]: in function 'error'
[@programdir\core\base\os.lua:973]:
[@programdir\modules\core\tools\link.lua:175]: in function 'catch'
[@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
[@programdir\modules\core\tools\link.lua:150]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]:
[@programdir\core\tool\linker.lua:222]: in function 'link'
[...gramdir\core\sandbox\modules\import\core\tool\linker.lua:73]: in function 'link'
[@programdir\modules\lib\detect\check_cxsnippets.lua:249]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
[@programdir\modules\lib\detect\check_cxsnippets.lua:236]:
[@programdir\modules\package\manager\system\find_package.lua:103]:
[@programdir\modules\package\manager\find_package.lua:84]: in function '_find_package_with_builtin_rule'
[@programdir\modules\package\manager\find_package.lua:130]: in function '_find_package'
[@programdir\modules\package\manager\find_package.lua:194]:
[@programdir\modules\lib\detect\find_package.lua:109]:
[@programdir\core\package\package.lua:1844]: in function '_fetch_library'
[@programdir\core\package\package.lua:2011]: in function 'fetch'
[...modules\private\action\require\impl\install_packages.lua:335]: in function 'jobfunc'
[@programdir\modules\async\runjobs.lua:241]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
[@programdir\modules\async\runjobs.lua:223]: in function 'cotask'
[@programdir\core\base\scheduler.lua:406]:

checking for glad ... no
finding glfw from xmake ..
checking for xmake::glfw ... no
finding glfw from vcpkg ..
finding glfw from conan ..
finding glfw from pkgconfig ..
finding glfw from system ..

"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\cl.exe" -c -nologo -FoC:\Users\Administrator\AppData\Local\Temp.xmake\240720_F93DB572847C4B008066555824AE1840.o C:\Users\Administrator\AppData\Local\Temp.xmake\240720_775FB00633BC4F66BF87D39CCDE5CF30.c
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\link.exe" -nologo -dynamicbase -nxcompat -machine:x64 glfw.lib -out:C:\Users\Administrator\AppData\Local\Temp.xmake\240720_F93DB572847C4B008066555824AE1840.b C:\Users\Administrator\AppData\Local\Temp.xmake\240720_F93DB572847C4B008066555824AE1840.o
checking for c links(glfw)
checking for c snippet(find_package/glfw)
checkinfo: ...gramdir\core\sandbox\modules\import\core\tool\linker.lua:75: @programdir\modules\core\tools\link.lua:175: LINK : fatal error LNK1181: 无法打开输入文件“glfw.lib”

stack traceback:
[C]: in function 'error'
[@programdir\core\base\os.lua:973]:
[@programdir\modules\core\tools\link.lua:175]: in function 'catch'
[@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
[@programdir\modules\core\tools\link.lua:150]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]:
[@programdir\core\tool\linker.lua:222]: in function 'link'
[...gramdir\core\sandbox\modules\import\core\tool\linker.lua:73]: in function 'link'
[@programdir\modules\lib\detect\check_cxsnippets.lua:249]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
[@programdir\modules\lib\detect\check_cxsnippets.lua:236]:
[@programdir\modules\package\manager\system\find_package.lua:103]:
[@programdir\modules\package\manager\find_package.lua:84]: in function '_find_package_with_builtin_rule'
[@programdir\modules\package\manager\find_package.lua:130]: in function '_find_package'
[@programdir\modules\package\manager\find_package.lua:194]:
[@programdir\modules\lib\detect\find_package.lua:109]:
[@programdir\core\package\package.lua:1844]: in function '_fetch_library'
[@programdir\core\package\package.lua:2011]: in function 'fetch'
[...modules\private\action\require\impl\install_packages.lua:335]: in function 'jobfunc'
[@programdir\modules\async\runjobs.lua:241]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
[@programdir\modules\async\runjobs.lua:223]: in function 'cotask'
[@programdir\core\base\scheduler.lua:406]:

checking for glfw ... no
finding glm from xmake ..
checking for xmake::glm ... no
finding glm from vcpkg ..
finding glm from conan ..
finding glm from pkgconfig ..
finding glm from system ..

"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\cl.exe" -c -nologo -FoC:\Users\Administrator\AppData\Local\Temp.xmake\240720_B8F5D0F241E74B408B11C0141C85BD40.o C:\Users\Administrator\AppData\Local\Temp.xmake\240720_775FB00633BC4F66BF87D39CCDE5CF30.c
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\link.exe" -nologo -dynamicbase -nxcompat -machine:x64 glm.lib -out:C:\Users\Administrator\AppData\Local\Temp.xmake\240720_B8F5D0F241E74B408B11C0141C85BD40.b C:\Users\Administrator\AppData\Local\Temp.xmake\240720_B8F5D0F241E74B408B11C0141C85BD40.o
checking for c links(glm)
checking for c snippet(find_package/glm)
checkinfo: ...gramdir\core\sandbox\modules\import\core\tool\linker.lua:75: @programdir\modules\core\tools\link.lua:175: LINK : fatal error LNK1181: 无法打开输入文件“glm.lib”

stack traceback:
[C]: in function 'error'
[@programdir\core\base\os.lua:973]:
[@programdir\modules\core\tools\link.lua:175]: in function 'catch'
[@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
[@programdir\modules\core\tools\link.lua:150]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]:
[@programdir\core\tool\linker.lua:222]: in function 'link'
[...gramdir\core\sandbox\modules\import\core\tool\linker.lua:73]: in function 'link'
[@programdir\modules\lib\detect\check_cxsnippets.lua:249]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
[@programdir\modules\lib\detect\check_cxsnippets.lua:236]:
[@programdir\modules\package\manager\system\find_package.lua:103]:
[@programdir\modules\package\manager\find_package.lua:84]: in function '_find_package_with_builtin_rule'
[@programdir\modules\package\manager\find_package.lua:130]: in function '_find_package'
[@programdir\modules\package\manager\find_package.lua:194]:
[@programdir\modules\lib\detect\find_package.lua:109]:
[@programdir\core\package\package.lua:1844]: in function '_fetch_library'
[@programdir\core\package\package.lua:2011]: in function 'fetch'
[...modules\private\action\require\impl\install_packages.lua:335]: in function 'jobfunc'
[@programdir\modules\async\runjobs.lua:241]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
[@programdir\modules\async\runjobs.lua:223]: in function 'cotask'
[@programdir\core\base\scheduler.lua:406]:

checking for glm ... no
finding imgui from xmake ..
checking for xmake::imgui ... no
finding imgui from vcpkg ..
finding imgui from conan ..
finding imgui from pkgconfig ..
finding imgui from system ..

"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\cl.exe" -c -nologo -FoC:\Users\Administrator\AppData\Local\Temp.xmake\240720_1CAFDCFC672745008434DDC5DBF98D00.o C:\Users\Administrator\AppData\Local\Temp.xmake\240720_775FB00633BC4F66BF87D39CCDE5CF30.c
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\link.exe" -nologo -dynamicbase -nxcompat -machine:x64 imgui.lib -out:C:\Users\Administrator\AppData\Local\Temp.xmake\240720_1CAFDCFC672745008434DDC5DBF98D00.b C:\Users\Administrator\AppData\Local\Temp.xmake\240720_1CAFDCFC672745008434DDC5DBF98D00.o
checking for c links(imgui)
checking for c snippet(find_package/imgui)
checkinfo: ...gramdir\core\sandbox\modules\import\core\tool\linker.lua:75: @programdir\modules\core\tools\link.lua:175: LINK : fatal error LNK1181: 无法打开输入文件“imgui.lib”

stack traceback:
[C]: in function 'error'
[@programdir\core\base\os.lua:973]:
[@programdir\modules\core\tools\link.lua:175]: in function 'catch'
[@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
[@programdir\modules\core\tools\link.lua:150]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]:
[@programdir\core\tool\linker.lua:222]: in function 'link'
[...gramdir\core\sandbox\modules\import\core\tool\linker.lua:73]: in function 'link'
[@programdir\modules\lib\detect\check_cxsnippets.lua:249]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
[@programdir\modules\lib\detect\check_cxsnippets.lua:236]:
[@programdir\modules\package\manager\system\find_package.lua:103]:
[@programdir\modules\package\manager\find_package.lua:84]: in function '_find_package_with_builtin_rule'
[@programdir\modules\package\manager\find_package.lua:130]: in function '_find_package'
[@programdir\modules\package\manager\find_package.lua:194]:
[@programdir\modules\lib\detect\find_package.lua:109]:
[@programdir\core\package\package.lua:1844]: in function '_fetch_library'
[@programdir\core\package\package.lua:2011]: in function 'fetch'
[...modules\private\action\require\impl\install_packages.lua:335]: in function 'jobfunc'
[@programdir\modules\async\runjobs.lua:241]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
[@programdir\modules\async\runjobs.lua:223]: in function 'cotask'
[@programdir\core\base\scheduler.lua:406]:

checking for imgui ... no
finding spdlog from xmake ..
checking for xmake::spdlog ... no
finding spdlog from vcpkg ..
finding spdlog from conan ..
finding spdlog from pkgconfig ..
finding spdlog from system ..

"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\cl.exe" -c -nologo -FoC:\Users\Administrator\AppData\Local\Temp.xmake\240720_3D6D181229E94E5087979322B1CAD870.o C:\Users\Administrator\AppData\Local\Temp.xmake\240720_775FB00633BC4F66BF87D39CCDE5CF30.c
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\link.exe" -nologo -dynamicbase -nxcompat -machine:x64 spdlog.lib -out:C:\Users\Administrator\AppData\Local\Temp.xmake\240720_3D6D181229E94E5087979322B1CAD870.b C:\Users\Administrator\AppData\Local\Temp.xmake\240720_3D6D181229E94E5087979322B1CAD870.o
checking for c links(spdlog)
checking for c snippet(find_package/spdlog)
checkinfo: ...gramdir\core\sandbox\modules\import\core\tool\linker.lua:75: @programdir\modules\core\tools\link.lua:175: LINK : fatal error LNK1181: 无法打开输入文件“spdlog.lib”

stack traceback:
[C]: in function 'error'
[@programdir\core\base\os.lua:973]:
[@programdir\modules\core\tools\link.lua:175]: in function 'catch'
[@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
[@programdir\modules\core\tools\link.lua:150]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]:
[@programdir\core\tool\linker.lua:222]: in function 'link'
[...gramdir\core\sandbox\modules\import\core\tool\linker.lua:73]: in function 'link'
[@programdir\modules\lib\detect\check_cxsnippets.lua:249]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
[@programdir\modules\lib\detect\check_cxsnippets.lua:236]:
[@programdir\modules\package\manager\system\find_package.lua:103]:
[@programdir\modules\package\manager\find_package.lua:84]: in function '_find_package_with_builtin_rule'
[@programdir\modules\package\manager\find_package.lua:130]: in function '_find_package'
[@programdir\modules\package\manager\find_package.lua:194]:
[@programdir\modules\lib\detect\find_package.lua:109]:
[@programdir\core\package\package.lua:1844]: in function '_fetch_library'
[@programdir\core\package\package.lua:2011]: in function 'fetch'
[...modules\private\action\require\impl\install_packages.lua:335]: in function 'jobfunc'
[@programdir\modules\async\runjobs.lua:241]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
[@programdir\modules\async\runjobs.lua:223]: in function 'cotask'
[@programdir\core\base\scheduler.lua:406]:

checking for spdlog ... no
finding stb from xmake ..
checking for xmake::stb ... no
finding stb from vcpkg ..
finding stb from conan ..
finding stb from pkgconfig ..
finding stb from system ..

"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\cl.exe" -c -nologo -FoC:\Users\Administrator\AppData\Local\Temp.xmake\240720_7149A21F6E2E450080442E6FBB5D2970.o C:\Users\Administrator\AppData\Local\Temp.xmake\240720_775FB00633BC4F66BF87D39CCDE5CF30.c
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\link.exe" -nologo -dynamicbase -nxcompat -machine:x64 stb.lib -out:C:\Users\Administrator\AppData\Local\Temp.xmake\240720_7149A21F6E2E450080442E6FBB5D2970.b C:\Users\Administrator\AppData\Local\Temp.xmake\240720_7149A21F6E2E450080442E6FBB5D2970.o
checking for c links(stb)
checking for c snippet(find_package/stb)
checkinfo: ...gramdir\core\sandbox\modules\import\core\tool\linker.lua:75: @programdir\modules\core\tools\link.lua:175: LINK : fatal error LNK1181: 无法打开输入文件“stb.lib”

stack traceback:
[C]: in function 'error'
[@programdir\core\base\os.lua:973]:
[@programdir\modules\core\tools\link.lua:175]: in function 'catch'
[@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
[@programdir\modules\core\tools\link.lua:150]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]:
[@programdir\core\tool\linker.lua:222]: in function 'link'
[...gramdir\core\sandbox\modules\import\core\tool\linker.lua:73]: in function 'link'
[@programdir\modules\lib\detect\check_cxsnippets.lua:249]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
[@programdir\modules\lib\detect\check_cxsnippets.lua:236]:
[@programdir\modules\package\manager\system\find_package.lua:103]:
[@programdir\modules\package\manager\find_package.lua:84]: in function '_find_package_with_builtin_rule'
[@programdir\modules\package\manager\find_package.lua:130]: in function '_find_package'
[@programdir\modules\package\manager\find_package.lua:194]:
[@programdir\modules\lib\detect\find_package.lua:109]:
[@programdir\core\package\package.lua:1844]: in function '_fetch_library'
[@programdir\core\package\package.lua:2011]: in function 'fetch'
[...modules\private\action\require\impl\install_packages.lua:335]: in function 'jobfunc'
[@programdir\modules\async\runjobs.lua:241]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
[@programdir\modules\async\runjobs.lua:223]: in function 'cotask'
[@programdir\core\base\scheduler.lua:406]:

checking for stb ... no
finding fmt from xmake ..
checking for xmake::fmt ... no
finding fmt from vcpkg ..
finding fmt from conan ..
finding fmt from pkgconfig ..
finding fmt from system ..

"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\cl.exe" -c -nologo -FoC:\Users\Administrator\AppData\Local\Temp.xmake\240720_3721AF2B5CA948108AFE370085ABA460.o C:\Users\Administrator\AppData\Local\Temp.xmake\240720_775FB00633BC4F66BF87D39CCDE5CF30.c
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\link.exe" -nologo -dynamicbase -nxcompat -machine:x64 fmt.lib -out:C:\Users\Administrator\AppData\Local\Temp.xmake\240720_3721AF2B5CA948108AFE370085ABA460.b C:\Users\Administrator\AppData\Local\Temp.xmake\240720_3721AF2B5CA948108AFE370085ABA460.o
checking for c links(fmt)
checking for c snippet(find_package/fmt)
checkinfo: ...gramdir\core\sandbox\modules\import\core\tool\linker.lua:75: @programdir\modules\core\tools\link.lua:175: LINK : fatal error LNK1181: 无法打开输入文件“fmt.lib”

stack traceback:
[C]: in function 'error'
[@programdir\core\base\os.lua:973]:
[@programdir\modules\core\tools\link.lua:175]: in function 'catch'
[@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
[@programdir\modules\core\tools\link.lua:150]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]:
[@programdir\core\tool\linker.lua:222]: in function 'link'
[...gramdir\core\sandbox\modules\import\core\tool\linker.lua:73]: in function 'link'
[@programdir\modules\lib\detect\check_cxsnippets.lua:249]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
[@programdir\modules\lib\detect\check_cxsnippets.lua:236]:
[@programdir\modules\package\manager\system\find_package.lua:103]:
[@programdir\modules\package\manager\find_package.lua:84]: in function '_find_package_with_builtin_rule'
[@programdir\modules\package\manager\find_package.lua:130]: in function '_find_package'
[@programdir\modules\package\manager\find_package.lua:194]:
[@programdir\modules\lib\detect\find_package.lua:109]:
[@programdir\core\package\package.lua:1844]: in function '_fetch_library'
[@programdir\core\package\package.lua:2011]: in function 'fetch'
[...modules\private\action\require\impl\install_packages.lua:335]: in function 'jobfunc'
[@programdir\modules\async\runjobs.lua:241]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
[@programdir\modules\async\runjobs.lua:223]: in function 'cotask'
[@programdir\core\base\scheduler.lua:406]:

checking for fmt ... no
finding tinyobjloader from xmake ..
checking for xmake::tinyobjloader ... no
finding tinyobjloader from vcpkg ..
finding tinyobjloader from conan ..
finding tinyobjloader from pkgconfig ..
finding tinyobjloader from system ..

"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\cl.exe" -c -nologo -FoC:\Users\Administrator\AppData\Local\Temp.xmake\240720_30360566E6AE4C508D8AA6DCE3E44F60.o C:\Users\Administrator\AppData\Local\Temp.xmake\240720_775FB00633BC4F66BF87D39CCDE5CF30.c
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\link.exe" -nologo -dynamicbase -nxcompat -machine:x64 tinyobjloader.lib -out:C:\Users\Administrator\AppData\Local\Temp.xmake\240720_30360566E6AE4C508D8AA6DCE3E44F60.b C:\Users\Administrator\AppData\Local\Temp.xmake\240720_30360566E6AE4C508D8AA6DCE3E44F60.o
checking for c links(tinyobjloader)
checking for c snippet(find_package/tinyobjloader)
checkinfo: ...gramdir\core\sandbox\modules\import\core\tool\linker.lua:75: @programdir\modules\core\tools\link.lua:175: LINK : fatal error LNK1181: 无法打开输入文件“tinyobjloader.lib”

stack traceback:
[C]: in function 'error'
[@programdir\core\base\os.lua:973]:
[@programdir\modules\core\tools\link.lua:175]: in function 'catch'
[@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
[@programdir\modules\core\tools\link.lua:150]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]:
[@programdir\core\tool\linker.lua:222]: in function 'link'
[...gramdir\core\sandbox\modules\import\core\tool\linker.lua:73]: in function 'link'
[@programdir\modules\lib\detect\check_cxsnippets.lua:249]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
[@programdir\modules\lib\detect\check_cxsnippets.lua:236]:
[@programdir\modules\package\manager\system\find_package.lua:103]:
[@programdir\modules\package\manager\find_package.lua:84]: in function '_find_package_with_builtin_rule'
[@programdir\modules\package\manager\find_package.lua:130]: in function '_find_package'
[@programdir\modules\package\manager\find_package.lua:194]:
[@programdir\modules\lib\detect\find_package.lua:109]:
[@programdir\core\package\package.lua:1844]: in function '_fetch_library'
[@programdir\core\package\package.lua:2011]: in function 'fetch'
[...modules\private\action\require\impl\install_packages.lua:335]: in function 'jobfunc'
[@programdir\modules\async\runjobs.lua:241]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
[@programdir\modules\async\runjobs.lua:223]: in function 'cotask'
[@programdir\core\base\scheduler.lua:406]:

checking for tinyobjloader ... no
finding yaml-cpp from xmake ..
checking for xmake::yaml-cpp ... no
finding yaml-cpp from vcpkg ..
finding yaml-cpp from conan ..
finding yaml-cpp from pkgconfig ..
finding yaml-cpp from system ..

"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\cl.exe" -c -nologo -FoC:\Users\Administrator\AppData\Local\Temp.xmake\240720_927145EEBC8C487086E24C288826C2C0.o C:\Users\Administrator\AppData\Local\Temp.xmake\240720_775FB00633BC4F66BF87D39CCDE5CF30.c
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\link.exe" -nologo -dynamicbase -nxcompat -machine:x64 yaml-cpp.lib -out:C:\Users\Administrator\AppData\Local\Temp.xmake\240720_927145EEBC8C487086E24C288826C2C0.b C:\Users\Administrator\AppData\Local\Temp.xmake\240720_927145EEBC8C487086E24C288826C2C0.o
checking for c links(yaml-cpp)
checking for c snippet(find_package/yaml-cpp)
checkinfo: ...gramdir\core\sandbox\modules\import\core\tool\linker.lua:75: @programdir\modules\core\tools\link.lua:175: LINK : fatal error LNK1181: 无法打开输入文件“yaml-cpp.lib”

stack traceback:
[C]: in function 'error'
[@programdir\core\base\os.lua:973]:
[@programdir\modules\core\tools\link.lua:175]: in function 'catch'
[@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
[@programdir\modules\core\tools\link.lua:150]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]:
[@programdir\core\tool\linker.lua:222]: in function 'link'
[...gramdir\core\sandbox\modules\import\core\tool\linker.lua:73]: in function 'link'
[@programdir\modules\lib\detect\check_cxsnippets.lua:249]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
[@programdir\modules\lib\detect\check_cxsnippets.lua:236]:
[@programdir\modules\package\manager\system\find_package.lua:103]:
[@programdir\modules\package\manager\find_package.lua:84]: in function '_find_package_with_builtin_rule'
[@programdir\modules\package\manager\find_package.lua:130]: in function '_find_package'
[@programdir\modules\package\manager\find_package.lua:194]:
[@programdir\modules\lib\detect\find_package.lua:109]:
[@programdir\core\package\package.lua:1844]: in function '_fetch_library'
[@programdir\core\package\package.lua:2011]: in function 'fetch'
[...modules\private\action\require\impl\install_packages.lua:335]: in function 'jobfunc'
[@programdir\modules\async\runjobs.lua:241]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
[@programdir\modules\async\runjobs.lua:223]: in function 'cotask'
[@programdir\core\base\scheduler.lua:406]:

checking for yaml-cpp ... no
note: the following packages were not found in any repository (check if they are spelled correctly):
-> glad
-> glfw
-> glm
-> imgui
-> spdlog
-> stb
-> fmt
-> tinyobjloader
-> yaml-cpp
error: @programdir\core\main.lua:329: @programdir\core\sandbox\modules\import\core\base\task.lua:65: stack traceback:
[C]: in function 'error'
[@programdir\core\base\os.lua:984]:
[...modules\private\action\require\impl\install_packages.lua:759]:
[@programdir\modules\private\action\require\install.lua:85]:
[@programdir\actions\config\main.lua:391]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]:
[@programdir\core\base\task.lua:491]: in function 'run'
[@programdir\core\sandbox\modules\import\core\base\task.lua:63]: in function 'run'
[@programdir\actions\build\main.lua:191]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]:
[@programdir\core\base\task.lua:491]: in function 'run'
[@programdir\core\main.lua:327]: in function 'cotask'
[@programdir\core\base\scheduler.lua:406]:

stack traceback:
[C]: in function 'error'
@programdir\core\base\os.lua:973: in function 'base/os.raiselevel'
(...tail calls...)
@programdir\core\main.lua:329: in upvalue 'cotask'
@programdir\core\base\scheduler.lua:406: in function <@programdir\core\base\scheduler.lua:399>
Issues-translate-bot commented 3 months ago

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


Title: Unable to install dependencies

star-hengxing commented 3 months ago

看起来官方包仓库都没拉下来,试试 xmake repo -u

Issues-translate-bot commented 3 months ago

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


It seems that the official package repository has not been downloaded. Try xmake repo -u

stoodger commented 3 months ago

看起来官方包仓库都没拉下来,试试 xmake repo -u

update也没用,里面只有几个文件夹,不知道为什么,手动下载复制之后好了。

Issues-translate-bot commented 3 months ago

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


It seems that the official package repository has not been downloaded. Try xmake repo -u

Update is useless. There are only a few folders in it. I don’t know why. After manually downloading and copying, it is fine.

waruqi commented 3 months ago

rm -rf ~/.xmake/repositories 删了再试试

Issues-translate-bot commented 3 months ago

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


rm -rf ~/.xmake/repositories Delete it and try again