From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8BF9BC43334 for ; Tue, 28 Jun 2022 15:52:38 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4LXTd06gjQz3cBj for ; Wed, 29 Jun 2022 01:52:36 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20210112 header.b=ZPMmeXYb; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=google.com (client-ip=2607:f8b0:4864:20::12e; helo=mail-il1-x12e.google.com; envelope-from=brandonkim@google.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20210112 header.b=ZPMmeXYb; dkim-atps=neutral Received: from mail-il1-x12e.google.com (mail-il1-x12e.google.com [IPv6:2607:f8b0:4864:20::12e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4LXTcD3jWTz3brm for ; Wed, 29 Jun 2022 01:51:55 +1000 (AEST) Received: by mail-il1-x12e.google.com with SMTP id p9so8151301ilj.7 for ; Tue, 28 Jun 2022 08:51:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=q8z9kpBHLUVewvym/4Uy093fsTTexEE47z5rhz1A2LI=; b=ZPMmeXYbQ25ddaSM8Eulno4Uu5HTh3KIpfKj7SM350uy615qurumv7JYk3iapXUr57 aGhStiR6oToyaIaMl6IxX/wBQTnY3/RERQEyC4aPdBWkbxlIWhFoK4i+XVkmSBEy9sAq 4P2EShSCgWGmIbSR66Sv6CYF1IS/evUXSJZ6WSwJHZzjgLTCfTyU6V6eWbeKzWQDzhk+ b5gjO0MjpO/orL/CE1Hm+hHFTNQNAjxFqi5zXKNG9zvU/Lmj2u88cERkv6NBObHFKKFV BPnRmOdWRR+vbKEFN+dqzoMy+t/3/FGBrNWhZMU/M7jFkSpUB9arfojqqMfPjh2o5kTw MLFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=q8z9kpBHLUVewvym/4Uy093fsTTexEE47z5rhz1A2LI=; b=7reGy5ZwpytUCCpi3ImB2KxrIE+Mfw93mngM8SVY1tLFikmr7qZjFkEdDzgtnaBcz1 s4rqt/k1PBc4lOD2p5ybO3MM4SRUSM1WjDgvh+i+cBOhItrSgk1M9ONq69/cTgHpcy7I QHqi5k0oCMnFBLLTApdNMT7APiovBwtjlvUT2H/ZZFPrCDf6FMNY9/0VUx1w7Yaw6gmS 8j6DKb58H1PEYN/MQT7OByXBgy1JqwQYvZt+NFiwnFmHJrqdm300CqROiS8ASHmq57RA ouuUkX+aZhl24MnM6UipLuvKGdG75lX1hP6tqrL9qaWLa/sFDVa1cyS+AFHLnG5lepdF ZH7A== X-Gm-Message-State: AJIora9/N+Yey4BMYZxo0tmQw0Tm0yIHEGtbEIT1DfBZ214fid84J6Cc MonZOyENrV+R0Qyxop3fU3WiSvb/cNmwGlwYAoaWmrsXJG24E0Yn X-Google-Smtp-Source: AGRyM1uhNucDNxaKRI+7T5Yy2wvT6DxOriM0EOHbYbij1rps9z4dNc0fltHq29EUwCjiSmx8jyeezYDHoE8ShD+FmcI= X-Received: by 2002:a05:6e02:1749:b0:2da:9a89:3961 with SMTP id y9-20020a056e02174900b002da9a893961mr5240759ill.258.1656431512397; Tue, 28 Jun 2022 08:51:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Brandon Kim Date: Tue, 28 Jun 2022 08:51:41 -0700 Message-ID: Subject: Re: [phosphor-ipmi-flash]: stdplus build failed before building the host-tool on the Host To: "Chris Chen (TPI)" , Willy Tu Content-Type: multipart/alternative; boundary="000000000000e4973105e28403f6" X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "openbmc@lists.ozlabs.org" Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" --000000000000e4973105e28403f6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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) 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 necessar= y > >> and some of our code now requires C++20. > > I disabled C++20 of the "ipmi-blob-tool" package because I got errors > below: > =3D=3D=3D=3D=3D > archer@archer-ArcherCityM:ipmi-blob-tool$ ./bootstrap.sh > + autoreconf -v -f -i > autoreconf: export WARNINGS=3D > 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 > =3D=3D=3D=3D=3D > 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=3Ddisabled builddir > ninja -C builddir > ninja -C builddir install > - ----- > > - After running "meson setup -Dbmc-blob-handler=3Ddisabled builddir", = it > occurred dependency errors, like 'sdbusplus', 'phosphor-dbus-interface= s', > '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? > - =3D=3D=3D=3D=3D > - 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 > =3D=3D=3D=3D=3D > > Thanks. > > Regards, > Chris Chen > > ------------------------------ > *=E5=AF=84=E4=BB=B6=E8=80=85:* Patrick Williams > *=E5=B7=B2=E5=82=B3=E9=80=81:* =E6=98=9F=E6=9C=9F=E4=BA=8C, 2022 6 =E6=9C= =88 28 =E6=97=A5 =E4=B8=8B=E5=8D=88 07:20 > *=E6=94=B6=E4=BB=B6=E8=80=85:* Chris Chen (TPI) > *=E5=89=AF=E6=9C=AC:* openbmc@lists.ozlabs.org > *=E4=B8=BB=E6=97=A8:* Re: [phosphor-ipmi-flash]: stdplus build failed bef= ore 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 ou= t > 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. > > > > > =3D=3D=3D=3D=3D > > archer@archer-ArcherCityM:stdplus$ > > archer@archer-ArcherCityM:stdplus$ meson setup -Dexamples=3Dfalse > -Dtests=3Ddisabled 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! > --000000000000e4973105e28403f6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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 dat= e anymore, but just to make sure - are you building each of the components = as specified by https://github.com/openbmc/phosphor-ipmi-flash#build= ing-the-host-tool ?

It details the commands to use f= or each of the dependencies.

Good point on the bur= n_my_bmc command in the README description not being not up to date and sti= ll using automake (https://github.com/openbmc/phosphor-ipmi-flash#bu= ilding-the-host-tool) - I'll try to run this to verify when I get t= ime later today, but in the meantime=C2=A0perhaps=C2=A0@Willy Tu=C2=A0may know the command off the top of his head as he = performed the big meson migration. As a first glance the command looks corr= ect.

Willy recently also migrated phospohr-host-ip= mid 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) <Ch= ris.Chen3@flex.com> wrote:
Hi Patrick,

Thanks for your prompt reply, and the issue is solved after installing Ubun= tu "libfmt-dev" package.

>> Do you know why you disabled C++20?=C2=A0 This shouldn't have = been necessary=C2=A0
>> and some of our code now requires C++20.

I disabled C++20 of the "ipmi-blob-tool" package because I got er= rors below:
=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D
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 "m= eson" rather than "bootstrap.sh", so I run these commands in= the source directory. Is it correct?
    -----
    meson setup -Dbmc-blob-handler=3Ddisabled builddir
    ninja -C builddir
    ninja -C builddir install
  • -----

  • After running "meson setup -Dbmc-blob-handler=3Ddisabled builddir= ", it occurred dependency errors, like 'sdbusplus', 'phosp= hor-dbus-interfaces', 'libipmid', and so on is required respect= ively, 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?
  • =3D=3D=3D=3D=3D
  • Dependency sdeventplus from subproject subproject= s/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' no= t found
    =3D=3D=3D=3D=3D
Thank= s.

Regards,
Chris Chen
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 star= ted to build the stdplus. I encountered a build failed issue as below. It l= ooks like there is a problem for using libfmt.a, I tried to figure out a solution on google but nothing is relate= d to this. Could anyone help on this? Thanks.

Do you know why you disabled C++20?=C2=A0 This shouldn't have been nece= ssary
and some of our code now requires C++20.

>
> =3D=3D=3D=3D=3D
> archer@archer-ArcherCityM:stdplus$
> archer@archer-ArcherCityM:stdplus$ meson setup -Dexamples=3Dfalse -Dte= sts=3Ddisabled 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 1= 1.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?=C2=A0 Ubuntu has `libfmt-dev` that you can<= br> 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
>
>=C2=A0=C2=A0 User defined options
>=C2=A0=C2=A0=C2=A0=C2=A0 examples: false
>=C2=A0=C2=A0=C2=A0=C2=A0 tests=C2=A0=C2=A0 : 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++=C2=A0 -o src/libstdplus.so.0.1 src/libstdplus.so.0.1.p/stdplus_exc= eption.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/stdp= lus_fd_managed.cpp.o src/libstdplus.so.0.1.p/stdplus_fd_mmap.cpp.o src/libs= tdplus.so.0.1.p/stdplus_fd_ops.cpp.o src/libstdplus.so.0.1.p/stdplus_io_uri= ng.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.=C2=A0 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 confidentia= l.
It is intended to be read only by the individual or entity to whom it is ad= dressed
or by their designee. If the reader of this message is not the intended rec= ipient,
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!
--000000000000e4973105e28403f6--