openbmc / bmcweb

A do everything Redfish, KVM, GUI, and DBus webserver for OpenBMC
Apache License 2.0
156 stars 131 forks source link

fatal error: sdbusplus/asio/connection.hpp: No such file or directory #161

Closed frsauvage closed 3 years ago

frsauvage commented 3 years ago

Hi,

I ran build_x86_docker.sh from centos8 (I changed docker to podma command in shell) I get following error

[8/15] Compiling C++ object lock_test.p/redfish-core_ut_lock_test.cpp.o FAILED: lock_test.p/redfish-core_ut_lock_test.cpp.o c++ -Ilock_test.p -I. -I.. -I../include -I../redfish-core/include -I../redfish-core/lib -I../http -I../subprojects/nlohmann/single_include -I../subprojects/nlohmann/single_include/nlohmann -I/usr/lib/x86_64-linux-gnu/pkgconfig/../../include -flto -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Wpedantic -Werror -std=c++17 -O2 -g -DBMCWEB_ENABLE_SSL -DBMCWEB_ENABLE_HOST_SERIAL_WEBSOCKET -DBMCWEB_ENABLE_KVM -DBMCWEB_ENABLE_MUTUAL_TLS_AUTHENTICATION -DWEBSERVER_ENABLE_PAM -DBMCWEB_ENABLE_REDFISH -DBMCWEB_ENABLE_DBUS_REST -DBMCWEB_ENABLE_STATIC_HOSTING -DBMCWEB_ENABLE_VM_WEBSOCKET -DBMCWEB_ENABLE_IBM_MANAGEMENT_CONSOLE -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wconversion -Wsign-conversion -Wno-attributes -Wno-stringop-overflow -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wunused-parameter -Wnull-dereference -Wdouble-promotion -Wformat=2 -fno-fat-lto-objects -fvisibility=hidden -fvisibility-inlines-hidden -DBMCWEB_ENABLE_LOGGING -DBMCWEB_ENABLE_DEBUG -DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT -DBOOST_ASIO_DISABLE_THREADS -DBOOST_BEAST_USE_STD_STRING_VIEW -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_ASIO_NO_DEPRECATED -DBOOST_ALL_NO_LIB -DBOOST_NO_RTTI -DBOOST_NO_TYPEID -DBOOST_COROUTINES_NO_DEPRECATION_WARNING -DBOOST_URL_STANDALONE -DBOOST_URL_HEADER_ONLY -Wl,--start-group -lpthread -Wl,--end-group -DGTEST_HAS_PTHREAD=1 -isystem../subprojects/boost-url/include -isystem../subprojects/boost_1_73_0 -MD -MQ lock_test.p/redfish-core_ut_lock_test.cpp.o -MF lock_test.p/redfish-core_ut_lock_test.cpp.o.d -o lock_test.p/redfish-core_ut_lock_test.cpp.o -c ../redfish-core/ut/lock_test.cpp In file included from ../include/sessions.hpp:13, from ../http/http_request.hpp:4, from ../http/http_response.hpp:2, from ../redfish-core/include/error_messages.hpp:17, from ../redfish-core/include/utils/json_utils.hpp:18, from ../redfish-core/ut/lock_test.cpp:4: ../include/dbus_singleton.hpp:2:10: fatal error: sdbusplus/asio/connection.hpp: No such file or directory 2 | #include <sdbusplus/asio/connection.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. [9/15] Compiling C++ object privileges_test.p/redfish-core_ut_privileges_test.cpp.o [10/15] Compiling C++ object bmcweb.p/src_webserver_main.cpp.o ninja: build stopped: subcommand failed. Error: error building at STEP "RUN cd source && meson setup build && meson compile -C build": error while running runtime: exit status 1 Any help would be appreciate, Regards, .. Francine

manojkiraneda commented 3 years ago

Hi @frsauvage ,

There seems to be some unnecessary headers that are included as part of a test file which was demanding sdbusplus/asio/connection.hpp & in the current state sdbusplus is not a dependency for all the working tests that are present in the repository, which is the reason for compile failure.

But, this error does not seem to come when building it natively on linux without any packages installed, atleast for me.Unfortunately i have lost my docker setup when i migrated to fedora33 yesterday, so could not test it till tomrw.

But, I have put up a quick fix for that at https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/37837 can you check if the issue is resolved with this ?

frsauvage commented 3 years ago

Yes it worked :-) Thank a lot @manojkiraneda !