-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
LTO build fails #259
Comments
Enabling everything bug introspection (and vapi + gnome-shell extension that depends on it, but those do not involve compilation) builds fine, so it looks like gobject-introspection integration is the culprit. Did you manage to build another project that uses introspection with LTO? |
Fixed in the 3.30 branch, will see if I have some other fix pending and make a new release soon-ish |
You know .. it still fails with lto. |
I know, but the problem isn’t in GPaste, it’s in gobject-introspection.
At least here I cannot build anything with lto and gobject-introspection
enabled.
All the libraries and binaries are built with lto, only the gi typelib is
not.
…On Tue 12 Feb 2019 at 11:53, Tomasz Kłoczko ***@***.***> wrote:
You know .. it still fails with lto.
Patch like this is more like hiding the the bug than fixing it :/
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#259 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AANm3oGx1DAzSCagMw_geMlqiMcH-xDrks5vMp0OgaJpZM4a1CJr>
.
|
I have all other gnome packages build with using lto and many are using gobject-introspection. regards |
I'm not really familiar with lto tbh. |
Note that gtk itself has the same problem: https://gitlab.gnome.org/GNOME/gtk/issues/1309 |
It seems that building with bfd fails while building with gold works. Will thus revert my change. I guess the answer here is: if you want to build with LTO, use gold |
Is it a more satisfactory solution for you? |
I'm not sure. |
Please find new comments under https://bugzilla.redhat.com/show_bug.cgi?id=1676679 |
The version of libmutter shouldn't matter. The symbol does exist, it's created by a glib macro.
|
Note that with the patch from that bug, the same problem still occurs |
Indeed. Looks like it is bug in ld. |
I just found a little time to investigate this issue and looks like it is bug in gpaste because: [tkloczko@domek gpaste-3.30.2]$ grep -r g_paste_settings_get_type src/libgpaste/settings/gpaste-settings.h:#define G_PASTE_TYPE_SETTINGS (g_paste_settings_get_type ()) src/libgpaste/libgpaste.sym: g_paste_settings_get_type; In other words you've created symbol and put it in library interface but it is nothing behind it. So in the libgpaste interface you have g_paste_settings_get_type but this symbol is used to define G_PASTE_TYPE_SETTINGS. Than this define is used in another define in src/libgpaste/settings/gpaste-settings.c: [tkloczko@domek gpaste-3.30.2]$ grep -wr G_PASTE_TYPE_SETTINGS src/libgpaste/settings/gpaste-settings.h:#define G_PASTE_TYPE_SETTINGS (g_paste_settings_get_type ()) src/libgpaste/settings/gpaste-settings.c: G_PASTE_TYPE_SETTINGS, \ src/libgpaste/settings/gpaste-settings.c: return g_object_new (G_PASTE_TYPE_SETTINGS, NULL); I'm not fully understand gobject interface. Can you have look on this as well? |
GPaste/src/libgpaste/gpaste-macros.h Line 73 in 8a0145c
https://github.com/GNOME/glib/blob/4d12174663f69729635cf5d4c470d24639782619/gobject/gtype.h#L1632 Then read the explanation here https://github.com/GNOME/glib/blob/4d12174663f69729635cf5d4c470d24639782619/gobject/gtype.h#L1689 Especially this part https://github.com/GNOME/glib/blob/4d12174663f69729635cf5d4c470d24639782619/gobject/gtype.h#L1708 The actual impl is here: https://github.com/GNOME/glib/blob/4d12174663f69729635cf5d4c470d24639782619/gobject/gtype.h#L1972 |
To reporoduce this you need to configure source tree by:
$ CFAL:GS="-flto" LDFLAGS="-flto -fuse-linker-plugin" AR=gcc-ar RANLIB=gcc-ranlib NM=gcc-nm ./configure <optiions>
The text was updated successfully, but these errors were encountered: