Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snap build fails with LTO enabled #109

Open
knopp opened this issue Oct 23, 2023 · 1 comment
Open

Snap build fails with LTO enabled #109

knopp opened this issue Oct 23, 2023 · 1 comment

Comments

@knopp
Copy link

knopp commented Oct 23, 2023

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants