Skip to content

树莓派4B 64位 本地编译 with_python 报错 #10695

@xingyingjie

Description

@xingyingjie

树莓派4B aarch64,Arm CPU + Arm Linux 系统,按照 https://www.paddlepaddle.org.cn/lite/develop/source_compile/arm_linux_compile_arm_linux.html 自己本地编译报错:

编译命令
./lite/tools/build_linux.sh --arch=armv8 --toolchain=gcc --with_python=ON --python_version=3.11

操作系统:
istributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm

运行环境:
python version 3.11.2
cmake version 3.10.3
gcc、g++ version 11.3.0

报错信息:
[ 72%] Building CXX object CMakeFiles/libprotoc.dir/home/pi/dreamerv3/paddle-lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_file.cc.o
In file included from /usr/include/c++/11/set:60,
from /home/pi/dreamerv3/paddle-lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_file.cc:41:
/usr/include/c++/11/bits/stl_tree.h: In instantiation of ‘static const _Key& std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_S_key(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type) [with _Key = const google::protobuf::FieldDescriptor*; _Val = const google::protobuf::FieldDescriptor*; _KeyOfValue = std::_Identity<const google::protobuf::FieldDescriptor*>; _Compare = google::protobuf::compiler::java::{anonymous}::FieldDescriptorCompare; _Alloc = std::allocator<const google::protobuf::FieldDescriptor*>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type = const std::_Rb_tree_node<const google::protobuf::FieldDescriptor*>]’:
/usr/include/c++/11/bits/stl_tree.h:2071:47: required from ‘std::pair<std::_Rb_tree_node_base
, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_unique_pos(const key_type&) [with _Key = const google::protobuf::FieldDescriptor*; _Val = const google::protobuf::FieldDescriptor*; _KeyOfValue = std::_Identity<const google::protobuf::FieldDescriptor*>; _Compare = google::protobuf::compiler::java::{anonymous}::FieldDescriptorCompare; _Alloc = std::allocator<const google::protobuf::FieldDescriptor*>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::key_type = const google::protobuf::FieldDescriptor*]’
/usr/include/c++/11/bits/stl_tree.h:2124:4: required from ‘std::pair<std::_Rb_tree_iterator<_Val>, bool> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_unique(_Arg&&) [with _Arg = const google::protobuf::FieldDescriptor* const&; _Key = const google::protobuf::FieldDescriptor*; _Val = const google::protobuf::FieldDescriptor*; _KeyOfValue = std::_Identity<const google::protobuf::FieldDescriptor*>; _Compare = google::protobuf::compiler::java::{anonymous}::FieldDescriptorCompare; _Alloc = std::allocator<const google::protobuf::FieldDescriptor*>]’
/usr/include/c++/11/bits/stl_set.h:512:25: required from ‘std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = const google::protobuf::FieldDescriptor*; _Compare = google::protobuf::compiler::java::{anonymous}::FieldDescriptorCompare; _Alloc = std::allocator<const google::protobuf::FieldDescriptor*>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<const google::protobuf::FieldDescriptor*, const google::protobuf::FieldDescriptor*, std::_Identity<const google::protobuf::FieldDescriptor*>, google::protobuf::compiler::java::{anonymous}::FieldDescriptorCompare, std::allocator<const google::protobuf::FieldDescriptor*> >::const_iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other = std::allocator<const google::protobuf::FieldDescriptor*>; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<const google::protobuf::FieldDescriptor*>, const google::protobuf::FieldDescriptor*>::rebind<const google::protobuf::FieldDescriptor*>; typename _Allocator::value_type = const google::protobuf::FieldDescriptor*; std::set<_Key, _Compare, _Alloc>::value_type = const google::protobuf::FieldDescriptor*]’
/home/pi/dreamerv3/paddle-lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_file.cc:97:54: required from here
/usr/include/c++/11/bits/stl_tree.h:770:15: error: static assertion failed: comparison object must be invocable as const
770 | is_invocable_v<const _Compare&, const _Key&, const _Key&>,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/stl_tree.h:770:15: note: ‘std::is_invocable_v<const google::protobuf::compiler::java::{anonymous}::FieldDescriptorCompare&, const google::protobuf::FieldDescriptor* const&, const google::protobuf::FieldDescriptor* const&>’ evaluates to false
[ 69%] Building CXX object CMakeFiles/libprotoc.dir/home/pi/dreamerv3/paddle-lite/third-party/protobuf-mobile/src/google/protobuf/compiler/java/java_enum_field_lite.cc.o
make[6]: *** [CMakeFiles/libprotoc.dir/build.make:1023: CMakeFiles/libprotoc.dir/home/pi/dreamerv3/paddle-lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_file.cc.o] Error 1
make[6]: Leaving directory '/home/pi/dreamerv3/paddle-lite/build.lite.linux.armv8.gcc/third_party/protobuf_host/src/protobuf_host-build'
make[5]: *** [CMakeFiles/Makefile2:143: CMakeFiles/libprotoc.dir/all] Error 2
make[5]: Leaving directory '/home/pi/dreamerv3/paddle-lite/build.lite.linux.armv8.gcc/third_party/protobuf_host/src/protobuf_host-build'
make[4]: *** [Makefile:130: all] Error 2
make[4]: Leaving directory '/home/pi/dreamerv3/paddle-lite/build.lite.linux.armv8.gcc/third_party/protobuf_host/src/protobuf_host-build'
make[3]: *** [CMakeFiles/protobuf_host.dir/build.make:111: third_party/protobuf_host/src/protobuf_host-stamp/protobuf_host-build] Error 2
make[3]: Leaving directory '/home/pi/dreamerv3/paddle-lite/build.lite.linux.armv8.gcc'
make[2]: *** [CMakeFiles/Makefile2:68: CMakeFiles/protobuf_host.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
[ 70%] Building CXX object CMakeFiles/libprotoc.dir/home/pi/dreamerv3/paddle-lite/third-party/protobuf-mobile/src/google/protobuf/compiler/java/java_enum_lite.cc.o

Image

-- Installing: /home/pi/dreamerv3/paddle-lite/build.lite.linux.armv8.gcc/third_party/install/protobuf/lib/cmake/protobuf/protobuf-config.cmake
-- Installing: /home/pi/dreamerv3/paddle-lite/build.lite.linux.armv8.gcc/third_party/install/protobuf/lib/cmake/protobuf/protobuf-config-version.cmake
-- Installing: /home/pi/dreamerv3/paddle-lite/build.lite.linux.armv8.gcc/third_party/install/protobuf/lib/cmake/protobuf/protobuf-options.cmake
make[4]: Leaving directory '/home/pi/dreamerv3/paddle-lite/build.lite.linux.armv8.gcc/third_party/protobuf/src/extern_protobuf-build'
[ 10%] Completed 'extern_protobuf'
make[3]: Leaving directory '/home/pi/dreamerv3/paddle-lite/build.lite.linux.armv8.gcc'
[ 10%] Built target extern_protobuf
make[2]: Leaving directory '/home/pi/dreamerv3/paddle-lite/build.lite.linux.armv8.gcc'
make[1]: *** [CMakeFiles/Makefile2:507: lite/CMakeFiles/publish_inference.dir/rule] Error 2
make[1]: Leaving directory '/home/pi/dreamerv3/paddle-lite/build.lite.linux.armv8.gcc'
make: *** [Makefile:261: publish_inference] Error 2

Image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions