<div dir="ltr">Hi Chris,<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">However, I encountered other fatal errors when building the "phosphor-host-ipmid" package as below. (Overall there are three kinds of fatal errors, which is missing gtest.h, json.hpp, and log.hpp, that occured in several files, so I just list one message of each error for reference.)<br>=====<br>../subprojects/phosphor-objmgr/libmapper/test/mapper.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory<br> 4 | #include <gtest/gtest.h><br></blockquote><br>Hmm it's strange that gtest is being pulled in when you have Dtest=disabled for the build. Could you try `rm -rf build` directory for phosphor-host-ipmid before doing the same command again?<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">../entity_map_json.hpp:5:10: fatal error: nlohmann/json.hpp: No such file or directory<br> 5 | #include <nlohmann/json.hpp><br>../include/ipmid/message.hpp:26:10: fatal error: phosphor-logging/log.hpp: No such file or directory<br> 26 | #include <phosphor-logging/log.hpp></blockquote><div><br></div><div>These should have been built as part of "subprojects". Could you make sure phosphor-host-ipmid is pulled to the latest, clear the build directory and build again just to make sure?</div><div><br></div><div>Thanks,</div><div>Brandon</div></div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 29, 2022 at 12:57 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 Brandon and Willy,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<ul>
<li>First of all, I would like to say thanks for your answer and confirmation, the problems I listed are solved.</li></ul>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<ul>
<li>For Brandon's question,</li><li style="display:block">> <span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:11pt">
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</span><span style="color:rgb(0,0,0);font-family:"Microsoft Jhenghei UI",Pmingliu,"Segoe UI",-apple-system,BlinkMacSystemFont,Roboto,"Helvetica Neue",sans-serif;font-size:14.6667px"><span style="font-family:Calibri,Helvetica,sans-serif;font-size:11pt"> </span></span><a href="https://github.com/openbmc/phosphor-ipmi-flash#building-the-host-tool" id="gmail-m_1825173308285465586LPNoLPOWALinkPreview" style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt" target="_blank"><span style="font-family:Calibri,Helvetica,sans-serif;font-size:11pt">https://github.com/openbmc/phosphor-ipmi-flash#building-the-host-tool</span></a><span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:11pt">?</span></li><li style="display:block"><span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:11pt"><br>
<span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;text-align:start;background-color:rgb(255,255,255);display:inline">Yes, I followed the README.md to build each of the components.</span></span></li></ul>
</div>
<div></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<ul>
<li><span>However, I encountered other fatal errors when building the "phosphor-host-ipmid" package as below. (Overall there are three kinds of fatal errors, which is missing gtest.h, json.hpp, and log.hpp, that occured in several files, so I just list one
message of each error for reference.)</span></li><li style="display:block">=====</li><li style="display:block"><span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">../subprojects/phosphor-objmgr/libmapper/test/mapper.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory</span></li><li style="display:block"><span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt"><span style="text-align:start;background-color:rgb(255,255,255);display:inline"> <span> </span></span>4 | #include
<gtest/gtest.h></span></li><li style="display:block"><span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">../entity_map_json.hpp:5:10: fatal error: nlohmann/json.hpp: No such file or directory</span></li><li style="display:block"><span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt"><span style="text-align:start;background-color:rgb(255,255,255);display:inline"> <span> </span></span>5 | #include
<nlohmann/json.hpp></span></li><li style="display:block"><span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">../include/ipmid/message.hpp:26:10: fatal error: phosphor-logging/log.hpp: No such file or directory</span></li><li style="display:block"><span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt"> 26 | #include <phosphor-logging/log.hpp></span></li><li style="display:block"><span style="font-size:12pt">=====</span></li><li style="display:block"><span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt"><br>
</span></li><li style="display:block"><span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">Do you have any suggestions on this?</span></li><li style="display:block"><span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt"><br>
</span></li><li style="display:block"><span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">BTW. I use following commands to build the</span><span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt"> "phosphor-host-ipmid"
package, it should be correct, right?</span></li><li style="display:block">-----</li><li style="display:block">meson setup -Dtests=disabled builddir</li><li style="display:block">ninja -C builddir</li><li style="display:block">ninja -C builddir install</li><li style="display:block">-----</li></ul>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<ul>
<li style="font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;color:rgb(0,0,0)">
<span><span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">I don't insist to build locally, so as per your recommendation I'm trying to build it by using docker. However, I have limit capability with docker,
I for now met a question on building docker image by using the "build-unit-test-docker" script you mentioned, that is after installing the docker-desktop on my Host, I referred to </span></span><a href="https://github.com/openbmc/docs/blob/master/testing/run-test-docker.md#build-docker-image" id="gmail-m_1825173308285465586LPNoLPOWALinkPreview_1" target="_blank">https://github.com/openbmc/docs/blob/master/testing/run-test-docker.md#build-docker-image</a> to
build the docker image, of course, I replace the command as below,</li><div></div>
</ul>
<ul>
<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">./scripts/build-qemu-robot-docker.sh<br>
</span></ul>
<ul>
<li style="display:block;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">Then, the error came out after several minutes. (I retried few times, some images are already exists.) Could you help to take a look at this, and give me
some suggestions as well?</span></li><li style="display:block;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">=====</span></li><li style="display:block;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">archer@archer-ArcherCityM:openbmc-build-scripts$ ./scripts/build-unit-test-docker<br>
</span></li><li style="display:block;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">Image openbmc/ubuntu-unit-test-base:2022-W26-e79767e5378d5a0f already exists. Skipping.
<div>Image openbmc/ubuntu-unit-test-uscilab-cereal:2022-W26-ab72d4495979e830 already exists. Skipping.</div>
<div>Image openbmc/ubuntu-unit-test-nlohmann-json:2022-W26-ffba809170eb0a41 already exists. Skipping.</div>
<div>Image openbmc/ubuntu-unit-test-naios-function2:2022-W26-3b876756bb76be23 already exists. Skipping.</div>
<div>Image openbmc/ubuntu-unit-test-cliutils-cli11:2022-W26-f53b55bea30b21c6 already exists. Skipping.</div>
<div>Image openbmc/ubuntu-unit-test-libvnc-libvncserver:2022-W26-90d3acb2a0df9617 already exists. Skipping.</div>
<div>Image openbmc/ubuntu-unit-test-cppalliance-url:2022-W26-460f317503ba9422 already exists. Skipping.</div>
<div>Image openbmc/ubuntu-unit-test-boost:2022-W26-d87626309071f65f already exists. Skipping.</div>
<div>Image openbmc/ubuntu-unit-test-catchorg-catch2:2022-W26-3439038e67e82304 already exists. Skipping.</div>
<div>Image openbmc/ubuntu-unit-test-leethomason-tinyxml2:2022-W26-323efeff9db53382 already exists. Skipping.</div>
<div>Image openbmc/ubuntu-unit-test-facebookexperimental-libunifex:2022-W26-1eff6ee41b25d7e1 already exists. Skipping.</div>
<div>Image openbmc/ubuntu-unit-test-linux-test-project-lcov:2022-W26-13690675d4cda956 already exists. Skipping.</div>
<div>Image openbmc/ubuntu-unit-test-fmtlib-fmt:2022-W26-8c08817ee76f296a already exists. Skipping.</div>
<div>Image openbmc/ubuntu-unit-test-google-googletest:2022-W26-41755ba7fe770d1e already exists. Skipping.</div>
<div>Image openbmc/ubuntu-unit-test-tristanpenman-valijson:2022-W26-2d55955ffea82018 already exists. Skipping.</div>
<div>Image openbmc/ubuntu-unit-test-open-power-pdbg:2022-W26-ea1338b7d5bcf717 already exists. Skipping.</div>
<div>Image openbmc/ubuntu-unit-test-openbmc-sdbusplus:2022-W26-4de3de6a7dd74c72 already exists. Skipping.</div>
<div>Image openbmc/ubuntu-unit-test-openbmc-stdplus:2022-W26-fcc6d0d878d82435 already exists. Skipping.</div>
<div>Image openbmc/ubuntu-unit-test-openbmc-gpioplus:2022-W26-6e12ea9e28a38a45 already exists. Skipping.</div>
Image openbmc/ubuntu-unit-test-openbmc-sdeventplus:2022-W26-077c15efe62026d9 already exists. Skipping.<br>
</span></li><li style="display:block;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">Package openbmc/linux failed!
<div>Traceback (most recent call last):</div>
<div> File "/home/archer/Downloads/openbmc-build-scripts/./scripts/build-unit-test-docker", line 852, in <module></div>
<div> Package.generate_all()</div>
<div> File "/home/archer/Downloads/openbmc-build-scripts/./scripts/build-unit-test-docker", line 396, in generate_all</div>
<div> raise t.exception</div>
<div> File "/home/archer/Downloads/openbmc-build-scripts/./scripts/build-unit-test-docker", line 365, in run</div>
<div> Docker.build(self.package, tag, dockerfile)</div>
<div> File "/home/archer/Downloads/openbmc-build-scripts/./scripts/build-unit-test-docker", line 620, in build</div>
<div> docker.build(</div>
<div> File "/home/archer/.local/lib/python3.10/site-packages/sh.py", line 1566, in __call__</div>
<div> return RunningCommand(cmd, call_args, stdin, stdout, stderr)</div>
<div> File "/home/archer/.local/lib/python3.10/site-packages/sh.py", line 822, in __init__</div>
<div> self.wait()</div>
<div> File "/home/archer/.local/lib/python3.10/site-packages/sh.py", line 879, in wait</div>
<div> self.handle_command_exit_code(exit_code)</div>
<div> File "/home/archer/.local/lib/python3.10/site-packages/sh.py", line 905, in handle_command_exit_code</div>
<div> raise exc</div>
<div>sh.ErrorReturnCode_1: </div>
<div><br>
</div>
<div> RAN: /usr/local/bin/docker build --network=host --force-rm --no-cache=false -t openbmc/ubuntu-unit-test-openbmc-linux:2022-W26-4d748d691e37a3f6 -</div>
<div><br>
</div>
<div> STDOUT:</div>
<div><br>
</div>
<div><br>
</div>
<div> STDERR:</div>
<div>#1 [internal] load build definition from Dockerfile</div>
<div>#1 sha256:7b1d92eec8d42e247f2bb4fd1260a7b209eb6af9dab84c342a27d5cdd089f3f8</div>
<div>#1 transferring dockerfile: 307B 0.0s done</div>
<div>#1 DONE 0.1s</div>
<div><br>
</div>
<div>#2 [internal] load .dockerignore</div>
<div>#2 sha256:c8396637158fe442f7870c427fb14a5e1f1f71b781353fcff1a75b6301070bcb</div>
<div>#2 transferring context: 2B done</div>
<div>#2 DONE 0.0s</div>
<div><br>
</div>
<div>#3 [internal] load metadata for <a href="http://docker.io/openbmc/ubuntu-unit-test-base:2022-W26-e79767e5378d5a0f" target="_blank">docker.io/openbmc/ubuntu-unit-test-base:2022-W26-e79767e5378d5a0f</a></div>
<div>#3 sha256:053b27ec734906a3cbf79dc0bc99b133a80abc1aa2fd5545010138b72cf16ee0</div>
<div>#3 DONE 0.0s</div>
<div><br>
</div>
<div>#4 [1/2] FROM <a href="http://docker.io/openbmc/ubuntu-unit-test-base:2022-W26-e79767e5378d5a0f" target="_blank">docker.io/openbmc/ubuntu-unit-test-base:2022-W26-e79767e5378d5a0f</a></div>
<div>#4 sha256:e6e9b48a100df776a75b8dc934e85d3f5282ade34c031f25e3dd74a0ecd13842</div>
<div>#4 CACHED</div>
<div><br>
</div>
#5 [2/2] RUN curl -L <a href="https://github.com/openbmc/linux/arch." target="_blank">https://github.com/openbmc/linux/arch.</a>.. (3475 more, please see e.stderr)</span></li><li style="display:block;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">=====</span></li></ul>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Regards,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Chris Chen</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_1825173308285465586divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>寄件者:</b> Willy Tu <<a href="mailto:wltu@google.com" target="_blank">wltu@google.com</a>><br>
<b>寄件日期:</b> 2022年6月28日 下午 11:56<br>
<b>收件者:</b> Brandon Kim <<a href="mailto:brandonkim@google.com" target="_blank">brandonkim@google.com</a>><br>
<b>副本:</b> Chris Chen (TPI) <<a href="mailto:Chris.Chen3@flex.com" target="_blank">Chris.Chen3@flex.com</a>>; Patrick Williams <<a href="mailto:patrick@stwcx.xyz" target="_blank">patrick@stwcx.xyz</a>>; <a href="mailto:openbmc@lists.ozlabs.org" target="_blank">openbmc@lists.ozlabs.org</a> <<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</font>
<div> </div>
</div>
<div><font size="2"><span style="font-size:11pt">
<div>Oh yeah, the README is 100% outdated. We have moved to meson and we<br>
should update it at some point in life.<br>
<br>
I think your command to build burn_my_bmc should be fine. The<br>
`host-tool` should be enabled by default.<br>
<br>
Can try the following, just in case.<br>
```<br>
meson setup -Dhost-tool=enabled builddir<br>
ninja -C builddir<br>
ninja -C builddir install<br>
```<br>
<br>
Willy Tu<br>
<br>
<br>
On Tue, Jun 28, 2022 at 8:51 AM Brandon Kim <<a href="mailto:brandonkim@google.com" target="_blank">brandonkim@google.com</a>> wrote:<br>
><br>
> Ah, it seems like the email chains were broken up for some reason - seeing this now after I replied to the other email chain.<br>
><br>
</div>
<div>> 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
<a href="https://urldefense.com/v3/__https://github.com/openbmc/phosphor-ipmi-flash*building-the-host-tool__;Iw!!HSntlCg!UGWKiK4C2gPBrPnKMLNL78cKJAEnz7sb96UQ2IJR62gd5toQOBTYp5LubQOq6YnHBYCe7qVRsw7I7w$" target="_blank">
https://urldefense.com/v3/__https://github.com/openbmc/phosphor-ipmi-flash*building-the-host-tool__;Iw!!HSntlCg!UGWKiK4C2gPBrPnKMLNL78cKJAEnz7sb96UQ2IJR62gd5toQOBTYp5LubQOq6YnHBYCe7qVRsw7I7w$</a> ?<br>
</div>
<div>><br>
> It details the commands to use for each of the dependencies.<br>
><br>
> Good point on the burn_my_bmc command in the README description not being not up to date and still using automake (<a href="https://urldefense.com/v3/__https://github.com/openbmc/phosphor-ipmi-flash*building-the-host-tool__;Iw!!HSntlCg!UGWKiK4C2gPBrPnKMLNL78cKJAEnz7sb96UQ2IJR62gd5toQOBTYp5LubQOq6YnHBYCe7qVRsw7I7w$" target="_blank">https://urldefense.com/v3/__https://github.com/openbmc/phosphor-ipmi-flash*building-the-host-tool__;Iw!!HSntlCg!UGWKiK4C2gPBrPnKMLNL78cKJAEnz7sb96UQ2IJR62gd5toQOBTYp5LubQOq6YnHBYCe7qVRsw7I7w$</a>
) - 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.<br>
><br>
> Willy recently also migrated phospohr-host-ipmid to meson, so he may know more about the PAM dependency as well.<br>
><br>
> Thanks,<br>
> Brandon<br>
><br>
><br>
> On Tue, Jun 28, 2022 at 8:04 AM Chris Chen (TPI) <<a href="mailto:Chris.Chen3@flex.com" target="_blank">Chris.Chen3@flex.com</a>> wrote:<br>
>><br>
>> Hi Patrick,<br>
>><br>
>> Thanks for your prompt reply, and the issue is solved after installing Ubuntu "libfmt-dev" package.<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>
>> I disabled C++20 of the "ipmi-blob-tool" package because I got errors below:<br>
>> =====<br>
>> archer@archer-ArcherCityM:ipmi-blob-tool$ ./bootstrap.sh<br>
>> + autoreconf -v -f -i<br>
>> autoreconf: export WARNINGS=<br>
>> autoreconf: Entering directory '.'<br>
>> autoreconf: <a href="http://configure.ac" target="_blank">configure.ac</a>: not using Gettext<br>
>> autoreconf: running: aclocal --force -I m4<br>
>> <a href="http://configure.ac:38" target="_blank">configure.ac:38</a>: error: invalid first argument `20' to AX_CXX_COMPILE_STDCXX<br>
>> /usr/share/aclocal/ax_cxx_compile_stdcxx.m4:50: AX_CXX_COMPILE_STDCXX is expanded from...<br>
>> <a href="http://configure.ac:38" target="_blank">configure.ac:38</a>: the top level<br>
>> autom4te: error: /usr/bin/m4 failed with exit status: 1<br>
>> aclocal: error: /usr/bin/autom4te failed with exit status: 1<br>
>> autoreconf: error: aclocal failed with exit status: 1<br>
>> =====<br>
>> Do you have ideas about how to solve it correctly?<br>
>><br>
>> 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:<br>
>><br>
>> 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<br>
>> -----<br>
>><br>
>> 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?<br>
>><br>
>> 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?<br>
>> =====<br>
>> Dependency sdeventplus from subproject subprojects/sdeventplus found: YES 0.1<br>
>> Dependency systemd found: YES 249 (cached)<br>
>> Run-time dependency libcrypto found: YES 3.0.2<br>
>><br>
>> meson.build:89:0: ERROR: C++ shared or static library 'pam' not found<br>
>> =====<br>
>><br>
>> Thanks.<br>
>><br>
>> Regards,<br>
>> Chris Chen<br>
>><br>
>> ________________________________ 寄件者: Patrick Williams<br>
>> 已傳送: 星期二, 2022 6 月 28 日 下午 07:20<br>
>> 收件者: Chris Chen (TPI)<br>
>> 副本: <a href="mailto:openbmc@lists.ozlabs.org" target="_blank">openbmc@lists.ozlabs.org</a><br>
>> 主旨: Re: [phosphor-ipmi-flash]: stdplus build failed before building the host-tool on the Host<br>
>><br>
>> 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>
>> 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>
</span></font></div>
</div>
</blockquote></div>