Skip to content

meson: update and modernize#137

Open
williamspatrick wants to merge 6 commits intoAMDESE:integ_sp8from
williamspatrick:integ_sp8
Open

meson: update and modernize#137
williamspatrick wants to merge 6 commits intoAMDESE:integ_sp8from
williamspatrick:integ_sp8

Conversation

@williamspatrick
Copy link
Copy Markdown

Reformat and modernize use of Meson. Fix a number of deprecated patterns,
fix the APML dependency when option is disabled, and add meson subproject
wrap files for all public dependencies so that the repository can be built
in stand-alone mode.

Use `meson format` to format the meson files.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Ensure all files are formatted per the .clang-format.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
If the APML support is disabled, we should not be looking for the APML
library.  Move this as appropriate so that meson doesn't search for it
when not specified.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Add wrap files for libgpiod and all the common OpenBMC repositories used
as dependencies.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
- Set meson requirement to 1.1.1 which is necessary for C++23 support.
- Use `dependency.get_variable` rather than `get_pkgconfig_variable`,
  which was deprecated in meson 0.56.
- Use systemd `systemd_system_unit_dir` variable rather than the
  underscore-less name, which is deprecated in systemd.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
The `meson_options.txt` file is deprecated in favor of `meson.options`.
Modernize the codebase by using the new filename.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
@williamspatrick
Copy link
Copy Markdown
Author

Standalone build still fails with the following:

[1/13] Compiling C++ object amd-ras-manager.p/src_crashdump_manager.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_crashdump_manager.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_crashdump_manager.cpp.o.rsp
In file included from ../src/crashdump_manager.cpp:1:
../include/crashdump_manager.hpp:3:10: fatal error: com/amd/crashdump/server.hpp: No such file or directory
    3 | #include <com/amd/crashdump/server.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[3/13] Compiling C++ object amd-ras-manager.p/src_apml_manager.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_apml_manager.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_apml_manager.cpp.o.rsp
In file included from ../include/base_manager.hpp:3,
                 from ../include/apml_manager.hpp:3,
                 from ../src/apml_manager.cpp:1:
../include/config_manager.hpp:5:10: fatal error: com/amd/RAS/Configuration/common.hpp: No such file or directory
    5 | #include <com/amd/RAS/Configuration/common.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[4/13] Compiling C++ object amd-ras-manager.p/src_utils_cper.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_utils_cper.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_utils_cper.cpp.o.rsp
In file included from ../include/base_manager.hpp:3,
                 from ../include/utils/cper.hpp:3,
                 from ../src/utils/cper.cpp:1:
../include/config_manager.hpp:5:10: fatal error: com/amd/RAS/Configuration/common.hpp: No such file or directory
    5 | #include <com/amd/RAS/Configuration/common.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[5/13] Compiling C++ object amd-ras-manager.p/src_base_manager.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_base_manager.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_base_manager.cpp.o.rsp
In file included from ../include/base_manager.hpp:3,
                 from ../src/base_manager.cpp:1:
../include/config_manager.hpp:5:10: fatal error: com/amd/RAS/Configuration/common.hpp: No such file or directory
    5 | #include <com/amd/RAS/Configuration/common.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[6/13] Compiling C++ object amd-ras-manager.p/src_main.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_main.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_main.cpp.o.rsp
In file included from ../src/main.cpp:1:
../include/config_manager.hpp:5:10: fatal error: com/amd/RAS/Configuration/common.hpp: No such file or directory
    5 | #include <com/amd/RAS/Configuration/common.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[7/13] Compiling C++ object amd-ras-manager.p/src_config_manager.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_config_manager.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_config_manager.cpp.o.rsp
In file included from ../src/config_manager.cpp:1:
../include/config_manager.hpp:5:10: fatal error: com/amd/RAS/Configuration/common.hpp: No such file or directory
    5 | #include <com/amd/RAS/Configuration/common.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[8/13] Compiling C++ object amd-ras-manager.p/src_utils_util.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_utils_util.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_utils_util.cpp.o.rsp
