<div dir="ltr">Hi Chris,<div><br></div><div>Are you building these locally? I would recommend using the docker that setup all the required environments for the build.</div><div><br></div><div>See <a href="https://github.com/openbmc/openbmc-build-scripts/blob/master/scripts/build-unit-test-docker">https://github.com/openbmc/openbmc-build-scripts/blob/master/scripts/build-unit-test-docker</a> for reference.</div><div><br></div><div>If you insist to build locally, </div><div><br></div><div>For </div><div>```</div><div><div style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><a href="http://configure.ac:38/" target="_blank">configure.ac:38</a>: error: invalid first argument `20' to AX_CXX_COMPILE_STDCXX</div><div style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">/usr/share/aclocal/ax_cxx_compile_stdcxx.m4:50: AX_CXX_COMPILE_STDCXX is expanded from...</div><div style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><a href="http://configure.ac:38/" target="_blank">configure.ac:38</a>: the top level</div></div><div>```, you will need to setup with the command in <a href="https://github.com/openbmc/openbmc-build-scripts/commit/3ea4cd7e18d607de59fedc5eae4f3e536e0632a4">https://github.com/openbmc/openbmc-build-scripts/commit/3ea4cd7e18d607de59fedc5eae4f3e536e0632a4</a></div><div><br></div><div>For the `pam ` issue, you will need to install `libpam0g-dev`.</div><div><br></div><div>Best,</div><div><br></div><div>Willy Tu</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 28, 2022 at 8:04 AM Chris Chen (TPI) <<a href="mailto:Chris.Chen3@flex.com">Chris.Chen3@flex.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi Patrick,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks for your prompt reply, and the issue is solved after installing Ubuntu "libfmt-dev" package.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
>> Do you know why you disabled C++20?  This shouldn't have been necessary </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
>> and some of our code now requires C++20.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I disabled C++20 of the "ipmi-blob-tool" package because I got errors below:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
=====</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
archer@archer-ArcherCityM:ipmi-blob-tool$ ./bootstrap.sh
<div>+ autoreconf -v -f -i</div>
<div>autoreconf: export WARNINGS=</div>
<div>autoreconf: Entering directory '.'</div>
<div>autoreconf: <a href="http://configure.ac" target="_blank">configure.ac</a>: not using Gettext</div>
<div>autoreconf: running: aclocal --force -I m4</div>
<div><a href="http://configure.ac:38" target="_blank">configure.ac:38</a>: error: invalid first argument `20' to AX_CXX_COMPILE_STDCXX</div>
<div>/usr/share/aclocal/ax_cxx_compile_stdcxx.m4:50: AX_CXX_COMPILE_STDCXX is expanded from...</div>
<div><a href="http://configure.ac:38" target="_blank">configure.ac:38</a>: the top level</div>
<div>autom4te: error: /usr/bin/m4 failed with exit status: 1</div>
<div>aclocal: error: /usr/bin/autom4te failed with exit status: 1</div>
autoreconf: error: aclocal failed with exit status: 1<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
=====</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Do you have ideas about how to solve it correctly?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
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:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<ul>
<li>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?<br>
-----<br>
meson setup -Dbmc-blob-handler=disabled builddir<br>
ninja -C builddir<br>
ninja -C builddir install</li><li style="display:block">-----<br>
<br>
</li><li>
<div>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?<span style="background-color:rgb(255,255,255);display:inline"><br>
</span></div>
<span style="background-color:rgb(255,255,255);display:inline"><br>
</span></li><li><span style="background-color:rgb(255,255,255);display:inline">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?</span></li><li style="display:block"><span style="background-color:rgb(255,255,255);display:inline">=====</span></li><li style="display:block"><span style="background-color:rgb(255,255,255);display:inline">Dependency sdeventplus from subproject subprojects/sdeventplus found: YES 0.1
<div>Dependency systemd found: YES 249 (cached)</div>
<div>Run-time dependency libcrypto found: YES 3.0.2</div>
<div><br>
</div>
<div>meson.build:89:0: ERROR: C++ shared or static library 'pam' not found</div>
=====</span></li></ul>
<div><span style="background-color:rgb(255,255,255);display:inline">Thanks.</span></div>
<div><br>
</div>
<div>Regards,</div>
<div>Chris Chen</div>
</div>
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
<hr style="display:inline-block;width:98%">
<b>寄件者:</b> Patrick Williams<br>
<b>已傳送:</b> 星期二, 2022 6 月 28 日 下午 07:20<br>
<b>收件者:</b> Chris Chen (TPI)<br>
<b>副本:</b> <a href="mailto:openbmc@lists.ozlabs.org" target="_blank">openbmc@lists.ozlabs.org</a><br>
<b>主旨:</b> Re: [phosphor-ipmi-flash]: stdplus build failed before building the host-tool on the Host
<div><br>
</div>
</div>
<div><font size="2"><span style="font-size:11pt">
<div>On Tue, Jun 28, 2022 at 08:43:34AM +0000, Chris Chen (TPI) wrote:<br>
> 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.<br>
<br>
Do you know why you disabled C++20?  This shouldn't have been necessary<br>
and some of our code now requires C++20.<br>
<br>
> <br>
> =====<br>
> archer@archer-ArcherCityM:stdplus$<br>
> archer@archer-ArcherCityM:stdplus$ meson setup -Dexamples=false -Dtests=disabled builddir<br>
> The Meson build system<br>
> Version: 0.61.2<br>
> Source dir: /home/archer/Downloads/host-tool/stdplus<br>
> Build dir: /home/archer/Downloads/host-tool/stdplus/builddir<br>
> Build type: native build<br>
> Project name: stdplus<br>
> Project version: 0.1<br>
> C++ compiler for the host machine: c++ (gcc 11.2.0 "c++ (Ubuntu 11.2.0-19ubuntu1) 11.2.0")<br>
> C++ linker for the host machine: c++ ld.bfd 2.38<br>
> Host machine cpu family: x86_64<br>
> Host machine cpu: x86_64<br>
> Found pkg-config: /usr/bin/pkg-config (0.29.2)<br>
> Run-time dependency fmt found: YES 8.1.2<br>
<br>
Where did this `fmt` come from?  Ubuntu has `libfmt-dev` that you can<br>
install which is version 8.1.1 on Jammy right now.<br>
<br>
> Library dl found: YES<br>
> Run-time dependency liburing found: YES 2.0<br>
> Build targets in project: 1<br>
> <br>
> stdplus 0.1<br>
> <br>
>   User defined options<br>
>     examples: false<br>
>     tests   : disabled<br>
> <br>
> Found ninja-1.10.1 at /usr/bin/ninja<br>
> archer@archer-ArcherCityM:stdplus$<br>
> archer@archer-ArcherCityM:stdplus$<br>
> archer@archer-ArcherCityM:stdplus$ ninja -C builddir<br>
> ninja: Entering directory `builddir'<br>
> [9/9] Linking target src/libstdplus.so.0.1<br>
> FAILED: src/libstdplus.so.0.1<br>
> 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<br>
> /usr/bin/ld: /usr/local/lib/libfmt.a(format.cc.o): warning: relocation against `stdout@@GLIBC_2.2.5' in read-only section `.text'<br>
> /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<br>
<br>
However you obtained your libfmt, it was compiled incorrectly.  It<br>
shouldn't have a static library but a dynamic one.<br>
<br>
The `libfmt-dev` package has `libfmt.so` which should be sufficient for<br>
linking as a shared library.<br>
<br>
-- <br>
Patrick Williams<br>
</div>
</span></font></div>
</div>

<div>
Legal Disclaimer :<br>
The information contained in this message may be privileged and confidential. <br>
It is intended to be read only by the individual or entity to whom it is addressed <br>
or by their designee. If the reader of this message is not the intended recipient, <br>
you are on notice that any distribution of this message, in any form, <br>
is strictly prohibited. If you have received this message in error, <br>
please immediately notify the sender and delete or destroy any copy of this message!<br>
</div></div>

</blockquote></div>