Closed feitiantutu closed 1 year ago
The Meson build system Version: 0.63.3 Source dir: /workdir/sdk/phosphor-state-manager Build dir: /workdir/sdk/phosphor-state-manager/build Build type: native build Project name: phosphor-state-manager Project version: 0.1 C++ compiler for the host machine: c++ (gcc 7.5.0 "c++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0") C++ linker for the host machine: c++ ld.bfd 2.30 Host machine cpu family: x86_64 Host machine cpu: x86_64 Configuring config.h using configuration Found pkg-config: /workdir/sdk/sysroots/x86_64-oesdk-linux/usr/bin/pkg-config (0.29.2) Run-time dependency sdbusplus found: YES 1.0.0 Run-time dependency sdeventplus found: YES 0.1 Run-time dependency phosphor-logging found: YES 1.0.0 Run-time dependency phosphor-dbus-interfaces found: YES 1.0.0 Run-time dependency libgpiod found: YES 1.6.3 Run-time dependency fmt found: YES 9.1.0
meson.build:88:7: ERROR: C++ Compiler does not support -std=c++20
It seems like meson still chose your system’s gcc/g++ instead of the one from the SDK. Can you give the steps you used to set up the SDK prior to calling meson?
qiu@ubuntu:~/sdk$ wget https://jenkins.openbmc.org/job/latest-master-sdk/label=docker-builder,target=romulus/lastSuccessfulBuild/artifact/deploy/sdk/oecore-x86_64-arm1176jzs-toolchain-nodistro.0.sh --2022-11-22 17:33:11-- https://jenkins.openbmc.org/job/latest-master-sdk/label=docker-builder,target=romulus/lastSuccessfulBuild/artifact/deploy/sdk/oecore-x86_64-arm1176jzs-toolchain-nodistro.0.sh Resolving jenkins.openbmc.org (jenkins.openbmc.org)... 169.60.228.181 Connecting to jenkins.openbmc.org (jenkins.openbmc.org)|169.60.228.181|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 340017813 (324M) [application/x-sh] Saving to: ‘oecore-x86_64-arm1176jzs-toolchain-nodistro.0.sh’
oecore-x86_64-arm11 13%[=> ] 44.25M 742KB/s in 76s
2022-11-22 17:34:28 (598 KB/s) - Connection closed at byte 46396560. Retrying.
--2022-11-22 17:34:29-- (try: 2) https://jenkins.openbmc.org/job/latest-master-sdk/label=docker-builder,target=romulus/lastSuccessfulBuild/artifact/deploy/sdk/oecore-x86_64-arm1176jzs-toolchain-nodistro.0.sh Connecting to jenkins.openbmc.org (jenkins.openbmc.org)|169.60.228.181|:443... connected. HTTP request sent, awaiting response... 206 Partial Content Length: 340017813 (324M), 293621253 (280M) remaining [application/x-sh] Saving to: ‘oecore-x86_64-arm1176jzs-toolchain-nodistro.0.sh’
oecore-x86_64-arm1176jzs-toolchain-nodistro.0.sh 79%[+++++++++++++++==========================================================================> ] 259.25M 753KB/s in 5m 28s
2022-11-22 17:39:57 (672 KB/s) - Connection closed at byte 271842488. Retrying.
--2022-11-22 17:39:59-- (try: 3) https://jenkins.openbmc.org/job/latest-master-sdk/label=docker-builder,target=romulus/lastSuccessfulBuild/artifact/deploy/sdk/oecore-x86_64-arm1176jzs-toolchain-nodistro.0.sh Connecting to jenkins.openbmc.org (jenkins.openbmc.org)|169.60.228.181|:443... connected. HTTP request sent, awaiting response... 206 Partial Content Length: 340017813 (324M), 68175325 (65M) remaining [application/x-sh] Saving to: ‘oecore-x86_64-arm1176jzs-toolchain-nodistro.0.sh’
oecore-x86_64-arm1176jzs-toolchain-nodistro.0.sh 100%[++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++======================>] 324.27M 667KB/s in 96s
2022-11-22 17:41:36 (692 KB/s) - ‘oecore-x86_64-arm1176jzs-toolchain-nodistro.0.sh’ saved [340017813/340017813]
Enter target directory for SDK (default: /usr/local/oecore-x86_64): /home/qiu/sdk/romulus You are about to install the SDK to "/home/qiu/sdk/romulus". Proceed [Y/n]? Y Extracting SDK...........................................................................................................done Setting it up...done SDK has been successfully set up and is ready to be used. Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g. $ . /home/qiu/sdk/romulus/environment-setup-arm1176jzs-openbmc-linux-gnueabi qiu@ubuntu:~/sdk$ . /home/qiu/sdk/romulus/environment-setup-arm1176jzs-openbmc-linux-gnueabi qiu@ubuntu:~/sdk$ git clone https://github.com/openbmc/phosphor-state-manager.git Cloning into 'phosphor-state-manager'... remote: Enumerating objects: 1556, done. remote: Counting objects: 100% (60/60), done. remote: Compressing objects: 100% (37/37), done. remote: Total 1556 (delta 27), reused 47 (delta 21), pack-reused 1496 Receiving objects: 100% (1556/1556), 498.44 KiB | 924.00 KiB/s, done. Resolving deltas: 100% (1044/1044), done. Checking connectivity... done. qiu@ubuntu:~/sdk$ qiu@ubuntu:~/sdk$ qiu@ubuntu:~/sdk$ ls oecore-x86_64-arm1176jzs-toolchain-nodistro.0.sh phosphor-state-manager romulus qiu@ubuntu:~/sdk$ cd phosphor-state-manager/ qiu@ubuntu:~/sdk/phosphor-state-manager$ ls bmc_state_manager.cpp data host_state_manager.hpp meson_options.txt scripts systemd_service_parser.hpp test bmc_state_manager.hpp discover_system_state.cpp host_state_manager_main.cpp obmcutil secure_boot_check.cpp systemd_target_monitor.cpp utils.cpp bmc_state_manager_main.cpp host_check.cpp hypervisor_state_manager.cpp OWNERS service_files systemd_target_parser.cpp utils.hpp chassis_check_power_status.cpp host_check.hpp hypervisor_state_manager.hpp README.md settings.cpp systemd_target_parser.hpp chassis_state_manager.cpp host_condition_gpio hypervisor_state_manager_main.cpp scheduled_host_transition.cpp settings.hpp systemd_target_signal.cpp chassis_state_manager.hpp host_reset_recovery.cpp LICENSE scheduled_host_transition.hpp subprojects systemd_target_signal.hpp chassis_state_manager_main.cpp host_state_manager.cpp meson.build scheduled_host_transition_main.cpp systemd_service_parser.cpp target_files qiu@ubuntu:~/sdk/phosphor-state-manager$ meson build The Meson build system Version: 0.64.0 Source dir: /home/qiu/sdk/phosphor-state-manager Build dir: /home/qiu/sdk/phosphor-state-manager/build Build type: native build Project name: phosphor-state-manager Project version: 0.1 C++ compiler for the host machine: c++ (gcc 5.4.0 "c++ (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609") C++ linker for the host machine: c++ ld.bfd 2.26.1 Host machine cpu family: x86_64 Host machine cpu: x86_64 Configuring config.h using configuration Found pkg-config: /home/qiu/sdk/romulus/sysroots/x86_64-oesdk-linux/usr/bin/pkg-config (0.29.2) Run-time dependency sdbusplus found: YES 1.0.0 Run-time dependency sdeventplus found: YES 0.1 Run-time dependency phosphor-logging found: YES 1.0.0 Run-time dependency phosphor-dbus-interfaces found: YES 1.0.0 Run-time dependency libgpiod found: YES 1.6.3 Run-time dependency fmt found: YES 9.1.0
meson.build:88:7: ERROR: C++ Compiler does not support -std=c++20
A full log can be found at /home/qiu/sdk/phosphor-state-manager/build/meson-logs/meson-log.txt
WARNING: Running the setup command as meson [options]
instead of meson setup [options]
is ambiguous and deprecated.
i removed default_options: [ 'warning_level=3', 'werror=true',
],
it's work
qiu@ubuntu:~/sdk/phosphor-state-manager$ meson build The Meson build system Version: 0.64.0 Source dir: /home/qiu/sdk/phosphor-state-manager Build dir: /home/qiu/sdk/phosphor-state-manager/build Build type: cross build Project name: phosphor-state-manager Project version: 0.1 C++ compiler for the host machine: arm-openbmc-linux-gnueabi-g++ -marm -mcpu=arm1176jz-s -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/qiu/sdk/romulus/sysroots/arm1176jzs-openbmc-linux-gnueabi (gcc 12.2.0 "arm-openbmc-linux-gnueabi-g++ (GCC) 12.2.0") C++ linker for the host machine: arm-openbmc-linux-gnueabi-g++ -marm -mcpu=arm1176jz-s -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/qiu/sdk/romulus/sysroots/arm1176jzs-openbmc-linux-gnueabi ld.bfd 2.39.0.20220819 C++ compiler for the build machine: g++ (gcc 5.4.0 "g++ (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609") C++ linker for the build machine: g++ ld.bfd 2.26.1 Build machine cpu family: x86_64 Build machine cpu: x86_64 Host machine cpu family: x86_64 Host machine cpu: x86_64 Target machine cpu family: x86_64 Target machine cpu: x86_64 Configuring config.h using configuration Found pkg-config: /home/qiu/sdk/romulus/sysroots/x86_64-oesdk-linux/usr/bin/pkg-config (0.29.2) Run-time dependency sdbusplus found: YES 1.0.0 Run-time dependency sdeventplus found: YES 0.1 Run-time dependency phosphor-logging found: YES 1.0.0 Run-time dependency phosphor-dbus-interfaces found: YES 1.0.0 Run-time dependency libgpiod found: YES 1.6.3 Run-time dependency fmt found: YES 9.1.0 Has header "nlohmann/json.hpp" : NO Cloning into 'nlohmann-json'... remote: Enumerating objects: 35549, done. remote: Counting objects: 100% (547/547), done. remote: Compressing objects: 100% (91/91), done. remote: Total 35549 (delta 259), reused 507 (delta 243), pack-reused 35002 Receiving objects: 100% (35549/35549), 176.25 MiB | 721.00 KiB/s, done. Resolving deltas: 100% (22037/22037), done. Checking connectivity... done.
Executing subproject nlohmann-json
nlohmann-json| Project name: nlohmann_json nlohmann-json| Project version: 3.11.2 nlohmann-json| C++ compiler for the host machine: arm-openbmc-linux-gnueabi-g++ -marm -mcpu=arm1176jz-s -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/qiu/sdk/romulus/sysroots/arm1176jzs-openbmc-linux-gnueabi (gcc 12.2.0 "arm-openbmc-linux-gnueabi-g++ (GCC) 12.2.0") nlohmann-json| C++ linker for the host machine: arm-openbmc-linux-gnueabi-g++ -marm -mcpu=arm1176jz-s -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/qiu/sdk/romulus/sysroots/arm1176jzs-openbmc-linux-gnueabi ld.bfd 2.39.0.20220819 nlohmann-json| C++ compiler for the build machine: g++ (gcc 5.4.0 "g++ (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609") nlohmann-json| C++ linker for the build machine: g++ ld.bfd 2.26.1 nlohmann-json| Build targets in project: 0 nlohmann-json| Subproject nlohmann-json finished.
meson.build:95: WARNING: include_directories sandbox violation! The project is trying to access the directory 'subprojects/nlohmann-json/single_include' which belongs to a different subproject. This is a problem as it hardcodes the relative paths of these two projects. This makes it impossible to compile the project in any other directory layout and also prevents the subproject from changing its own directory layout.
Instead of poking directly at the internals the subproject should be executed and it should set a variable that the caller can then use. Something like:
some_dep = declare_dependency(include_directories: include_directories('include'))
[provide] some = some_dep
some_dep = dependency('some') executable(..., dependencies: [some_dep])
This warning will become a hard error in a future Meson release.
meson.build:95: WARNING: include_directories sandbox violation! The project is trying to access the directory 'subprojects/nlohmann-json/single_include/nlohmann' which belongs to a different subproject. This is a problem as it hardcodes the relative paths of these two projects. This makes it impossible to compile the project in any other directory layout and also prevents the subproject from changing its own directory layout.
Instead of poking directly at the internals the subproject should be executed and it should set a variable that the caller can then use. Something like:
some_dep = declare_dependency(include_directories: include_directories('include'))
[provide] some = some_dep
some_dep = dependency('some') executable(..., dependencies: [some_dep])
This warning will become a hard error in a future Meson release.
Has header "CLI/CLI.hpp" : NO Found CMake: NO Run-time dependency cli11 found: NO (tried pkgconfig and cmake) Looking for a fallback subproject for the dependency CLI11 Cloning into 'CLI11'... fatal: unable to access 'https://github.com/CLIUtils/CLI11.git/': gnutls_handshake() failed: Error in the pull function.
meson.build:103:4: ERROR: Git command failed: ['/usr/bin/git', 'clone', 'https://github.com/CLIUtils/CLI11.git', 'CLI11']
A full log can be found at /home/qiu/sdk/phosphor-state-manager/build/meson-logs/meson-log.txt
WARNING: Running the setup command as meson [options]
instead of meson setup [options]
is ambiguous and deprecated.
We’ve removed suggestions to use SDK from documentation.
i used sdk but not work