openbmc / docs

OpenBMC Documentation
Creative Commons Attribution 4.0 International
277 stars 307 forks source link

Hello-World example fails: boost not found #76

Closed Erich-McMillan closed 1 year ago

Erich-McMillan commented 2 years ago

Hello, I am following the instructions provided to build hello-world. I was able to configure the environment and boot Romulus via Qemu, but encountered an error when building phosphor-state-manager.

The problem:

phosphor-state-manager doesn't build due to cereal build issue (see attached log). Seems boost can't be found via BoostConfig.cmake?

I looked in the sdk-workspace, it appears boost 1.79.0 and associated .hpp/.c cp files are present and I have the sdk for Romulus in my path, so I'm not sure where to look next.

Relevant Info

Operating system: Ubuntu 20.04.4 LTS (Focal) Chipset: Intel i7-9700T Branch/Commit: phosphor-state-manager/main ("master") 128ea8e3f1c56af1f7aa615a6f3b94088c9ba978 Meson Log: meson-log.txt

Thanks for taking a look, hope I haven't missed one of the setup steps in the docs :)

NodeMan97 commented 2 years ago

Hey Erich! Thank you for pointing this out. The good news is that I was able to recreate this issue. Bad news is I haven't been able to figure it out yet :p. Hopefully I'll be able to come up with a fix before the weekend as this is something that needs to be addressed.

P.S: I know you were following the steps to build the project through the SDK, but in general in order to use ninja to build with certain repos within Openbmc it is necessary to use gcc-11. I noticed you were using 9.4.0. That isn't causing this issue, but thought I'd give you the heads up. Cheers!

Erich-McMillan commented 2 years ago

Hi NodeMan97,

Thanks for taking a look, let me know if I can help to triage the issue on my end.

In the meantime I will try using GCC11 and report back. Probably won't get to test until tomorrow or this weekend.

:)

NodeMan97 commented 2 years ago

Hello, Following these steps should get the sdk hello world example up and running. https://github.com/NodeMan97/build-for-phosphor-state-manager-sdk/blob/master/SDK-FIX.md

Basically have to manually add some dependencies to the meson build and also some cmake files.

hayleyyan commented 2 years ago

Hello @NodeMan97

I followed the steps from the github repository mentioned above but it seems like it needs an updated version of boost_serialization? (1.79.0 vs 1.80.0)

| Could not find a configuration file for package "boost_serialization" that
| exactly matches requested version "1.80.0".

| The following configuration files were considered but not accepted:

| /root/sdk/romulus-2022-09-21/sysroots/arm1176jzs-openbmc-linux-gnueabi/usr/lib/cmake/boost_serialization-1.79.0/boost_serialization-config.cmake, version: 1.79.0

| Call Stack (most recent call first):
| /root/sdk/romulus-2022-09-21/sysroots/arm1176jzs-openbmc-linux-gnueabi/usr/lib/cmake/Boost-1.80.0/BoostConfig.cmake:262 (boost_find_component)
| /root/sdk/romulus-2022-09-21/sysroots/x86_64-oesdk-linux/usr/share/cmake-3.24/Modules/FindBoost.cmake:594 (find_package)
| CMakeLists.txt:111 (find_package)

| -- Configuring incomplete, errors occurred!
| See also "/home/phosphor-state-manager/build/subprojects/cereal/__CMake_build/CMakeFiles/CMakeOutput.log".

cereal| CMake configuration: FAILED

cereal| Exception: Failed to configure the CMake subproject

Subproject subprojects/cereal is buildable: NO (disabling)

meson.build:132:4: ERROR: Assert failed: cereal is required
eli-schwartz commented 2 years ago

You should only need boost for the cereal test programs. Can you instead try to delete subprojects/cereal.wrap, run meson wrap install cereal, and update meson.build to declare it as a required dependency?

williamspatrick commented 1 year ago

Documentation has been updated to not use SDK.