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

Windows平台上os.run()与shell执行结果不匹配 #5389

Closed
YoumiHa opened this issue Jul 24, 2024 · 7 comments
Closed

Windows平台上os.run()与shell执行结果不匹配 #5389

YoumiHa opened this issue Jul 24, 2024 · 7 comments
Labels

Comments

@YoumiHa
Copy link

YoumiHa commented Jul 24, 2024

Xmake 版本

2.9.3

操作系统版本和架构

Windows 11 23H2 22631.3737

描述问题

我在我的xmake-repo的包的on_install中使用os.run()运行conan build脚本在相同的windows平台下可以正常构建,但是使用os.run(),os.exec(),os.iorun()执行后即发生错误,如图. 我的xmake-repo仓库
3e665f12c40e8bfd5ed2f3c2e4917182

期待的结果

os.run()的结果与shell相匹配

工程配置

add_rules("mode.debug", "mode.release")
add_repositories("endstone https://github.com/YoumiHa/xmake-repo.git")
add_requires("endstone")
add_requires("conan::base64/0.5.2")
add_requires("conan::boost/1.85.0")
add_requires("conan::concurrentqueue/1.0.4")
add_requires("conan::cpptrace/0.6.2")
add_requires("conan::expected-lite/0.6.3")
add_requires("conan::fmt/10.0.0",{configs = {transitive_headers = true, transitive_libs = true}})
add_requires("conan::funchook/1.1.3")
add_requires("conan::glm/1.0.1")
add_requires("magic_enum")
add_requires("conan::ms-gsl/4.0.0")
add_requires("conan::nlohmann_json/3.11.3")
add_requires("conan::pybind11/2.13.1")
add_requires("conan::spdlog/1.14.1")
add_requires("conan::tomlplusplus/3.3.0",{config = {settings = "compiler.cppstd=17"}})

if not has_config("vs_runtime") then
    set_runtimes("MD")
end

target("endstone-xmake")
    set_kind("shared")
    add_files("src/**.cpp")
    add_includedirs("src")
    add_packages("endstone")
    add_packages("fmt","base64","concurrentqueue","cpptrace","expected-lite","funchook","glm","magic_enum","ms-gsl","nlohmann_json","pybind11","spdlog","tomlplusplus")

附加信息和错误日志

checking for platform ... windows
checking for architecture ... x64
checking for Microsoft Visual Studio (x64) version ... 2022
updating repositook
note: install or modify (m) these packages (pass -y to skip confirm)?
in endstone:
  -> endstone latest [runtimes:"MD"]
please input: y (y/n/m)
y
  => downloading endstone .. (1/7z) ⠋
C:\Users\Administrator\AppData\Local\.xmake\cache\packages\2407\e\endstone\latest\source>echo C:\Users\Administrator\AppData\Local\.xmake\cache\packages\2407\e\endstone\latest\source
C:\Users\Administrator\AppData\Local\.xmake\cache\packages\2407\e\endstone\latest\source

C:\Users\Administrator\AppData\Local\.xmake\cache\packages\2407\e\endstone\latest\source>conan profile detect --force
  => installing endstone .. (1/build.bat) ⠹detect_api: Found msvc 17

Detected profile:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=14
compiler.runtime=dynamic
compiler.version=194
os=Windows

WARN: This profile is a guess of your environment, please check it.
WARN: The output of this command is not guaranteed to be stable and can change in future Conan versions.
WARN: Use your own profile files for stability.
Saving detected profile to C:\Users\Administrator\.conan2\profiles\default

C:\Users\Administrator\AppData\Local\.xmake\cache\packages\2407\e\endstone\latest\source>conan export third_party/funchook --version 1.1.3
  => installing endstone .. (1/build.bat) ⠸
======== Exporting recipe to the cache ========
funchook/1.1.3: Exporting package recipe: C:\Users\Administrator\AppData\Local\.xmake\cache\packages\2407\e\endstone\latest\source\third_party\funchook\conanfile.py
funchook/1.1.3: exports: File 'conandata.yml' found. Exporting it...
  => installing endstone .. (1/build.bat) ⠼funchook/1.1.3: Calling export_sources()
funchook/1.1.3: Copied 1 '.yml' file: conandata.yml
funchook/1.1.3: Copied 1 '.py' file: conanfile.py
funchook/1.1.3: Copied 1 '.patch' file: 1.1.3-0001-cmake-use-cci-capstone.patch
funchook/1.1.3: Exported to cache folder: C:\Users\Administrator\.conan2\p\funch9a9b5445ac004\e
funchook/1.1.3: Exported: funchook/1.1.3#4c8a0d9bd963824e63298db0a92710de (2024-07-24 12:21:53 UTC)

C:\Users\Administrator\AppData\Local\.xmake\cache\packages\2407\e\endstone\latest\source>conan build . -s compiler.cppstd=17 -s build_type=Debug -c tools.cmake.cmaketoolchain:generator=Ninja -build-folder=build
  => installing endstone .. (1/build.bat) ⠴
======== Input profiles ========
                                          Profile host:
  => installing endstone .. (1/build.bat) ⠦[settings]
arch=x86_64
build_type=Debug
compiler=msvc
compiler.cppstd=17
compiler.runtime=dynamic
compiler.runtime_type=Debug
compiler.version=194
os=Windows
[conf]
tools.cmake.cmaketoolchain:generator=Ninja

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=14
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=194
os=Windows


======== Computing dependency graph ========
  => installing endstone .. (1/build.bat) ⠋Graph root
    conanfile.py (endstone/0.4.11.dev105): C:\Users\Administrator\AppData\Local\.xmake\cache\packages\2407\e\endstone\latest\source\conanfile.py
Requirements
    base64/0.5.2#310604495b1fd8f5b737c908c76dc8bf - Cache
    boost/1.85.0#cad28bb3b25193d1bc9b190f5f5926b6 - Cache
    capstone/4.0.2#96cf8a0c66d96c65062277068756beb0 - Cache
    concurrentqueue/1.0.4#1e48e1c712bcfd892087c9c622a51502 - Cache
    cpptrace/0.6.2#467c8563f5ec4d4e1a9aed61e73c1d11 - Cache
    expected-lite/0.6.3#8ab50f785d3105e9bfffe17524ec24b5 - Cache
    fmt/10.2.1#8d582aeebdf05b6f0abe2911b926c3f4 - Cache
    funchook/1.1.3#4c8a0d9bd963824e63298db0a92710de - Cache
    glew/2.2.0#7ed80001a1a9686f00ccf4f4680c5f73 - Cache
    glfw/3.4#556ce0bc9e0abc75fe4378b86e566fc4 - Cache
    glm/1.0.1#94392c53a527f7d830119b84fe80c754 - Cache
    glu/system#ee50fc2ade0e1c0c8ebb3be3ea60e0f5 - Cache
    imgui/1.90.8-docking#53b1b8aa7442b729eca80e25febdab1a - Cache
    libdwarf/0.9.1#74f3c2940c7dca2ec082aa9a35496242 - Cache
    magic_enum/0.9.5#ba07901b1c92063df850e362eed7ccb3 - Cache
    ms-gsl/4.0.0#60ed7b1ae7ff8fbfe0bf9a1c1f0443a8 - Cache
    nlohmann_json/3.11.3#45828be26eb619a2e04ca517bb7b828d - Cache
    opengl/system#4df6fecde4084386beded3ed0e56e4ea - Cache
    pybind11/2.13.1#f025ec3eeca56e48a8f71b36a5fe62c0 - Cache
    spdlog/1.14.1#972bbf70be1da4bc57ea589af0efde03 - Cache
    tomlplusplus/3.3.0#3109e968b4a517f395e638753c6faa43 - Cache
    zlib/1.3.1#f52e03ae3d251dec704634230cd806a2 - Cache
    zstd/1.5.5#1f239731dc45147c7fc2f54bfbde73df - Cache
    zstr/1.0.7#c48beb39b7fefd2beb0da59914db1c36 - Cache
Test requirements
    gtest/1.14.0#25e2a474b4d1aecf5ff4f0555dcdf72c - Cache
Resolved version ranges
    fmt/[~10]: fmt/10.2.1
    zlib/[>=1.2.11 <2]: zlib/1.3.1

======== Computing necessary packages ========
Requirements
    base64/0.5.2#310604495b1fd8f5b737c908c76dc8bf:8b7e35f91e516e42ed736c6dd52a9263da3a5dad#c861944fe3052adcee033ee164f5f757 - Cache
    boost/1.85.0#cad28bb3b25193d1bc9b190f5f5926b6:da39a3ee5e6b4b0d3255bfef95601890afd80709#ec7ce88f81bcb5322e50b8f9cb55b016 - Cache
    capstone/4.0.2#96cf8a0c66d96c65062277068756beb0:d0f6b44a31f116c39c5fb834f109b2177daed4a4#80c12d03f009b56810070a75c2846408 - Cache
    concurrentqueue/1.0.4#1e48e1c712bcfd892087c9c622a51502:da39a3ee5e6b4b0d3255bfef95601890afd80709#d76553f653b5b8bdf7b424d83820fea4 - Cache
    cpptrace/0.6.2#467c8563f5ec4d4e1a9aed61e73c1d11:67fb8ca185a2df688ca132896936c06494a500cb#122c5ff183d07df3e4d730ccb1964db4 - Cache
    expected-lite/0.6.3#8ab50f785d3105e9bfffe17524ec24b5:da39a3ee5e6b4b0d3255bfef95601890afd80709#beb7503b67488b722e231f67855dbbf6 - Cache
    fmt/10.2.1#8d582aeebdf05b6f0abe2911b926c3f4:e9cc6aa7033aa076204a6933d6474b2cfd467ed1#26c4c9e23aee0ebb134d5050cf1c772c - Cache
    funchook/1.1.3#4c8a0d9bd963824e63298db0a92710de:47ec31976e18d45bc42cf2e1a6f94fd258b8101c#a3733003aea995a3d8acac9d8bc41db6 - Cache
    glew/2.2.0#7ed80001a1a9686f00ccf4f4680c5f73:a1a1125da42a71d5dd7487b76bf9ce15642197fb#24106e9e710f0aead1797945c24d8d3b - Cache
    glfw/3.4#556ce0bc9e0abc75fe4378b86e566fc4:ee8ddfc1a6035d30dc67d6422a1a1c9220db1abc#a76bfa584946019a6d5472a117a67141 - Cache
    glm/1.0.1#94392c53a527f7d830119b84fe80c754:da39a3ee5e6b4b0d3255bfef95601890afd80709#2bbcd0ae421fb99e8713dabae8437299 - Cache
                                              glu/system#ee50fc2ade0e1c0c8ebb3be3ea60e0f5:da39a3ee5e6b4b0d3255bfef95601890afd80709#0ba8627bd47edc3a501e8f0eb9a79e5e - Cache
    imgui/1.90.8-docking#53b1b8aa7442b729eca80e25febdab1a:a1a4f9c143ce4438c1ed53b4e73368879031fc25#a1b48e0169ef2fc89af967799ca3ebe7 - Cache
    libdwarf/0.9.1#74f3c2940c7dca2ec082aa9a35496242:61b5a06bc63cff13737011cf4950154dec868658#1dc702f28289e6b1f3b1fbaeba08711b - Cache
  => installing endstone .. (1/build.bat) ⠙    magic_enum/0.9.5#ba07901b1c92063df850e362eed7ccb3:da39a3ee5e6b4b0d3255bfef95601890afd80709#f8e92e088b3c1c8d1b2719c6d200db34 - Cache
    ms-gsl/4.0.0#60ed7b1ae7ff8fbfe0bf9a1c1f0443a8:da39a3ee5e6b4b0d3255bfef95601890afd80709#b598077be9be7a01e859da8eca72dee0 - Cache
    nlohmann_json/3.11.3#45828be26eb619a2e04ca517bb7b828d:da39a3ee5e6b4b0d3255bfef95601890afd80709#552828a2560333bcbeff9d087ce0af0f - Cache
    opengl/system#4df6fecde4084386beded3ed0e56e4ea:da39a3ee5e6b4b0d3255bfef95601890afd80709#0ba8627bd47edc3a501e8f0eb9a79e5e - Cache
    pybind11/2.13.1#f025ec3eeca56e48a8f71b36a5fe62c0:da39a3ee5e6b4b0d3255bfef95601890afd80709#b643bc62769d1ac1d24e0b50c4c19dff - Cache
    spdlog/1.14.1#972bbf70be1da4bc57ea589af0efde03:16e4fed5fdbc60404fa37ddce38b873c130f7d64#e3050802c5c58f6d4ef6706a985392b0 - Cache
    tomlplusplus/3.3.0#3109e968b4a517f395e638753c6faa43:da39a3ee5e6b4b0d3255bfef95601890afd80709#27e922b4e373419ae48f1f1e7e5d8a3d - Cache
    zlib/1.3.1#f52e03ae3d251dec704634230cd806a2:8b7e35f91e516e42ed736c6dd52a9263da3a5dad#fb5181de9d8171e9bf193466ebe724eb - Cache
    zstd/1.5.5#1f239731dc45147c7fc2f54bfbde73df:84686b40e13ac9cce8e1c0900e6b00ce53d2ec1b#eee23a1ceb87bf99f4fb8bbc72d373e0 - Cache
    zstr/1.0.7#c48beb39b7fefd2beb0da59914db1c36:da39a3ee5e6b4b0d3255bfef95601890afd80709#431a633c471dc4c218d38c40d7b3f7c8 - Cache
Test requirements
    gtest/1.14.0#25e2a474b4d1aecf5ff4f0555dcdf72c:d53ec296953c38bd3c4e09cfec253d2e7af2df07#67b33ec2df334f2e6415e798e1d67930 - Cache

======== Installing packages ========

======== Installing packages ========
base64/0.5.2: Already installed! (1 of 25)
boost/1.85.0: Already installed! (2 of 25)
capstone/4.0.2: Already installed! (3 of 25)
concurrentqueue/1.0.4: Already installed! (4 of 25)
expected-lite/0.6.3: Already installed! (5 of 25)
fmt/10.2.1: Already installed! (6 of 25)
  => installing endstone .. (1/build.bat) ⠹glm/1.0.1: Already installed! (7 of 25)
gtest/1.14.0: Already installed! (8 of 25)
imgui/1.90.8-docking: Already installed! (9 of 25)
imgui/1.90.8-docking: Appending PATH env var with : C:\Users\Administrator\.conan2\p\b\imgui058ac5d4c5846\p\bin
magic_enum/0.9.5: Already installed! (10 of 25)
ms-gsl/4.0.0: Already installed! (11 of 25)
nlohmann_json/3.11.3: Already installed! (12 of 25)
  => installing endstone .. (1/build.bat) ⠸opengl/system: Already installed! (13 of 25)
pybind11/2.13.1: Already installed! (14 of 25)
tomlplusplus/3.3.0: Already installed! (15 of 25)
zlib/1.3.1: Already installed! (16 of 25)
  => installing endstone .. (1/build.bat) ⠼zstd/1.5.5: Already installed! (17 of 25)
funchook/1.1.3: Already installed! (18 of 25)
glfw/3.4: Already installed! (19 of 25)
glu/system: Already installed! (20 of 25)
libdwarf/0.9.1: Already installed! (21 of 25)
spdlog/1.14.1: Already installed! (22 of 25)
  => installing endstone .. (1/build.bat) ⠴zstr/1.0.7: Already installed! (23 of 25)
cpptrace/0.6.2: Already installed! (24 of 25)
glew/2.2.0: Already installed! (25 of 25)
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated:     'env_info' used in: boost/1.85.0, imgui/1.90.8-docking, zstd/1.5.5
WARN: deprecated:     'cpp_info.filenames' used in: expected-lite/0.6.3, cpptrace/0.6.2, glfw/3.4, funchook/1.1.3, glew/2.2.0, boost/1.85.0, opengl/system
WARN: deprecated:     'cpp_info.names' used in: ms-gsl/4.0.0, expected-lite/0.6.3, cpptrace/0.6.2, zstd/1.5.5, glfw/3.4, funchook/1.1.3, glew/2.2.0, pybind11/2.13.1, boost/1.85.0, spdlog/1.14.1, zlib/1.3.1, fmt/10.2.1, gtest/1.14.0
WARN: deprecated:     'user_info' used in: boost/1.85.0
WARN: deprecated:     'cpp_info.build_modules' used in: pybind11/2.13.1, glfw/3.4

