docs icon indicating copy to clipboard operation
docs copied to clipboard

Hello-World example fails: boost not found

Open Erich-McMillan opened this issue 3 years ago • 4 comments

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 :)

Erich-McMillan avatar Jul 25 '22 02:07 Erich-McMillan

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!

NodeMan97 avatar Jul 28 '22 21:07 NodeMan97

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.

:)

Erich-McMillan avatar Jul 29 '22 02:07 Erich-McMillan

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.

NodeMan97 avatar Aug 03 '22 18:08 NodeMan97

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

hayleyyan avatar Sep 22 '22 20:09 hayleyyan

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?

eli-schwartz avatar Nov 06 '22 17:11 eli-schwartz

Documentation has been updated to not use SDK.

williamspatrick avatar Jul 29 '23 11:07 williamspatrick