xmake-io / xmake-repo

📦 An official xmake package repository
https://xrepo.xmake.io
Apache License 2.0
684 stars 398 forks source link

Windows下xmake下载mosquitto库编译出错 #5549

Open xufuhong2010 opened 1 week ago

xufuhong2010 commented 1 week ago

Xmake 版本

2.9.5

操作系统版本和架构

windows10

描述问题

安装mosquitto库出错,采用visual studio 2022编译器(安装在d盘,非c盘)

期待的结果

正常安装mosquitto依赖库

工程配置

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

add_requires("boost", "mosquitto", "cppzmq")

target("sim_gsmr_server")
    set_kind("binary")
    add_files("src/*.cpp")
    add_packages("boost", "mosquitto", "cppzmq")

附加信息和错误日志

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.41.34123
note: install or modify (m) these packages (pass -y to skip confirm)?
in xmake-repo:
  -> mosquitto v2.0.18 [runtimes:"MT"]
  -> zeromq 4.3.5 [runtimes:"MT", from:cppzmq]
  -> cppzmq v4.10.0
please input: y (y/n/m)
y
  => install mosquitto v2.0.18 .. failed

-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19044.
-- The C compiler identification is MSVC 19.41.34123.0
-- The CXX compiler identification is MSVC 19.41.34123.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: E:/program/vs2022/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: E:/program/vs2022/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe - broken
-- Configuring incomplete, errors occurred!
ject developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at CMakeLists.txt:3:
  Syntax Warning in cmake code at column 148
  Argument not separated from preceding token by whitespace.
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at CMakeLists.txt:4:
  Syntax Warning in cmake code at column 145
  Argument not separated from preceding token by whitespace.
This warning is for project developers.  Use -Wno-dev to suppress it.
if you want to get more verbose errors, please see:
  -> C:\Users\wuxian\AppData\Local\.xmake\cache\packages\2410\m\mosquitto\v2.0.18\installdir.failed\logs\install.txt
  => install zeromq 4.3.5 .. failed

-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19044.
-- The C compiler identification is MSVC 19.41.34123.0
-- The CXX compiler identification is MSVC 19.41.34123.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: E:/program/vs2022/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
if you want to get more verbose errors, please see:
  -> C:\Users\wuxian\AppData\Local\.xmake\cache\packages\2410\z\zeromq\4.3.5\installdir.failed\logs\install.txt
PS D:\app\xmakeapp\sim_gsmr_server> xmake -vD
checking for platform ... windows
checking for architecture ... x64
checking for cl.exe ... E:\program\vs2022\VC\Tools\MSVC\14.41.34120\bin\HostX64\x64\cl.exe
checking for Microsoft Visual Studio (x64) version ... 2022
checking for Microsoft C/C++ Compiler (x64) version ... 19.41.34123
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
checking for git ... ok
checkinfo: cannot runv(gzip.exe --version), No such file or directory
checking for gzip ... no
checking for 7z ... C:\Users\wuxian\xmake\winenv\bin\7z
git rev-parse HEAD
finding boost from xmake ..
checking for xmake::boost ... boost 1.86.0
checking for cmake ... no
checking for cmake ... no
checking for cmake ... no
checking for cmake ... C:\Program Files\CMake\bin\cmake
finding uthash from xmake ..
checking for xmake::uthash ... uthash 2023.7.11
finding openssl from xmake ..
checking for xmake::openssl ... no
checking for xmake-repo::openssl ... openssl
finding pthreads4w from xmake ..
checking for xmake::pthreads4w ... pthreads4w 3.0.0
finding cjson from xmake ..
checking for xmake::cjson ... cjson 1.7.15
finding mosquitto from xmake ..
checking for xmake::mosquitto ... no
finding mosquitto from vcpkg ..
finding mosquitto from conan ..
finding mosquitto from system ..
checking for cl.exe ... E:\program\vs2022\VC\Tools\MSVC\14.41.34120\bin\HostX64\x64\cl.exe
checking for the c compiler (cc) ... cl.exe
> E:\program\vs2022\VC\Tools\MSVC\14.41.34120\bin\HostX64\x64\cl.exe -c -nologo -FoC:\Users\Public\Documents\iSkysoft\CreatorTemp\.xmake\241020\_CC559152CF7A452083EAFF2429068970.o C:\Users\Public\Documents\iSkysoft\CreatorTemp\.xmake\241020\_775FB00633BC4F66BF87D39CCDE5CF30.c
checking for cl.exe ... E:\program\vs2022\VC\Tools\MSVC\14.41.34120\bin\HostX64\x64\cl.exe
checking for the c++ compiler (cxx) ... cl.exe
checking for link.exe ... E:\program\vs2022\VC\Tools\MSVC\14.41.34120\bin\HostX64\x64\link.exe
checking for the linker (ld) ... link.exe
> E:\program\vs2022\VC\Tools\MSVC\14.41.34120\bin\HostX64\x64\link.exe -nologo -dynamicbase -nxcompat -machine:x64 mosquitto.lib -out:C:\Users\Public\Documents\iSkysoft\CreatorTemp\.xmake\241020\_CC559152CF7A452083EAFF2429068970.b C:\Users\Public\Documents\iSkysoft\CreatorTemp\.xmake\241020\_CC559152CF7A452083EAFF2429068970.o
> checking for c links(mosquitto)
> checking for c snippet(find_package/mosquitto)
checkinfo: ...gramdir\core\sandbox\modules\import\core\tool\linker.lua:75: @programdir\modules\core\tools\link.lua:175: LINK : fatal error LNK1181: 无法打开输入文件“mosquitto.lib”

stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:1004]:
    [@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:241]:
    [@programdir\core\tool\linker.lua:232]: 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:241]: 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:73]:
    [@programdir\modules\package\manager\find_package.lua:86]: in function '_find_package_with_builtin_rule'
    [@programdir\modules\package\manager\find_package.lua:132]: in function '_find_package'
    [@programdir\modules\package\manager\find_package.lua:196]:
    [@programdir\modules\lib\detect\find_package.lua:86]:
    [@programdir\core\package\package.lua:1902]: in function '_fetch_library'
    [@programdir\core\package\package.lua:2072]: in function 'fetch'
    [...modules\private\action\require\impl\install_packages.lua:340]: in function 'jobfunc'
    [@programdir\modules\async\runjobs.lua:241]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:241]: 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 mosquitto ... no
finding zeromq from xmake ..
checking for xmake::zeromq ... no
finding zeromq from vcpkg ..
finding zeromq from conan ..
finding zeromq from system ..
> E:\program\vs2022\VC\Tools\MSVC\14.41.34120\bin\HostX64\x64\cl.exe -c -nologo -FoC:\Users\Public\Documents\iSkysoft\CreatorTemp\.xmake\241020\_492C8ADA354B40508AAF85ACC213A1B0.o C:\Users\Public\Documents\iSkysoft\CreatorTemp\.xmake\241020\_775FB00633BC4F66BF87D39CCDE5CF30.c
> E:\program\vs2022\VC\Tools\MSVC\14.41.34120\bin\HostX64\x64\link.exe -nologo -dynamicbase -nxcompat -machine:x64 zeromq.lib -out:C:\Users\Public\Documents\iSkysoft\CreatorTemp\.xmake\241020\_492C8ADA354B40508AAF85ACC213A1B0.b C:\Users\Public\Documents\iSkysoft\CreatorTemp\.xmake\241020\_492C8ADA354B40508AAF85ACC213A1B0.o
> checking for c links(zeromq)
> checking for c snippet(find_package/zeromq)
checkinfo: ...gramdir\core\sandbox\modules\import\core\tool\linker.lua:75: @programdir\modules\core\tools\link.lua:175: LINK : fatal error LNK1181: 无法打开输入文件“zeromq.lib”

stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:1004]:
    [@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:241]:
    [@programdir\core\tool\linker.lua:232]: 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:241]: 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:73]:
    [@programdir\modules\package\manager\find_package.lua:86]: in function '_find_package_with_builtin_rule'
    [@programdir\modules\package\manager\find_package.lua:132]: in function '_find_package'
    [@programdir\modules\package\manager\find_package.lua:196]:
    [@programdir\modules\lib\detect\find_package.lua:86]:
    [@programdir\core\package\package.lua:1902]: in function '_fetch_library'
    [@programdir\core\package\package.lua:2072]: in function 'fetch'
    [...modules\private\action\require\impl\install_packages.lua:340]: in function 'jobfunc'
    [@programdir\modules\async\runjobs.lua:241]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:241]: 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 zeromq ... no
finding cppzmq from xmake ..
checking for xmake::cppzmq ... no
finding cppzmq from vcpkg ..
finding cppzmq from conan ..
finding cppzmq from system ..
> E:\program\vs2022\VC\Tools\MSVC\14.41.34120\bin\HostX64\x64\cl.exe -c -nologo -FoC:\Users\Public\Documents\iSkysoft\CreatorTemp\.xmake\241020\_3823C22FAA2F4520891BB556BE3FA070.o C:\Users\Public\Documents\iSkysoft\CreatorTemp\.xmake\241020\_775FB00633BC4F66BF87D39CCDE5CF30.c
> E:\program\vs2022\VC\Tools\MSVC\14.41.34120\bin\HostX64\x64\link.exe -nologo -dynamicbase -nxcompat -machine:x64 cppzmq.lib -out:C:\Users\Public\Documents\iSkysoft\CreatorTemp\.xmake\241020\_3823C22FAA2F4520891BB556BE3FA070.b C:\Users\Public\Documents\iSkysoft\CreatorTemp\.xmake\241020\_3823C22FAA2F4520891BB556BE3FA070.o
> checking for c links(cppzmq)
> checking for c snippet(find_package/cppzmq)
checkinfo: ...gramdir\core\sandbox\modules\import\core\tool\linker.lua:75: @programdir\modules\core\tools\link.lua:175: LINK : fatal error LNK1181: 无法打开输入文件“cppzmq.lib”

stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:1004]:
    [@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:241]:
    [@programdir\core\tool\linker.lua:232]: 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:241]: 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:73]:
    [@programdir\modules\package\manager\find_package.lua:86]: in function '_find_package_with_builtin_rule'
    [@programdir\modules\package\manager\find_package.lua:132]: in function '_find_package'
    [@programdir\modules\package\manager\find_package.lua:196]:
    [@programdir\modules\lib\detect\find_package.lua:86]:
    [@programdir\core\package\package.lua:1902]: in function '_fetch_library'
    [@programdir\core\package\package.lua:2072]: in function 'fetch'
    [...modules\private\action\require\impl\install_packages.lua:340]: in function 'jobfunc'
    [@programdir\modules\async\runjobs.lua:241]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:241]: 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 cppzmq ... no
note: install or modify (m) these packages (pass -y to skip confirm)?
in xmake-repo:
  -> mosquitto v2.0.18 [runtimes:"MT"]
  -> zeromq 4.3.5 [runtimes:"MT", from:cppzmq]
  -> cppzmq v4.10.0
please input: y (y/n/m)
y
checking for ping ... ok
pinging the host(github.com) ... 65 ms
checking for tar ... ok
tar -xf C:\Users\wuxian\AppData\Local\.xmake\cache\packages\2410\m\mosquitto\v2.0.18\v2.0.18.tar.gz
mosquitto-2.0.18/www/man: Can't create '\\\\?\\C:\\Users\\wuxian\\AppData\\Local\\.xmake\\cache\\packages\\2410\\m\\mosquitto\\v2.0.18\\source.tmp\\mosquitto-2.0.18\\www\\man'
tar: Error exit delayed from previous errors.
C:\Users\wuxian\xmake\winenv\bin\7z x -y v2.0.18.tar.gz -snl- -oC:\Users\Public\Documents\iSkysoft\CreatorTemp\.xmake\241020\_7341ED3560D041608BB557522B7FC4A0.tar

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

Scanning the drive for archives:
1 file, 2237611 bytes (2186 KiB)

Extracting archive: v2.0.18.tar.gz
--
Path = v2.0.18.tar.gz
Type = gzip
Headers Size = 10

Everything is Ok

Size:       7475200
Compressed: 2237611
C:\Users\wuxian\xmake\winenv\bin\7z x -y C:\Users\Public\Documents\iSkysoft\CreatorTemp\.xmake\241020\_7341ED3560D041608BB557522B7FC4A0.tar\v2.0.18.tar -snl- -osource.tmp

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

Scanning the drive for archives:
1 file, 7475200 bytes (7300 KiB)

Extracting archive: C:\Users\Public\Documents\iSkysoft\CreatorTemp\.xmake\241020\_7341ED3560D041608BB557522B7FC4A0.tar\v2.0.18.tar
--
Path = C:\Users\Public\Documents\iSkysoft\CreatorTemp\.xmake\241020\_7341ED3560D041608BB557522B7FC4A0.tar\v2.0.18.tar
Type = tar
Physical Size = 7475200
Headers Size = 686592
Code Page = UTF-8

Everything is Ok

Folders: 214
Files: 1106
Size:       6492552
Compressed: 7475200
checking for E:\program\vs2022\VC\Tools\MSVC\14.41.34120\bin\HostX64\x64\cl.exe ... ok
checking for flags (cl_external_includedir) ... ok
> cl.exe "-external:W0" "-external:IC:\Users\wuxian\AppData\Local\.xmake\packages\u\uthash\2023.7.11\9b8409ecaedc434ebc39e0faf314f594\include" "-nologo"
checkinfo: cannot runv(pkgconf.exe --version), No such file or directory
checking for pkgconf ... no
checkinfo: cannot runv(pkgconf.exe --version), No such file or directory
checking for pkgconf ... no
checking for pkg-config ... ok
checking for cmake ... C:\Program Files\CMake\bin\cmake
checking for link.exe ... E:\program\vs2022\VC\Tools\MSVC\14.41.34120\bin\HostX64\x64\link.exe
checking for the static library archiver (ar) ... link.exe
checking for link.exe ... E:\program\vs2022\VC\Tools\MSVC\14.41.34120\bin\HostX64\x64\link.exe
checking for the shared library linker (sh) ... link.exe
checkinfo: cannot runv(pkgconf.exe --version), No such file or directory
checking for pkgconf ... no
checkinfo: cannot runv(pkgconf.exe --version), No such file or directory
checking for pkgconf ... no
checking for pkg-config ... ok
C:\Program Files\CMake\bin\cmake -DDOCUMENTATION=OFF -DWITH_CLIENTS=OFF -DWITH_APPS=OFF -DWITH_PLUGINS=OFF -DCMAKE_BUILD_TYPE=Release -DWITH_STATIC_LIBRARIES=ON -DWITH_TLS=ON -DWITH_CJSON=ON -DWITH_BROKER=OFF -DWITH_LIB_CPP=ON -DWITH_TLS_PSK=ON -DWITH_BUNDLED_DEPS=ON -DWITH_DLT=OFF -DWITH_EC=ON -DWITH_WEBSOCKETS=OFF -DWITH_THREADING=ON -DWITH_UNIX_SOCKETS=ON -DWITH_SOCKS=ON -DCMAKE_INSTALL_PREFIX=C:\Users\wuxian\AppData\Local\.xmake\packages\m\mosquitto\v2.0.18\5a0ebdd4dda342d9b78d663437ab2f52 -DCMAKE_INSTALL_LIBDIR:PATH=lib -G "Visual Studio 17 2022" -A x64 -DCMAKE_GENERATOR_TOOLSET=v143 -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY=pdb -DCMAKE_POSITION_INDEPENDENT_CODE=ON "-DCMAKE_STATIC_LINKER_FLAGS_RELEASE=/machine:x64  -nodefaultlib:msvcrt.lib" C:\Users\wuxian\AppData\Local\.xmake\cache\packages\2410\m\mosquitto\v2.0.18\source
CMake Warning (dev) at CMakeLists.txt:1:
  Syntax Warning in cmake code at column 174

  Argument not separated from preceding token by whitespace.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:2:
  Syntax Warning in cmake code at column 38

  Argument not separated from preceding token by whitespace.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:3:
  Syntax Warning in cmake code at column 41

  Argument not separated from preceding token by whitespace.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:4:
  Syntax Warning in cmake code at column 172

  Argument not separated from preceding token by whitespace.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:5:
  Syntax Warning in cmake code at column 33

  Argument not separated from preceding token by whitespace.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:6:
  Syntax Warning in cmake code at column 30

  Argument not separated from preceding token by whitespace.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:7:
  Syntax Warning in cmake code at column 166

  Argument not separated from preceding token by whitespace.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:8:
  Syntax Warning in cmake code at column 164

  Argument not separated from preceding token by whitespace.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19044.
-- The C compiler identification is MSVC 19.41.34123.0
-- The CXX compiler identification is MSVC 19.41.34123.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: E:/program/vs2022/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: E:/program/vs2022/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

    "E:/program/vs2022/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: C:/Users/wuxian/AppData/Local/.xmake/cache/packages/2410/m/mosquitto/v2.0.18/source/build_5a0ebdd4/CMakeFiles/CMakeScratch/TryCompile-01tih8

    Run Build Command(s):E:/program/vs2022/MSBuild/Current/Bin/amd64/MSBuild.exe cmTC_0e6d1.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:n && 适用于 .NET Framework MSBuild 版本 17.11.9+a69bbaaf5
    生成启动时间为 2024/10/20 21:58:09。

    节点 1 上的项目“C:\Users\wuxian\AppData\Local\.xmake\cache\packages\2410\m\mosquitto\v2.0.18\source\build_5a0ebdd4\CMakeFiles\CMakeScratch\TryCompile-01tih8\cmTC_0e6d1.vcxproj”(默认目标)。
    PrepareForBuild:
      正在创建目录“cmTC_0e6d1.dir\Debug\”。
      已启用结构化输出。编译器诊断的格式设置将反映错误层次结构。有关详细信息,请参阅 https://aka.ms/cpp/structured-output。
      正在创建目录“C:\Users\wuxian\AppData\Local\.xmake\cache\packages\2410\m\mosquitto\v2.0.18\source\build_5a0ebdd4\CMakeFiles\CMakeScratch\TryCompile-01tih8\Debug\”。
      正在创建目录“cmTC_0e6d1.dir\Debug\cmTC_0e6d1.tlog\”。
    InitializeBuildStatus:
      正在创建“cmTC_0e6d1.dir\Debug\cmTC_0e6d1.tlog\unsuccessfulbuild”,因为已指定“AlwaysCreate”。
      正在对“cmTC_0e6d1.dir\Debug\cmTC_0e6d1.tlog\unsuccessfulbuild”执行 Touch 任务。
    VcpkgTripletSelection:
      Using triplet "x64-windows" from "D:\usrlibapp\vcpkg\installed\x64-windows\"
      Using normalized configuration "Release"
    ClCompile:
      E:\program\vs2022\VC\Tools\MSVC\14.41.34120\bin\HostX64\x64\CL.exe /c /I"D:\usrlibapp\vcpkg\installed\x64-windows\include" /Zi /W1 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_0e6d1.dir\Debug\\" /Fd"cmTC_0e6d1.dir\Debug\vc143.pdb" /external:W0 /Gd /TC /errorReport:queue  -external:IC:/Users/wuxian/AppData/Local/.xmake/packages/u/uthash/2023.7.11/9b8409ecaedc434ebc39e0faf314f594/include "";"-external:IC:/Program";"Files/OpenSSL/include -external:W0 -external:IC:/Users/wuxian/AppData/Local/.xmake/packages/p/pthreads4w/3.0.0/c27339ca84fb4bd5949fa6f269cae859/include/pthread -external:W0 -external:IC:/Users/wuxian/AppData/Local/.xmake/packages/c/cjson/1.7.15/5d29b7ead93148bbac47aa2d02ef454d/include" "C:\Users\wuxian\AppData\Local\.xmake\cache\packages\2410\m\mosquitto\v2.0.18\source\build_5a0ebdd4\CMakeFiles\CMakeScratch\TryCompile-01tih8\testCCompiler.c"
      用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.41.34123 版
      版权所有(C) Microsoft Corporation。保留所有权利。
      cl /c /I"D:\usrlibapp\vcpkg\installed\x64-windows\include" /Zi /W1 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_0e6d1.dir\Debug\\" /Fd"cmTC_0e6d1.dir\Debug\vc143.pdb" /external:W0 /Gd /TC /errorReport:queue  -external:IC:/Users/wuxian/AppData/Local/.xmake/packages/u/uthash/2023.7.11/9b8409ecaedc434ebc39e0faf314f594/include "";"-external:IC:/Program";"Files/OpenSSL/include -external:W0 -external:IC:/Users/wuxian/AppData/Local/.xmake/packages/p/pthreads4w/3.0.0/c27339ca84fb4bd5949fa6f269cae859/include/pthread -external:W0 -external:IC:/Users/wuxian/AppData/Local/.xmake/packages/c/cjson/1.7.15/5d29b7ead93148bbac47aa2d02ef454d/include" "C:\Users\wuxian\AppData\Local\.xmake\cache\packages\2410\m\mosquitto\v2.0.18\source\build_5a0ebdd4\CMakeFiles\CMakeScratch\TryCompile-01tih8\testCCompiler.c"
      include
      testCCompiler.c
      正在生成代码...
    /;-external:IC:/Program;Files/OpenSSL/include -external:W0 -external:IC:/Users/wuxian/AppData/Local/.xmake/packages/p/pthreads4w/3.0.0/c27339ca84fb4bd5949fa6f269cae859/include/pthread -external:W0 -external:IC:/Users/wuxian/AppData/Local/.xmake/packages/c/cjson/1.7.15/5d29b7ead93148bbac47aa2d02ef454d/include(1,1): error C1083: 无法打开源文件: “;-external:IC:/Program;Files/OpenSSL/include -external:W0 -external:IC:/Users/wuxian/AppData/Local/.xmake/packages/p/pthreads4w/3.0.0/c27339ca84fb4bd5949fa6f269cae859/include/pthread -external:W0 -external:IC:/Users/wuxian/AppData/Local/.xmake/packages/c/cjson/1.7.15/5d29b7ead93148bbac47aa2d02ef454d/include”: No such file or directory [C:\Users\wuxian\AppData\Local\.xmake\cache\packages\2410\m\mosquitto\v2.0.18\source\build_5a0ebdd4\CMakeFiles\CMakeScratch\TryCompile-01tih8\cmTC_0e6d1.vcxproj]
      (编译源文件“/;-external:IC:/Program;Files/OpenSSL/include%20-external:W0%20-external:IC:/Users/wuxian/AppData/Local/.xmake/packages/p/pthreads4w/3.0.0/c27339ca84fb4bd5949fa6f269cae859/include/pthread%20-external:W0%20-external:IC:/Users/wuxian/AppData/Local/.xmake/packages/c/cjson/1.7.15/5d29b7ead93148bbac47aa2d02ef454d/include”)

    已完成生成项目“C:\Users\wuxian\AppData\Local\.xmake\cache\packages\2410\m\mosquitto\v2.0.18\source\build_5a0ebdd4\CMakeFiles\CMakeScratch\TryCompile-01tih8\cmTC_0e6d1.vcxproj”(默认目标)的操作 - 失败。

    生成失败。

    “C:\Users\wuxian\AppData\Local\.xmake\cache\packages\2410\m\mosquitto\v2.0.18\source\build_5a0ebdd4\CMakeFiles\CMakeScratch\TryCompile-01tih8\cmTC_0e6d1.vcxproj”(默认目标) (1) ->
    (ClCompile 目标) ->
      /;-external:IC:/Program;Files/OpenSSL/include -external:W0 -external:IC:/Users/wuxian/AppData/Local/.xmake/packages/p/pthreads4w/3.0.0/c27339ca84fb4bd5949fa6f269cae859/include/pthread -external:W0 -external:IC:/Users/wuxian/AppData/Local/.xmake/packages/c/cjson/1.7.15/5d29b7ead93148bbac47aa2d02ef454d/include(1,1): error C1083: 无法打开源文件: “;-external:IC:/Program;Files/OpenSSL/include -external:W0 -external:IC:/Users/wuxian/AppData/Local/.xmake/packages/p/pthreads4w/3.0.0/c27339ca84fb4bd5949fa6f269cae859/include/pthread -external:W0 -external:IC:/Users/wuxian/AppData/Local/.xmake/packages/c/cjson/1.7.15/5d29b7ead93148bbac47aa2d02ef454d/include”: No such file or directory [C:\Users\wuxian\AppData\Local\.xmake\cache\packages\2410\m\mosquitto\v2.0.18\source\build_5a0ebdd4\CMakeFiles\CMakeScratch\TryCompile-01tih8\cmTC_0e6d1.vcxproj]

        0 个警告
        1 个错误

    已用时间 00:00:02.49

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:16 (project)

-- Configuring incomplete, errors occurred!
error: @programdir\core\sandbox\modules\os.lua:378: execv(C:\Program Files\CMake\bin\cmake -DDOCUMENTATION=OFF -DWITH_CLIENTS=OFF -DWITH_APPS=OFF -DWITH_PLUGINS=OFF -DCMAKE_BUILD_TYPE=Release -DWITH_STATIC_LIBRARIES=ON -DWITH_TLS=ON -DWITH_CJSON=ON -DWITH_BROKER=OFF -DWITH_LIB_CPP=ON -DWITH_TLS_PSK=ON -DWITH_BUNDLED_DEPS=ON -DWITH_DLT=OFF -DWITH_EC=ON -DWITH_WEBSOCKETS=OFF -DWITH_THREADING=ON -DWITH_UNIX_SOCKETS=ON -DWITH_SOCKS=ON -DCMAKE_INSTALL_PREFIX=C:\Users\wuxian\AppData\Local\.xmake\packages\m\mosquitto\v2.0.18\5a0ebdd4dda342d9b78d663437ab2f52 -DCMAKE_INSTALL_LIBDIR:PATH=lib -G "Visual Studio 17 2022" -A x64 -DCMAKE_GENERATOR_TOOLSET=v143 -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY=pdb -DCMAKE_POSITION_INDEPENDENT_CODE=ON "-DCMAKE_STATIC_LINKER_FLAGS_RELEASE=/machine:x64  -nodefaultlib:msvcrt.lib" C:\Users\wuxian\AppData\Local\.xmake\cache\packages\2410\m\mosquitto\v2.0.18\source) failed(1)
stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:1004]:
    [@programdir\core\sandbox\modules\os.lua:378]:
    [@programdir\core\sandbox\modules\os.lua:291]: in function 'vrunv'
    [@programdir\modules\package\tools\cmake.lua:1241]: in function 'configure'
    [@programdir\modules\package\tools\cmake.lua:1283]: in function 'install'
    [...e\repositories\xmake-repo\packages\m\mosquitto\xmake.lua:88]: in function 'script'
    [...dir\modules\private\action\require\impl\utils\filter.lua:114]: in function 'call'
    [...\modules\private\action\require\impl\actions\install.lua:392]:

  => install mosquitto v2.0.18 .. failed
error: @programdir\core\main.lua:329: @programdir\core\sandbox\modules\import\core\base\task.lua:65: @programdir\modules\async\runjobs.lua:325: ...\modules\private\action\require\impl\actions\install.lua:494: install failed!
stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:1004]:
    [...\modules\private\action\require\impl\actions\install.lua:494]: in function 'catch'
    [@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
    [...\modules\private\action\require\impl\actions\install.lua:361]:
    [...modules\private\action\require\impl\install_packages.lua:496]: in function 'jobfunc'
    [@programdir\modules\async\runjobs.lua:241]:

stack traceback:
        [C]: in function 'error'
        @programdir\core\base\os.lua:1004: in function '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 1 week ago

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


Title: Xmake download mosquitto library compilation error under Windows

Issues-translate-bot commented 1 week ago

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


Title: Xmake download mosquitto library compilation error under Windows