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

v9.0.0版本编译无法通过 #51

Closed
wawozhu opened this issue Mar 7, 2024 · 10 comments
Closed

v9.0.0版本编译无法通过 #51

wawozhu opened this issue Mar 7, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@wawozhu
Copy link

wawozhu commented Mar 7, 2024

我按照README的操作步骤,最后编译报错如下,请问大佬这个是什么导致的呢,protobuf版本是3.14.0

error: ‘class apollo::cyber::proto::Header’ has no member named ‘ByteSizeLong’; did you mean ‘ByteSize’?
if (static_cast<int64_t>(message->ByteSizeLong()) != size) {
~~~~~~~~~^~~~~~~~~~~~
ByteSize
/home/xiangdong/CyberRT/cyber/record/file/record_file_reader.h:86:64: error: ‘class apollo::cyber::proto::Header’ has no member named ‘ByteSizeLong’; did you mean ‘ByteSize’?
<< ", expect: " << size << ", actual: " << message->ByteSizeLong();
~~~~~~~~~^~~~~~~~~~~~
ByteSize

@minhanghuang
Copy link
Owner

Hi @wawozhu, 按顺序执行下面这几行命令确认一下版本

cd CyberRT
source install/setup.bash
protoc --version

如果protoc --version的输出是libprotoc 3.14.0, 进入build进行编译

@wawozhu
Copy link
Author

wawozhu commented Mar 8, 2024

大佬好,切换了protoc版本后,上面的报错解决了,但是有下面新的报错,感觉还是protobuf版本的问题呢?

../../libcyber.so:对‘google::protobuf::internal::InlineGreedyStringParser(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, char const, google::protobuf::internal::ParseContext*)’未定义的引用
../../libcyber.so:对‘google::protobuf::internal::AddDescriptors(google::protobuf::internal::DescriptorTable const*)’未定义的引用
../../libcyber.so:对‘google::protobuf::internal::ArenaStringPtr::ClearToEmpty()’未定义的引用
../../libcyber.so:对‘google::protobuf::internal::ArenaStringPtr::Set(google::protobuf::internal::ArenaStringPtr::NonEmptyDefault, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&&, google::protobuf::Arena*)’未定义的引用
../../libcyber.so:对‘google::protobuf::internal::ArenaImpl::AllocateAlignedAndAddCleanup(unsigned long, void ()(void))’未定义的引用
../../libcyber.so:对‘google::protobuf::Any::_InternalParse(char const*, google::protobuf::internal::ParseContext*)’未定义的引用
../../libcyber.so:对‘google::protobuf::internal::GenericSwap(google::protobuf::Message*, google::protobuf::Message*)’未定义的引用
../../libcyber.so:对‘google::protobuf::RepeatedField::data() const’未定义的引用
../../libcyber.so:对‘google::protobuf::RepeatedField::Add(double const&)’未定义的引用
../../libcyber.so:对‘google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&, unsigned char*, google::protobuf::io::EpsCopyOutputStream*)’未定义的引用
../../libcyber.so:对‘google::protobuf::internal::EpsCopyInputStream::ReadStringFallback(char const*, int, std::__cxx11::basic_string<char, std::char_traits, std::allocator >)’未定义的引用
../../libcyber.so:对‘google::protobuf::internal::ArenaStringPtr::Set(google::protobuf::internal::ArenaStringPtr::NonEmptyDefault, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, google::protobuf::Arena
)’未定义的引用
../../libcyber.so:对‘google::protobuf::internal::UnknownFieldParse(unsigned long, google::protobuf::UnknownFieldSet*, char const*, google::protobuf::internal::ParseContext*)’未定义的引用
../../libcyber.so:对‘google::protobuf::FileDescriptorProto::FileDescriptorProto(google::protobuf::Arena*)’未定义的引用
../../libcyber.so:对‘google::protobuf::RepeatedField::data() const’未定义的引用
../../libcyber.so:对‘google::protobuf::internal::EpsCopyInputStream::DoneFallback(int, int)’未定义的引用
../../libcyber.so:对‘google::protobuf::Any::ByteSizeLong() const’未定义的引用
../../libcyber.so:对‘google::protobuf::internal::DestroyMessage(void const*)’未定义的引用
../../libcyber.so:对‘google::protobuf::RepeatedField::Clear()’未定义的引用
../../libcyber.so:对‘google::protobuf::internal::ArenaStringPtr::Destroy(google::protobuf::internal::ArenaStringPtr::EmptyDefault, google::protobuf::Arena*)’未定义的引用
../../libcyber.so:对‘google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const*, bool)’未定义的引用
../../libcyber.so:对‘google::protobuf::Any_default_instance’未定义的引用
../../libcyber.so:对‘google::protobuf::FileDescriptor::dependency(int) const’未定义的引用
../../libcyber.so:对‘google::protobuf::internal::ArenaStringPtr::Mutable[abi:cxx11](google::protobuf::internal::ArenaStringPtr::EmptyDefault, google::protobuf::Arena*)’未定义的引用
../../libcyber.so:对‘google::protobuf::internal::InitSCCImpl(google::protobuf::internal::SCCInfoBase*)’未定义的引用
../../libcyber.so:对‘google::protobuf::internal::kGlobalEmptyTable’未定义的引用
../../libcyber.so:对‘google::protobuf::internal::ArenaImpl::SpaceAllocated() const’未定义的引用
../../libcyber.so:对‘google::protobuf::RepeatedField::MergeFrom(google::protobuf::RepeatedField const&)’未定义的引用
../../libcyber.so:对‘google::protobuf::RepeatedPtrField<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >::RepeatedPtrField(google::protobuf::RepeatedPtrField<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > const&)’未定义的引用
../../libcyber.so:对‘google::protobuf::RepeatedPtrField<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >::RepeatedPtrField(google::protobuf::Arena*)’未定义的引用
../../libcyber.so:对‘google::protobuf::Arena::AllocateAlignedNoHook(unsigned long)’未定义的引用
../../libcyber.so:对‘google::protobuf::Message::SpaceUsedLong() const’未定义的引用
../../libcyber.so:对‘google::protobuf::RepeatedField::~RepeatedField()’未定义的引用
../../libcyber.so:对‘google::protobuf::internal::PackedFloatParser(void*, char const*, google::protobuf::internal::ParseContext*)’未定义的引用
../../libcyber.so:对‘google::protobuf::RepeatedField::size() const’未定义的引用
../../libcyber.so:对‘google::protobuf::Any::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const’未定义的引用
../../libcyber.so:对‘google::protobuf::RepeatedField::MergeFrom(google::protobuf::RepeatedField const&)’未定义的引用
../../libcyber.so:对‘google::protobuf::internal::fixed_address_empty_string’未定义的引用
../../libcyber.so:对‘google::protobuf::RepeatedField::RepeatedField(google::protobuf::RepeatedField const&)’未定义的引用
collect2: error: ld returned 1 exit status
cyber/tools/CMakeFiles/cyber_recorder.dir/build.make:246: recipe for target 'bin/cyber/tools/cyber_recorder/cyber_recorder' failed
make[2]: *** [bin/cyber/tools/cyber_recorder/cyber_recorder] Error 1
CMakeFiles/Makefile2:639: recipe for target 'cyber/tools/CMakeFiles/cyber_recorder.dir/all' failed
make[1]: *** [cyber/tools/CMakeFiles/cyber_recorder.dir/all] Error 2
Makefile:155: recipe for target 'all' failed
make: *** [all] Error 2

