Open Vobraz opened 8 months ago
Package can not be built if conan was installed via Windows installer The reason is that the recipe use the python executable, and it's path obtained like: tc.variables["PYTHON_EXECUTABLE"] = sys.executable.replace("\\", "/") "sys.executable" will be ".../python.exe" only if conan was installed via pip, but with Windows installer it is ".../conan.exe" Line: https://github.com/conan-io/conan-center-index/blob/f26e57ef872d654653b4ae612fffb05fb753b645/recipes/onnx/all/conanfile.py#L106 Commit: https://github.com/conan-io/conan-center-index/commit/d0fc51d52a40650a2376437935e1d353003ebfc4
tc.variables["PYTHON_EXECUTABLE"] = sys.executable.replace("\\", "/")
[settings] arch=x86_64 build_type=Debug compiler=msvc compiler.cppstd=20 compiler.runtime=dynamic compiler.runtime_type=Debug compiler.version=193 os=Windows
conan install --require onnx/1.15.0 -s build_type=Debug --build missing
Also mentioned here https://github.com/conan-io/conan-center-index/issues/21790#issuecomment-1859147337
Description
Package can not be built if conan was installed via Windows installer The reason is that the recipe use the python executable, and it's path obtained like:
tc.variables["PYTHON_EXECUTABLE"] = sys.executable.replace("\\", "/")
"sys.executable" will be ".../python.exe" only if conan was installed via pip, but with Windows installer it is ".../conan.exe" Line: https://github.com/conan-io/conan-center-index/blob/f26e57ef872d654653b4ae612fffb05fb753b645/recipes/onnx/all/conanfile.py#L106 Commit: https://github.com/conan-io/conan-center-index/commit/d0fc51d52a40650a2376437935e1d353003ebfc4Package and Environment Details
Conan profile
[settings] arch=x86_64 build_type=Debug compiler=msvc compiler.cppstd=20 compiler.runtime=dynamic compiler.runtime_type=Debug compiler.version=193 os=Windows
Steps to reproduce
conan install --require onnx/1.15.0 -s build_type=Debug --build missing
Logs
Click to expand log
``` ======== Input profiles ======== Profile host: [settings] arch=x86_64 build_type=Debug compiler=msvc compiler.cppstd=20 compiler.runtime=dynamic compiler.runtime_type=Debug compiler.version=193 os=Windows Profile build: [settings] arch=x86_64 build_type=Release compiler=msvc compiler.cppstd=20 compiler.runtime=dynamic compiler.runtime_type=Release compiler.version=193 os=Windows ======== Computing dependency graph ======== Graph root cli Requirements onnx/1.15.0#0f668bd44c6ab5e08b17ab4af13203f6 - Cache protobuf/3.21.12#ed2404ae366627005beb2173eab68174 - Cache zlib/1.3#06023034579559bb64357db3a53f88a4 - Cache Build requirements protobuf/3.21.12#ed2404ae366627005beb2173eab68174 - Cache zlib/1.3#06023034579559bb64357db3a53f88a4 - Cache Resolved version ranges zlib/[>=1.2.11 <2]: zlib/1.3 ======== Computing necessary packages ======== protobuf/3.21.12: Checking 3 compatible configurations protobuf/3.21.12: Main binary package 'e762180897c5c92d4655e2dd7b54c4d4225df5e4' missing. Using compatible package '9a546d3c2c7b2b02ebec30698e8536173849d86f': compiler.cppstd=14 onnx/1.15.0: Checking 2 compatible configurations onnx/1.15.0: Compatible configurations not found in cache, checking servers onnx/1.15.0: 'b2433750cef6f375a867309e8ddab0bbe9b1a0d1': compiler.cppstd=17 onnx/1.15.0: 'c6278a2ee25e2868c4a09c12773030cd4f555262': compiler.cppstd=23 Requirements onnx/1.15.0#0f668bd44c6ab5e08b17ab4af13203f6:1200420ad74a74cba8f5b76599dab41735b18892 - Build protobuf/3.21.12#ed2404ae366627005beb2173eab68174:9e59c2e778d65e6e544dd6e21cb49680f810c33a#e854697bbe73f95067173c3e85bf54f7 - Cache zlib/1.3#06023034579559bb64357db3a53f88a4:ed44dacde2751b398e4bf9441ff992a70c913c00#7b093339b8c54a731db48cb39e249fcd - Cache Build requirements protobuf/3.21.12#ed2404ae366627005beb2173eab68174:9a546d3c2c7b2b02ebec30698e8536173849d86f#588af8873e534fedec73b03cc8736218 - Cache Skipped binaries zlib/1.3 ======== Installing packages ======== zlib/1.3: Already installed! (1 of 4) protobuf/3.21.12: Already installed! (2 of 4) protobuf/3.21.12: Already installed! (3 of 4) -------- Installing package onnx/1.15.0 (4 of 4) -------- onnx/1.15.0: Building from source onnx/1.15.0: Package onnx/1.15.0:1200420ad74a74cba8f5b76599dab41735b18892 onnx/1.15.0: Copying sources to build folder onnx/1.15.0: Building your package in C:\Users\user\.conan2\p\b\onnx35363824559f2\b onnx/1.15.0: Calling generate() onnx/1.15.0: Generators folder: C:\Users\user\.conan2\p\b\onnx35363824559f2\b\build\generators onnx/1.15.0: CMakeToolchain generated: conan_toolchain.cmake onnx/1.15.0: CMakeToolchain generated: CMakePresets.json onnx/1.15.0: CMakeToolchain generated: ..\..\src\CMakeUserPresets.json onnx/1.15.0: CMakeDeps necessary find_package() and targets for your CMakeLists.txt find_package(protobuf) target_link_libraries(... protobuf::protobuf) onnx/1.15.0: Generating aggregated env files onnx/1.15.0: Generated aggregated env files: ['conanbuild.bat', 'conanrun.bat'] onnx/1.15.0: Calling build() onnx/1.15.0: apply_conandata_patches(): No patches defined in conandata onnx/1.15.0: Running CMake.configure() onnx/1.15.0: RUN: cmake -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE="C:/Users/user/.conan2/p/b/onnx35363824559f2/b/build/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/Users/user/.conan2/p/b/onnx35363824559f2/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "C:\Users\user\.conan2\p\b\onnx35363824559f2\b\src" CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake. Update the VERSION argument