Closed JGNS closed 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.
i use aarch64-linux-gnu-g++-10
Unfortunately, the official flutter/engine and flutter-elinux doesn't support gcc compiler so please use clang instead. Thanks. Closing.
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] 错误 2It seems to be a compatibility issue. How can I solve this problem? Thank you.