@minhanghuang
Copy link
Owner

在编译前, 如果是新开的Terminal, 需要加载环境source install/setup.bash, 然后才能执行make

@wawozhu
Copy link
Author

wawozhu commented Mar 8, 2024

你好,这步是执行过的。

@minhanghuang
Copy link
Owner

非常抱歉, 是最近一次更新的脚本出了问题, 我改一下, 稍等

@wawozhu
Copy link
Author

wawozhu commented Mar 8, 2024

好的大佬,看了一下install.py 安装protobuf的地方写成了glog,另外是不是还缺一些依赖啊?

@minhanghuang
Copy link
Owner

好的大佬,看了一下install.py 安装protobuf的地方写成了glog,另外是不是还缺一些依赖啊?

可以先使用下面的脚本安装依赖, 取代install.py

cd CyberRT
sudo ./scripts/install.sh

@wawozhu
Copy link
Author

wawozhu commented Mar 8, 2024

这样ok了大佬,还有一个问题大佬,我现在想用交叉编译器编译这这个工程放个工程放到arm芯片上跑,需要修改哪些地方呢,谢谢。

@minhanghuang
Copy link
Owner

这个工程当前没有交叉编译, 你可以写一个toolchain, arm和amd只需要区分croutine这两个汇编文件就可以

@wawozhu
Copy link
Author

wawozhu commented Mar 8, 2024

好的,谢谢大佬~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants