[phosphor-ipmi-host] static assertion be raised in aarch64 build
CHLI30 at nuvoton.com
CHLI30 at nuvoton.com
Thu Jun 2 20:10:31 AEST 2022
Hi All,
Is anyone meet this kind of static_assert() be raised in "pack.hpp" and "unpack.hpp"?
We meet one compile error in "aarch64" platform with the newer commit (5d38067).
However, the same commit without this compile error in "arm" platform.
I try to diff "arm" and "aarch64" compile options,
Unfortunately, didn't find any clues to fix this build error in aarch64 platform.
Error message of log.do_compile:
error: static assertion failed: Attempt to pack a type that has no IPMI unpack operation
error: static assertion failed: Attempt to unpack a type that has no IPMI unpack operation
....
cc1plus: all warnings being treated as errors
Makefile:1344: recipe for target 'libipmi20_la-sensorhandler.lo' failed
make[2]: Leaving directory '/home/tim/npcm-master/openbmc/build/evb-npcm845/tmp/work/cortexa35-openbmc-linux/phosphor-ipmi-host/1.0+gitAUTOINC+5d38067181-r1/build'
Makefile:1599: recipe for target 'all-recursive' failed
make[2]: *** [libipmi20_la-sensorhandler.lo] Error 1
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/tim/npcm-master/openbmc/build/evb-npcm845/tmp/work/cortexa35-openbmc-linux/phosphor-ipmi-host/1.0+gitAUTOINC+5d38067181-r1/build'
ERROR: oe_runmake failed
More messages in log.do_compile:
/home/tim/npcm-master/openbmc/build/evb-npcm845/tmp/work/cortexa35-openbmc-linux/phosphor-ipmi-host/1.0+gitAUTOINC+5d38067181-r1/build/../git/include/ipmid/message/unpack.hpp: In instantiation of 'static int ipmi::message::details::UnpackSingle<A>::op(ipmi::message::Payload&, T&) [with T = boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<24, 24, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void>, boost::multiprecision::et_off>]':
/home/tim/npcm-master/openbmc/build/evb-npcm845/tmp/work/cortexa35-openbmc-linux/phosphor-ipmi-host/1.0+gitAUTOINC+5d38067181-r1/build/../git/include/ipmid/message.hpp:440:45: required from 'int ipmi::message::Payload::unpack(Arg&&, Args&& ...) [with Arg = boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<24, 24, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void>, boost::multiprecision::et_off>&; Args = {}]'
../git/ipmid-new.cpp:300:37: required from here
/home/tim/npcm-master/openbmc/build/evb-npcm845/tmp/work/cortexa35-openbmc-linux/phosphor-ipmi-host/1.0+gitAUTOINC+5d38067181-r1/build/../git/include/ipmid/message/unpack.hpp:123:46: error: static assertion failed: Attempt to unpack a type that has no IPMI unpack operation
123 | utility::dependent_false<T>::value,
| ^~~~~
/home/tim/npcm-master/openbmc/build/evb-npcm845/tmp/work/cortexa35-openbmc-linux/phosphor-ipmi-host/1.0+gitAUTOINC+5d38067181-r1/build/../git/include/ipmid/message/unpack.hpp:123:46: note: 'std::integral_constant<bool, false>::value' evaluates to false
/home/tim/npcm-master/openbmc/build/evb-npcm845/tmp/work/cortexa35-openbmc-linux/phosphor-ipmi-host/1.0+gitAUTOINC+5d38067181-r1/build/../git/include/ipmid/message/unpack.hpp:126:5: error: no return statement in function returning non-void [-Werror=return-type]
126 | }
| ^
......
/home/tim/npcm-master/openbmc/build/evb-npcm845/tmp/work/cortexa35-openbmc-linux/phosphor-ipmi-host/1.0+gitAUTOINC+5d38067181-r1/build/../git/include/ipmid/message/pack.hpp: In instantiation of 'static int ipmi::message::details::PackSingle<A>::op(ipmi::message::Payload&, const T&) [with T = boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<24, 24, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void>, boost::multiprecision::et_off>]':
/home/tim/npcm-master/openbmc/build/evb-npcm845/tmp/work/cortexa35-openbmc-linux/phosphor-ipmi-host/1.0+gitAUTOINC+5d38067181-r1/build/../git/include/ipmid/message.hpp:262:43: required from 'int ipmi::message::Payload::pack(Arg&&, Args&& ...) [with Arg = boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<24, 24, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void>, boost::multiprecision::et_off>&; Args = {}]'
../git/ipmid-new.cpp:308:16: required from here
/home/tim/npcm-master/openbmc/build/evb-npcm845/tmp/work/cortexa35-openbmc-linux/phosphor-ipmi-host/1.0+gitAUTOINC+5d38067181-r1/build/../git/include/ipmid/message/pack.hpp:80:28: error: static assertion failed: Attempt to pack a type that has no IPMI pack operation
80 | static_assert(std::is_integral_v<T>,
| ~~~~~^~~~~~~~~~~~~~~~
static_assert() in unpack.hpp:
template <typename T>
struct UnpackSingle
{
static int op(Payload& p, T& t)
{
static_assert(
utility::dependent_false<T>::value,
"Attempt to unpack a type that has no IPMI unpack operation");
static_assert() in pack.hpp:
template <typename T>
struct PackSingle
{
static int op(Payload& p, const T& t)
{
static_assert(std::is_integral_v<T>,
"Attempt to pack a type that has no IPMI pack operation");
Best regards,
Tim
________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20220602/9683bf9f/attachment-0001.htm>
More information about the openbmc
mailing list