All of lore.kernel.org
 help / color / mirror / Atom feed
* [phosphor-ipmi-flash]: stdplus build failed before building the host-tool on the Host
@ 2022-06-28  8:43 Chris Chen (TPI)
  2022-06-28 11:20 ` Patrick Williams
  0 siblings, 1 reply; 7+ messages in thread
From: Chris Chen (TPI) @ 2022-06-28  8:43 UTC (permalink / raw)
  To: openbmc; +Cc: Chris Chen (TPI)

[-- Attachment #1: Type: text/plain, Size: 3853 bytes --]

Hi everyone,

I for now am trying to enable the In-Band Update of BMC Firmware using OEM IPMI Blob Transport feature. So I followed the README.md in the phosphor-ipmi-flash repo to build the host-tool on the Host, the Host is running the Ubuntu 22.04 with installing gcc, g++, cmake, and meson tools which versions are as below:
=====
archer@archer-ArcherCityM:stdplus$ gcc --version
gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
archer@archer-ArcherCityM:stdplus$ g++ --version
g++ (Ubuntu 11.2.0-19ubuntu1) 11.2.0
archer@archer-ArcherCityM:stdplus$ cmake --version
cmake version 3.22.1
archer@archer-ArcherCityM:stdplus$ meson --version
0.61.2
=====

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.

=====
archer@archer-ArcherCityM:stdplus$
archer@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
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@archer-ArcherCityM:stdplus$
archer@archer-ArcherCityM:stdplus$
archer@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
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
=====

Of course, I have not the burn_my_bmc (the host-tool) yet.

Regards,
Chris Chen

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!

[-- Attachment #2: Type: text/html, Size: 7668 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [phosphor-ipmi-flash]: stdplus build failed before building the host-tool on the Host
  2022-06-28  8:43 [phosphor-ipmi-flash]: stdplus build failed before building the host-tool on the Host Chris Chen (TPI)
@ 2022-06-28 11:20 ` Patrick Williams
  2022-06-28 15:44   ` Brandon Kim
  0 siblings, 1 reply; 7+ messages in thread
From: Patrick Williams @ 2022-06-28 11:20 UTC (permalink / raw)
  To: Chris Chen (TPI); +Cc: openbmc

[-- Attachment #1: Type: text/plain, Size: 3122 bytes --]

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@archer-ArcherCityM:stdplus$
> archer@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@archer-ArcherCityM:stdplus$
> archer@archer-ArcherCityM:stdplus$
> archer@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [phosphor-ipmi-flash]: stdplus build failed before building the host-tool on the Host
  2022-06-28 11:20 ` Patrick Williams
@ 2022-06-28 15:44   ` Brandon Kim
  0 siblings, 0 replies; 7+ messages in thread
From: Brandon Kim @ 2022-06-28 15:44 UTC (permalink / raw)
  To: Patrick Williams; +Cc: openbmc, Chris Chen (TPI), William Kennington

Apologies, I must have missed the first email - please let me and
wak@google.com know if there are any further issues you're
experiencing with the repo. Thanks Patrick for the help.

Cheers,
Brandon


On Tue, Jun 28, 2022 at 4:21 AM Patrick Williams <patrick@stwcx.xyz> wrote:
>
> 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@archer-ArcherCityM:stdplus$
> > archer@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@archer-ArcherCityM:stdplus$
> > archer@archer-ArcherCityM:stdplus$
> > archer@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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [phosphor-ipmi-flash]: stdplus build failed before building the host-tool on the Host
  2022-06-29  7:57     ` 回覆: " Chris Chen (TPI)
@ 2022-06-29 17:19       ` Brandon Kim
  0 siblings, 0 replies; 7+ messages in thread
From: Brandon Kim @ 2022-06-29 17:19 UTC (permalink / raw)
  To: Chris Chen (TPI); +Cc: openbmc, Willy Tu

[-- Attachment #1: Type: text/plain, Size: 17837 bytes --]

Hi Chris,

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.)
> =====
> ../subprojects/phosphor-objmgr/libmapper/test/mapper.cpp:4:10: fatal
> error: gtest/gtest.h: No such file or directory
>     4 | #include <gtest/gtest.h>
>

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?

../entity_map_json.hpp:5:10: fatal error: nlohmann/json.hpp: No such file
> or directory
>     5 | #include <nlohmann/json.hpp>
> ../include/ipmid/message.hpp:26:10: fatal error: phosphor-logging/log.hpp:
> No such file or directory
>    26 | #include <phosphor-logging/log.hpp>


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?

Thanks,
Brandon


On Wed, Jun 29, 2022 at 12:57 AM Chris Chen (TPI) <Chris.Chen3@flex.com>
wrote:

> Hi Brandon and Willy,
>
>    - First of all, I would like to say thanks for your answer and
>    confirmation, the problems I listed are solved.
>
>
>    - For Brandon's question,
>    - > 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?
>    -
>    Yes, I followed the README.md to build each of the components.
>
>
>    - 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.)
>    - =====
>    - ../subprojects/phosphor-objmgr/libmapper/test/mapper.cpp:4:10: fatal
>    error: gtest/gtest.h: No such file or directory
>    -     4 | #include <gtest/gtest.h>
>    - ../entity_map_json.hpp:5:10: fatal error: nlohmann/json.hpp: No such
>    file or directory
>    -     5 | #include <nlohmann/json.hpp>
>    - ../include/ipmid/message.hpp:26:10: fatal error:
>    phosphor-logging/log.hpp: No such file or directory
>    -    26 | #include <phosphor-logging/log.hpp>
>    - =====
>    -
>    - Do you have any suggestions on this?
>    -
>    - BTW. I use following commands to build the "phosphor-host-ipmid"
>    package, it should be correct, right?
>    - -----
>    - meson setup -Dtests=disabled builddir
>    - ninja -C builddir
>    - ninja -C builddir install
>    - -----
>
>
>    - 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
>    https://github.com/openbmc/docs/blob/master/testing/run-test-docker.md#build-docker-image to
>    build the docker image, of course, I replace the command as below,
>
>
>    ./scripts/build-qemu-robot-docker.sh
>
>
>    - 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?
>    - =====
>    - archer@archer-ArcherCityM:openbmc-build-scripts$
>    ./scripts/build-unit-test-docker
>    - Image openbmc/ubuntu-unit-test-base:2022-W26-e79767e5378d5a0f
>    already exists.  Skipping.
>    Image
>    openbmc/ubuntu-unit-test-uscilab-cereal:2022-W26-ab72d4495979e830 already
>    exists.  Skipping.
>    Image openbmc/ubuntu-unit-test-nlohmann-json:2022-W26-ffba809170eb0a41
>    already exists.  Skipping.
>    Image
>    openbmc/ubuntu-unit-test-naios-function2:2022-W26-3b876756bb76be23 already
>    exists.  Skipping.
>    Image
>    openbmc/ubuntu-unit-test-cliutils-cli11:2022-W26-f53b55bea30b21c6 already
>    exists.  Skipping.
>    Image
>    openbmc/ubuntu-unit-test-libvnc-libvncserver:2022-W26-90d3acb2a0df9617
>    already exists.  Skipping.
>    Image
>    openbmc/ubuntu-unit-test-cppalliance-url:2022-W26-460f317503ba9422 already
>    exists.  Skipping.
>    Image openbmc/ubuntu-unit-test-boost:2022-W26-d87626309071f65f already
>    exists.  Skipping.
>    Image
>    openbmc/ubuntu-unit-test-catchorg-catch2:2022-W26-3439038e67e82304 already
>    exists.  Skipping.
>    Image
>    openbmc/ubuntu-unit-test-leethomason-tinyxml2:2022-W26-323efeff9db53382
>    already exists.  Skipping.
>    Image
>    openbmc/ubuntu-unit-test-facebookexperimental-libunifex:2022-W26-1eff6ee41b25d7e1
>    already exists.  Skipping.
>    Image
>    openbmc/ubuntu-unit-test-linux-test-project-lcov:2022-W26-13690675d4cda956
>    already exists.  Skipping.
>    Image openbmc/ubuntu-unit-test-fmtlib-fmt:2022-W26-8c08817ee76f296a
>    already exists.  Skipping.
>    Image
>    openbmc/ubuntu-unit-test-google-googletest:2022-W26-41755ba7fe770d1e
>    already exists.  Skipping.
>    Image
>    openbmc/ubuntu-unit-test-tristanpenman-valijson:2022-W26-2d55955ffea82018
>    already exists.  Skipping.
>    Image
>    openbmc/ubuntu-unit-test-open-power-pdbg:2022-W26-ea1338b7d5bcf717 already
>    exists.  Skipping.
>    Image
>    openbmc/ubuntu-unit-test-openbmc-sdbusplus:2022-W26-4de3de6a7dd74c72
>    already exists.  Skipping.
>    Image
>    openbmc/ubuntu-unit-test-openbmc-stdplus:2022-W26-fcc6d0d878d82435 already
>    exists.  Skipping.
>    Image
>    openbmc/ubuntu-unit-test-openbmc-gpioplus:2022-W26-6e12ea9e28a38a45 already
>    exists.  Skipping.
>    Image
>    openbmc/ubuntu-unit-test-openbmc-sdeventplus:2022-W26-077c15efe62026d9
>    already exists.  Skipping.
>    - Package openbmc/linux failed!
>    Traceback (most recent call last):
>      File
>    "/home/archer/Downloads/openbmc-build-scripts/./scripts/build-unit-test-docker",
>    line 852, in <module>
>        Package.generate_all()
>      File
>    "/home/archer/Downloads/openbmc-build-scripts/./scripts/build-unit-test-docker",
>    line 396, in generate_all
>        raise t.exception
>      File
>    "/home/archer/Downloads/openbmc-build-scripts/./scripts/build-unit-test-docker",
>    line 365, in run
>        Docker.build(self.package, tag, dockerfile)
>      File
>    "/home/archer/Downloads/openbmc-build-scripts/./scripts/build-unit-test-docker",
>    line 620, in build
>        docker.build(
>      File "/home/archer/.local/lib/python3.10/site-packages/sh.py", line
>    1566, in __call__
>        return RunningCommand(cmd, call_args, stdin, stdout, stderr)
>      File "/home/archer/.local/lib/python3.10/site-packages/sh.py", line
>    822, in __init__
>        self.wait()
>      File "/home/archer/.local/lib/python3.10/site-packages/sh.py", line
>    879, in wait
>        self.handle_command_exit_code(exit_code)
>      File "/home/archer/.local/lib/python3.10/site-packages/sh.py", line
>    905, in handle_command_exit_code
>        raise exc
>    sh.ErrorReturnCode_1:
>
>      RAN: /usr/local/bin/docker build --network=host --force-rm
>    --no-cache=false -t
>    openbmc/ubuntu-unit-test-openbmc-linux:2022-W26-4d748d691e37a3f6 -
>
>      STDOUT:
>
>
>      STDERR:
>    #1 [internal] load build definition from Dockerfile
>    #1
>    sha256:7b1d92eec8d42e247f2bb4fd1260a7b209eb6af9dab84c342a27d5cdd089f3f8
>    #1 transferring dockerfile: 307B 0.0s done
>    #1 DONE 0.1s
>
>    #2 [internal] load .dockerignore
>    #2
>    sha256:c8396637158fe442f7870c427fb14a5e1f1f71b781353fcff1a75b6301070bcb
>    #2 transferring context: 2B done
>    #2 DONE 0.0s
>
>    #3 [internal] load metadata for
>    docker.io/openbmc/ubuntu-unit-test-base:2022-W26-e79767e5378d5a0f
>    #3
>    sha256:053b27ec734906a3cbf79dc0bc99b133a80abc1aa2fd5545010138b72cf16ee0
>    #3 DONE 0.0s
>
>    #4 [1/2] FROM
>    docker.io/openbmc/ubuntu-unit-test-base:2022-W26-e79767e5378d5a0f
>    #4
>    sha256:e6e9b48a100df776a75b8dc934e85d3f5282ade34c031f25e3dd74a0ecd13842
>    #4 CACHED
>
>    #5 [2/2] RUN curl -L https://github.com/openbmc/linux/arch... (3475
>    more, please see e.stderr)
>    - =====
>
> Regards,
> Chris Chen
>
> ------------------------------
> *寄件者:* Willy Tu <wltu@google.com>
> *寄件日期:* 2022年6月28日 下午 11:56
> *收件者:* Brandon Kim <brandonkim@google.com>
> *副本:* Chris Chen (TPI) <Chris.Chen3@flex.com>; Patrick Williams <
> patrick@stwcx.xyz>; openbmc@lists.ozlabs.org <openbmc@lists.ozlabs.org>
> *主旨:* Re: [phosphor-ipmi-flash]: stdplus build failed before building the
> host-tool on the Host
>
> 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@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://urldefense.com/v3/__https://github.com/openbmc/phosphor-ipmi-flash*building-the-host-tool__;Iw!!HSntlCg!UGWKiK4C2gPBrPnKMLNL78cKJAEnz7sb96UQ2IJR62gd5toQOBTYp5LubQOq6YnHBYCe7qVRsw7I7w$
> ?
> >
> > 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://urldefense.com/v3/__https://github.com/openbmc/phosphor-ipmi-flash*building-the-host-tool__;Iw!!HSntlCg!UGWKiK4C2gPBrPnKMLNL78cKJAEnz7sb96UQ2IJR62gd5toQOBTYp5LubQOq6YnHBYCe7qVRsw7I7w$
> ) - 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@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@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@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@archer-ArcherCityM:stdplus$
> >> > archer@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@archer-ArcherCityM:stdplus$
> >> > archer@archer-ArcherCityM:stdplus$
> >> > archer@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!
>

[-- Attachment #2: Type: text/html, Size: 27090 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [phosphor-ipmi-flash]: stdplus build failed before building the host-tool on the Host
  2022-06-28 15:51 ` Brandon Kim
