[phosphor-ipmi-flash]: stdplus build failed before building the host-tool on the Host
Willy Tu
wltu at google.com
Wed Jun 29 01:56:19 AEST 2022
Oh yeah, the README is 100% outdated. We have moved to meson and we
should update it at some point in life.
I think your command to build burn_my_bmc should be fine. The
`host-tool` should be enabled by default.
Can try the following, just in case.
```
meson setup -Dhost-tool=enabled builddir
ninja -C builddir
ninja -C builddir install
```
Willy Tu
On Tue, Jun 28, 2022 at 8:51 AM Brandon Kim <brandonkim at google.com> wrote:
>
> Ah, it seems like the email chains were broken up for some reason - seeing this now after I replied to the other email chain.
>
> It is totally possible that our instructions in the README is not up to date anymore, but just to make sure - are you building each of the components as specified by https://github.com/openbmc/phosphor-ipmi-flash#building-the-host-tool ?
>
> It details the commands to use for each of the dependencies.
>
> Good point on the burn_my_bmc command in the README description not being not up to date and still using automake (https://github.com/openbmc/phosphor-ipmi-flash#building-the-host-tool) - I'll try to run this to verify when I get time later today, but in the meantime perhaps @Willy Tu may know the command off the top of his head as he performed the big meson migration. As a first glance the command looks correct.
>
> Willy recently also migrated phospohr-host-ipmid to meson, so he may know more about the PAM dependency as well.
>
> Thanks,
> Brandon
>
>
> On Tue, Jun 28, 2022 at 8:04 AM Chris Chen (TPI) <Chris.Chen3 at flex.com> wrote:
>>
>> Hi Patrick,
>>
>> Thanks for your prompt reply, and the issue is solved after installing Ubuntu "libfmt-dev" package.
>>
>> >> Do you know why you disabled C++20? This shouldn't have been necessary
>> >> and some of our code now requires C++20.
>>
>> I disabled C++20 of the "ipmi-blob-tool" package because I got errors below:
>> =====
>> archer at archer-ArcherCityM:ipmi-blob-tool$ ./bootstrap.sh
>> + autoreconf -v -f -i
>> autoreconf: export WARNINGS=
>> autoreconf: Entering directory '.'
>> autoreconf: configure.ac: not using Gettext
>> autoreconf: running: aclocal --force -I m4
>> configure.ac:38: error: invalid first argument `20' to AX_CXX_COMPILE_STDCXX
>> /usr/share/aclocal/ax_cxx_compile_stdcxx.m4:50: AX_CXX_COMPILE_STDCXX is expanded from...
>> configure.ac:38: the top level
>> autom4te: error: /usr/bin/m4 failed with exit status: 1
>> aclocal: error: /usr/bin/autom4te failed with exit status: 1
>> autoreconf: error: aclocal failed with exit status: 1
>> =====
>> Do you have ideas about how to solve it correctly?
>>
>> In addition, i have started to build the burn_my_bmc (the host-tool) on the Host by cloning the "phosphor-ipmi-flash" source. There are some questions came out:
>>
>> The "phosphor-ipmi-flash" package seems became to use "meson" rather than "bootstrap.sh", so I run these commands in the source directory. Is it correct?
>> -----
>> meson setup -Dbmc-blob-handler=disabled builddir
>> ninja -C builddir
>> ninja -C builddir install
>> -----
>>
>> After running "meson setup -Dbmc-blob-handler=disabled builddir", it occurred dependency errors, like 'sdbusplus', 'phosphor-dbus-interfaces', 'libipmid', and so on is required respectively, is it correct?
>>
>> I for now have tried to install these dependencies one-by-one, but be stuck at 'libipmid'. That is I clone the "phosphor-host-ipmid" and run "meson builddir" command to build it, however, I got an error in blow and I can't solve it. Could you please give me some suggestions?
>> =====
>> Dependency sdeventplus from subproject subprojects/sdeventplus found: YES 0.1
>> Dependency systemd found: YES 249 (cached)
>> Run-time dependency libcrypto found: YES 3.0.2
>>
>> meson.build:89:0: ERROR: C++ shared or static library 'pam' not found
>> =====
>>
>> Thanks.
>>
>> Regards,
>> Chris Chen
>>
>> ________________________________ 寄件者: Patrick Williams
>> 已傳送: 星期二, 2022 6 月 28 日 下午 07:20
>> 收件者: Chris Chen (TPI)
>> 副本: openbmc at lists.ozlabs.org
>> 主旨: Re: [phosphor-ipmi-flash]: stdplus build failed before building the host-tool on the Host
>>
>> On Tue, Jun 28, 2022 at 08:43:34AM +0000, Chris Chen (TPI) wrote:
>> > And each library and tool is built successful(only one thing that is I had to disable C++20 for the ipmi-blob-tool, others were fine) untilI started to build the stdplus. I encountered a build failed issue as below. It looks like there is a problem for using libfmt.a, I tried to figure out a solution on google but nothing is related to this. Could anyone help on this? Thanks.
>>
>> Do you know why you disabled C++20? This shouldn't have been necessary
>> and some of our code now requires C++20.
>>
>> >
>> > =====
>> > archer at archer-ArcherCityM:stdplus$
>> > archer at archer-ArcherCityM:stdplus$ meson setup -Dexamples=false -Dtests=disabled builddir
>> > The Meson build system
>> > Version: 0.61.2
>> > Source dir: /home/archer/Downloads/host-tool/stdplus
>> > Build dir: /home/archer/Downloads/host-tool/stdplus/builddir
>> > Build type: native build
>> > Project name: stdplus
>> > Project version: 0.1
>> > C++ compiler for the host machine: c++ (gcc 11.2.0 "c++ (Ubuntu 11.2.0-19ubuntu1) 11.2.0")
>> > C++ linker for the host machine: c++ ld.bfd 2.38
>> > Host machine cpu family: x86_64
>> > Host machine cpu: x86_64
>> > Found pkg-config: /usr/bin/pkg-config (0.29.2)
>> > Run-time dependency fmt found: YES 8.1.2
>>
>> Where did this `fmt` come from? Ubuntu has `libfmt-dev` that you can
>> install which is version 8.1.1 on Jammy right now.
>>
>> > Library dl found: YES
>> > Run-time dependency liburing found: YES 2.0
>> > Build targets in project: 1
>> >
>> > stdplus 0.1
>> >
>> > User defined options
>> > examples: false
>> > tests : disabled
>> >
>> > Found ninja-1.10.1 at /usr/bin/ninja
>> > archer at archer-ArcherCityM:stdplus$
>> > archer at archer-ArcherCityM:stdplus$
>> > archer at archer-ArcherCityM:stdplus$ ninja -C builddir
>> > ninja: Entering directory `builddir'
>> > [9/9] Linking target src/libstdplus.so.0.1
>> > FAILED: src/libstdplus.so.0.1
>> > c++ -o src/libstdplus.so.0.1 src/libstdplus.so.0.1.p/stdplus_exception.cpp.o src/libstdplus.so.0.1.p/stdplus_signal.cpp.o src/libstdplus.so.0.1.p/stdplus_dl.cpp.o src/libstdplus.so.0.1.p/stdplus_fd_create.cpp.o src/libstdplus.so.0.1.p/stdplus_fd_dupable.cpp.o src/libstdplus.so.0.1.p/stdplus_fd_impl.cpp.o src/libstdplus.so.0.1.p/stdplus_fd_managed.cpp.o src/libstdplus.so.0.1.p/stdplus_fd_mmap.cpp.o src/libstdplus.so.0.1.p/stdplus_fd_ops.cpp.o src/libstdplus.so.0.1.p/stdplus_io_uring.cpp.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libstdplus.so.0 /usr/local/lib/libfmt.a -ldl /usr/lib/x86_64-linux-gnu/liburing.so -Wl,--end-group
>> > /usr/bin/ld: /usr/local/lib/libfmt.a(format.cc.o): warning: relocation against `stdout@@GLIBC_2.2.5' in read-only section `.text'
>> > /usr/bin/ld: /usr/local/lib/libfmt.a(format.cc.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
>>
>> However you obtained your libfmt, it was compiled incorrectly. It
>> shouldn't have a static library but a dynamic one.
>>
>> The `libfmt-dev` package has `libfmt.so` which should be sufficient for
>> linking as a shared library.
>>
>> --
>> Patrick Williams
>> Legal Disclaimer :
>> The information contained in this message may be privileged and confidential.
>> It is intended to be read only by the individual or entity to whom it is addressed
>> or by their designee. If the reader of this message is not the intended recipient,
>> you are on notice that any distribution of this message, in any form,
>> is strictly prohibited. If you have received this message in error,
>> please immediately notify the sender and delete or destroy any copy of this message!
More information about the openbmc
mailing list