canonical / flutter-snap

GNU General Public License v3.0
18 stars 8 forks source link

Snap build fails with LTO enabled #109

Open knopp opened 1 year ago

knopp commented 1 year ago

To reproduce install Flutter via snap add add set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) inside linux/CMakeLists.txt, before declaring targets.

The run will fails with LLVMgold.so unable to load plugins. I'm not sure why gold plugin is used though. The bfd linker will also fail with the following error, depending on platform

[  +23 ms]   = note: /snap/flutter/current/usr/bin/ld: /usr/libexec/gcc/x86_64-redhat-linux/13/liblto_plugin.so: error loading plugin: /var/lib/snapd/snap/flutter/141/usr/bin/../../lib/x86_64-linux-gnu/libc.so.6: version
`GLIBC_2.33' not found (required by /usr/libexec/gcc/x86_64-redhat-linux/13/liblto_plugin.so)

In case of Fedora 38, the system liblto plugin requires glibc 2.33, but flutter snap ships with 2.31 and the linker trying to load the plugin is using glibc shipped with the snap.

arun-gautham commented 2 months ago

Do we have a fix here ? is it really runnable flutter on ARM ?? Ubuntu on raspberry pi