@ 2022-06-28 15:56   ` Willy Tu
  2022-06-29  7:57     ` 回覆: " Chris Chen (TPI)
  0 siblings, 1 reply; 7+ messages in thread
From: Willy Tu @ 2022-06-28 15:56 UTC (permalink / raw)
  To: Brandon Kim; +Cc: openbmc, Chris Chen (TPI)

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@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@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@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@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@archer-ArcherCityM:stdplus$
>> > archer@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@archer-ArcherCityM:stdplus$
>> > archer@archer-ArcherCityM:stdplus$
>> > archer@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!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [phosphor-ipmi-flash]: stdplus build failed before building the host-tool on the Host
  2022-06-28 15:03 回覆: " Chris Chen (TPI)
  2022-06-28 15:49 ` Willy Tu
@ 2022-06-28 15:51 ` Brandon Kim
  2022-06-28 15:56   ` Willy Tu
  1 sibling, 1 reply; 7+ messages in thread
From: Brandon Kim @ 2022-06-28 15:51 UTC (permalink / raw)
  To: Chris Chen (TPI), Willy Tu; +Cc: openbmc

[-- Attachment #1: Type: text/plain, Size: 7640 bytes --]

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 <wltu@google.com> 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@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@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@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@archer-ArcherCityM:stdplus$
> > archer@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@archer-ArcherCityM:stdplus$
> > archer@archer-ArcherCityM:stdplus$
> > archer@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!
>

[-- Attachment #2: Type: text/html, Size: 11316 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [phosphor-ipmi-flash]: stdplus build failed before building the host-tool on the Host
  2022-06-28 15:03 回覆: " Chris Chen (TPI)
@ 2022-06-28 15:49 ` Willy Tu
  2022-06-28 15:51 ` Brandon Kim
  1 sibling, 0 replies; 7+ messages in thread
From: Willy Tu @ 2022-06-28 15:49 UTC (permalink / raw)
  To: Chris Chen (TPI); +Cc: openbmc

[-- Attachment #1: Type: text/plain, Size: 7358 bytes --]

Hi Chris,

Are you building these locally? I would recommend using the docker that
setup all the required environments for the build.

See
https://github.com/openbmc/openbmc-build-scripts/blob/master/scripts/build-unit-test-docker
for
reference.

If you insist to build locally,

For
```
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
```, you will need to setup with the command in
https://github.com/openbmc/openbmc-build-scripts/commit/3ea4cd7e18d607de59fedc5eae4f3e536e0632a4

For the `pam ` issue, you will need to install `libpam0g-dev`.

Best,

Willy Tu

On Tue, Jun 28, 2022 at 8:04 AM Chris Chen (TPI) <Chris.Chen3@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@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@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@archer-ArcherCityM:stdplus$
> > archer@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@archer-ArcherCityM:stdplus$
> > archer@archer-ArcherCityM:stdplus$
> > archer@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!
>

[-- Attachment #2: Type: text/html, Size: 11493 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-06-29 17:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-28  8:43 [phosphor-ipmi-flash]: stdplus build failed before building the host-tool on the Host Chris Chen (TPI)
2022-06-28 11:20 ` Patrick Williams
2022-06-28 15:44   ` Brandon Kim
2022-06-28 15:03 回覆: " Chris Chen (TPI)
2022-06-28 15:49 ` Willy Tu
2022-06-28 15:51 ` Brandon Kim
2022-06-28 15:56   ` Willy Tu
2022-06-29  7:57     ` 回覆: " Chris Chen (TPI)
2022-06-29 17:19       ` Brandon Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.