wang-bin / fvp

Flutter video player plugin for all desktop+mobile platforms. download prebuilt examples from github actions. https://pub.dev/packages/fvp
BSD 3-Clause "New" or "Revised" License
126 stars 20 forks source link

Linux compile error #58

Closed nojusgat closed 5 months ago

nojusgat commented 6 months ago

Describe the bug Unable to compile plugin on Ubuntu 22.04, using Flutter 3.16.5, Dart 3.2.3, DevTools 2.28.4, cmake version 3.22.1.

/snap/flutter/current/usr/lib/x86_64-linux-gnu/libglib-2.0.so
-Wl,-rpath-link,/home/user/app/linux/flutter/ephemeral/.plugin_symlinks/fvp/linux/mdk-sdk/lib/amd64 && :
[   +1 ms] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libapparmor.so.1: undefined reference to `fstatat@GLIBC_2.33'
[        ] /snap/flutter/current/usr/bin/ld: /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-15.99.so: undefined reference to
`pthread_setspecific@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libasound.so.2: undefined reference to `dlopen@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-15.99.so: undefined reference to
`pthread_mutexattr_setprotocol@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libgbm.so.1: undefined reference to `fstat64@GLIBC_2.33'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libpulse.so.0: undefined reference to `pthread_sigmask@GLIBC_2.32'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libasound.so.2: undefined reference to `pthread_mutexattr_init@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libasyncns.so.0: undefined reference to `res_query@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libasound.so.2: undefined reference to `dlinfo@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libasound.so.2: undefined reference to `dlerror@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libgbm.so.1: undefined reference to `stat64@GLIBC_2.33'
[        ] /snap/flutter/current/usr/bin/ld: /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-15.99.so: undefined reference to
`pthread_getspecific@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libasound.so.2: undefined reference to `pthread_create@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libasound.so.2: undefined reference to `pthread_mutex_trylock@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-15.99.so: undefined reference to
`sem_init@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libasound.so.2: undefined reference to `pthread_mutexattr_destroy@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-15.99.so: undefined reference to
`sem_destroy@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libasound.so.2: undefined reference to `lstat@GLIBC_2.33'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libasound.so.2: undefined reference to `pthread_mutexattr_settype@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libasound.so.2: undefined reference to `pthread_join@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libasound.so.2: undefined reference to `dlclose@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-15.99.so: undefined reference to
`pthread_key_delete@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-15.99.so: undefined reference to
`sem_post@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libasound.so.2: undefined reference to `fstat@GLIBC_2.33'
[        ] /snap/flutter/current/usr/bin/ld: /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-15.99.so: undefined reference to
`shm_unlink@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libasound.so.2: undefined reference to `stat@GLIBC_2.33'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libasound.so.2: undefined reference to `pthread_once@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-15.99.so: undefined reference to
`sem_wait@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libpulse.so.0: undefined reference to `dladdr@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-15.99.so: undefined reference to
`pthread_key_create@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libasound.so.2: undefined reference to `dlsym@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-15.99.so: undefined reference to
`shm_open@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libasound.so.2: undefined reference to `dladdr1@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libasyncns.so.0: undefined reference to `res_search@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-15.99.so: undefined reference to
`lstat64@GLIBC_2.33'
[        ] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[   +2 ms] ninja: build stopped: subcommand failed.
[  +15 ms] Building Linux application... (completed in 66.2s)
[   +1 ms] "flutter linux" took 67,221ms.
[   +6 ms] Build process failed
[        ] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
           #1      _runBuild (package:flutter_tools/src/linux/build_linux.dart:186:5)
           <asynchronous suspension>
           #2      buildLinux (package:flutter_tools/src/linux/build_linux.dart:80:5)
           <asynchronous suspension>
           #3      BuildLinuxCommand.runCommand (package:flutter_tools/src/commands/build_linux.dart:89:5)
           <asynchronous suspension>
           #4      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1350:27)
           <asynchronous suspension>
           #5      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #6      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
           <asynchronous suspension>
           #7      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:348:9)
           <asynchronous suspension>
           #8      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #9      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:294:5)
           <asynchronous suspension>
           #10     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:112:9)
           <asynchronous suspension>
           #11     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #12     main (package:flutter_tools/executable.dart:90:3)
           <asynchronous suspension>

[  +86 ms] ensureAnalyticsSent: 78ms
[        ] Running 0 shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 1
fabioselau077 commented 6 months ago

same here

wang-bin commented 6 months ago

I need you full build log and error message of libfvp_plugin.so. I can't reproduce the issue on ubuntu 23.10, and ubuntu 22.04 in github action

wang-bin commented 5 months ago

I guess the issue comes from snap, the linker can't find libc symbols even if it exist in the system, it's ridiculous. Maybe there is an old libc in snap and used by the linker. DO NOT use snap, try the flutter tarball.

https://stackoverflow.com/questions/74156104/glibc-2-33-not-found-while-building-flutter-for-linux

nojusgat commented 5 months ago

I guess the issue comes from snap, the linker can't find libc symbols even if it exist in the system, it's ridiculous. Maybe there is an old libc in snap and used by the linker. DO NOT use snap, try the flutter tarball.

https://stackoverflow.com/questions/74156104/glibc-2-33-not-found-while-building-flutter-for-linux

Thanks, installing flutter from tarball seems to have solved the issue.

wang-bin commented 5 months ago

no more build error in the latest version using flutter from snap