You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i try to compile dabnn and its third part code on jetson nano ubuntu16.04(arm-noAndroid),
cmake .. is all right
when i come to “cmake --build .” ,i got some errors about benchmark code:
In file included from /home/t/project_win/02_190731_BNN/dabnn/benchmark/benchmark_single_model.cpp:3:0:
/home/t/project_win/02_190731_BNN/dabnn/third_party/benchmark/src/../include/benchmark/benchmark.h: In instantiation of ‘benchmark::RegisterBenchmark(const char*, Lambda&&, Args&& ...)::<lambda(benchmark::State&)> [with Lambda = void (&)(benchmark::State&, std::__cxx11::basic_string); Args = {char*&}]’:
/home/t/project_win/02_190731_BNN/dabnn/third_party/benchmark/src/../include/benchmark/benchmark.h:1053:48: required from ‘struct benchmark::RegisterBenchmark(const char*, Lambda&&, Args&& ...) [with Lambda = void (&)(benchmark::State&, std::__cxx11::basic_string); Args = {char*&}]::<lambda(class benchmark::State&)>’
/home/t/project_win/02_190731_BNN/dabnn/third_party/benchmark/src/../include/benchmark/benchmark.h:1052:38: required from ‘benchmark::internal::Benchmark* benchmark::RegisterBenchmark(const char*, Lambda&&, Args&& ...) [with Lambda = void (&)(benchmark::State&, std::__cxx11::basic_string); Args = {char*&}]’/home/t/project_win/02_190731_BNN/dabnn/benchmark/benchmark_single_model.cpp:22:74: required from here
/home/t/project_win/02_190731_BNN/dabnn/third_party/benchmark/src/../include/benchmark/benchmark.h:1053:41: error: variable ‘fn’ has function type
name, [=](benchmark::State& st) { fn(st, args...); });
^~
/home/t/project_win/02_190731_BNN/dabnn/third_party/benchmark/src/../include/benchmark/benchmark.h:1053:41: error: variable ‘fn’ has function type
/home/t/project_win/02_190731_BNN/dabnn/third_party/benchmark/src/../include/benchmark/benchmark.h: In instantiation of ‘struct benchmark::RegisterBenchmark(const char*, Lambda&&, Args&& ...) [with Lambda = void (&)(benchmark::State&, std::__cxx11::basic_string); Args = {char*&}]::<lambda(class benchmark::State&)>’:
/home/t/project_win/02_190731_BNN/dabnn/third_party/benchmark/src/../include/benchmark/benchmark.h:1052:38: required from ‘benchmark::internal::Benchmark* benchmark::RegisterBenchmark(const char*, Lambda&&, Args&& ...) [with Lambda = void (&)(benchmark::State&, std::__cxx11::basic_string); Args = {char*&}]’/home/t/project_win/02_190731_BNN/dabnn/benchmark/benchmark_single_model.cpp:22:74: required from here
/home/t/project_win/02_190731_BNN/dabnn/third_party/benchmark/src/../include/benchmark/benchmark.h:1053:41: error: field ‘benchmark::RegisterBenchmark(const char*, Lambda&&, Args&& ...) [with Lambda = void (&)(benchmark::State&, std::__cxx11::basic_string); Args = {char*&}]::<lambda(benchmark::State&)>::’ invalidly declared function type
/home/t/project_win/02_190731_BNN/dabnn/third_party/benchmark/src/../include/benchmark/benchmark.h:1039:22: warning: ‘benchmark::internal::Benchmark* benchmark::RegisterBenchmark(const char*, Lambda&&) [with Lambda = benchmark::RegisterBenchmark(const char*, Lambda&&, Args&& ...) [with Lambda = void (&)(benchmark::State&, std::__cxx11::basic_string); Args = {char*&}]::<lambda(benchmark::State&)>]’, declared using local type ‘benchmark::RegisterBenchmark(const char*, Lambda&&, Args&& ...) [with Lambda = void (&)(benchmark::State&, std::__cxx11::basic_string); Args = {char*&}]::<lambda(benchmark::State&)>’, is used but never defined [-fpermissive]
internal::Benchmark* RegisterBenchmark(const char* name, Lambda&& fn) {
^~~~~~~~~~~~~~~~~
benchmark/CMakeFiles/benchmark_single_model.dir/build.make:62: recipe for target 'benchmark/CMakeFiles/benchmark_single_model.dir/benchmark_single_model.cpp.o' failed
i tried to add "add_cxx_compiler_flag(-fpermissive)" in benchmark/CMakeLists.txt , and third_part/benchmark/CMakeLists.txt,but got the same error.
I googled it and got close issue on this link: gabime/spdlog#931
tmp solution :
set CMakeLists.txt
option(BNN_BUILD_BENCHMARK "Build benchmark" OFF)
option(BNN_NET_BENCHMARK "define BNN_BENCHMARK" OFF)
rm old cmake files and compile again, it can be compiled completely.
The text was updated successfully, but these errors were encountered:
I have the issue too.I solved it by add '&' before 'BM_single_model' in benchmark_single_model.cpp.
benchmark::RegisterBenchmark("single_model", &BM_single_model, argv[1]);
benchmark complile error
device: jetson nano
os: ubuntu18.04
gcc7.4/g++7.4/cmake3.10.2
when i try to compile dabnn and its third part code on jetson nano ubuntu16.04(arm-noAndroid),
cmake .. is all right
when i come to “cmake --build .” ,i got some errors about benchmark code:
In file included from /home/t/project_win/02_190731_BNN/dabnn/benchmark/benchmark_single_model.cpp:3:0:
/home/t/project_win/02_190731_BNN/dabnn/third_party/benchmark/src/../include/benchmark/benchmark.h: In instantiation of ‘benchmark::RegisterBenchmark(const char*, Lambda&&, Args&& ...)::<lambda(benchmark::State&)> [with Lambda = void (&)(benchmark::State&, std::__cxx11::basic_string); Args = {char*&}]’:
/home/t/project_win/02_190731_BNN/dabnn/third_party/benchmark/src/../include/benchmark/benchmark.h:1053:48: required from ‘struct benchmark::RegisterBenchmark(const char*, Lambda&&, Args&& ...) [with Lambda = void (&)(benchmark::State&, std::__cxx11::basic_string); Args = {char*&}]::<lambda(class benchmark::State&)>’
/home/t/project_win/02_190731_BNN/dabnn/third_party/benchmark/src/../include/benchmark/benchmark.h:1052:38: required from ‘benchmark::internal::Benchmark* benchmark::RegisterBenchmark(const char*, Lambda&&, Args&& ...) [with Lambda = void (&)(benchmark::State&, std::__cxx11::basic_string); Args = {char*&}]’/home/t/project_win/02_190731_BNN/dabnn/benchmark/benchmark_single_model.cpp:22:74: required from here
/home/t/project_win/02_190731_BNN/dabnn/third_party/benchmark/src/../include/benchmark/benchmark.h:1053:41: error: variable ‘fn’ has function type
name, [=](benchmark::State& st) { fn(st, args...); });
^~
/home/t/project_win/02_190731_BNN/dabnn/third_party/benchmark/src/../include/benchmark/benchmark.h:1053:41: error: variable ‘fn’ has function type
/home/t/project_win/02_190731_BNN/dabnn/third_party/benchmark/src/../include/benchmark/benchmark.h: In instantiation of ‘struct benchmark::RegisterBenchmark(const char*, Lambda&&, Args&& ...) [with Lambda = void (&)(benchmark::State&, std::__cxx11::basic_string); Args = {char*&}]::<lambda(class benchmark::State&)>’:
/home/t/project_win/02_190731_BNN/dabnn/third_party/benchmark/src/../include/benchmark/benchmark.h:1052:38: required from ‘benchmark::internal::Benchmark* benchmark::RegisterBenchmark(const char*, Lambda&&, Args&& ...) [with Lambda = void (&)(benchmark::State&, std::__cxx11::basic_string); Args = {char*&}]’/home/t/project_win/02_190731_BNN/dabnn/benchmark/benchmark_single_model.cpp:22:74: required from here
/home/t/project_win/02_190731_BNN/dabnn/third_party/benchmark/src/../include/benchmark/benchmark.h:1053:41: error: field ‘benchmark::RegisterBenchmark(const char*, Lambda&&, Args&& ...) [with Lambda = void (&)(benchmark::State&, std::__cxx11::basic_string); Args = {char*&}]::<lambda(benchmark::State&)>::’ invalidly declared function type
/home/t/project_win/02_190731_BNN/dabnn/third_party/benchmark/src/../include/benchmark/benchmark.h:1039:22: warning: ‘benchmark::internal::Benchmark* benchmark::RegisterBenchmark(const char*, Lambda&&) [with Lambda = benchmark::RegisterBenchmark(const char*, Lambda&&, Args&& ...) [with Lambda = void (&)(benchmark::State&, std::__cxx11::basic_string); Args = {char*&}]::<lambda(benchmark::State&)>]’, declared using local type ‘benchmark::RegisterBenchmark(const char*, Lambda&&, Args&& ...) [with Lambda = void (&)(benchmark::State&, std::__cxx11::basic_string); Args = {char*&}]::<lambda(benchmark::State&)>’, is used but never defined [-fpermissive]
internal::Benchmark* RegisterBenchmark(const char* name, Lambda&& fn) {
^~~~~~~~~~~~~~~~~
benchmark/CMakeFiles/benchmark_single_model.dir/build.make:62: recipe for target 'benchmark/CMakeFiles/benchmark_single_model.dir/benchmark_single_model.cpp.o' failed
i tried to add "add_cxx_compiler_flag(-fpermissive)" in benchmark/CMakeLists.txt , and third_part/benchmark/CMakeLists.txt,but got the same error.
I googled it and got close issue on this link: gabime/spdlog#931
tmp solution :
set CMakeLists.txt
option(BNN_BUILD_BENCHMARK "Build benchmark" OFF)
option(BNN_NET_BENCHMARK "define BNN_BENCHMARK" OFF)
rm old cmake files and compile again, it can be compiled completely.
The text was updated successfully, but these errors were encountered: