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

fixing build error: undefined symbol: void boost::hash_combine #4942

Closed
wants to merge 1 commit into from

Conversation

hanw
Copy link
Contributor

@hanw hanw commented Oct 4, 2024

I'm unable to build p4c on Ubuntu 20.04 without this change.

This is the error message.

ld.lld: error: undefined symbol: void boost::hash_combine<unsigned long long>(unsigned long&, unsigned long long const&)                                                           
>>> referenced by expression.cpp                                                                                                                                                   >>>               expression.cpp.o:(P4::IR::Constant::get(P4::IR::Type const*, boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<0u, 0u, (boost::multiprecision::cpp_integer_type)1, (boost::multiprecision::cpp_int_check_type)0, std::allocator<unsigned long long> >, (boost::multiprecision::expression_template_option)1>, P4::Util::SourceInfo)) in archive ../../ir/libir.a                                                                                                                                          >>> referenced by expression.cpp                                                                                                                                                   >>>               expression.cpp.o:(absl::lts_20240116::container_internal::raw_hash_set<absl::lts_20240116::container_internal::FlatHashMapPolicy<std::tuple<int, unsigned long, bool, boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<0u, 0u, (boost::multiprecision::cpp_integer_type)1, (boost::multiprecision::cpp_int_check_type)0, std::allocator<unsigned long long> >, (boost::multiprecision::expression_template_option)1> >, P4::IR::Constant const*>, P4::Util::Hash, std::equal_to<std::tuple<int, unsigned long, bool, boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<0u, 0u, (boost::multiprecision::cpp_integer_type)1, (boost::multiprecision::cpp_int_check_type)0, std::allocator<unsigned long long> >, (boost::multiprecision::expression_template_option)1> > >, std::allocator<std::pair<std::tuple<int, unsigned long, bool, boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<0u, 0u, (boost::multiprecision::cpp_integer_type)1, (boost::multiprecision::cpp_int_check_type)0, std::allocator<unsigned long long> >, (boost::multiprecision::expression_template_option)1> > const, P4::IR::Constant const*> > >::hash_slot_fn(void*, void*)) in archive ../../ir/libir.a     >>> referenced by expression.cpp                                                                                                                                                   >>>               expression.cpp.o:(absl::lts_20240116::container_internal::raw_hash_set<absl::lts_20240116::container_internal::FlatHashMapPolicy<std::tuple<int, unsigned long, bool, boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<0u, 0u, (boost::multiprecision::cpp_integer_type)1, (boost::multiprecision::cpp_int_check_type)0, std::allocator<unsigned long long> >, (boost::multiprecision::expression_template_option)1> >, P4::IR::Constant const*>, P4::Util::Hash, std::equal_to<std::tuple<int, unsigned long, bool, boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<0u, 0u, (boost::multiprecision::cpp_integer_type)1, (boost::multiprecision::cpp_int_check_type)0, std::allocator<unsigned long long> >, (boost::multiprecision::expression_template_option)1> > >, std::allocator<std::pair<std::tuple<int, unsigned long, bool, boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<0u, 0u, (boost::multiprecision::cpp_integer_type)1, (boost::multiprecision::cpp_int_check_type)0, std::allocator<unsigned long long> >, (boost::multiprecision::expression_template_option)1> > const, P4::IR::Constant const*> > >::resize(unsigned long)) in archive ../../ir/libir.a 

@hanw hanw requested a review from asl October 4, 2024 03:40
@hanw hanw added the bug This behavior is unintended and should be fixed. label Oct 4, 2024
Copy link
Contributor

@asl asl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neither boost::hash nor boost::hash_combine are used in p4c. Ubuntu 20.04 is on CI and it green. Likely you are having some local modifications.

@hanw hanw closed this Oct 4, 2024
@asl asl deleted the hanw/build-fix branch October 4, 2024 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This behavior is unintended and should be fixed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants