openbmc / phosphor-state-manager

Apache License 2.0
11 stars 21 forks source link

chassis_state_manager.cpp:28:71: error: ‘sdbusplus::xyz::openbmc_project::State::Shutdown::Power::Error::Blackout’ has not been declared #8

Closed ChaoyangZhang closed 5 years ago

ChaoyangZhang commented 5 years ago

When I make the phosphor-state-manager,the following issue throws to me:

chassis_state_manager.cpp:28:71: error: ‘sdbusplus::xyz::openbmc_project::State::Shutdown::Power::Error::Blackout’ has not been declared
 using sdbusplus::xyz::openbmc_project::State::Shutdown::Power::Error::Blackout;
                                                                       ^~~~~~~~
chassis_state_manager.cpp: In member function ‘void phosphor::state::manager::Chassis::determineInitialState()’:
chassis_state_manager.cpp:106:28: error: ‘Blackout’ was not declared in this scope
                     report<Blackout>();
                            ^~~~~~~~
chassis_state_manager.cpp:106:28: note: suggested alternative: ‘stack_t’
                     report<Blackout>();
                            ^~~~~~~~
                            stack_t
chassis_state_manager.cpp:106:38: error: no matching function for call to ‘report<<expression error> >()’
                     report<Blackout>();
                                      ^
In file included from /usr/local/oecore-x86_64/sysroots/armv6-openbmc-linux-gnueabi/usr/include/phosphor-logging/elog-errors.hpp:10,
                 from chassis_state_manager.cpp:6:
/usr/local/oecore-x86_64/sysroots/armv6-openbmc-linux-gnueabi/usr/include/phosphor-logging/elog.hpp:176:6: note: candidate: ‘template<class T, class ... Args> void phosphor::logging::report(Args ...)’
 void report(Args... i_args)
      ^~~~~~
/usr/local/oecore-x86_64/sysroots/armv6-openbmc-linux-gnueabi/usr/include/phosphor-logging/elog.hpp:176:6: note:   template argument deduction/substitution failed:
chassis_state_manager.cpp:106:38: error: template argument 1 is invalid
                     report<Blackout>();
                                      ^
In file included from /usr/local/oecore-x86_64/sysroots/armv6-openbmc-linux-gnueabi/usr/include/phosphor-logging/elog-errors.hpp:10,
                 from chassis_state_manager.cpp:6:
/usr/local/oecore-x86_64/sysroots/armv6-openbmc-linux-gnueabi/usr/include/phosphor-logging/elog.hpp:203:6: note: candidate: ‘template<class T, class ... Args> void phosphor::logging::report(sdbusplus::xyz::openbmc_project::Logging::server::Entry::Level, Args ...)’
 void report(Entry::Level level, Args... i_args)
      ^~~~~~
/usr/local/oecore-x86_64/sysroots/armv6-openbmc-linux-gnueabi/usr/include/phosphor-logging/elog.hpp:203:6: note:   template argument deduction/substitution failed:
chassis_state_manager.cpp:106:38: error: template argument 1 is invalid
                     report<Blackout>();
                                      ^

I don't know why this happens?please help me! Thank you!

geissonator commented 5 years ago

Are you building with the SDK? If so you'll need to be sure to use a recent one. That error was recently added into phosphor-dbus-interfaces so you'll need a current version of that repo in your build env. Recent SDK's can be grabbed from https://openpower.xyz/job/openbmc-build-sdk/

ChaoyangZhang commented 5 years ago

Thank for your comment! I has alread installed SDK. Install SDK as follow steps:

# bitbake -c populate_sdk obmc-phosphor-image
# ./tmp/deploy/sdk/oecore-x86_64-armv6-toolchain-nodistro.0.sh

And got those tips:

Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro) SDK installer version nodistro.0
=============================================================================================
Enter target directory for SDK (default: /usr/local/oecore-x86_64): 
You are about to install the SDK to "/usr/local/oecore-x86_64". Proceed[Y/n]? y
Extracting SDK.............................................................................done
Setting it up...done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
 $ . /usr/local/oecore-x86_64/environment-setup-armv6-openbmc-linux-gnueabi

I also execute this: $ . /usr/local/oecore-x86_64/environment-setup-armv6-openbmc-linux-gnueabi

Could you give me the detail how to install the recent SDK? Thank you!

geissonator commented 5 years ago

Are you running the "bitbake -c populate_sdk obmc-phosphor-image" against a recent openbmc/openbmc master? If so then it should work. I don't use the x86 sdk much. You could try to use the one from here

wget https://openpower.xyz/job/openbmc-build-sdk/distro=ubuntu,target=qemux86-64/lastSuccessfulBuild/artifact/deploy/sdk/oecore-x86_64-core2-64-toolchain-nodistro.0.sh

Or I usually use the witherspoon one:

wget https://openpower.xyz/job/openbmc-build-sdk/distro=ubuntu,target=witherspoon/lastSuccessfulBuild/artifact/deploy/sdk/oecore-x86_64-armv6-toolchain-nodistro.0.sh
ChaoyangZhang commented 5 years ago

Thank you for your help.It is very useful. And I have killed this issue under your guidance.