Install torchvision for c++ on Jetson Nano - c++
I want to use torchvision c++ on my Jetson Nano (Jetpack 4.5).
I need only torchvision::ops::nms function from torchvision. If you can give source codes of that function or an alternative implementation of that function with torch (c++) please share, and installation will not be required any more.
I have tried MANY ways to install, but haven't succeed yet.
For example I tried https://www.neuralception.com/settingupopencv/ this approach, but getting this error while running make and can't solve it.
[ 2%] Building CXX object CMakeFiles/torchvision.dir/torchvision/csrc/io/image/cpu/common_jpeg.cpp.o
[ 5%] Building CXX object CMakeFiles/torchvision.dir/torchvision/csrc/io/image/cpu/decode_image.cpp.o
In file included from /usr/include/c++/7/bits/stl_algobase.h:59:0,
from /usr/include/c++/7/memory:62,
from /home/jets/Desktop/project/torch/include/c10/core/Allocator.h:4,
from /home/jets/Desktop/project/torch/include/ATen/ATen.h:7,
from /home/jets/Desktop/project/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.cpp:1:
/usr/include/aarch64-linux-gnu/c++/7/bits/c++config.h:250:27: error: #if with no expression
#if _GLIBCXX_USE_CXX11_ABI
^
/usr/include/aarch64-linux-gnu/c++/7/bits/c++config.h:438:27: error: #if with no expression
#if _GLIBCXX_USE_CXX11_ABI
^
In file included from /usr/include/c++/7/bits/stl_algobase.h:59:0,
from /usr/include/c++/7/memory:62,
from /home/jets/Desktop/project/torch/include/c10/core/Allocator.h:4,
from /home/jets/Desktop/project/torch/include/ATen/ATen.h:7,
from /home/jets/Desktop/project/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.cpp:1:
/usr/include/aarch64-linux-gnu/c++/7/bits/c++config.h:563:3: error: operator '&&' has no right operand
&& _GLIBCXX_USE_DUAL_ABI && __cpp_transactional_memory >= 201505L \
^~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/memory:62,
from /home/jets/Desktop/project/torch/include/c10/core/Allocator.h:4,
from /home/jets/Desktop/project/torch/include/ATen/ATen.h:7,
from /home/jets/Desktop/project/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.cpp:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:107:27: error: #if with no expression
#if _GLIBCXX_USE_CXX11_ABI
^
In file included from /usr/include/c++/7/string:52:0,
from /usr/include/c++/7/stdexcept:39,
from /usr/include/c++/7/array:39,
from /usr/include/c++/7/tuple:39,
from /usr/include/c++/7/bits/unique_ptr.h:37,
from /usr/include/c++/7/memory:80,
from /home/jets/Desktop/project/torch/include/c10/core/Allocator.h:4,
from /home/jets/Desktop/project/torch/include/ATen/ATen.h:7,
from /home/jets/Desktop/project/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.cpp:1:
/usr/include/c++/7/bits/basic_string.h:56:27: error: #if with no expression
#if _GLIBCXX_USE_CXX11_ABI
^
In file included from /usr/include/c++/7/string:53:0,
from /usr/include/c++/7/stdexcept:39,
from /usr/include/c++/7/array:39,
from /usr/include/c++/7/tuple:39,
from /usr/include/c++/7/bits/unique_ptr.h:37,
from /usr/include/c++/7/memory:80,
from /home/jets/Desktop/project/torch/include/c10/core/Allocator.h:4,
from /home/jets/Desktop/project/torch/include/ATen/ATen.h:7,
from /home/jets/Desktop/project/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.cpp:1:
/usr/include/c++/7/bits/basic_string.tcc:50:27: error: #if with no expression
#if _GLIBCXX_USE_CXX11_ABI
^
In file included from /usr/include/c++/7/array:39:0,
from /usr/include/c++/7/tuple:39,
from /usr/include/c++/7/bits/unique_ptr.h:37,
from /usr/include/c++/7/memory:80,
from /home/jets/Desktop/project/torch/include/c10/core/Allocator.h:4,
from /home/jets/Desktop/project/torch/include/ATen/ATen.h:7,
from /home/jets/Desktop/project/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.cpp:1:
/usr/include/c++/7/stdexcept:46:27: error: #if with no expression
#if _GLIBCXX_USE_CXX11_ABI
^
/usr/include/c++/7/stdexcept:127:28: error: operator '||' has no left operand
#if _GLIBCXX_USE_CXX11_ABI || _GLIBCXX_DEFINE_STDEXCEPT_COPY_OPS
^~
/usr/include/c++/7/stdexcept:211:28: error: operator '||' has no left operand
#if _GLIBCXX_USE_CXX11_ABI || _GLIBCXX_DEFINE_STDEXCEPT_COPY_OPS
^~
In file included from /usr/include/c++/7/bits/ios_base.h:41:0,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /home/jets/Desktop/project/torch/include/c10/macros/Macros.h:228,
from /home/jets/Desktop/project/torch/include/c10/core/DeviceType.h:8,
from /home/jets/Desktop/project/torch/include/c10/core/Device.h:3,
from /home/jets/Desktop/project/torch/include/c10/core/Allocator.h:6,
from /home/jets/Desktop/project/torch/include/ATen/ATen.h:7,
from /home/jets/Desktop/project/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.cpp:1:
/usr/include/c++/7/bits/locale_classes.h:354:27: error: #if with no expression
#if _GLIBCXX_USE_CXX11_ABI
^
In file included from /usr/include/c++/7/bits/ios_base.h:46:0,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /home/jets/Desktop/project/torch/include/c10/macros/Macros.h:228,
from /home/jets/Desktop/project/torch/include/c10/core/DeviceType.h:8,
from /home/jets/Desktop/project/torch/include/c10/core/Device.h:3,
from /home/jets/Desktop/project/torch/include/c10/core/Allocator.h:6,
from /home/jets/Desktop/project/torch/include/ATen/ATen.h:7,
from /home/jets/Desktop/project/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.cpp:1:
/usr/include/c++/7/system_error:91:27: error: #if with no expression
#if _GLIBCXX_USE_CXX11_ABI
^
In file included from /usr/include/c++/7/ios:42:0,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /home/jets/Desktop/project/torch/include/c10/macros/Macros.h:228,
from /home/jets/Desktop/project/torch/include/c10/core/DeviceType.h:8,
from /home/jets/Desktop/project/torch/include/c10/core/Device.h:3,
from /home/jets/Desktop/project/torch/include/c10/core/Allocator.h:6,
from /home/jets/Desktop/project/torch/include/ATen/ATen.h:7,
from /home/jets/Desktop/project/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.cpp:1:
/usr/include/c++/7/bits/ios_base.h:230:27: error: #if with no expression
#if _GLIBCXX_USE_CXX11_ABI
^
/usr/include/c++/7/bits/ios_base.h:254:27: error: #if with no expression
#if _GLIBCXX_USE_CXX11_ABI
^
In file included from /home/jets/Desktop/project/torch/include/c10/macros/Macros.h:228:0,
from /home/jets/Desktop/project/torch/include/c10/core/DeviceType.h:8,
from /home/jets/Desktop/project/torch/include/c10/core/Device.h:3,
from /home/jets/Desktop/project/torch/include/c10/core/Allocator.h:6,
from /home/jets/Desktop/project/torch/include/ATen/ATen.h:7,
from /home/jets/Desktop/project/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.cpp:1:
/usr/include/c++/7/sstream:297:27: error: #if with no expression
#if _GLIBCXX_USE_CXX11_ABI
^
In file included from /usr/include/c++/7/sstream:826:0,
from /home/jets/Desktop/project/torch/include/c10/macros/Macros.h:228,
from /home/jets/Desktop/project/torch/include/c10/core/DeviceType.h:8,
from /home/jets/Desktop/project/torch/include/c10/core/Device.h:3,
from /home/jets/Desktop/project/torch/include/c10/core/Allocator.h:6,
from /home/jets/Desktop/project/torch/include/ATen/ATen.h:7,
from /home/jets/Desktop/project/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.cpp:1:
/usr/include/c++/7/bits/sstream.tcc:92:27: error: #if with no expression
#if _GLIBCXX_USE_CXX11_ABI
^
In file included from /usr/include/c++/7/locale:41:0,
from /usr/include/c++/7/iomanip:43,
from /home/jets/Desktop/project/torch/include/c10/util/logging_is_not_google_glog.h:8,
from /home/jets/Desktop/project/torch/include/c10/util/Logging.h:28,
from /home/jets/Desktop/project/torch/include/c10/core/TensorImpl.h:19,
from /home/jets/Desktop/project/torch/include/ATen/core/TensorBody.h:14,
from /home/jets/Desktop/project/torch/include/ATen/Tensor.h:3,
from /home/jets/Desktop/project/torch/include/ATen/Context.h:4,
from /home/jets/Desktop/project/torch/include/ATen/ATen.h:9,
from /home/jets/Desktop/project/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.cpp:1:
/usr/include/c++/7/bits/locale_facets_nonio.h:719:27: error: #if with no expression
#if _GLIBCXX_USE_CXX11_ABI
^
/usr/include/c++/7/bits/locale_facets_nonio.h:1567:33: error: operator '&&' has no right operand
&& _GLIBCXX_USE_CXX11_ABI == 0
^~
/usr/include/c++/7/bits/locale_facets_nonio.h:1590:33: error: operator '&&' has no right operand
&& _GLIBCXX_USE_CXX11_ABI == 0
^~
/usr/include/c++/7/bits/locale_facets_nonio.h:1712:33: error: operator '&&' has no right operand
&& _GLIBCXX_USE_CXX11_ABI == 0
^~
/usr/include/c++/7/bits/locale_facets_nonio.h:1747:33: error: operator '&&' has no right operand
&& _GLIBCXX_USE_CXX11_ABI == 0
^~
In file included from /usr/include/c++/7/bits/locale_facets_nonio.h:2013:0,
from /usr/include/c++/7/locale:41,
from /usr/include/c++/7/iomanip:43,
from /home/jets/Desktop/project/torch/include/c10/util/logging_is_not_google_glog.h:8,
from /home/jets/Desktop/project/torch/include/c10/util/Logging.h:28,
from /home/jets/Desktop/project/torch/include/c10/core/TensorImpl.h:19,
from /home/jets/Desktop/project/torch/include/ATen/core/TensorBody.h:14,
from /home/jets/Desktop/project/torch/include/ATen/Tensor.h:3,
from /home/jets/Desktop/project/torch/include/ATen/Context.h:4,
from /home/jets/Desktop/project/torch/include/ATen/ATen.h:9,
from /home/jets/Desktop/project/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.cpp:1:
/usr/include/c++/7/bits/locale_facets_nonio.tcc:352:33: error: operator '&&' has no right operand
&& _GLIBCXX_USE_CXX11_ABI == 0
^~
/usr/include/c++/7/bits/locale_facets_nonio.tcc:564:33: error: operator '&&' has no right operand
&& _GLIBCXX_USE_CXX11_ABI == 0
^~
In file included from /usr/include/c++/7/list:63:0,
from /home/jets/Desktop/project/torch/include/ATen/core/dispatch/OperatorEntry.h:17,
from /home/jets/Desktop/project/torch/include/ATen/core/dispatch/Dispatcher.h:6,
from /home/jets/Desktop/project/torch/include/torch/csrc/jit/runtime/operator.h:6,
from /home/jets/Desktop/project/torch/include/torch/csrc/jit/ir/ir.h:7,
from /home/jets/Desktop/project/torch/include/torch/csrc/jit/api/function_impl.h:4,
from /home/jets/Desktop/project/torch/include/torch/csrc/jit/api/method.h:7,
from /home/jets/Desktop/project/torch/include/torch/csrc/jit/api/object.h:6,
from /home/jets/Desktop/project/torch/include/torch/csrc/jit/frontend/tracer.h:9,
from /home/jets/Desktop/project/torch/include/torch/csrc/autograd/generated/variable_factories.h:12,
from /home/jets/Desktop/project/torch/include/torch/csrc/api/include/torch/types.h:7,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.cpp:1:
/usr/include/c++/7/bits/stl_list.h:326:27: error: #if with no expression
#if _GLIBCXX_USE_CXX11_ABI
^
/usr/include/c++/7/bits/stl_list.h:349:27: error: #if with no expression
#if _GLIBCXX_USE_CXX11_ABI
^
/usr/include/c++/7/bits/stl_list.h:1886:27: error: #if with no expression
#if _GLIBCXX_USE_CXX11_ABI
^
/usr/include/c++/7/bits/stl_list.h:1955:27: error: #if with no expression
#if _GLIBCXX_USE_CXX11_ABI
^
In file included from /usr/include/c++/7/list:64:0,
from /home/jets/Desktop/project/torch/include/ATen/core/dispatch/OperatorEntry.h:17,
from /home/jets/Desktop/project/torch/include/ATen/core/dispatch/Dispatcher.h:6,
from /home/jets/Desktop/project/torch/include/torch/csrc/jit/runtime/operator.h:6,
from /home/jets/Desktop/project/torch/include/torch/csrc/jit/ir/ir.h:7,
from /home/jets/Desktop/project/torch/include/torch/csrc/jit/api/function_impl.h:4,
from /home/jets/Desktop/project/torch/include/torch/csrc/jit/api/method.h:7,
from /home/jets/Desktop/project/torch/include/torch/csrc/jit/api/object.h:6,
from /home/jets/Desktop/project/torch/include/torch/csrc/jit/frontend/tracer.h:9,
from /home/jets/Desktop/project/torch/include/torch/csrc/autograd/generated/variable_factories.h:12,
from /home/jets/Desktop/project/torch/include/torch/csrc/api/include/torch/types.h:7,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.h:3,
from /home/jets/Desktop/project/vision/torchvision/csrc/io/image/cpu/decode_image.cpp:1:
/usr/include/c++/7/bits/list.tcc:178:27: error: #if with no expression
#if _GLIBCXX_USE_CXX11_ABI
^
CMakeFiles/torchvision.dir/build.make:89: recipe for target 'CMakeFiles/torchvision.dir/torchvision/csrc/io/image/cpu/decode_image.cpp.o' failed
make[2]: *** [CMakeFiles/torchvision.dir/torchvision/csrc/io/image/cpu/decode_image.cpp.o] Error 1
CMakeFiles/Makefile2:82: recipe for target 'CMakeFiles/torchvision.dir/all' failed
make[1]: *** [CMakeFiles/torchvision.dir/all] Error 2
Makefile:135: recipe for target 'all' failed
make: *** [all] Error 2
Changed the compiler, tried multiple other things but still cant fix this.
Tried to install torchvision for python and link libs in cmake (worked for libtorch installation), but there is no "include" or "libs" directories in torchvision directory.
Tried to install with this instructions, but when I'm running sudo -H pip3 install torchvision-0.11.0a0+fa347eb-cp36-cp36m-linux_aarch64.whl it says "No module named Cython", but I have cython installed, then it tries to build numpy from source and again fails (I have numpy installed).
And that's not all, tried millions of other ways but still stuck (even googled in Chinese).
Please, if you know something that can help, please say.
Related
Failure building protoc/zlib when using custom c++ toolchain
My goal here is simple: I want a custom c++ toolchain where I can specify my own compilers and compiler options. I have boiled down my current issue into a contrived example repo here: http://github.com/btmcg/bazel_toolchain I followed the tutorial described at https://docs.bazel.build/versions/main/tutorial/cc-toolchain-config.html to use my custom built version of gcc. This seems to work okay until I add a cc_proto_library. Bazel appears to use my custom toolchain to build protoc/zlib and errors out because of the warning flags I have in my custom toolchain. I was under the impression that --host_crosstool_top=#bazel_tools//tools/cpp:toolchain would tell Bazel to ignore my custom toolchain, however that doesn't seem to be the case. I would expect it to use /bin/gcc and not my custom gcc or warnings. Any help would be appreciated Here is where the build currently fails: $ bazel build --config=gcc_config //main:hello-world --verbose_failures INFO: Analyzed target //main:hello-world (0 packages loaded, 0 targets configured). INFO: Found 1 target... ERROR: /home/brian/.cache/bazel/_bazel_brian/2fc228b5a7b1bf0ef87f3ee9353aa72d/external/com_google_protobuf/BUILD:155:11: Compiling src/google/protobuf/extension_set.cc failed: (Exit 1): gcc failed: error executing command (cd /home/brian/.cache/bazel/_bazel_brian/2fc228b5a7b1bf0ef87f3ee9353aa72d/sandbox/linux-sandbox/404/execroot/__main__ && \ exec env - \ LD_LIBRARY_PATH=/home/brian/.local/lib64:/home/brian/.local/lib \ PATH=/home/brian/.local/tools/bazel/4.2.2/bin:/home/brian/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl \ PWD=/proc/self/cwd \ /opt/custom/gcc/11.2.0/bin/gcc -MD -MF bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_objs/protobuf_lite/extension_set.d '-frandom-seed=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_objs/protobuf_lite/extension_set.o' -iquote external/com_google_protobuf -iquote bazel-out/k8-fastbuild/bin/external/com_google_protobuf -isystem external/com_google_protobuf/src -isystem bazel-out/k8-fastbuild/bin/external/com_google_protobuf/src -xc++ -Werror -Wswitch-default -DHAVE_ZLIB -Wmissing-field-initializers -Woverloaded-virtual -Wno-sign-compare -c external/com_google_protobuf/src/google/protobuf/extension_set.cc -o bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_objs/protobuf_lite/extension_set.o) Execution platform: #local_config_platform//:host Use --sandbox_debug to see verbose messages from the sandbox external/com_google_protobuf/src/google/protobuf/extension_set.cc: In function 'bool google::protobuf::internal::{anonymous}::is_packable(google::protobuf::internal::WireFormatLite::WireType)': external/com_google_protobuf/src/google/protobuf/extension_set.cc:72:10: error: switch missing default case [-Werror=switch-default] 72 | switch (type) { | ^ external/com_google_protobuf/src/google/protobuf/extension_set.cc: In member function 'void* google::protobuf::internal::ExtensionSet::MutableRawRepeatedField(int, google::protobuf::internal::FieldType, bool, const google::protobuf::FieldDescriptor*)': external/com_google_protobuf/src/google/protobuf/extension_set.cc:419:12: error: switch missing default case [-Werror=switch-default] 419 | switch (WireFormatLite::FieldTypeToCppType( | ^ external/com_google_protobuf/src/google/protobuf/extension_set.cc: In member function 'void google::protobuf::internal::ExtensionSet::RemoveLast(int)': external/com_google_protobuf/src/google/protobuf/extension_set.cc:855:10: error: switch missing default case [-Werror=switch-default] 855 | switch (cpp_type(extension->type)) { | ^ external/com_google_protobuf/src/google/protobuf/extension_set.cc: In member function 'void google::protobuf::internal::ExtensionSet::SwapElements(int, int, int)': external/com_google_protobuf/src/google/protobuf/extension_set.cc:910:10: error: switch missing default case [-Werror=switch-default] 910 | switch (cpp_type(extension->type)) { | ^ external/com_google_protobuf/src/google/protobuf/extension_set.cc: In member function 'void google::protobuf::internal::ExtensionSet::InternalExtensionMergeFrom(const google::protobuf::MessageLite*, int, const google::protobuf::internal::ExtensionSet::Extension&, google::protobuf::Arena*)': external/com_google_protobuf/src/google/protobuf/extension_set.cc:1008:12: error: switch missing default case [-Werror=switch-default] 1008 | switch (cpp_type(other_extension.type)) { | ^ external/com_google_protobuf/src/google/protobuf/extension_set.cc:1055:14: error: switch missing default case [-Werror=switch-default] 1055 | switch (cpp_type(other_extension.type)) { | ^ external/com_google_protobuf/src/google/protobuf/extension_set.cc: In member function 'bool google::protobuf::internal::ExtensionSet::ParseFieldWithExtensionInfo(int, bool, const google::protobuf::internal::ExtensionInfo&, google::protobuf::io::CodedInputStream*, google::protobuf::internal::FieldSkipper*)': external/com_google_protobuf/src/google/protobuf/extension_set.cc:1322:12: error: switch missing default case [-Werror=switch-default] 1322 | switch (extension.type) { | ^ external/com_google_protobuf/src/google/protobuf/extension_set.cc:1378:12: error: switch missing default case [-Werror=switch-default] 1378 | switch (extension.type) { | ^ external/com_google_protobuf/src/google/protobuf/extension_set.cc: In member function 'void google::protobuf::internal::ExtensionSet::Extension::Clear()': external/com_google_protobuf/src/google/protobuf/extension_set.cc:1612:12: error: switch missing default case [-Werror=switch-default] 1612 | switch (cpp_type(type)) { | ^ external/com_google_protobuf/src/google/protobuf/extension_set.cc: In member function 'size_t google::protobuf::internal::ExtensionSet::Extension::ByteSize(int) const': external/com_google_protobuf/src/google/protobuf/extension_set.cc:1660:14: error: switch missing default case [-Werror=switch-default] 1660 | switch (real_type(type)) { | ^ external/com_google_protobuf/src/google/protobuf/extension_set.cc:1710:14: error: switch missing default case [-Werror=switch-default] 1710 | switch (real_type(type)) { | ^ external/com_google_protobuf/src/google/protobuf/extension_set.cc:1751:12: error: switch missing default case [-Werror=switch-default] 1751 | switch (real_type(type)) { | ^ external/com_google_protobuf/src/google/protobuf/extension_set.cc: In member function 'int google::protobuf::internal::ExtensionSet::Extension::GetSize() const': external/com_google_protobuf/src/google/protobuf/extension_set.cc:1799:10: error: switch missing default case [-Werror=switch-default] 1799 | switch (cpp_type(type)) { | ^ external/com_google_protobuf/src/google/protobuf/extension_set.cc: In member function 'void google::protobuf::internal::ExtensionSet::Extension::Free()': external/com_google_protobuf/src/google/protobuf/extension_set.cc:1825:12: error: switch missing default case [-Werror=switch-default] 1825 | switch (cpp_type(type)) { | ^ external/com_google_protobuf/src/google/protobuf/extension_set.cc: In member function 'uint8_t* google::protobuf::internal::ExtensionSet::Extension::InternalSerializeFieldWithCachedSizesToArray(const google::protobuf::MessageLite*, const google::protobuf::internal::ExtensionSet*, int, uint8_t*, google::protobuf::io::EpsCopyOutputStream*) const': external/com_google_protobuf/src/google/protobuf/extension_set.cc:2026:14: error: switch missing default case [-Werror=switch-default] 2026 | switch (real_type(type)) { | ^ external/com_google_protobuf/src/google/protobuf/extension_set.cc:2060:14: error: switch missing default case [-Werror=switch-default] 2060 | switch (real_type(type)) { | ^ external/com_google_protobuf/src/google/protobuf/extension_set.cc:2111:12: error: switch missing default case [-Werror=switch-default] 2111 | switch (real_type(type)) { | ^ cc1plus: all warnings being treated as errors Target //main:hello-world failed to build INFO: Elapsed time: 3.122s, Critical Path: 3.00s INFO: 18 processes: 9 internal, 9 linux-sandbox. FAILED: Build did NOT complete successfully
Bazel is going to build parts of protobuf twice, once for the host and once for the target. extension_set.cc is one of those. --host_crosstool_top will be used when compiling for the host to build protoc to be run later in the build. Your custom toolchain will be used when building those same files for the target as part of the final binary. Your build failure is when building for the target with your custom toolchain. You'll need to make that work somehow. I often end up modifying BUILD files to add -Wno-* copts so they work with my toolchains. --per_file_copt could be used instead. If you want to just build the host version while setting things up, write a simple genrule like this: genrule( name = "abc", tools = [ "#com_google_protobuf//:protoc" ], outs = [ "dummy" ], cmd = "touch $#", ) If you bazel build abc, then bazel will build protoc for the host, even though it's not actually used by the cmd.
src/caffe/parallel.cpp:70:1: error: ‘Params’ does not name a type
This is not the first time I compiled caffe, but I still have problems that I can't solve. The caffe version I used is https://github.com/chuanqi305/ssd, the compiled version is GPU, I successfully compiled and run on my computer ( Ubuntu 16.04 GTX1080TI*1 cuda9.0) , but in the school server (Ubuntu 14.04 Tesla k80*2+Tesla k40*2 cuda8.0), the same code, the same configuration, but the compilation failed。The error occurred in the code compilation phase rather than the link phase, but the code itself is definitely no problem, because it has been compiled successfully on another computer, I don't know if it is because of my gcc/g++ version. I tried to compile the parallel.cpp file myself using the g++ command. When I don't specify the header file path, the same error will occur, but in the Makefile, the location of the header file has been added. The error message is below: SGM#user-SMBIOS-implementations-newer-thandmidecode-Super-Server:~/ssd-ssd$ sudo make all PROTOC src/caffe/proto/caffe.proto CXX .build_release/src/caffe/proto/caffe.pb.cc CXX src/caffe/parallel.cpp src/caffe/parallel.cpp:70:1: error: ‘Params’ does not name a type Params<Dtype>::Params(shared_ptr<Solver<Dtype> > root_solver) ^ src/caffe/parallel.cpp:77:1: error: ‘GPUParams’ does not name a type GPUParams<Dtype>::GPUParams(shared_ptr<Solver<Dtype> > root_solver, int device) ^ src/caffe/parallel.cpp:102:1: error: ‘GPUParams’ does not name a type GPUParams<Dtype>::~GPUParams() { ^ src/caffe/parallel.cpp:110:15: error: expected initializer before ‘<’ token void GPUParams<Dtype>::configure(Solver<Dtype>* solver) const { ^ src/caffe/parallel.cpp:117:6: error: ‘DevicePair’ has not been declared void DevicePair::compute(const vector<int> devices, vector<DevicePair>* pairs) { ^ src/caffe/parallel.cpp:117:60: error: ‘DevicePair’ was not declared in this scope void DevicePair::compute(const vector<int> devices, vector<DevicePair>* pairs) { ^ src/caffe/parallel.cpp:117:70: error: template argument 1 is invalid void DevicePair::compute(const vector<int> devices, vector<DevicePair>* pairs) { ^ src/caffe/parallel.cpp:117:70: error: template argument 2 is invalid src/caffe/parallel.cpp: In function ‘void caffe::compute(std::vector<int>, int*)’: src/caffe/parallel.cpp:133:20: error: request for member ‘push_back’ in ‘* pairs’, which is of non-class type ‘int’ pairs->push_back(DevicePair(remaining[i], remaining[j])); ^ src/caffe/parallel.cpp:133:67: error: ‘DevicePair’ was not declared in this scope pairs->push_back(DevicePair(remaining[i], remaining[j])); ^ src/caffe/parallel.cpp:157:18: error: request for member ‘push_back’ in ‘* pairs’, which is of non-class type ‘int’ pairs->push_back(DevicePair(remaining[i], remaining[j])); ^ src/caffe/parallel.cpp:157:65: error: ‘DevicePair’ was not declared in this scope pairs->push_back(DevicePair(remaining[i], remaining[j])); ^ src/caffe/parallel.cpp:175:14: error: request for member ‘push_back’ in ‘* pairs’, which is of non-class type ‘int’ pairs->push_back(DevicePair(remaining[i], remaining[i + 1])); ^ src/caffe/parallel.cpp:175:65: error: ‘DevicePair’ was not declared in this scope pairs->push_back(DevicePair(remaining[i], remaining[i + 1])); ^ src/caffe/parallel.cpp:185:10: error: request for member ‘insert’ in ‘* pairs’, which is of non-class type ‘int’ pairs->insert(pairs->begin(), DevicePair(-1, remaining[0])); ^ src/caffe/parallel.cpp:185:24: error: request for member ‘begin’ in ‘* pairs’, which is of non-class type ‘int’ pairs->insert(pairs->begin(), DevicePair(-1, remaining[0])); ^ src/caffe/parallel.cpp:185:60: error: ‘DevicePair’ was not declared in this scope pairs->insert(pairs->begin(), DevicePair(-1, remaining[0])); ^ In file included from src/caffe/parallel.cpp:4:0: src/caffe/parallel.cpp:187:16: error: request for member ‘size’ in ‘* pairs’, which is of non-class type ‘int’ CHECK(pairs->size() == devices.size()); ^ src/caffe/parallel.cpp:188:30: error: request for member ‘size’ in ‘* pairs’, which is of non-class type ‘int’ for (int i = 0; i < pairs->size(); ++i) { ^ In file included from src/caffe/parallel.cpp:4:0: src/caffe/parallel.cpp:189:21: error: invalid types ‘int[int]’ for array subscript CHECK((*pairs)[i].parent() != (*pairs)[i].device()); ^ src/caffe/parallel.cpp:189:45: error: invalid types ‘int[int]’ for array subscript CHECK((*pairs)[i].parent() != (*pairs)[i].device()); ^ src/caffe/parallel.cpp:190:36: error: request for member ‘size’ in ‘* pairs’, which is of non-class type ‘int’ for (int j = i + 1; j < pairs->size(); ++j) { ^ In file included from src/caffe/parallel.cpp:4:0: src/caffe/parallel.cpp:191:23: error: invalid types ‘int[int]’ for array subscript CHECK((*pairs)[i].device() != (*pairs)[j].device()); ^ src/caffe/parallel.cpp:191:47: error: invalid types ‘int[int]’ for array subscript CHECK((*pairs)[i].device() != (*pairs)[j].device()); ^ src/caffe/parallel.cpp: At global scope: src/caffe/parallel.cpp:202:1: error: ‘P2PSync’ does not name a type P2PSync<Dtype>::P2PSync(shared_ptr<Solver<Dtype> > root_solver, ^ src/caffe/parallel.cpp:249:1: error: ‘P2PSync’ does not name a type P2PSync<Dtype>::~P2PSync() { ^ src/caffe/parallel.cpp:271:13: error: expected initializer before ‘<’ token void P2PSync<Dtype>::InternalThreadEntry() { ^ src/caffe/parallel.cpp:287:13: error: expected initializer before ‘<’ token void P2PSync<Dtype>::on_start() { ^ src/caffe/parallel.cpp:325:13: error: expected initializer before ‘<’ token void P2PSync<Dtype>::on_gradients_ready() { ^ src/caffe/parallel.cpp:383:13: error: expected initializer before ‘<’ token void P2PSync<Dtype>::Prepare(const vector<int>& gpus, ^ src/caffe/parallel.cpp:421:13: error: expected initializer before ‘<’ token void P2PSync<Dtype>::Run(const vector<int>& gpus) { ^ In file included from /usr/local/include/caffe/blob.hpp:8:0, from /usr/local/include/caffe/caffe.hpp:7, from src/caffe/parallel.cpp:12: src/caffe/parallel.cpp:439:19: error: ‘Params’ is not a class template INSTANTIATE_CLASS(Params); ^ src/caffe/parallel.cpp:439:19: error: explicit instantiation of non-template type ‘caffe::Params’ src/caffe/parallel.cpp:439:19: error: ‘Params’ is not a class template INSTANTIATE_CLASS(Params); ^ src/caffe/parallel.cpp:439:19: error: explicit instantiation of non-template type ‘caffe::Params’ src/caffe/parallel.cpp:440:19: error: ‘GPUParams’ is not a class template INSTANTIATE_CLASS(GPUParams); ^ src/caffe/parallel.cpp:440:19: error: explicit instantiation of non-template type ‘caffe::GPUParams’ src/caffe/parallel.cpp:440:19: error: ‘GPUParams’ is not a class template INSTANTIATE_CLASS(GPUParams); ^ src/caffe/parallel.cpp:440:19: error: explicit instantiation of non-template type ‘caffe::GPUParams’ src/caffe/parallel.cpp:441:19: error: ‘P2PSync’ is not a class template INSTANTIATE_CLASS(P2PSync); ^ src/caffe/parallel.cpp:441:19: error: explicit instantiation of non-template type ‘caffe::P2PSync’ src/caffe/parallel.cpp:441:19: error: ‘P2PSync’ is not a class template INSTANTIATE_CLASS(P2PSync); ^ src/caffe/parallel.cpp:441:19: error: explicit instantiation of non-template type ‘caffe::P2PSync’ make: *** [.build_release/src/caffe/parallel.o] Error 1 Makefile.config ## Refer to http://caffe.berkeleyvision.org/installation.html # Contributions simplifying and improving our build system are welcome! # cuDNN acceleration switch (uncomment to build with cuDNN). USE_CUDNN := 1 # CPU-only switch (uncomment to build without GPU support). # CPU_ONLY := 1 # uncomment to disable IO dependencies and corresponding data layers # USE_OPENCV := 0 # USE_LEVELDB := 0 # USE_LMDB := 0 # uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary) # You should not set this flag if you will be reading LMDBs with any # possibility of simultaneous read and write # ALLOW_LMDB_NOLOCK := 1 # Uncomment if you're using OpenCV 3 OPENCV_VERSION := 3 # To customize your choice of compiler, uncomment and set the following. # N.B. the default for Linux is g++ and the default for OSX is clang++ # CUSTOM_CXX := g++ # CUDA directory contains bin/ and lib/ directories that we need. CUDA_DIR := /usr/local/cuda # On Ubuntu 14.04, if cuda tools are installed via # "sudo apt-get install nvidia-cuda-toolkit" then use this instead: # CUDA_DIR := /usr # CUDA architecture setting: going with all of them. # For CUDA < 6.0, comment the lines after *_35 for compatibility. CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \ -gencode arch=compute_20,code=sm_21 \ -gencode arch=compute_30,code=sm_30 \ -gencode arch=compute_35,code=sm_35 \ -gencode arch=compute_50,code=sm_50 \ -gencode arch=compute_52,code=sm_52 \ -gencode arch=compute_60,code=sm_60 \ -gencode arch=compute_61,code=sm_61 \ -gencode arch=compute_61,code=compute_61 # BLAS choice: # atlas for ATLAS (default) # mkl for MKL # open for OpenBlas # BLAS := atlas BLAS := open # Custom (MKL/ATLAS/OpenBLAS) include and lib directories. # Leave commented to accept the defaults for your choice of BLAS # (which should work)! # BLAS_INCLUDE := /path/to/your/blas # BLAS_LIB := /path/to/your/blas # Homebrew puts openblas in a directory that is not on the standard search path # BLAS_INCLUDE := $(shell brew --prefix openblas)/include # BLAS_LIB := $(shell brew --prefix openblas)/lib # This is required only if you will compile the matlab interface. # MATLAB directory should contain the mex binary in /bin. # MATLAB_DIR := /usr/local # MATLAB_DIR := /Applications/MATLAB_R2012b.app # NOTE: this is required only if you will compile the python interface. # We need to be able to find Python.h and numpy/arrayobject.h. #PYTHON_INCLUDE := /usr/include/python2.7 \ # /usr/lib/python2.7/dist-packages/numpy/core/include # Anaconda Python distribution is quite popular. Include path: # Verify anaconda location, sometimes it's in root. ANACONDA_HOME := /home/SGM/anaconda3 PYTHON_INCLUDE := /home/SGM/anaconda3/include \ /home/SGM/anaconda3/include/python3.6m \ /home/SGM/anaconda3/lib/python3.6/site-packages/numpy/core/include # Uncomment to use Python 3 (default is Python 2) PYTHON_LIBRARIES := boost_python3 python3.6m PYTHON_INCLUDE := /home/SGM/anaconda3/include/python3.6m \ /home/SGM/anaconda3/lib/python3.6/site-packages/numpy/core/include # We need to be able to find libpythonX.X.so or .dylib. PYTHON_LIB := /usr/lib # PYTHON_LIB := $(ANACONDA_HOME)/lib # Homebrew installs numpy in a non standard path (keg only) # PYTHON_INCLUDE += $(dir $(shell python -c 'import numpy.core; print(numpy.core.__file__)'))/include # PYTHON_LIB += $(shell brew --prefix numpy)/lib # Uncomment to support layers written in Python (will link against Python libs) WITH_PYTHON_LAYER := 1 # Whatever else you find you need goes here. INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/local/hdf5/include LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/local/hdf5/lib /home/SGM/anaconda3/lib/ # If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies # INCLUDE_DIRS += $(shell brew --prefix)/include # LIBRARY_DIRS += $(shell brew --prefix)/lib # Uncomment to use `pkg-config` to specify OpenCV library paths. # (Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.) # USE_PKG_CONFIG := 1 # N.B. both build and distribute dirs are cleared on `make clean` BUILD_DIR := build DISTRIBUTE_DIR := distribute # Uncomment for debugging. Does not work on OSX due to https://github.com/BVLC/caffe/issues/171 # DEBUG := 1 # The ID of the GPU that 'make runtest' will use to run unit tests. TEST_GPUID := 0 # enable pretty build (comment to see full commands) Q ?= #
When you change the environment,have you edit the path in Makefile.config? Please make the python path correct and make sure cudnn is installed,if you want to compile with cuDNN. Not very clear with your issue, try comment USE_CUDNN := 1
How to fix an unknown error when cross compiling my QT application to raspberry-pi3
my program (QT/C++)is using a python module to download some video from google drive, it's work very well but I couldn't cross compile it for raspberry pi3. I am new in QT Cross Compile for raspberry and I couldn't find a solution for this error in any place : #define _POSIX_C_SOURCE 200112L ^ In file included from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/arm-linux-gnueabihf/bits/os_defines.h:39:0, from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/arm-linux-gnueabihf/bits/c++config.h:426, from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/cstddef:41, from /opt/qtrpi/raspi/qt5pi/include/QtCore/qglobal.h:45, from /opt/qtrpi/raspi/qt5pi/include/QtCore/qtimer.h:43, from /opt/qtrpi/raspi/qt5pi/include/QtCore/QTimer:1, from DigitalSignal.h:5, from DigitalSignal.cpp:1: /opt/qtrpi/raspbian/sysroot/usr/include/./features.h:230:0: note: ceci est l'emplacement d’une précédente définition # define _POSIX_C_SOURCE 200809L ^ In file included from lib/python2.7/Include/Python.h:8:0, from DigitalSignal.cpp:15: lib/python2.7/Include/pyconfig.h:1242:0: warning: « _XOPEN_SOURCE » redéfini [enabled by default] #define _XOPEN_SOURCE 600 ^ In file included from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/arm-linux-gnueabihf/bits/os_defines.h:39:0, from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/arm-linux-gnueabihf/bits/c++config.h:426, from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/cstddef:41, from /opt/qtrpi/raspi/qt5pi/include/QtCore/qglobal.h:45, from /opt/qtrpi/raspi/qt5pi/include/QtCore/qtimer.h:43, from /opt/qtrpi/raspi/qt5pi/include/QtCore/QTimer:1, from DigitalSignal.h:5, from DigitalSignal.cpp:1: /opt/qtrpi/raspbian/sysroot/usr/include/./features.h:162:0: note: ceci est l'emplacement d’une précédente définition # define _XOPEN_SOURCE 700 ^ In file included from lib/python2.7/Include/Python.h:61:0, from DigitalSignal.cpp:15: lib/python2.7/Include/pyport.h:895:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)." #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)." ^ Makefile:1145: recipe for target 'DigitalSignal.o' failed make: *** [DigitalSignal.o] Error 1
Basing on the solution of this problem Python compilation error: "LONG_BIT definition appears wrong for platform" .I changed in lib/python2.7/Include/pyconfig.h this line #define SIZEOF_LONG 8 bye this line #define SIZEOF_LONG 4 (explanation : '4' for 32 bits and '8' for 64 bits ). but now I have a new error that i does't understand ::: t/usr/lib/arm-linux-gnueabihf -lQt5Widgets -lQt5Gui -lQt5Qml -lQt5Network -lQt5Xml -lQt5Core -Wl,-rpath-link,/opt/qtrpi/raspbian/sysroot/opt/vc/lib -lGLESv2 -lpthread /home/Documents/project/digitalsignage/lib/python2.7//libpython2.7.a : erreur lors de l'ajout de symboles : Format de fichier non reconnu collect2: error: ld a retourné le statut de sortie 1 Makefile:170: recipe for target 'DigitalSignal' failed make: *** [DigitalSignal] Error 1 can anyone what is the meaning of this error ???
C++ error: expected primary-expression before ‘;’ token using Cmake
I used Cmake to define folder paths. I have Config.in.h file and where #cmakedefine are declared as #cmakedefine CAFFE_MODEL_PATH #cmakedefine CAFFE_MODEL_PATH #cmakedefine CAFFE_TRAIN_MODEL #cmakedefine MEAN_FILE #cmakedefine LABEL_FILE In my CMakeLists.txt, I did as set(CAFFE_MODEL_PATH "" CACHE PATH "Path to a Caffe model") set(CAFFE_TRAIN_MODEL "" CACHE PATH "Path to a trained model") set(MEAN_FILE "" CACHE PATH "Path to the mean file all trained images") set(LABEL_FILE "" CACHE PATH "Path to the mean file all trained images") configure_file ( "${PROJECT_SOURCE_DIR}/Config.h.in" "${PROJECT_SOURCE_DIR}/Config.h" ) So that Config.h has #define for those CAFFE_MODEL_PATH, CAFFE_TRAIN_MODEL, MEAN_FILE, LABEL_FILE. But when I use them in my main.cpp file int main(void) { ::google::InitGoogleLogging("endtoenddetection"); string model_file = CAFFE_MODEL_PATH; string trained_file = CAFFE_TRAIN_MODEL; string mean_file = MEAN_FILE; string label_file = LABEL_FILE; } I have errors as /home/Softwares/ReInspect/endtoendLstm/main.cpp:8:43: error: expected primary-expression before ‘;’ token string model_file = CAFFE_MODEL_PATH; ^ /home/Softwares/ReInspect/endtoendLstm/main.cpp:9:44: error: expected primary-expression before ‘;’ token string trained_file = CAFFE_TRAIN_MODEL; ^ /home/Softwares/ReInspect/endtoendLstm/main.cpp:10:36: error: expected primary-expression before ‘;’ token string mean_file = MEAN_FILE; ^ /home/Softwares/ReInspect/endtoendLstm/main.cpp:11:37: error: expected primary-expression before ‘;’ token string label_file = LABEL_FILE;
When configure_file, expression #cmakedefine CAFFE_MODEL_PATH is actually a conditional macro definition. That is, the macro is defined only when corresponded CMake variable is evaluated as no-false (according to if(constant) rules). In your case, CMake variables have empty values, which are evaluated as false. So configured file (Config.h in you case) doesn't contain macros definitions. If you want to define macro with string value, use #define CAFFE_MODEL_PATH "#CAFFE_MODEL_PATH#" Such a way the macro will be properly defined even if corresponded variable is empty. See also documentation for configure_file command.
Why doesn't Readline work as a subdirectory in autoconf?
I'm trying to migrate a project to autotools, got stuck with integrating the third party libraries we use. Some work the basic way: (the following is in my configure.ac) AC_CONFIG_SUBDIRS([thirdparty/sqlite]) AC_CONFIG_SUBDIRS([thirdparty/protobuf]) But readline doesn't: AC_CONFIG_SUBDIRS([thirdparty/readline]) When I try autoreconf, I get this error: brett#Brett-Thinkpad:~/auto3$ autoreconf autoheader: warning: missing template: CTYPE_NON_ASCII autoheader: Use AC_DEFINE([CTYPE_NON_ASCII], [], [Description]) autoheader: warning: missing template: FIONREAD_IN_SYS_IOCTL autoheader: warning: missing template: HAVE_BSD_SIGNALS autoheader: warning: missing template: HAVE_GETPW_DECLS autoheader: warning: missing template: HAVE_LANGINFO_CODESET autoheader: warning: missing template: HAVE_MBRLEN autoheader: warning: missing template: HAVE_MBSCMP autoheader: warning: missing template: HAVE_MBSNRTOWCS autoheader: warning: missing template: HAVE_MBSRTOWCS autoheader: warning: missing template: HAVE_MBSTATE_T autoheader: warning: missing template: HAVE_POSIX_SIGNALS autoheader: warning: missing template: HAVE_POSIX_SIGSETJMP autoheader: warning: missing template: HAVE_STRUCT_DIRENT_D_FILENO autoheader: warning: missing template: HAVE_STRUCT_DIRENT_D_INO autoheader: warning: missing template: HAVE_USG_SIGHOLD autoheader: warning: missing template: HAVE_WCRTOMB autoheader: warning: missing template: HAVE_WCSCOLL autoheader: warning: missing template: HAVE_WCSDUP autoheader: warning: missing template: HAVE_WCTYPE autoheader: warning: missing template: HAVE_WCWIDTH autoheader: warning: missing template: MUST_REINSTALL_SIGHANDLERS autoheader: warning: missing template: NO_MULTIBYTE_SUPPORT autoheader: warning: missing template: SPEED_T_IN_SYS_TYPES autoheader: warning: missing template: STRCOLL_BROKEN autoheader: warning: missing template: STRUCT_WINSIZE_IN_SYS_IOCTL autoheader: warning: missing template: STRUCT_WINSIZE_IN_TERMIOS autoheader: warning: missing template: TIOCSTAT_IN_SYS_IOCTL autoheader: warning: missing template: VOID_SIGHANDLER autoreconf: /usr/bin/autoheader failed with exit status: 1 The Readline source appears to be organized in the same way as SQLite and Protobuf - ./configure && make && make install works the same for all three. What's different about readline? (I'm using Readline version 6.2) (Sorry if this is basic...I'm just getting started with Autotools)
I'm not familiar with the readline sources, but I'd guess that either you or readline are using an obsolete version of the autotools. That doesn't stop ./configure && make && make install from working, since when you download the tarball you get the configure and Makefiles that the incompatibly-versioned autotools have already generated. But it does mean you can't generate new ones with your version of autotools. You can probably fix it by just doing what the error message tells you: add a whole bunch of lines like AC_DEFINE([CTYPE_NON_ASCII], [], [Description]) to thirdparty/readline/configure.ac. Or upgrade to the latest autotools if the problem is on your end. For more specific and effective advice, include the offending configure.ac in your question and tell us the version of autotools you're using.