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

Meson build with export-dynamic flag fails #2846

Closed
gnunn1 opened this issue Sep 5, 2018 · 3 comments
Closed

Meson build with export-dynamic flag fails #2846

gnunn1 opened this issue Sep 5, 2018 · 3 comments

Comments

@gnunn1
Copy link

gnunn1 commented Sep 5, 2018

Myself and some others are looking at replacing autotools in Tilix with meson for the various Linux distros to use when building and packaging the binary. However we are running into an issue with meson around the use of the -L--export-dynamic flag.

When compiling with meson using LDC and that flag the following errors are generated:

[66/66] Linking target tilix.
FAILED: tilix
ldc  -of tilix 'tilix@exe/source_secretc_secrettypes.d.o' 'tilix@exe/source_secretc_secret.d.o' 'tilix@exe/source_app.d.o' 'tilix@exe/source_x11_X.d.o' 'tilix@exe/source_x11_Xlib.d.o' 'tilix@exe/source_secret_SchemaAttribute.d.o' 'tilix@exe/source_secret_Item.d.o' 'tilix@exe/source_secret_Schema.d.o' 'tilix@exe/source_secret_Service.d.o' 'tilix@exe/source_secret_Prompt.d.o' 'tilix@exe/source_secret_Collection.d.o' 'tilix@exe/source_secret_Secret.d.o' 'tilix@exe/source_secret_Value.d.o' 'tilix@exe/source_gx_util_array.d.o' 'tilix@exe/source_gx_util_path.d.o' 'tilix@exe/source_gx_util_string.d.o' 'tilix@exe/source_gx_gtk_cairo.d.o' 'tilix@exe/source_gx_gtk_clipboard.d.o' 'tilix@exe/source_gx_gtk_x11.d.o' 'tilix@exe/source_gx_gtk_resource.d.o' 'tilix@exe/source_gx_gtk_vte.d.o' 'tilix@exe/source_gx_gtk_actions.d.o' 'tilix@exe/source_gx_gtk_threads.d.o' 'tilix@exe/source_gx_gtk_dialog.d.o' 'tilix@exe/source_gx_gtk_settings.d.o' 'tilix@exe/source_gx_gtk_util.d.o' 'tilix@exe/source_gx_gtk_color.d.o' 'tilix@exe/source_gx_tilix_appwindow.d.o' 'tilix@exe/source_gx_tilix_terminal_advpaste.d.o' 'tilix@exe/source_gx_tilix_terminal_search.d.o' 'tilix@exe/source_gx_tilix_terminal_regex.d.o' 'tilix@exe/source_gx_tilix_terminal_actions.d.o' 'tilix@exe/source_gx_tilix_terminal_activeprocess.d.o' 'tilix@exe/source_gx_tilix_terminal_terminal.d.o' 'tilix@exe/source_gx_tilix_terminal_layout.d.o' 'tilix@exe/source_gx_tilix_terminal_password.d.o' 'tilix@exe/source_gx_tilix_terminal_util.d.o' 'tilix@exe/source_gx_tilix_terminal_exvte.d.o' 'tilix@exe/source_gx_tilix_terminal_monitor.d.o' 'tilix@exe/source_gx_tilix_sidebar.d.o' 'tilix@exe/source_gx_tilix_customtitle.d.o' 'tilix@exe/source_gx_tilix_prefeditor_bookmarkeditor.d.o' 'tilix@exe/source_gx_tilix_prefeditor_profileeditor.d.o' 'tilix@exe/source_gx_tilix_prefeditor_common.d.o' 'tilix@exe/source_gx_tilix_prefeditor_prefdialog.d.o' 'tilix@exe/source_gx_tilix_prefeditor_titleeditor.d.o' 'tilix@exe/source_gx_tilix_prefeditor_advdialog.d.o' 'tilix@exe/source_gx_tilix_preferences.d.o' 'tilix@exe/source_gx_tilix_application.d.o' 'tilix@exe/source_gx_tilix_shortcuts.d.o' 'tilix@exe/source_gx_tilix_colorschemes.d.o' 'tilix@exe/source_gx_tilix_session.d.o' 'tilix@exe/source_gx_tilix_constants.d.o' 'tilix@exe/source_gx_tilix_common.d.o' 'tilix@exe/source_gx_tilix_cmdparams.d.o' 'tilix@exe/source_gx_tilix_encoding.d.o' 'tilix@exe/source_gx_tilix_closedialog.d.o' 'tilix@exe/source_gx_tilix_bookmark_manager.d.o' 'tilix@exe/source_gx_tilix_bookmark_bmchooser.d.o' 'tilix@exe/source_gx_tilix_bookmark_bmeditor.d.o' 'tilix@exe/source_gx_tilix_bookmark_bmtreeview.d.o' 'tilix@exe/source_gx_i18n_l10n.d.o' -L-L/usr/lib// -L-lgtkd-3 -L-ldl -L-lvted-3 -L-L/usr/lib// -L-lgtkd-3 -L-ldl -L-lX11
/usr/bin/ld: tilix@exe/source_gx_tilix_appwindow.d.o: in function `_D2gx5tilix6common__T12GenericEventTCQBjQBj7session7SessionZQBn11__xopEqualsFKxSQDaQDaQCx__TQCtTQCiZQDbKxQBaZb':
/tmp/tilix/build/../source/gx/tilix/common.d:28: undefined reference to `_D6object__T8__equalsTxDFC2gx5tilix7session7SessionZvTxQBgZQBvFNaNbNiNfAxQByQfZb'
/usr/bin/ld: tilix@exe/source_gx_tilix_terminal_terminal.d.o: in function `_D2gx5tilix6common__T12GenericEventTEQBjQBjQBg10ActionTypeTCQCgQCgQCd__T16CumulativeResultTbZQvZQCx11__xopEqualsFKxSQEkQEkQEh__TQEdTQDsTQCzZQEpKxQBeZb':
/tmp/tilix/build/../source/gx/tilix/common.d:28: undefined reference to `_D6object__T8__equalsTxDFE2gx5tilix6common10ActionTypeCQBdQBdQBa__T16CumulativeResultTbZQvZvTxQCtZQDiFNaNbNiNfAxQDlQfZb'
/usr/bin/ld: tilix@exe/source_gx_tilix_terminal_terminal.d.o: in function `_D2gx5tilix6common__T12GenericEventTAyaTQeTQhTQkZQBc11__xopEqualsFKxSQCpQCpQCm__TQCiTQBxTQCbTQCfTQCjZQDcKxQBmZb':
/tmp/tilix/build/../source/gx/tilix/common.d:28: undefined reference to `_D6object__T8__equalsTxDFAyaQdQfQhZvTxQpZQBdFNaNbNiNfAxQBgQfZb'
collect2: error: ld returned 1 exit status
Error: /usr/bin/gcc failed with status: 1
ninja: build stopped: subcommand failed.

Taking out the export-dynamic flag it all works fine. Unfortunately this flag is the default for the DMD compiler (which apparently exhibits the same behavior) as well as LDC (which is what I care about for Meson support) on some distros like Arch. That flag looks pretty innocuous so I'm not sure why it is causing an issue. A full discussion of the issue can be viewed here:

gnunn1/tilix#1502

For anyone that wants to try to reproduce it, you can clone this repo and switch to the meson branch:

https://github.com/bilelmoussaoui/tilix

@kinke
Copy link
Member

kinke commented Sep 5, 2018

I replied there; short summary for here as well: I guess it's another instance of the frontend's template-culling algorithm failing to emit some functions, apparently only uncovered due to -L--export-dynamic keeping some functions referencing the missing ones.

The template culling issue is a long-standing frontend one (i.e., in DMD).
The Arch distro LDC package using -L--export-dynamic by default is Arch-specific.

So thx for the report, but there's nothing we can do directly for LDC here.

@gnunn1
Copy link
Author

gnunn1 commented Sep 5, 2018

Thanks, I appreciate the insight and I will close the issue

@gnunn1 gnunn1 closed this as completed Sep 5, 2018
@ximion
Copy link
Contributor

ximion commented Sep 6, 2018

It potentially makes sense to report this issue against DMD instead...

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

3 participants