openbmc / phosphor-inventory-manager

Apache License 2.0
8 stars 9 forks source link

How to build? What is the difference between inventory manager and entity manager? #9

Closed MinzChan closed 11 months ago

MinzChan commented 1 year ago

Building After running pimgen.py, build PIM using the following steps:

./bootstrap.sh ./configure ${CONFIGURE_FLAGS} make To clean the repository run:

./bootstrap.sh clean

i did not find a bootstrap.sh

williamspatrick commented 1 year ago

The repository was converted to meson a while ago but it looks like we misssed updating the README.

meson setup builddir
ninja -C builddir
MinzChan commented 1 year ago

asus@asus-ASUS-TUF-Gaming-F15-FX507ZM:~/sdk/phosphor-inventory-manager$ meson setup build meson-wrapper: Running meson with setup options: " --cross-file=/home/asus/sdk/romulus-2023-07-28/sysroots/x86_64-oesdk-linux/usr/share/meson/arm-openbmc-linux-gnueabi-meson.cross --native-file=/home/asus/sdk/romulus-2023-07-28/sysroots/x86_64-oesdk-linux/usr/share/meson/meson.native " The Meson build system Version: 1.1.1 Source dir: /home/asus/sdk/phosphor-inventory-manager Build dir: /home/asus/sdk/phosphor-inventory-manager/build Build type: cross build Project name: phosphor-inventory-manager Project version: 1.0.0 C++ compiler for the host machine: arm-openbmc-linux-gnueabi-g++ -marm -mcpu=arm1176jz-s -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/asus/sdk/romulus-2023-07-28/sysroots/arm1176jzs-openbmc-linux-gnueabi (gcc 13.1.1 "arm-openbmc-linux-gnueabi-g++ (GCC) 13.1.1 20230520") C++ linker for the host machine: arm-openbmc-linux-gnueabi-g++ -marm -mcpu=arm1176jz-s -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/asus/sdk/romulus-2023-07-28/sysroots/arm1176jzs-openbmc-linux-gnueabi ld.bfd 2.40.0.20230419 C++ compiler for the build machine: g++ (gcc 13.1.0 "g++ (Ubuntu 13.1.0-8ubuntu1) 13.1.0") C++ linker for the build machine: g++ ld.bfd 2.40.90.20230705 Build machine cpu family: x86_64 Build machine cpu: x86_64 Host machine cpu family: x86_64 Host machine cpu: x86_64 Target machine cpu family: x86_64 Target machine cpu: x86_64 Configuring config.h using configuration Found pkg-config: /home/asus/sdk/romulus-2023-07-28/sysroots/x86_64-oesdk-linux/usr/bin/pkg-config (0.29.2) Found CMake: NO Run-time dependency cereal found: NO (tried pkgconfig and cmake) Header "cereal/cereal.hpp" has symbol "cereal::specialize" with dependency cereal: YES Run-time dependency sdbusplus found: YES 1.0.0 Run-time dependency phosphor-dbus-interfaces found: YES 1.0.0 Run-time dependency phosphor-logging found: YES 1.0.0 Program python3 found: YES (/home/asus/sdk/romulus-2023-07-28/sysroots/x86_64-oesdk-linux/usr/bin/python3) Has header "nlohmann/json.hpp" : YES Run-time dependency GTest found: YES 1.13.0 Run-time dependency GMock found: YES 1.13.0 Build targets in project: 9

phosphor-inventory-manager 1.0.0

User defined options Cross files : /home/asus/sdk/romulus-2023-07-28/sysroots/x86_64-oesdk-linux/usr/share/meson/arm-openbmc-linux-gnueabi-meson.cross Native files: /home/asus/sdk/romulus-2023-07-28/sysroots/x86_64-oesdk-linux/usr/share/meson/meson.native

Found ninja-1.11.1 at /home/asus/sdk/romulus-2023-07-28/sysroots/x86_64-oesdk-linux/usr/bin/ninja

build failed in ninja -C build there are so many "changed in GCC 7.1" errors

williamspatrick commented 1 year ago

there are so many "changed in GCC 7.1" errors

That sounds like a warning and not an error. Do you have a full output you can upload to gist.github.com?

MinzChan commented 1 year ago

https://gist.github.com/MinzChan/04d12fdc564a3d7bca275cf6cafba9fa

williamspatrick commented 1 year ago

arm-openbmc-linux-gnueabi-g++: fatal error: Killed signal terminated program cc1plus compilation terminated.

Your system ran out of memory during compile. You might try adding -j1 to ninja or increasing the memory to your virtual machine.

williamspatrick commented 1 year ago

Keeping open to track the documentation update.