You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @sausinx . The issue seems to be that the compiler is ignoring the attributes on the template argument int ()(FILE), which is the type of the fclose function. This is likely due to a bug or limitation in the compiler.
To resolve this issue, you can disable the specific warning that is causing the error. Do the following:
In your CMakeLists.txt file, add the following line to disable the warning:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-ignored-attributes")
While executing cmake --build . --target aws-iot-device-client
[ 97%] Building CXX object CMakeFiles/aws-iot-device-client.dir/source/jobs/JobEngine.cpp.o
/home/ubuntu/aws-iot-device-client/source/jobs/JobEngine.cpp: In member function ‘virtual void Aws::Iot::DeviceClient::Jobs::JobEngine::processCmdOutput(int, bool, int)’:
/home/ubuntu/aws-iot-device-client/source/jobs/JobEngine.cpp:29:39: error: ignoring attributes on template argument ‘int ()(FILE)’ [-Werror=ignored-attribute]
29 | unique_ptr<FILE, decltype(&fclose)> pipe(fdopen(fd, "r"), &fclose);
| ^
cc1plus: all warnings being treated as errors
gmake[3]: *** [CMakeFiles/aws-iot-device-client.dir/build.make:384: CMakeFiles/aws-iot-device-client.dir/source/jobs/JobEngine.cpp.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:696: CMakeFiles/aws-iot-device-client.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:703: CMakeFiles/aws-iot-device-client.dir/rule] Error 2
gmake: *** [Makefile:169: aws-iot-device-client] Error 2
Distributor ID: Ubuntu
Description: Ubuntu 24.04.1 LTS
Release: 24.04
Codename: noble
The text was updated successfully, but these errors were encountered: