flutter_secure_storage icon indicating copy to clipboard operation
flutter_secure_storage copied to clipboard

Linux App Won't build

Open GoranSustekJr opened this issue 1 year ago • 2 comments

dMy ubuntu machine gives error when executing flutter run -d linux. I get the following error when Using flutter run -d linux -v ] [ ] Shutdown hooks complete [ ] [ ] exiting with code 0 [ +758 ms] [2/5] Building CXX object CMakeFiles/crocut.dir/flutter/generated_plugin_registrant.cc.o [ +210 ms] [3/5] Building CXX object CMakeFiles/crocut.dir/my_application.cc.o [ +288 ms] [4/5] Linking CXX executable intermediates_do_not_run/crocut [ +1 ms] FAILED: intermediates_do_not_run/crocut [ +42 ms] : && /snap/flutter/current/usr/bin/clang++ -g -B/snap/flutter/current/usr/lib/gcc/x86_64-linux-gnu/9 -B/snap/flutter/current/usr/lib/x86_64-linux-gnu -B/snap/flutter/current/lib/x86_64-linux-gnu -B/snap/flutter/current/usr/lib/ -L/snap/flutter/current/usr/lib/gcc/x86_64-linux-gnu/9 -L/snap/flutter/current/usr/lib/x86_64-linux-gnu -L/snap/flutter/current/lib/x86_64-linux-gnu -L/snap/flutter/current/usr/lib/ -lblkid -lgcrypt -llzma -llz4 -lgpg-error -luuid -lpthread -ldl -lepoxy -lfontconfig CMakeFiles/crocut.dir/main.cc.o CMakeFiles/crocut.dir/my_application.cc.o CMakeFiles/crocut.dir/flutter/generated_plugin_registrant.cc.o -o intermediates_do_not_run/crocut -Wl,-rpath,/home/gsustek/projects/crocut-10-2-2024/crocut/build/linux/x64/debug/plugins/flutter_secure_storage_linux:/home/gsustek/projects/crocut-10-2-2024/crocut/build/linux/x64/debug/pl ugins/native_context_menu:/home/gsustek/projects/crocut-10-2-2024/crocut/build/linux/x64/debug/plugins/screen_retriever:/home/gsustek/projects/crocut-10-2-2024/crocut/build/linux/x64/debug /plugins/url_launcher_linux:/home/gsustek/projects/crocut-10-2-2024/crocut/build/linux/x64/debug/plugins/window_manager:/home/gsustek/projects/crocut-10-2-2024/crocut/build/linux/x64/debug /plugins/window_to_front:/home/gsustek/projects/crocut-10-2-2024/crocut/linux/flutter/ephemeral: plugins/flutter_secure_storage_linux/libflutter_secure_storage_linux_plugin.so plugins/native_context_menu/libnative_context_menu_plugin.so plugins/screen_retriever/libscreen_retriever_plugin.so plugins/url_launcher_linux/liburl_launcher_linux_plugin.so plugins/window_manager/libwindow_manager_plugin.so plugins/window_to_front/libwindow_to_front_plugin.so /home/gsustek/projects/crocut-10-2-2024/crocut/linux/flutter/ephemeral/libflutter_linux_gtk.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libgtk-3.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libgdk-3.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libpango-1.0.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libharfbuzz.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libatk-1.0.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libcairo-gobject.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libcairo.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libgio-2.0.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libgobject-2.0.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libglib-2.0.so && : [ +3 ms] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libsecret-1.so.0: undefined reference tog_task_set_static_name' [ +1 ms] clang: error: linker command failed with exit code 1 (use -v to see invocation) [ +4 ms] ninja: build stopped: subcommand failed. [ +26 ms] Building Linux application... (completed in 9.3s) [+8564 ms] Exception: Build process failed [ +4 ms] "flutter run" took 19,436ms. [ +5 ms] #0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3) #1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:790:9) #2 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1367:27) #3 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19) #4 CommandRunner.runCommand (package:args/command_runner.dart:212:13) #5 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:348:9) #6 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19) #7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:294:5) #8 run.. (package:flutter_tools/runner.dart:112:9) #9 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19) #10 main (package:flutter_tools/executable.dart:90:3)

[ +84 ms] ensureAnalyticsSent: 82ms [ ] Running 1 shutdown hook [ +11 ms] Shutdown hooks complete [ ] exiting with code 1 `

I installed libsecret-1-dev, libsecret-tools, libsecret-1-0 and libjsoncpp-dev packages.

I think that error lines are these: [ +3 ms] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libsecret-1.so.0: undefined reference tog_task_set_static_name' [ +1 ms] clang: error: linker command failed with exit code 1 (use -v to see invocation)`

GoranSustekJr avatar Feb 10 '24 18:02 GoranSustekJr

I had this same error. My app was working fine, then I attempted to introduce flutter_secure_storage.

This issue here leads us in the right direction to repair: https://github.com/mogol/flutter_secure_storage/issues/362

sudo snap remove flutter --purge

Then manually download and re-install flutter on linux from the manual installation instructions.

This, gets me to a few more errors, in which I lacked other required dependencies. I had to install the following:

sudo apt-get install build-essential libgtk-3-dev clang ninja-build cmake libsecret-1-0 libsecret-1-dev libjsoncpp-dev libsecret-tools libusb-dev

then

flutter clean flutter pub cache clean

finally,

flutter run -d linux -v :heavy_check_mark:

abarrafo avatar Feb 21 '24 20:02 abarrafo

Thank you very much it works!

On Wed, 21 Feb 2024 at 21:48, abarrafo @.***> wrote:

I had this same error. My app was working fine, then I attempted to introduce flutter_secure_storage.

This issue here leads us in the right direction to repair: #362 https://github.com/mogol/flutter_secure_storage/issues/362

sudo snap remove flutter --purge

Then manually download and re-install flutter on linux from the manual installation instructions.

This, gets me to a few more errors, in which I lacked other required dependencies. I had to install the following:

sudo apt-get install build-essential libgtk-3-dev clang ninja-build cmake libsecret-1-0 libsecret-1-dev libjsoncpp-dev libsecret-tools libusb-dev

then

flutter clean flutter pub cache clean

finally,

flutter run -d linux -v ✔️

— Reply to this email directly, view it on GitHub https://github.com/mogol/flutter_secure_storage/issues/676#issuecomment-1957884345, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBEQTYKGW34YUUAVOI24TELYUZMR5AVCNFSM6AAAAABDC4PTWSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJXHA4DIMZUGU . You are receiving this because you authored the thread.Message ID: @.***>

GoranSustekJr avatar Feb 22 '24 00:02 GoranSustekJr

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Aug 13 '24 20:08 github-actions[bot]

I am closing all older issues. If this issue still exists in the latest version, please let me know.

juliansteenbakker avatar Aug 13 '24 20:08 juliansteenbakker