../src/utils/util.cpp:5:10: fatal error: esmi_mailbox.h: No such file or directory
    5 | #include "esmi_mailbox.h"
      |          ^~~~~~~~~~~~~~~~
compilation terminated.

It looks like we need a patch for com.amd dbus interfaces and there is a dependency on a header file that is not present when APML is disabled.

@supven01
Copy link
Copy Markdown
Collaborator

Standalone build still fails with the following:

[1/13] Compiling C++ object amd-ras-manager.p/src_crashdump_manager.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_crashdump_manager.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_crashdump_manager.cpp.o.rsp
In file included from ../src/crashdump_manager.cpp:1:
../include/crashdump_manager.hpp:3:10: fatal error: com/amd/crashdump/server.hpp: No such file or directory
    3 | #include <com/amd/crashdump/server.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[3/13] Compiling C++ object amd-ras-manager.p/src_apml_manager.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_apml_manager.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_apml_manager.cpp.o.rsp
In file included from ../include/base_manager.hpp:3,
                 from ../include/apml_manager.hpp:3,
                 from ../src/apml_manager.cpp:1:
../include/config_manager.hpp:5:10: fatal error: com/amd/RAS/Configuration/common.hpp: No such file or directory
    5 | #include <com/amd/RAS/Configuration/common.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[4/13] Compiling C++ object amd-ras-manager.p/src_utils_cper.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_utils_cper.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_utils_cper.cpp.o.rsp
In file included from ../include/base_manager.hpp:3,
                 from ../include/utils/cper.hpp:3,
                 from ../src/utils/cper.cpp:1:
../include/config_manager.hpp:5:10: fatal error: com/amd/RAS/Configuration/common.hpp: No such file or directory
    5 | #include <com/amd/RAS/Configuration/common.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[5/13] Compiling C++ object amd-ras-manager.p/src_base_manager.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_base_manager.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_base_manager.cpp.o.rsp
In file included from ../include/base_manager.hpp:3,
                 from ../src/base_manager.cpp:1:
../include/config_manager.hpp:5:10: fatal error: com/amd/RAS/Configuration/common.hpp: No such file or directory
    5 | #include <com/amd/RAS/Configuration/common.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[6/13] Compiling C++ object amd-ras-manager.p/src_main.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_main.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_main.cpp.o.rsp
In file included from ../src/main.cpp:1:
../include/config_manager.hpp:5:10: fatal error: com/amd/RAS/Configuration/common.hpp: No such file or directory
    5 | #include <com/amd/RAS/Configuration/common.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[7/13] Compiling C++ object amd-ras-manager.p/src_config_manager.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_config_manager.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_config_manager.cpp.o.rsp
In file included from ../src/config_manager.cpp:1:
../include/config_manager.hpp:5:10: fatal error: com/amd/RAS/Configuration/common.hpp: No such file or directory
    5 | #include <com/amd/RAS/Configuration/common.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[8/13] Compiling C++ object amd-ras-manager.p/src_utils_util.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_utils_util.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_utils_util.cpp.o.rsp
../src/utils/util.cpp:5:10: fatal error: esmi_mailbox.h: No such file or directory
    5 | #include "esmi_mailbox.h"
      |          ^~~~~~~~~~~~~~~~
compilation terminated.

It looks like we need a patch for com.amd dbus interfaces and there is a dependency on a header file that is not present when APML is disabled.

This application has a dependency on APML library. com.amd dbus interface dependency can be separated out. However, APML library dependency can't be avoided. Is there a reason why APML library is being removed out from this application?

@ojayanth
Copy link
Copy Markdown

Standalone build still fails with the following:

[1/13] Compiling C++ object amd-ras-manager.p/src_crashdump_manager.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_crashdump_manager.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_crashdump_manager.cpp.o.rsp
In file included from ../src/crashdump_manager.cpp:1:
../include/crashdump_manager.hpp:3:10: fatal error: com/amd/crashdump/server.hpp: No such file or directory
    3 | #include <com/amd/crashdump/server.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[3/13] Compiling C++ object amd-ras-manager.p/src_apml_manager.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_apml_manager.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_apml_manager.cpp.o.rsp
