Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译错误 #10574

Open
BerineYang opened this issue Oct 15, 2024 · 1 comment
Open

编译错误 #10574

BerineYang opened this issue Oct 15, 2024 · 1 comment
Assignees

Comments

@BerineYang
Copy link

尊敬的百度飞桨工程师:
您好!我是正在使用百度飞桨框架的开发者,我近期正在使用百度飞桨进行开发时,对Paddle-Lite安装包中进行如下操作:
./lite/tools/build_linux.sh --arch=armv8 --with_python=ON --with_opencl=ON full_publish
我的Paddle Lite版本为2.12,系统版本是Ubuntu22.04,cmake版本是cmake version 3.10.3,处理器型号是RK3588S,预期调用ARM Mali G78 MP4 GPU实现加速
在编译时,出现大量报错,还请工程师帮忙解决,报错如下:

/usr/include/c++/12/bits/stl_tree.h: In instantiation of ‘static const _Key& std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_S_key(_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*>; _Const_Link_type = const std::_Rb_tree_node<const google::protobuf::FieldDescriptor*>*]’:

/usr/include/c++/12/bits/stl_tree.h:2117: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*>; key_type = const google::protobuf::FieldDescriptor*]’

/usr/include/c++/12/bits/stl_tree.h:2170: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++/12/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*; value_type = const google::protobuf::FieldDescriptor*]’

/home/orangepi/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_file.cc:97:54: required from here

/usr/include/c++/12/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++/12/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

make[6]: *** [CMakeFiles/libprotoc.dir/build.make:1023: CMakeFiles/libprotoc.dir/home/orangepi/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_file.cc.o] Error 1

make[6]: Leaving directory '/home/orangepi/Paddle-Lite/build.lite.linux.armv8.gcc.opencl/third_party/protobuf_host/src/protobuf_host-build'

make[5]: *** [CMakeFiles/Makefile2:143: CMakeFiles/libprotoc.dir/all] Error 2

make[5]: Leaving directory '/home/orangepi/Paddle-Lite/build.lite.linux.armv8.gcc.opencl/third_party/protobuf_host/src/protobuf_host-build'

make[4]: *** [Makefile:130: all] Error 2

make[4]: Leaving directory '/home/orangepi/Paddle-Lite/build.lite.linux.armv8.gcc.opencl/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/orangepi/Paddle-Lite/build.lite.linux.armv8.gcc.opencl'

make[2]: *** [CMakeFiles/Makefile2:68: CMakeFiles/protobuf_host.dir/all] Error 2

make[2]: Leaving directory '/home/orangepi/Paddle-Lite/build.lite.linux.armv8.gcc.opencl'

make[1]: *** [CMakeFiles/Makefile2:541: lite/CMakeFiles/publish_inference.dir/rule] Error 2

make[1]: Leaving directory '/home/orangepi/Paddle-Lite/build.lite.linux.armv8.gcc.opencl'

make: *** [Makefile:274: publish_inference] Error 2
以上error似乎是C++版本问题,恳请工程师帮忙解决!

@MuShangCC
Copy link
Collaborator

降低gcc版本,参考 #10517

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants