Closed tersup closed 4 years ago
Confirmed on Ubuntu and Raspbian
#include <algorithm>
needs to be added to main.cpp and img4tool.cpp
config.log
This is Ubuntu's log!
make all-recursive
make[1]: Entering directory '/ReRa1n/rerain-deps/img4tool'
Making all in img4tool
make[2]: Entering directory '/ReRa1n/rerain-deps/img4tool/img4tool'
/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/include -I/usr/local/include -g -O2 -std=c++11 -MT libimg4tool_la-img4tool.lo -MD -MP -MF .deps/libimg4tool_la-img4tool.Tpo -c -o libimg4tool_la-img4tool.lo test -f 'img4tool.cpp' || echo './'
img4tool.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/include -I/usr/local/include -g -O2 -std=c++11 -MT libimg4tool_la-img4tool.lo -MD -MP -MF .deps/libimg4tool_la-img4tool.Tpo -c img4tool.cpp -fPIC -DPIC -o .libs/libimg4tool_la-img4tool.o
img4tool.cpp:34:2: warning: #warning TODO adjust this for HAVE_COMMCRYPTO [-Wcpp]
^~~
img4tool.cpp:753:22: warning: multi-character character constant [-Wmultichar]
case 'TSGD': //DGST
^~
img4tool.cpp:781:51: warning: multi-character character constant [-Wmultichar]
ASN1DERElement bnch = getValFromIM4M(im4m,'BNCH');
^~
img4tool.cpp:921:40: warning: multi-character character constant [-Wmultichar]
assure(ptagVal == htonl('BNCN'));
^
img4tool.cpp:922:77: warning: multi-character character constant [-Wmultichar]
assure((uint32_t)ptag[0].getStringValue().c_str() == htonl('BNCN'));
^
img4tool.cpp:1041:22: warning: multi-character character constant [-Wmultichar]
case 'DROB': //BORD
^~
img4tool.cpp:1045:22: warning: multi-character character constant [-Wmultichar]
case 'PIHC': //CHIP
^~
img4tool.cpp:1049:22: warning: multi-character character constant [-Wmultichar]
case 'MODS': //SDOM
^~
img4tool.cpp:1167:30: warning: multi-character character constant [-Wmultichar]
case 'TSGD': //DGST
^~
img4tool.cpp: In function ‘void tihmstar::img4tool::printKBAG(const void*, size_t)’:
img4tool.cpp:90:64: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
printf("num: %llu\n",elem.getIntegerValue());
img4tool.cpp: In function ‘void tihmstar::img4tool::printIMG4(const void*, size_t, bool, bool)’:
img4tool.cpp:312:30: error: ‘reverse’ is not a member of ‘std’
std::reverse(octetString.begin(), octetString.end());
^~~~~~~
img4tool.cpp: In function ‘void tihmstar::img4tool::printIM4P(const void*, size_t)’:
img4tool.cpp:383:89: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
printf("Uncompressed size: 0x%08llx\n",sizeTag.getIntegerValue());
~~~~~~~~~~~~~~~~~~~~~~~~~^
img4tool.cpp: In function ‘void tihmstar::img4tool::printIM4M(const void*, size_t, bool)’:
img4tool.cpp:414:67: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
printf("Version: %llu\n",tag.getIntegerValue());
~~~~~~~~~~~~~~~~~~~~~^
img4tool.cpp: In function ‘bool tihmstar::img4tool::isGeneratorValidForIM4M(const tihmstar::img4tool::ASN1DERElement&, std::__cxx11::string)’:
img4tool.cpp:784:51: warning: format ‘%llx’ expects argument of type ‘long long unsigned int*’, but argument 3 has type ‘uint64_t* {aka long unsigned int*}’ [-Wformat=]
sscanf(generator.c_str(), "0x%16llx", &gen);
~~~~^
img4tool.cpp: In function ‘bool tihmstar::img4tool::doesIM4MBoardMatchBuildIdentity(const tihmstar::img4tool::ASN1DERElement&, plist_t)’:
img4tool.cpp:1059:46: warning: format ‘%llx’ expects argument of type ‘long long unsigned int*’, but argument 3 has type ‘uint64_t* {aka long unsigned int*}’ [-Wformat=]
sscanf(pstrval, "0x%llx",&val);
~~~~^
img4tool.cpp:1061:44: warning: format ‘%lld’ expects argument of type ‘long long int*’, but argument 3 has type ‘uint64_t* {aka long unsigned int*}’ [-Wformat=]
sscanf(pstrval, "%lld",&val);
~~~~^
Makefile:592: recipe for target 'libimg4tool_la-img4tool.lo' failed
make[2]: *** [libimg4tool_la-img4tool.lo] Error 1
make[2]: Leaving directory '/ReRa1n/rerain-deps/img4tool/img4tool'
Makefile:481: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/ReRa1n/rerain-deps/img4tool'
Makefile:388: recipe for target 'all' failed
make: *** [all] Error 2
./autogen.sh checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... x86_64-pc-linux-gnu checking how to print strings... printf checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking for a sed that does not truncate output... /bin/sed checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking for gawk... no checking for mawk... mawk checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for mt... mt checking if mt is a manifest tool... no checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking whether make supports nested variables... yes checking dependency style of gcc... gcc3 checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for ld used by g++... /usr/bin/ld -m elf_x86_64 checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC -DPIC checking if g++ PIC flag -fPIC -DPIC works... yes checking if g++ static flag -static works... yes checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking dependency style of g++... gcc3 checking for gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking whether gcc understands -c and -o together... (cached) yes checking whether we need platform-specific build settings... checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for openssl... yes checking for libplist... yes checking for libgeneral... yes checking arpa/inet.h usability... yes checking arpa/inet.h presence... yes checking for arpa/inet.h... yes checking for stdint.h... (cached) yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for unistd.h... (cached) yes checking for compression_decode_buffer in -lcompression... no checking for lzfse_decode_buffer in -llzfse... yes checking for stdbool.h that conforms to C99... yes checking for _Bool... yes checking for size_t... yes checking for uint32_t... yes checking for uint64_t... yes checking for uint8_t... yes checking for memmem... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating include/Makefile config.status: creating libimg4tool.pc config.status: creating include/img4tool/img4tool.hpp config.status: creating img4tool/Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing libtool commands config.status: executing depfiles commands
install prefix ..........: /usr/local have plist ..............: yes crypto backend ..........: openssl compiler ................: gcc
Now type 'make' to build img4tool-168, and then 'make install' for installation.
should be fixed in https://github.com/tihmstar/img4tool/pull/32
Error at compile time!
make all-recursive make[1]: Entering directory '/home/tersup/Downloads/img4tool' Making all in img4tool make[2]: Entering directory '/home/tersup/Downloads/img4tool/img4tool' g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/include -I/usr/local/include -g -O2 -std=c++11 -MT img4tool-main.o -MD -MP -MF .deps/img4tool-main.Tpo -c -o img4tool-main.o
test -f 'main.cpp' || echo './'
main.cpp main.cpp: In function ‘int main_r(int, const char)’: main.cpp:384:12: error: ‘reverse’ is not a member of ‘std’ 384 | std::reverse(octetString.begin(), octetString.end()); | ^~~ make[2]: ** [Makefile:609: img4tool-main.o] Error 1 make[2]: Leaving directory '/home/tersup/Downloads/img4tool/img4tool' make[1]: [Makefile:481: all-recursive] Error 1 make[1]: Leaving directory '/home/tersup/Downloads/img4tool' make: *** [Makefile:388: all] Error 2config.log