In file included from ../include/base_manager.hpp:3,
                 from ../include/apml_manager.hpp:3,
                 from ../src/apml_manager.cpp:1:
../include/config_manager.hpp:5:10: fatal error: com/amd/RAS/Configuration/common.hpp: No such file or directory
    5 | #include <com/amd/RAS/Configuration/common.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[4/13] Compiling C++ object amd-ras-manager.p/src_utils_cper.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_utils_cper.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_utils_cper.cpp.o.rsp
In file included from ../include/base_manager.hpp:3,
                 from ../include/utils/cper.hpp:3,
                 from ../src/utils/cper.cpp:1:
../include/config_manager.hpp:5:10: fatal error: com/amd/RAS/Configuration/common.hpp: No such file or directory
    5 | #include <com/amd/RAS/Configuration/common.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[5/13] Compiling C++ object amd-ras-manager.p/src_base_manager.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_base_manager.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_base_manager.cpp.o.rsp
In file included from ../include/base_manager.hpp:3,
                 from ../src/base_manager.cpp:1:
../include/config_manager.hpp:5:10: fatal error: com/amd/RAS/Configuration/common.hpp: No such file or directory
    5 | #include <com/amd/RAS/Configuration/common.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[6/13] Compiling C++ object amd-ras-manager.p/src_main.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_main.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_main.cpp.o.rsp
In file included from ../src/main.cpp:1:
../include/config_manager.hpp:5:10: fatal error: com/amd/RAS/Configuration/common.hpp: No such file or directory
    5 | #include <com/amd/RAS/Configuration/common.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[7/13] Compiling C++ object amd-ras-manager.p/src_config_manager.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_config_manager.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_config_manager.cpp.o.rsp
In file included from ../src/config_manager.cpp:1:
../include/config_manager.hpp:5:10: fatal error: com/amd/RAS/Configuration/common.hpp: No such file or directory
    5 | #include <com/amd/RAS/Configuration/common.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[8/13] Compiling C++ object amd-ras-manager.p/src_utils_util.cpp.o
FAILED: [code=1] amd-ras-manager.p/src_utils_util.cpp.o 
/usr/bin/ccache c++ @amd-ras-manager.p/src_utils_util.cpp.o.rsp
../src/utils/util.cpp:5:10: fatal error: esmi_mailbox.h: No such file or directory
    5 | #include "esmi_mailbox.h"
      |          ^~~~~~~~~~~~~~~~
compilation terminated.

It looks like we need a patch for com.amd dbus interfaces and there is a dependency on a header file that is not present when APML is disabled.

This application has a dependency on APML library. com.amd dbus interface dependency can be separated out. However, APML library dependency can't be avoided. Is there a reason why APML library is being removed out from this application?

Since AMD is carrying some internal PDI patches while the submodule currently points to the upstream PDI repository, this mismatch is causing the build failures. Until those patches are accepted and merged upstream, we may need to temporarily use an AMD‑hosted PDI repository to keep standalone builds working.

@williamspatrick
Copy link
Copy Markdown
Author

It looks like we need a patch for com.amd dbus interfaces and there is a dependency on a header file that is not present when APML is disabled.

This application has a dependency on APML library. com.amd dbus interface dependency can be separated out. However, APML library dependency can't be avoided. Is there a reason why APML library is being removed out from this application?

@supven01 - there is no open source APML library, so I have no way to build this. The application has a meson option apml-interface, which my assumption was this intended to build in an APML-less mode (based on existing meson logic).

@williamspatrick
Copy link
Copy Markdown
Author

Since AMD is carrying some internal PDI patches while the submodule currently points to the upstream PDI repository, this mismatch is causing the build failures. Until those patches are accepted and merged upstream, we may need to temporarily use an AMD‑hosted PDI repository to keep standalone builds working.

Can we add a Meson option(s) to disable support for those OEM interfaces?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants