sony / flutter-elinux-plugins

Flutter plugins for embedded Linux (eLinux)
BSD 3-Clause "New" or "Revised" License
43 stars 23 forks source link

<video player> compilation error #93

Closed JGNS closed 6 months ago

JGNS commented 6 months ago

hello,an error occurred during compilation: In file included from /home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/.plugin_symlinks/video_p layer_elinux/elinux/video_player_elinux_plugin.cc:10: /home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/cpp_client_wrapper/inclu de/flutter/event_stream_handler_functions.h: In instantiation of ‘std::unique_ptr<flutter::StreamHandlerError > flutter::StreamHandlerFunctions::OnListenInternal(const T, std::unique_ptr<flutter::EventSink >&&) [with T = flutter::EncodableValue]’: /home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/cpp_client_wrapper/inclu de/flutter/event_stream_handler_functions.h:48:42: required from here /home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/cpp_client_wrapper/inclu de/flutter/event_stream_handler_functions.h:57:27: error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move] 57 | return std::move(error); | ^ /home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/cpp_client_wrapper/inclu de/flutter/event_stream_handler_functions.h:57:27: note: remove ‘std::move’ call /home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/cpp_client_wrapper/inclu de/flutter/event_stream_handler_functions.h: In instantiation of ‘std::unique_ptr<flutter::StreamHandlerError > flutter::StreamHandlerFunctions::OnCancelInternal(const T) [with T = flutter::EncodableValue]’: /home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/cpp_client_wrapper/inclu de/flutter/event_stream_handler_functions.h:61:42: required from here /home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/cpp_client_wrapper/inclu de/flutter/event_stream_handler_functions.h:69:27: error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move] 69 | return std::move(error); | ^ /home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/cpp_client_wrapper/inclu de/flutter/event_stream_handler_functions.h:69:27: note: remove ‘std::move’ call /home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/.plugin_symlinks/video_p layer_elinux/elinux/video_player_elinux_plugin.cc: In member function ‘const string {anonymous}::VideoPlayerPlugin::GetExecutableDirectory()’: /home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/.plugin_symlinks/video_p layer_elinux/elinux/video_player_elinux_plugin.cc:633:11: error: ignoring return value of ‘ssize_t readlink(const char, char, size_t)’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result] 633 | readlink("/proc/self/exe", buf, sizeof(buf) - 1); | ~~^~~~~~~~~~ cc1plus: all warnings being treated as errors make[2]: [plugins/video_player_elinux/CMakeFiles/video_player_elinux_plugin.dir/build.mak e:63:plugins/video_player_elinux/CMakeFiles/video_player_elinux_plugin.dir/video _player_elinux_plugin.cc.o] 错误 1 make[1]: [CMakeFiles/Makefile2:250:plugins/video_player_elinux/CMakeFiles/video_player_el inux_plugin.dir/all] 错误 2 make: *** [Makefile:130:all] 错误 2

It seems to be a compatibility issue. How can I solve this problem? Thank you.

JGNS commented 6 months ago

i use aarch64-linux-gnu-g++-10

HidenoriMatsubayashi commented 6 months ago

Unfortunately, the official flutter/engine and flutter-elinux doesn't support gcc compiler so please use clang instead. Thanks. Closing.