I was getting a compilation error with the version tagged as 1.0.1:
FAILED: CMakeFiles/picotool.dir/main.cpp.o
/usr/bin/x86_64-pc-linux-gnu-g++ -DPICO_BUILD=1 -DPICO_NO_HARDWARE=1 -DPICO_ON_DEVICE=0 -I/usr/include/libusb-1.0 -I/opt/raspberrypi/pico-sdk/src/common/pico_binary_info/include -I/opt/raspberrypi/pico-sdk/src/common/boot_uf2/include -I/opt/raspberrypi/pico-sdk/src/common/boot_picoboot/include -I/opt/raspberrypi/pico-sdk/src/host/pico_platform/include -I/var/tmp/portage/dev-embedded/picotool-1.0.1/work/picotool-1.0.1/picoboot_connection -march=sandybridge -O2 -pipe -fomit-frame-pointer -std=gnu++14 -MD -MT CMakeFiles/picotool.dir/main.cpp.o -MF CMakeFiles/picotool.dir/main.cpp.o.d -o CMakeFiles/picotool.dir/main.cpp.o -c /var/tmp/portage/dev-embedded/picotool-1.0.1/work/picotool-1.0.1/main.cpp
In file included from /var/tmp/portage/dev-embedded/picotool-1.0.1/work/picotool-1.0.1/main.cpp:11:
/var/tmp/portage/dev-embedded/picotool-1.0.1/work/picotool-1.0.1/cli.h: In member function 'D& cli::matchable_derived<T>::repeatable()':
/var/tmp/portage/dev-embedded/picotool-1.0.1/work/picotool-1.0.1/cli.h:257:25: error: 'numeric_limits' is not a member of 'std'
257 | _max = std::numeric_limits<int>::max();
| ^~~~~~~~~~~~~~
/var/tmp/portage/dev-embedded/picotool-1.0.1/work/picotool-1.0.1/cli.h:257:40: error: expected primary-expression before 'int'
257 | _max = std::numeric_limits<int>::max();
| ^~~
/var/tmp/portage/dev-embedded/picotool-1.0.1/work/picotool-1.0.1/cli.h: At global scope:
/var/tmp/portage/dev-embedded/picotool-1.0.1/work/picotool-1.0.1/cli.h:444:31: error: 'numeric_limits' is not a member of 'std'
444 | int _max_value = std::numeric_limits<int>::max();
| ^~~~~~~~~~~~~~
/var/tmp/portage/dev-embedded/picotool-1.0.1/work/picotool-1.0.1/cli.h:444:46: error: expected primary-expression before 'int'
444 | int _max_value = std::numeric_limits<int>::max();
| ^~~
/var/tmp/portage/dev-embedded/picotool-1.0.1/work/picotool-1.0.1/cli.h: In lambda function:
/var/tmp/portage/dev-embedded/picotool-1.0.1/work/picotool-1.0.1/cli.h:408:36: error: 'numeric_limits' is not a member of 'std'
408 | long lvalue = std::numeric_limits<long>::max();
| ^~~~~~~~~~~~~~
/var/tmp/portage/dev-embedded/picotool-1.0.1/work/picotool-1.0.1/cli.h:408:51: error: expected primary-expression before 'long'
408 | long lvalue = std::numeric_limits<long>::max();
| ^~~~
/var/tmp/portage/dev-embedded/picotool-1.0.1/work/picotool-1.0.1/cli.h: At global scope:
/var/tmp/portage/dev-embedded/picotool-1.0.1/work/picotool-1.0.1/cli.h:500:40: error: 'numeric_limits' is not a member of 'std'
500 | unsigned int _max_value = std::numeric_limits<unsigned int>::max();
| ^~~~~~~~~~~~~~
/var/tmp/portage/dev-embedded/picotool-1.0.1/work/picotool-1.0.1/cli.h:500:55: error: expected primary-expression before 'unsigned'
500 | unsigned int _max_value = std::numeric_limits<unsigned int>::max();
| ^~~~~~~~
/var/tmp/portage/dev-embedded/picotool-1.0.1/work/picotool-1.0.1/cli.h: In lambda function:
/var/tmp/portage/dev-embedded/picotool-1.0.1/work/picotool-1.0.1/cli.h:460:36: error: 'numeric_limits' is not a member of 'std'
460 | long lvalue = std::numeric_limits<long>::max();
| ^~~~~~~~~~~~~~
/var/tmp/portage/dev-embedded/picotool-1.0.1/work/picotool-1.0.1/cli.h:460:51: error: expected primary-expression before 'long'
460 | long lvalue = std::numeric_limits<long>::max();
| ^~~~
The fix was to #include <limits> in cli.h, so I'm sending this as a PR :)
I was getting a compilation error with the version tagged as 1.0.1:
The fix was to
#include <limits>
in cli.h, so I'm sending this as a PR :)pico-sdk is v1.1.2 and gcc is: