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

[package] fmt/10.1.0: raise error when build #19805

Closed
shaqtsui opened this issue Sep 14, 2023 · 2 comments
Closed

[package] fmt/10.1.0: raise error when build #19805

shaqtsui opened this issue Sep 14, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@shaqtsui
Copy link

Description

Error comes when build fmt in windows environment.

Here is the logs.
I sorry that my os only support Chinese, so the log contains non-Englhish some chars.
Hope it not block you from identify the root cause.


======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=14
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=14
compiler.runtime=dynamic
compiler.runtime_type=Debug
compiler.version=193
os=Windows


======== Computing dependency graph ========
Graph root
    conanfile.txt: D:\shaq\Projects\test\build\.conan\spdlog\1.12.0\conanfile.txt
Requirements
    fmt/10.1.0#51d8d1db43672712db81b146a85ca73d - Cache
    spdlog/1.12.0#248c215bc5f0718402fbf1de126ef847 - Cache

======== Computing necessary packages ========
fmt/10.1.0: Checking 3 compatible configurations:
fmt/10.1.0: '79ad5c0ced8862627ded87a6ae4c8164feb65141': compiler.cppstd=17
fmt/10.1.0: '0383c995792d0aac2ac49961509293f5fad4ca34': compiler.cppstd=20
fmt/10.1.0: '4616954f9a4d997cde12e14fbf2142d994dd2d7a': compiler.cppstd=23
spdlog/1.12.0: Checking 3 compatible configurations:
spdlog/1.12.0: 'a2dc73d02d841a3967b625cd15bf7203b494ae26': compiler.cppstd=17
spdlog/1.12.0: 'e063a300f542ab2dd09cb7328a4d3cf9f683cd8f': compiler.cppstd=20
spdlog/1.12.0: 'd37533297892253f20eb689313729f09e6d1fec0': compiler.cppstd=23
Requirements
    fmt/10.1.0#51d8d1db43672712db81b146a85ca73d:45d860077f7215205ccd3bc2cc483cbd37723c46 - Build
    spdlog/1.12.0#248c215bc5f0718402fbf1de126ef847:365f113b7df34d03b0fa9988810dcf136cc300eb - Build

======== Installing packages ========
fmt/10.1.0: Sources downloaded from 'conancenter'
fmt/10.1.0: Calling source() in C:\Users\shaqt\.conan2\p\fmt3c860b7c6a343\s\src
fmt/10.1.0: ERROR: Error downloading file https://github.com/fmtlib/fmt/releases/download/10.1.0/fmt-10.1.0.zip: '('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))'
fmt/10.1.0: Waiting 5 seconds to retry...
fmt/10.1.0: Unzipping 4.6MB, this can take a while


-------- Installing package fmt/10.1.0 (1 of 2) --------
fmt/10.1.0: Building from source
fmt/10.1.0: Package fmt/10.1.0:45d860077f7215205ccd3bc2cc483cbd37723c46
fmt/10.1.0: Copying sources to build folder
fmt/10.1.0: Building your package in C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b
fmt/10.1.0: Calling generate()
fmt/10.1.0: Generators folder: C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\build\generators
fmt/10.1.0: CMakeToolchain generated: conan_toolchain.cmake
fmt/10.1.0: CMakeToolchain generated: CMakePresets.json
fmt/10.1.0: CMakeToolchain generated: ..\..\src\CMakeUserPresets.json
fmt/10.1.0: Generating aggregated env files
fmt/10.1.0: Generated aggregated env files: ['conanbuild.bat', 'conanrun.bat']
fmt/10.1.0: Calling build()
fmt/10.1.0: apply_conandata_patches(): No patches defined in conandata
fmt/10.1.0: Running CMake.configure()
fmt/10.1.0: RUN: cmake -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE="C:/Users/shaqt/.conan2/p/b/fmt2c8b1822198b1/b/build/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/Users/shaqt/.conan2/p/b/fmt2c8b1822198b1/p" -DFMT_DOC="OFF" -DFMT_TEST="OFF" -DFMT_INSTALL="ON" -DFMT_LIB_DIR="lib" -DFMT_OS="ON" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\src"
-- CMake version: 3.27.1
-- Using Conan toolchain: C:/Users/shaqt/.conan2/p/b/fmt2c8b1822198b1/b/build/generators/conan_toolchain.cmake
-- Conan toolchain: C++ Standard 14 with extensions OFF
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.22621.
-- The CXX compiler identification is MSVC 19.37.32822.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Version: 10.1.0
-- Build type: Release
-- Configuring done (4.6s)
-- Generating done (0.0s)
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_POLICY_DEFAULT_CMP0091


-- Build files have been written to: C:/Users/shaqt/.conan2/p/b/fmt2c8b1822198b1/b/build

fmt/10.1.0: Running CMake.build()
fmt/10.1.0: RUN: cmake --build "C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\build" --config Release
适用于 .NET Framework MSBuild 版本 17.7.2+d6990bcfa

  1>Checking Build System
  Building Custom Rule C:/Users/shaqt/.conan2/p/b/fmt2c8b1822198b1/b/src/CMakeLists.txt
  format.cc
  os.cc
C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\src\include\fmt\format.h(847,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\src\src\os.cc) [C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\build\fmt.vcxproj]
C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\src\include\fmt\format.h(1456,34): error C2001: 常量中有换行符 (编译源文件 C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\src\src\os.cc) [C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\build\fmt.vcxproj]
C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\src\include\fmt\format.h(847,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\src\src\format.cc) [C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\build\fmt.vcxproj]
C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\src\include\fmt\format.h(1456,34): error C2001: 常量中有换行符 (编译源文件 C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\src\src\format.cc) [C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\build\fmt.vcxproj]
C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\src\include\fmt\format.h(1456,33): fatal  error C1075: “{”: 未找到匹配令牌 (编译源文件 C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\src\src\format.cc) [C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\build\fmt.vcxproj]
C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\src\include\fmt\format.h(1456,33): fatal  error C1075: “{”: 未找到匹配令牌 (编译源文件 C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\src\src\os.cc) [C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\build\fmt.vcxproj]

fmt/10.1.0: ERROR: 
Package '45d860077f7215205ccd3bc2cc483cbd37723c46' build failed
fmt/10.1.0: WARN: Build folder C:\Users\shaqt\.conan2\p\b\fmt2c8b1822198b1\b\build
*********************************************************
Recipe 'fmt/10.1.0' cannot build its binary
It is possible that this recipe is not Conan 2.0 ready
If the recipe comes from ConanCenter, report it at https://github.com/conan-io/conan-center-index/issues
If it is your recipe, check if it is updated to 2.0
*********************************************************

ERROR: fmt/10.1.0: Error in build() method, line 95
	cmake.build()
	ConanException: Error 1 while executing

Package and Environment Details

  • Package Name/Version: fmt/10.1.0
  • Operating System+version: Windows 11
  • Compiler+version: msvc 193
  • Conan version: conan 2.0.10
  • Python version: Python 3.11.4

Conan profile

command line:

conan install . -g XmakeGenerator --profile:build=profile_build.txt --profile:host=profile_host.txt --build=missing

profile_host.txt

[settings]
arch=x86_64
build_type=Release
os=Windows
compiler=msvc
compiler.version=193
compiler.cppstd=14
compiler.runtime=dynamic
compiler.runtime_type=Debug

profile_build.txt

[settings]
arch=x86_64
build_type=Release
os=Windows
compiler=msvc
compiler.version=193
compiler.cppstd=14
compiler.runtime=dynamic
compiler.runtime_type=Debug

Steps to reproduce

conan install . -g XmakeGenerator --profile:build=profile_build.txt --profile:host=profile_host.txt --build=missing

Logs

Click to expand log

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=14
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=14
compiler.runtime=dynamic
compiler.runtime_type=Debug
compiler.version=193
os=Windows

======== Computing dependency graph ========
Graph root
conanfile.txt: D:\shaq\Projects\test\build.conan\spdlog\1.12.0\conanfile.txt
Requirements
fmt/10.1.0#51d8d1db43672712db81b146a85ca73d - Cache
spdlog/1.12.0#248c215bc5f0718402fbf1de126ef847 - Cache

======== Computing necessary packages ========
fmt/10.1.0: Checking 3 compatible configurations:
fmt/10.1.0: '79ad5c0ced8862627ded87a6ae4c8164feb65141': compiler.cppstd=17
fmt/10.1.0: '0383c995792d0aac2ac49961509293f5fad4ca34': compiler.cppstd=20
fmt/10.1.0: '4616954f9a4d997cde12e14fbf2142d994dd2d7a': compiler.cppstd=23
spdlog/1.12.0: Checking 3 compatible configurations:
spdlog/1.12.0: 'a2dc73d02d841a3967b625cd15bf7203b494ae26': compiler.cppstd=17
spdlog/1.12.0: 'e063a300f542ab2dd09cb7328a4d3cf9f683cd8f': compiler.cppstd=20
spdlog/1.12.0: 'd37533297892253f20eb689313729f09e6d1fec0': compiler.cppstd=23
Requirements
fmt/10.1.0#51d8d1db43672712db81b146a85ca73d:45d860077f7215205ccd3bc2cc483cbd37723c46 - Build
spdlog/1.12.0#248c215bc5f0718402fbf1de126ef847:365f113b7df34d03b0fa9988810dcf136cc300eb - Build

======== Installing packages ========
fmt/10.1.0: Sources downloaded from 'conancenter'
fmt/10.1.0: Calling source() in C:\Users\shaqt.conan2\p\fmt3c860b7c6a343\s\src
fmt/10.1.0: ERROR: Error downloading file https://github.com/fmtlib/fmt/releases/download/10.1.0/fmt-10.1.0.zip: '('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))'
fmt/10.1.0: Waiting 5 seconds to retry...
fmt/10.1.0: Unzipping 4.6MB, this can take a while

-------- Installing package fmt/10.1.0 (1 of 2) --------
fmt/10.1.0: Building from source
fmt/10.1.0: Package fmt/10.1.0:45d860077f7215205ccd3bc2cc483cbd37723c46
fmt/10.1.0: Copying sources to build folder
fmt/10.1.0: Building your package in C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b
fmt/10.1.0: Calling generate()
fmt/10.1.0: Generators folder: C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\build\generators
fmt/10.1.0: CMakeToolchain generated: conan_toolchain.cmake
fmt/10.1.0: CMakeToolchain generated: CMakePresets.json
fmt/10.1.0: CMakeToolchain generated: ....\src\CMakeUserPresets.json
fmt/10.1.0: Generating aggregated env files
fmt/10.1.0: Generated aggregated env files: ['conanbuild.bat', 'conanrun.bat']
fmt/10.1.0: Calling build()
fmt/10.1.0: apply_conandata_patches(): No patches defined in conandata
fmt/10.1.0: Running CMake.configure()
fmt/10.1.0: RUN: cmake -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE="C:/Users/shaqt/.conan2/p/b/fmt2c8b1822198b1/b/build/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/Users/shaqt/.conan2/p/b/fmt2c8b1822198b1/p" -DFMT_DOC="OFF" -DFMT_TEST="OFF" -DFMT_INSTALL="ON" -DFMT_LIB_DIR="lib" -DFMT_OS="ON" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\src"
-- CMake version: 3.27.1
-- Using Conan toolchain: C:/Users/shaqt/.conan2/p/b/fmt2c8b1822198b1/b/build/generators/conan_toolchain.cmake
-- Conan toolchain: C++ Standard 14 with extensions OFF
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.22621.
-- The CXX compiler identification is MSVC 19.37.32822.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Version: 10.1.0
-- Build type: Release
-- Configuring done (4.6s)
-- Generating done (0.0s)
CMake Warning:
Manually-specified variables were not used by the project:

CMAKE_POLICY_DEFAULT_CMP0091

-- Build files have been written to: C:/Users/shaqt/.conan2/p/b/fmt2c8b1822198b1/b/build

fmt/10.1.0: Running CMake.build()
fmt/10.1.0: RUN: cmake --build "C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\build" --config Release
适用于 .NET Framework MSBuild 版本 17.7.2+d6990bcfa

1>Checking Build System
Building Custom Rule C:/Users/shaqt/.conan2/p/b/fmt2c8b1822198b1/b/src/CMakeLists.txt
format.cc
os.cc
C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\src\include\fmt\format.h(847,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\src\src\os.cc) [C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\build\fmt.vcxproj]
C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\src\include\fmt\format.h(1456,34): error C2001: 常量中有换行符 (编译源文件 C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\src\src\os.cc) [C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\build\fmt.vcxproj]
C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\src\include\fmt\format.h(847,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\src\src\format.cc) [C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\build\fmt.vcxproj]
C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\src\include\fmt\format.h(1456,34): error C2001: 常量中有换行符 (编译源文件 C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\src\src\format.cc) [C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\build\fmt.vcxproj]
C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\src\include\fmt\format.h(1456,33): fatal error C1075: “{”: 未找到匹配令牌 (编译源文件 C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\src\src\format.cc) [C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\build\fmt.vcxproj]
C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\src\include\fmt\format.h(1456,33): fatal error C1075: “{”: 未找到匹配令牌 (编译源文件 C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\src\src\os.cc) [C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\build\fmt.vcxproj]

fmt/10.1.0: ERROR:
Package '45d860077f7215205ccd3bc2cc483cbd37723c46' build failed
fmt/10.1.0: WARN: Build folder C:\Users\shaqt.conan2\p\b\fmt2c8b1822198b1\b\build


Recipe 'fmt/10.1.0' cannot build its binary
It is possible that this recipe is not Conan 2.0 ready
If the recipe comes from ConanCenter, report it at https://github.com/conan-io/conan-center-index/issues
If it is your recipe, check if it is updated to 2.0


ERROR: fmt/10.1.0: Error in build() method, line 95
cmake.build()
ConanException: Error 1 while executing

@shaqtsui shaqtsui added the bug Something isn't working label Sep 14, 2023
@toge
Copy link
Contributor

toge commented Sep 17, 2023

@shaqtsui
Thank you for your report.

I think it is not cci recipe bug but fmt bug.
It seems to be fixed in fmt/10.1.1. fmtlib/fmt#3599

Please try to use fmt/10.1.1.

@shaqtsui
Copy link
Author

Thanks a lot for the reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants