BlockchainCommons / BlockchainCommons/seedtool-cli
Does not compile on Windows 10
- Ngôn ngữ chính
- C++
- Star
- 38
- Fork
- 15
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I would really need this to compile correctly with MSYS on Windows 10, since the Rust version is a no go in my system.
The main problem is the following error about "no type named 'uint_fast64_t' in namespace 'std'"
Following is the interesting parts in verbatim, and I also attached is the full build log: [build.log](https://github.com/user-attachments/files/20402701/build.log)
```
make[1]: Entering directory '/home/seedtool-cli/src'
clang++ -I/home/seedtool-cli/sysroot/include -I/home/seedtool-cli/sysroot/include -std=c++17 --debug -O0 -I"../deps/cbor-lite/include" -c -o seedtool.o seedtool.cpp
In file included from seedtool.cpp:11:
In file included from ./params.hpp:16:
In file included from E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/bc-ur.hpp:24:
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:57:13: error: no type named 'uint_fast64_t' in namespace 'std'; did you mean simply 'uint_fast64_t'?
57 | using Tag = std::uint_fast64_t;
| ^~~~~~~~~~~~~~~~~~
| uint_fast64_t
E:/msys64/mingw64/include/stdint.h:65:48: note: 'uint_fast64_t' declared here
65 | __MINGW_EXTENSION typedef unsigned long long uint_fast64_t;
| ^
In file included from seedtool.cpp:11:
In file included from ./params.hpp:16:
In file included from E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/bc-ur.hpp:24:
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:60:11: error: unknown type name 'Tag'
60 | constexpr Tag unsignedInteger = 0u;
| ^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:61:11: error: unknown type name 'Tag'
61 | constexpr Tag negativeInteger = 1u << 5;
| ^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:62:11: error: unknown type name 'Tag'
62 | constexpr Tag byteString = 2u << 5;
| ^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:63:11: error: unknown type name 'Tag'
63 | constexpr Tag textString = 3u << 5;
| ^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:64:11: error: unknown type name 'Tag'
64 | constexpr Tag array = 4u << 5;
| ^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:65:11: error: unknown type name 'Tag'
65 | constexpr Tag map = 5u << 5;
| ^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:66:11: error: unknown type name 'Tag'
66 | constexpr Tag semantic = 6u << 5;
| ^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:67:11: error: unknown type name 'Tag'
67 | constexpr Tag floatingPoint = 7u << 5;
| ^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:68:11: error: unknown type name 'Tag'
68 | constexpr Tag simple = 7u << 5;
| ^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:69:11: error: unknown type name 'Tag'
69 | constexpr Tag mask = 0xe0u;
| ^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:73:11: error: unknown type name 'Tag'
73 | constexpr Tag length1 = 24u;
| ^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:74:11: error: unknown type name 'Tag'
74 | constexpr Tag length2 = 25u;
| ^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:75:11: error: unknown type name 'Tag'
75 | constexpr Tag length4 = 26u;
| ^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:76:11: error: unknown type name 'Tag'
76 | constexpr Tag length8 = 27u;
| ^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:78:11: error: unknown type name 'Tag'
78 | constexpr Tag False = 20u;
| ^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:79:11: error: unknown type name 'Tag'
79 | constexpr Tag True = 21u;
| ^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:80:11: error: unknown type name 'Tag'
80 | constexpr Tag null = 22u;
| ^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:81:11: error: unknown type name 'Tag'
81 | constexpr Tag undefined = 23u;
| ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[1]: *** [: seedtool.o] Error 1
make[1]: Leaving directory '/home/seedtool-cli/src'
make: *** [Makefile:38: check] Error 2
```
Moreover, I tried to fix the problem by including _'cstdint'_ library near the top of the source header file _'cbor-lite.hpp'_:
by adding
`#include `
But not sure it was any better with that change, since a whole bunch of other errors came up:
```
make[1]: Entering directory '/home/seedtool-cli/src'
clang++ -I/home/seedtool-cli/sysroot/include -I/home/seedtool-cli/sysroot/include -std=c++17 --debug -O0 -I"../deps/cbor-lite/include" -c -o seedtool.o seedtool.cpp
In file included from seedtool.cpp:11:
In file included from ./params.hpp:16:
In file included from E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/bc-ur.hpp:24:
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:26:26: error: unknown class name 'exception'; did you mean '::std::exception'?
26 | class Exception : public std::exception {
| ^~~~~~~~~~~~~~
| ::std::exception
E:/msys64/mingw64/include/c++/15.1.0/bits/exception.h:61:9: note: '::std::exception' declared here
61 | class exception
| ^
In file included from seedtool.cpp:11:
In file included from ./params.hpp:16:
In file included from E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/bc-ur.hpp:24:
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:36:30: error: no type named 'string' in namespace 'ur::std'; did you mean '::std::string'?
36 | explicit Exception(const std::string& d) noexcept {
| ^~~~~~~~~~~
| ::std::string
E:/msys64/mingw64/include/c++/15.1.0/bits/stringfwd.h:79:33: note: '::std::string' declared here
79 | typedef basic_string string;
| ^
In file included from seedtool.cpp:11:
In file included from ./params.hpp:16:
In file included from E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/bc-ur.hpp:24:
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:56:5: error: no type named 'string' in namespace 'ur::std'; did you mean '::std::string'?
56 | std::string what_ = "CBOR Exception";
| ^~~~~~~~~~~
| ::std::string
E:/msys64/mingw64/include/c++/15.1.0/bits/stringfwd.h:79:33: note: '::std::string' declared here
79 | typedef basic_string string;
| ^
In file included from seedtool.cpp:11:
In file included from ./params.hpp:16:
In file included from E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/bc-ur.hpp:24:
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:33:23: error: no member named 'string' in namespace 'ur::std'
33 | what_ += std::string(": ") + d;
| ~~~~~^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:43:47: error: no member named 'move' in namespace 'ur::std'; did you mean '::std::move'?
43 | Exception(Exception&& e) noexcept : what_(std::move(e.what_)) {
| ^~~~~~~~~
| ::std::move
E:/msys64/mingw64/include/c++/15.1.0/bits/move.h:138:5: note: '::std::move' declared here
138 | move(_Tp&& __t) noexcept
| ^
In file included from seedtool.cpp:11:
In file included from ./params.hpp:16:
In file included from E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/bc-ur.hpp:24:
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:117:10: error: no template named 'enable_if' in namespace 'ur::std'; did you mean '::std::enable_if'?
117 | typename std::enable_if::value, std::size_t>::type length(Type val) {
| ^~~~~~~~~~~~~~
| ::std::enable_if
E:/msys64/mingw64/include/c++/15.1.0/type_traits:133:12: note: '::std::enable_if' declared here
133 | struct enable_if
| ^
In file included from seedtool.cpp:11:
In file included from ./params.hpp:16:
In file included from E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/bc-ur.hpp:24:
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:117:25: error: no template named 'is_unsigned' in namespace 'ur::std'; did you mean '::std::is_unsigned'?
117 | typename std::enable_if::value, std::size_t>::type length(Type val) {
| ^~~~~~~~~~~~~~~~
| ::std::is_unsigned
E:/msys64/mingw64/include/c++/15.1.0/type_traits:999:12: note: '::std::is_unsigned' declared here
999 | struct is_unsigned
| ^
In file included from seedtool.cpp:11:
In file included from ./params.hpp:16:
In file included from E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/bc-ur.hpp:24:
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:117:56: error: no template named 'size_t' in namespace 'ur::std'; did you mean '::std::size'?
117 | typename std::enable_if::value, std::size_t>::type length(Type val) {
| ^~~~~~~~~~~
| ::std::size
E:/msys64/mingw64/include/c++/15.1.0/bits/range_access.h:274:5: note: '::std::size' declared here
274 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^
In file included from seedtool.cpp:11:
In file included from ./params.hpp:16:
In file included from E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/bc-ur.hpp:24:
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:117:61: error: no member named 'size_t' in namespace 'ur::std'
117 | typename std::enable_if::value, std::size_t>::type length(Type val) {
| ~~~~~^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:119:10: error: no type named 'size_t' in namespace 'ur::std'; did you mean simply 'size_t'?
119 | for (std::size_t i = 1; i <= ((sizeof val) >> 1); i <<= 1) {
| ^~~~~~~~~~~
| size_t
E:/msys64/mingw64/lib/clang/20/include/__stddef_size_t.h:18:23: note: 'size_t' declared here
18 | typedef __SIZE_TYPE__ size_t;
| ^
In file included from seedtool.cpp:11:
In file included from ./params.hpp:16:
In file included from E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/bc-ur.hpp:24:
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:126:10: error: no template named 'enable_if' in namespace 'ur::std'; did you mean '::std::enable_if'?
126 | typename std::enable_if::value, std::size_t>::type encodeTagAndAdditional(
| ^~~~~~~~~~~~~~
| ::std::enable_if
E:/msys64/mingw64/include/c++/15.1.0/type_traits:133:12: note: '::std::enable_if' declared here
133 | struct enable_if
| ^
In file included from seedtool.cpp:11:
In file included from ./params.hpp:16:
In file included from E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/bc-ur.hpp:24:
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:126:25: error: no template named 'is_class' in namespace 'ur::std'; did you mean '::std::is_class'?
126 | typename std::enable_if::value, std::size_t>::type encodeTagAndAdditional(
| ^~~~~~~~~~~~~
| ::std::is_class
E:/msys64/mingw64/include/c++/15.1.0/type_traits:654:12: note: '::std::is_class' declared here
654 | struct is_class
| ^
In file included from seedtool.cpp:11:
In file included from ./params.hpp:16:
In file included from E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/bc-ur.hpp:24:
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:126:55: error: no template named 'size_t' in namespace 'ur::std'; did you mean '::std::size'?
126 | typename std::enable_if::value, std::size_t>::type encodeTagAndAdditional(
| ^~~~~~~~~~~
| ::std::size
E:/msys64/mingw64/include/c++/15.1.0/bits/range_access.h:274:5: note: '::std::size' declared here
274 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^
In file included from seedtool.cpp:11:
In file included from ./params.hpp:16:
In file included from E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/bc-ur.hpp:24:
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:126:60: error: no member named 'size_t' in namespace 'ur::std'
126 | typename std::enable_if::value, std::size_t>::type encodeTagAndAdditional(
| ~~~~~^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:133:10: error: no template named 'enable_if' in namespace 'ur::std'; did you mean '::std::enable_if'?
133 | typename std::enable_if::value, std::size_t>::type decodeTagAndAdditional(
| ^~~~~~~~~~~~~~
| ::std::enable_if
E:/msys64/mingw64/include/c++/15.1.0/type_traits:133:12: note: '::std::enable_if' declared here
133 | struct enable_if
| ^
In file included from seedtool.cpp:11:
In file included from ./params.hpp:16:
In file included from E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/bc-ur.hpp:24:
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:133:25: error: no template named 'is_class' in namespace 'ur::std'; did you mean '::std::is_class'?
133 | typename std::enable_if::value, std::size_t>::type decodeTagAndAdditional(
| ^~~~~~~~~~~~~
| ::std::is_class
E:/msys64/mingw64/include/c++/15.1.0/type_traits:654:12: note: '::std::is_class' declared here
654 | struct is_class
| ^
In file included from seedtool.cpp:11:
In file included from ./params.hpp:16:
In file included from E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/bc-ur.hpp:24:
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:133:62: error: no template named 'size_t' in namespace 'ur::std'; did you mean '::std::size'?
133 | typename std::enable_if::value, std::size_t>::type decodeTagAndAdditional(
| ^~~~~~~~~~~
| ::std::size
E:/msys64/mingw64/include/c++/15.1.0/bits/range_access.h:274:5: note: '::std::size' declared here
274 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^
In file included from seedtool.cpp:11:
In file included from ./params.hpp:16:
In file included from E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/bc-ur.hpp:24:
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:133:67: error: no member named 'size_t' in namespace 'ur::std'
133 | typename std::enable_if::value, std::size_t>::type decodeTagAndAdditional(
| ~~~~~^
E:/msys64/home/seedtool-cli/sysroot/include/bc-ur/cbor-lite.hpp:143:10: error: no template named 'enable_if' in namespace 'ur::std'; did you mean '::std::enable_if'?
143 | typename std::enable_if::value && std::is_unsigned::value, std::size_t>::type encodeTagAndValue(
| ^~~~~~~~~~~~~~
| ::std::enable_if
E:/msys64/mingw64/include/c++/15.1.0/type_traits:133:12: note: '::std::enable_if' declared here
133 | struct enable_if
| ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[1]: *** [: seedtool.o] Error 1
make[1]: Leaving directory '/home/seedtool-cli/src'
make: *** [Makefile:38: check] Error 2
```
I'm attaching also the log file for the build with the change: [build2.log](https://github.com/user-attachments/files/20403256/build2.log)
Hướng dẫn đóng góp
Hướng nghiên cứu
Tái hiện bản build MSYS Windows bằng lệnh được hiển thị trong issue và kiểm tra cbor-lite.hpp đến params.hpp cùng seedtool.cpp. Kiểm tra target của Makefile ở dòng 38 và build log đính kèm để nắm đầy đủ ngữ cảnh của lỗi; được xem là hoàn thành khi make check biên dịch thành công trên Windows 10 mà không có các lỗi namespace đã nêu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- cpp
- Lĩnh vực
- build-system, cli
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 42/100