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

--buildtype=debug doesn't build for bmcweb" #303

Open
4 tasks done
abiasojo opened this issue Mar 11, 2025 · 1 comment
Open
4 tasks done

--buildtype=debug doesn't build for bmcweb" #303

abiasojo opened this issue Mar 11, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@abiasojo
Copy link
Contributor

Is this the right place to submit this?

  • This is not a security vulnerability or a crashing bug
  • This is not a question about how to use OpenBMC
  • This is not a bug in an OpenBMC fork or a bug in code still under code review.
  • This is not a request for a new feature.

Bug Description

Building with --buildtype=debug results in errors related to boost beast and boost intrusive modules

In file included from /home/asojoabi/upstream-build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/bmcweb/1.0+git/recipe-sysroot/usr/include/boost/beast/http/fields.hpp:805,
         from /home/asojoabi/upstream-build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/bmcweb/1.0+git/recipe-sysroot/usr/include/boost/beast/http/message.hpp:14,
         from ../../../../../../../Code/upstream-public/bmcweb/http/http_body.hpp:17,
         from ../../../../../../../Code/upstream-public/bmcweb/http/http_response.hpp:4,
         from ../../../../../../../Code/upstream-public/bmcweb/include/json_html_serializer.hpp:5,
         from ../../../../../../../Code/upstream-public/bmcweb/src/json_html_serializer.cpp:3:
In member function 'const boost::beast::string_view boost::beast::http::basic_fields<Allocator>::value_type::name_string() const [with Allocator = std::allocator<char>]',
  inlined from 'bool boost::beast::http::basic_fields<Allocator>::key_compare::operator()(const boost::beast::http::basic_fields<Allocator>::value_type&, boost::beast::string_view) const [with Allocator = std::allocator<char>]' at /home/asojoabi/upstream-build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/bmcweb/1.0+git/recipe-sysroot/usr/include/boost/beast/http/fields.hpp:144:31,
  inlined from 'Ret boost::intrusive::tree_value_compare<ValuePtr, KeyCompare, KeyOfValue, Ret, true>::operator()(const key_type&, const U&, typename boost::intrusive::disable_if_smartref_to<U, ValuePtr>::type*) const [with U = boost::core::basic_string_view<char>; ValuePtr = boost::beast::http::basic_fields<std::allocator<char> >::element*; KeyCompare = boost::beast::http::basic_fields<std::allocator<char> >::key_compare; KeyOfValue = boost::move_detail::identity<boost::beast::http::basic_fields<std::allocator<char> >::element>; Ret = bool]' at /home/asojoabi/upstream-build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/bmcweb/1.0+git/recipe-sysroot/usr/include/boost/intrusive/detail/tree_value_compare.hpp:175:30,
  inlined from 'bool boost::intrusive::detail::key_nodeptr_comp<KeyTypeKeyCompare, ValueTraits, KeyOfValue>::operator()(const T1&, const T2&, typename boost::move_detail::enable_if_c<(is_same_or_nodeptr_convertible<T1>::value && (! is_same_or_nodeptr_convertible<T2>::value)), sfinae_type*>::type) const [with T1 = boost::intrusive::rbtree_node<void*>*; T2 = boost::core::basic_string_view<char>; KeyTypeKeyCompare = boost::beast::http::basic_fields<std::allocator<char> >::key_compare; ValueTraits = boost::intrusive::bhtraits<boost::beast::http::basic_fields<std::allocator<char> >::element, boost::intrusive::rbtree_node_traits<void*, false>, boost::intrusive::normal_link, boost::intrusive::dft_tag, 3>; KeyOfValue = boost::move_detail::identity<boost::beast::http::basic_fields<std::allocator<char> >::element>]' at /home/asojoabi/upstream-build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/bmcweb/1.0+git/recipe-sysroot/usr/include/boost/intrusive/detail/key_nodeptr_comp.hpp:104:20:
/home/asojoabi/upstream-build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/bmcweb/1.0+git/recipe-sysroot/usr/include/boost/beast/http/impl/fields.hpp:324:34: error: potential null pointer dereference [-Werror=null-dereference]
 324 |     static_cast<std::size_t>(off_ - 2)};
   |                 ^~~~
In file included from /home/asojoabi/upstream-build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/bmcweb/1.0+git/recipe-sysroot/usr/include/boost/intrusive/list_hook.hpp:20,
         from /home/asojoabi/upstream-build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/bmcweb/1.0+git/recipe-sysroot/usr/include/boost/intrusive/list.hpp:20,
         from /home/asojoabi/upstream-build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/bmcweb/1.0+git/recipe-sysroot/usr/include/boost/beast/http/fields.hpp:19:
In static member function 'static boost::intrusive::list_node_traits<VoidPointer>::node_ptr boost::intrusive::list_node_traits<VoidPointer>::get_next(const_node_ptr) [with VoidPointer = void*]',
  inlined from 'static bool boost::intrusive::circular_list_algorithms<NodeTraits>::inited(const_node_ptr) [with NodeTraits = boost::intrusive::list_node_traits<void*>]' at /home/asojoabi/upstream-build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/bmcweb/1.0+git/recipe-sysroot/usr/include/boost/intrusive/circular_list_algorithms.hpp:84:35,
  inlined from 'boost::intrusive::list_impl<ValueTraits, SizeType, ConstantTimeSize, HeaderHolder>::const_iterator boost::intrusive::list_impl<ValueTraits, SizeType, ConstantTimeSize, HeaderHolder>::iterator_to(const_reference) const [with ValueTraits = boost::intrusive::bhtraits<boost::beast::http::basic_fields<std::allocator<char> >::element, boost::intrusive::list_node_traits<void*>, boost::intrusive::normal_link, boost::intrusive::dft_tag, 1>; SizeType = unsigned int; bool ConstantTimeSize = false; HeaderHolder = void]' at /home/asojoabi/upstream-build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/bmcweb/1.0+git/recipe-sysroot/usr/include/boost/intrusive/list.hpp:1325:7,
  inlined from 'boost::beast::http::basic_fields<Allocator>::const_iterator boost::beast::http::basic_fields<Allocator>::find(boost::beast::string_view) const [with Allocator = std::allocator<char>]' at /home/asojoabi/upstream-build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/bmcweb/1.0+git/recipe-sysroot/usr/include/boost/beast/http/impl/fields.hpp:707:33:
/home/asojoabi/upstream-build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/bmcweb/1.0+git/recipe-sysroot/usr/include/boost/intrusive/detail/list_node.hpp:60:17: error: potential null pointer dereference [-Werror=null-dereference]
  60 |  { return n->next_; }
   |         ^~~~~

Version

commit ef0b2d46d0245447bf21d6c74821599d5f7b7b05

Additional Information

No response

@gtmills gtmills added the bug Something isn't working label Mar 12, 2025
@edtanous
Copy link
Contributor

edtanous commented Mar 17, 2025

On this sha1, I just tried a debug build with:

meson builddebug --buildtype=debug && meson compile -C builddebug

And for me it works just fine, and on CI it's working just fine.

From your logs it looks like you're trying to build from within yocto. In Yocto you would generally not directly set --buildtype, but would set up yocto for a debug build. Can you provide instructions on how you set up the build?

Please include which machine you're building for, what upstream sha1 you're testing, and what you're appending to enable a debug build.

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

3 participants