======== Finalizing install (deploy, generators) ========
conanfile.py (endstone/0.4.11.dev105): Calling generate()
conanfile.py (endstone/0.4.11.dev105): Generators folder: C:\Users\Administrator\AppData\Local\.xmake\cache\packages\2407\e\endstone\latest\source\build\Debug\generators
conanfile.py (endstone/0.4.11.dev105): CMakeDeps necessary find_package() and targets for your CMakeLists.txt
    find_package(base64)
    find_package(Boost)
    find_package(concurrentqueue)
    find_package(cpptrace)
    find_package(expected-lite)
    find_package(funchook)
    find_package(glm)
    find_package(magic_enum)
    find_package(Microsoft.GSL)
    find_package(nlohmann_json)
    find_package(pybind11)
    find_package(spdlog)
    find_package(fmt)
    find_package(tomlplusplus)
    find_package(glew)
    find_package(glfw3)
    find_package(imgui)
    find_package(zstr)
    find_package(GTest)
    target_link_libraries(... aklomp::base64 boost::boost concurrentqueue::concurrentqueue cpptrace::cpptrace nonstd::expected-lite funchook::funchook glm::glm magic_enum::magic_enum Microsoft.GSL::GSL nlohmann_json::nlohmann_json pybind11_all_do_not_use spdlog::spdlog fmt::fmt tomlplusplus::tomlplusplus GLEW::GLEW glfw imgui::imgui zstr::zstr gtest::gtest)
conanfile.py (endstone/0.4.11.dev105): CMakeToolchain generated: conan_toolchain.cmake
conanfile.py (endstone/0.4.11.dev105): CMakeToolchain: Preset 'conan-debug' added to CMakePresets.json.
    (cmake>=3.23) cmake --preset conan-debug
    (cmake<3.23) cmake <path> -G Ninja -DCMAKE_TOOLCHAIN_FILE=generators\conan_toolchain.cmake  -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Debug
conanfile.py (endstone/0.4.11.dev105): CMakeToolchain generated: C:\Users\Administrator\AppData\Local\.xmake\cache\packages\2407\e\endstone\latest\source\build\Debug\generators\CMakePresets.json
conanfile.py (endstone/0.4.11.dev105): CMakeToolchain generated: C:\Users\Administrator\AppData\Local\.xmake\cache\packages\2407\e\endstone\latest\source\CMakeUserPresets.json
conanfile.py (endstone/0.4.11.dev105): Generating aggregated env files
conanfile.py (endstone/0.4.11.dev105): Generated aggregated env files: ['conanbuild.bat', 'conanrun.bat']

======== Calling build() ========
conanfile.py (endstone/0.4.11.dev105): Calling build()
conanfile.py (endstone/0.4.11.dev105): Running CMake.configure()
conanfile.py (endstone/0.4.11.dev105): RUN: cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/Users/Administrator/AppData/Local/.xmake/cache/packages/2407/e/endstone/latest/source" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Debug" "C:/Users/Administrator/AppData/Local/.xmake/cache/packages/2407/e/endstone/latest/source"
conanvcvars.bat: Activating environment Visual Studio 17 - amd64 - winsdk_version=None - vcvars_ver=14.4
  => installing endstone .. (1/build.bat) ⠋[vcvarsall.bat] Environment initialized for: 'x64'
-- Using Conan toolchain: C:/Users/Administrator/AppData/Local/.xmake/cache/packages/2407/e/endstone/latest/source/build/Debug/generators/conan_toolchain.cmake
-- Conan toolchain: Setting CMAKE_MSVC_RUNTIME_LIBRARY=$<$<CONFIG:Debug>:MultiThreadedDebugDLL>
-- Conan toolchain: C++ Standard 17 with extensions OFF
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- The C compiler identification is MSVC 19.41.34117.0
  => installing endstone .. (1/build.bat) ⠙-- The CXX compiler identification is MSVC 19.41.34117.0
-- Detecting C compiler ABI info
  => installing endstone .. (1/build.bat) ⠸-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/Vs2022PreBusiness/VC/Tools/MSVC/14.41.34117/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
CMake Error:
  Running

   'D:/Vs2022PreBusiness/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe' '-C' 'C:/Users/Administrator/AppData/Local/.xmake/cache/packages/2407/e/endstone/latest/source/build/Debug/CMakeFiles/CMakeScratch/TryCompile-1dlxr7' '-t' 'recompact'

  failed with:

   ninja: error: build.ninja:35: loading 'CMakeFiles\rules.ninja': 系统找不到指定的文件。



  include CMakeFiles\rules.ninja

                                ^ near here



CMake Error at F:/Program Files/CMake/share/cmake-3.29/Modules/CMakeDetermineCompilerABI.cmake:64 (try_compile):
  Failed to generate test project build system.
Call Stack (most recent call first):
  F:/Program Files/CMake/share/cmake-3.29/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)
  CMakeLists.txt:2 (project)


-- Configuring incomplete, errors occurred!

ERROR: conanfile.py (endstone/0.4.11.dev105): Error in build() method, line 162
        cmake.configure()
        ConanException: Error 1 while executing

C:\Users\Administrator\AppData\Local\.xmake\cache\packages\2407\e\endstone\latest\source>mkdir lib

C:\Users\Administrator\AppData\Local\.xmake\cache\packages\2407\e\endstone\latest\source>mkdir lib\include

C:\Users\Administrator\AppData\Local\.xmake\cache\packages\2407\e\endstone\latest\source>xcopy build\Debug\endstone_runtime.dll lib
找不到文件 - endstone_runtime.dll
复制了 0 个文件

C:\Users\Administrator\AppData\Local\.xmake\cache\packages\2407\e\endstone\latest\source>xcopy build\Debug\endstone_runtime.lib lib
找不到文件 - endstone_runtime.lib
复制了 0 个文件

  => install endstone latest .. failed

cannot copy file lib/include/bedrock, file not found!
if you want to get more verbose errors, please see:
  -> C:\Users\Administrator\AppData\Local\.xmake\cache\packages\2407\e\endstone\latest\installdir.failed\logs\install.txt
error: install failed!
warning: add_requires("conan::tomlplusplus/3.3.0") has unknown option: {config=table: 00000262CE0D3600}!

文件text.txt

@YoumiHa YoumiHa added the bug label Jul 24, 2024
@Issues-translate-bot
Copy link

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


Title: os.run() on Windows platform does not match the shell execution result

@waruqi
Copy link
Member

waruqi commented Jul 25, 2024

这好像跟 xmake 没啥关系吧,conan/cmake 的构建问题。。os.run 就是调用 CreateProcess 创建子进程。。不保证一定跟 cmd/powershell 完全一样的 envs 环境。。但不管是什么 envs ,conan 自身构建失败,跟 xmake 无关。

@Issues-translate-bot
Copy link

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


This seems to have nothing to do with xmake, but a conan/cmake build problem. . os.run is to call CreateProcess to create a child process. . There is no guarantee that the envs environment will be exactly the same as cmd/powershell. . But no matter what envs is, conan itself fails to build and has nothing to do with xmake.

@YoumiHa
Copy link
Author

YoumiHa commented Jul 25, 2024

这好像跟 xmake 没啥关系吧,conan/cmake 的构建问题。。os.run 就是调用 CreateProcess 创建子进程。。不保证一定跟 cmd/powershell 完全一样的 envs 环境。。但不管是什么 envs ,conan 自身构建失败,跟 xmake 无关。

确实利用创建进程的winapi envs环境不同,但是利用c#写的控制台程序,另外开启cmd进程运行conan的进程进行构建仍旧会失败,这是直接调用cmd的shell然后向cmd进程输入启动build脚本的

@Issues-translate-bot
Copy link

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


This seems to have nothing to do with xmake, but a conan/cmake build problem. . os.run is to call CreateProcess to create a child process. . There is no guarantee that the envs environment will be exactly the same as cmd/powershell. . But no matter what envs is, conan itself fails to build and has nothing to do with xmake.

It is true that the winapi envs environment used to create the process is different, but using a console program written in C# and opening the cmd process to run the conan process will still fail to build. This is to directly call the cmd shell and then enter the startup build script into the cmd process.

@waruqi
Copy link
Member

waruqi commented Jul 25, 2024

那这个跟 xmake 没啥关系。

@Issues-translate-bot
Copy link

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


Then this has nothing to do with xmake.

@YoumiHa YoumiHa closed this as not planned Won't fix, can't repro, duplicate, stale Jul 26, 2024
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