I'm going to have a look a replacing the currentl autotools with meson since most things in the gnome universe are going that way. Support for dub will remain of course.
Don't hesitate to ping me if you need any help with that! Worked on Autotools/CMake to meson for a lot of projects recently so I think I have got how meson works.
If you need help with the dub compatibility just let me know :smile:. I'm the one that added support for dub in meson.
Thanks both of you, appreciate it. There is already a meson build system in experimental that @ximion put together so I'm going to use that as a starting point.
Nice! Replacing Autotools is great :-)
The preliminary Meson build definitions that I made ages ago will certainly needs some serious updating though ^^
D compatibility in Meson has come a long way: https://mesonbuild.com/D.html
Please be wary of https://github.com/dlang/dmd/pull/6961, that is still not fixed and especially when using templates a very effective trap to tap into (apparently even if you know about it...).
I need to understand better how dependencies work in meson and dub, right now it fails with the following:
[1/1] Linking target tilix.
FAILED: tilix
ldc2 -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':
/home/gnunn/Development/dlang/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':
/home/gnunn/Development/dlang/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':
/home/gnunn/Development/dlang/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.
Whereas dub is using the following:
ldc2 -disable-linker-strip-dead -of.dub/build/default-debug-linux.posix-x86_64-ldc_2081-0C1B266EA96BE1CD715533E9137459CF/tilix -g -w -oq -od=.dub/obj -d-version=StdLoggerDisableTrace -d-version=Have_tilix -d-version=Have_gtk_d_gtkd -d-version=Have_gtk_d_vte -d-debug=GC -Isource/ -I../../../.dub/packages/gtk-d-3.8.3/gtk-d/generated/gtkd -I../../../.dub/packages/gtk-d-3.8.3/gtk-d/generated/vte source/app.d source/gx/gtk/actions.d source/gx/gtk/cairo.d source/gx/gtk/clipboard.d source/gx/gtk/color.d source/gx/gtk/dialog.d source/gx/gtk/resource.d source/gx/gtk/settings.d source/gx/gtk/threads.d source/gx/gtk/util.d source/gx/gtk/vte.d source/gx/gtk/x11.d source/gx/i18n/l10n.d source/gx/tilix/application.d source/gx/tilix/appwindow.d source/gx/tilix/bookmark/bmchooser.d source/gx/tilix/bookmark/bmeditor.d source/gx/tilix/bookmark/bmtreeview.d source/gx/tilix/bookmark/manager.d source/gx/tilix/closedialog.d source/gx/tilix/cmdparams.d source/gx/tilix/colorschemes.d source/gx/tilix/common.d source/gx/tilix/constants.d source/gx/tilix/customtitle.d source/gx/tilix/encoding.d source/gx/tilix/prefeditor/advdialog.d source/gx/tilix/prefeditor/bookmarkeditor.d source/gx/tilix/prefeditor/common.d source/gx/tilix/prefeditor/prefdialog.d source/gx/tilix/prefeditor/profileeditor.d source/gx/tilix/prefeditor/titleeditor.d source/gx/tilix/preferences.d source/gx/tilix/session.d source/gx/tilix/shortcuts.d source/gx/tilix/sidebar.d source/gx/tilix/terminal/actions.d source/gx/tilix/terminal/activeprocess.d source/gx/tilix/terminal/advpaste.d source/gx/tilix/terminal/exvte.d source/gx/tilix/terminal/layout.d source/gx/tilix/terminal/monitor.d source/gx/tilix/terminal/password.d source/gx/tilix/terminal/regex.d source/gx/tilix/terminal/search.d source/gx/tilix/terminal/terminal.d source/gx/tilix/terminal/util.d source/gx/util/array.d source/gx/util/path.d source/gx/util/string.d source/secret/Collection.d source/secret/Item.d source/secret/Prompt.d source/secret/Schema.d source/secret/SchemaAttribute.d source/secret/Secret.d source/secret/Service.d source/secret/Value.d source/secretc/secret.d source/secretc/secrettypes.d source/x11/X.d source/x11/Xlib.d ../../../.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2081-CFF77E7E317974B91595390F85DDD732/libvted-3.a ../../../.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2081-843AE431B4AC71EC323E2A7548D79107/libgtkd-3.a -L=-lX11 -L=-ldl -vcolumns
Could you post your meson.build please?
Here you go, it's just a very lightly modified version of ximion's original:
project('Tilix', 'd')
compiler = meson.get_compiler('d')
if compiler.get_id() == 'gcc'
error('Tilix can not be compiled with GDC at time, since the standard library version of all GDC versions is currently (2016) too old. Sorry.')
endif
if compiler.get_id() == 'ldc2'
extra_args = ['-disable-linker-strip-dead']
else
extra_args = []
endif
glib = import('gnome')
i18n = import('i18n')
tilix_sources = [
'source/secretc/secrettypes.d',
'source/secretc/secret.d',
'source/app.d',
'source/x11/X.d',
'source/x11/Xlib.d',
'source/secret/SchemaAttribute.d',
'source/secret/Item.d',
'source/secret/Schema.d',
'source/secret/Service.d',
'source/secret/Prompt.d',
'source/secret/Collection.d',
'source/secret/Secret.d',
'source/secret/Value.d',
'source/gx/util/array.d',
'source/gx/util/path.d',
'source/gx/util/string.d',
'source/gx/gtk/cairo.d',
'source/gx/gtk/clipboard.d',
'source/gx/gtk/x11.d',
'source/gx/gtk/resource.d',
'source/gx/gtk/vte.d',
'source/gx/gtk/actions.d',
'source/gx/gtk/threads.d',
'source/gx/gtk/dialog.d',
'source/gx/gtk/settings.d',
'source/gx/gtk/util.d',
'source/gx/gtk/color.d',
'source/gx/tilix/appwindow.d',
'source/gx/tilix/terminal/advpaste.d',
'source/gx/tilix/terminal/search.d',
'source/gx/tilix/terminal/regex.d',
'source/gx/tilix/terminal/actions.d',
'source/gx/tilix/terminal/activeprocess.d',
'source/gx/tilix/terminal/terminal.d',
'source/gx/tilix/terminal/layout.d',
'source/gx/tilix/terminal/password.d',
'source/gx/tilix/terminal/util.d',
'source/gx/tilix/terminal/exvte.d',
'source/gx/tilix/terminal/monitor.d',
'source/gx/tilix/sidebar.d',
'source/gx/tilix/customtitle.d',
'source/gx/tilix/prefeditor/bookmarkeditor.d',
'source/gx/tilix/prefeditor/profileeditor.d',
'source/gx/tilix/prefeditor/common.d',
'source/gx/tilix/prefeditor/prefdialog.d',
'source/gx/tilix/prefeditor/titleeditor.d',
'source/gx/tilix/prefeditor/advdialog.d',
'source/gx/tilix/preferences.d',
'source/gx/tilix/application.d',
'source/gx/tilix/shortcuts.d',
'source/gx/tilix/colorschemes.d',
'source/gx/tilix/session.d',
'source/gx/tilix/constants.d',
'source/gx/tilix/common.d',
'source/gx/tilix/cmdparams.d',
'source/gx/tilix/encoding.d',
'source/gx/tilix/closedialog.d',
'source/gx/tilix/bookmark/manager.d',
'source/gx/tilix/bookmark/bmchooser.d',
'source/gx/tilix/bookmark/bmeditor.d',
'source/gx/tilix/bookmark/bmtreeview.d',
'source/gx/i18n/l10n.d'
]
source_root = meson.source_root()
sources_dir = include_directories('source/')
#
# Dependencies
#
gtkd_dep = dependency('gtkd-3', version: '>=3.8.3')
vted_dep = dependency('vted-3', version: '>=3.8.3')
xlib_dep = dependency('x11')
gcr = find_program('glib-compile-resources')
msgfmt = find_program('msgfmt')
# install target for arch-indep data
tilix_share = 'share/tilix'
#
# Build resources and metadata files
#
gresource = custom_target('glib-resource',
input: 'data/resources/tilix.gresource.xml',
output: 'tilix.gresource',
command: [gcr, '@INPUT@',
'--sourcedir', source_root + '/data/resources',
'--target', '@OUTPUT@'],
install: true,
install_dir: tilix_share + '/resources'
)
desktop_target = custom_target('desktop-file',
input: 'data/pkg/desktop/com.gexperts.Tilix.desktop.in',
output: 'com.gexperts.Tilix.desktop',
command: [msgfmt, '--desktop',
'-d', source_root + '/po',
'--template', '@INPUT@',
'-o', '@OUTPUT@'],
install: true,
install_dir: 'share/applications'
)
metainfo_target = custom_target('metainfo',
input: 'data/appdata/com.gexperts.Tilix.appdata.xml.in',
output: 'com.gexperts.Tilix.appdata.xml',
command: [msgfmt, '--xml',
'-d', source_root + '/po',
'--template', '@INPUT@',
'-o', '@OUTPUT@'],
install: true,
install_dir: 'share/metainfo'
)
#
# Build & Test
#
tilix_exe = executable('tilix',
[tilix_sources],
include_directories : [sources_dir],
dependencies : [gtkd_dep,
vted_dep,
xlib_dep],
d_args: extra_args,
install : true
)
# FIXME: Unittests are currently broken
#tilix_test_exe = executable('tilix_test',
# [tilix_sources],
# include_directories : [sources_dir],
# dependencies : [gtkd_dep,
# vted_dep,
# xlib_dep],
# d_args: compiler.unittest_args()
#)
#test('tilix_test', tilix_test_exe)
# Validate things
desktop_file_validate = find_program('desktop-file-validate', required: false)
appstreamcli = find_program('appstreamcli', required: false)
if desktop_file_validate.found()
test('desktopfile_test',
desktop_file_validate,
args: [desktop_target.full_path()]
)
endif
if appstreamcli.found()
test('appstream_test',
appstreamcli,
args: ['--no-color',
'validate', metainfo_target.full_path()],
should_fail: true # FIXME: the <kudos/> tag isn't in the spec and therefore this validation fails
)
endif
#
# Install
#
color_schemes = [
'data/schemes/base16-twilight-dark.json',
'data/schemes/linux.json',
'data/schemes/material.json',
'data/schemes/monokai.json',
'data/schemes/orchis.json',
'data/schemes/solarized-dark.json',
'data/schemes/solarized-light.json',
'data/schemes/tango.json',
]
# GSettings schema
install_data('data/gsettings/com.gexperts.Tilix.gschema.xml', install_dir: 'share/glib-2.0/schemas')
# Color schemes
install_data(color_schemes, install_dir: tilix_share + '/schemes')
# Scripts
install_data('data/scripts/tilix_int.sh', install_dir: tilix_share + '/scripts')
# Copying Nautilus extension
install_data('data/nautilus/open-tilix.py', install_dir: 'share/nautilus-python/extensions/')
# Copy D-Bus service descriptor
install_data('data/dbus/com.gexperts.Tilix.service', install_dir: 'share/dbus-1/services/')
#
# Subdirectories
#
subdir('po')
subdir('data/icons')
Sincerely, I have no clue on what might be happening here. I don't know where _D6object__T8__equals comes from.
@gnunn1
if compiler.get_id() == 'ldc2'
extra_args = ['-disable-linker-strip-dead']
else
extra_args = []
endif
You can drop that entire section, it's not necessary anymore.
Does that help? Is there a Tilix branch with your changes that I can play around with?
undefined reference to _D6object__T8__equalsTxDFC2gx5tilix7session7SessionZvTxQBgZQBvFNaNbNiNfAxQByQfZb - this is in DRuntime. Which ldc version are you using? I think I saw such an issue and it's definitely fixed with LDC >= 1.11.
I am using LDC 1.11 and I still have the same issue.
This is definitely not an LDC error, could reproduce with DMD too, not to say that building with Dub is working fine.
dmd -oftilix 'tilix@exe/source_gx_i18n_l10n.d.o' 'tilix@exe/source_gx_tilix_colorschemes.d.o' 'tilix@exe/source_gx_tilix_session.d.o' 'tilix@exe/source_gx_tilix_prefeditor_prefdialog.d.o' 'tilix@exe/source_gx_tilix_prefeditor_profileeditor.d.o' 'tilix@exe/source_gx_tilix_prefeditor_bookmarkeditor.d.o' 'tilix@exe/source_gx_tilix_prefeditor_titleeditor.d.o' 'tilix@exe/source_gx_tilix_prefeditor_common.d.o' 'tilix@exe/source_gx_tilix_prefeditor_advdialog.d.o' 'tilix@exe/source_gx_tilix_common.d.o' 'tilix@exe/source_gx_tilix_encoding.d.o' 'tilix@exe/source_gx_tilix_terminal_regex.d.o' 'tilix@exe/source_gx_tilix_terminal_search.d.o' 'tilix@exe/source_gx_tilix_terminal_util.d.o' 'tilix@exe/source_gx_tilix_terminal_advpaste.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_exvte.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_monitor.d.o' 'tilix@exe/source_gx_tilix_terminal_actions.d.o' 'tilix@exe/source_gx_tilix_customtitle.d.o' 'tilix@exe/source_gx_tilix_bookmark_bmchooser.d.o' 'tilix@exe/source_gx_tilix_bookmark_bmtreeview.d.o' 'tilix@exe/source_gx_tilix_bookmark_bmeditor.d.o' 'tilix@exe/source_gx_tilix_bookmark_manager.d.o' 'tilix@exe/source_gx_tilix_appwindow.d.o' 'tilix@exe/source_gx_tilix_shortcuts.d.o' 'tilix@exe/source_gx_tilix_preferences.d.o' 'tilix@exe/source_gx_tilix_cmdparams.d.o' 'tilix@exe/source_gx_tilix_sidebar.d.o' 'tilix@exe/source_gx_tilix_constants.d.o' 'tilix@exe/source_gx_tilix_closedialog.d.o' 'tilix@exe/source_gx_tilix_application.d.o' 'tilix@exe/source_gx_util_path.d.o' 'tilix@exe/source_gx_util_string.d.o' 'tilix@exe/source_gx_util_array.d.o' 'tilix@exe/source_gx_gtk_clipboard.d.o' 'tilix@exe/source_gx_gtk_cairo.d.o' 'tilix@exe/source_gx_gtk_util.d.o' 'tilix@exe/source_gx_gtk_resource.d.o' 'tilix@exe/source_gx_gtk_dialog.d.o' 'tilix@exe/source_gx_gtk_color.d.o' 'tilix@exe/source_gx_gtk_settings.d.o' 'tilix@exe/source_gx_gtk_threads.d.o' 'tilix@exe/source_gx_gtk_vte.d.o' 'tilix@exe/source_gx_gtk_actions.d.o' 'tilix@exe/source_gx_gtk_x11.d.o' 'tilix@exe/source_secretc_secrettypes.d.o' 'tilix@exe/source_secretc_secret.d.o' 'tilix@exe/source_x11_Xlib.d.o' 'tilix@exe/source_x11_X.d.o' 'tilix@exe/source_secret_Item.d.o' 'tilix@exe/source_secret_Secret.d.o' 'tilix@exe/source_secret_Schema.d.o' 'tilix@exe/source_secret_Value.d.o' 'tilix@exe/source_secret_Service.d.o' 'tilix@exe/source_secret_SchemaAttribute.d.o' 'tilix@exe/source_secret_Prompt.d.o' 'tilix@exe/source_secret_Collection.d.o' 'tilix@exe/source_app.d.o' -L/home/anubis/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-dmd_2081-9B79B3551BF0E688521E1BA33942B6E2/libgtkd-3.a /home/anubis/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-dmd_2081-9B79B3551BF0E688521E1BA33942B6E2/libgtkd-3.a -L-lvted-3 -L-L/usr/lib// -L-lgtkd-3 -L-ldl -L-lX11
/usr/bin/ld: tilix@exe/source_gx_tilix_session.d.o: in function `_D2gx5tilix6common__T12GenericEventTEQBjQBjQBg10ActionTypeTCQCgQCgQCd__T16CumulativeResultTbZQvZQCx11__xopEqualsFKxSQEkQEkQEh__TQEdTQDsTQCzZQEpKxQBeZb':
../source/gx/tilix/session.d:(.text._D2gx5tilix6common__T12GenericEventTEQBjQBjQBg10ActionTypeTCQCgQCgQCd__T16CumulativeResultTbZQvZQCx11__xopEqualsFKxSQEkQEkQEh__TQEdTQDsTQCzZQEpKxQBeZb[_D2gx5tilix6common__T12GenericEventTEQBjQBjQBg10ActionTypeTCQCgQCgQCd__T16CumulativeResultTbZQvZQCx11__xopEqualsFKxSQEkQEkQEh__TQEdTQDsTQCzZQEpKxQBeZb]+0x39): undefined reference to `_D6object__T8__equalsTxDFE2gx5tilix6common10ActionTypeCQBdQBdQBa__T16CumulativeResultTbZQvZvTxQCtZQDiFNaNbNiNfAxQDlQfZb'
/usr/bin/ld: tilix@exe/source_gx_tilix_session.d.o: in function `_D2gx5tilix6common__T12GenericEventTAyaTQeTQhTQkZQBc11__xopEqualsFKxSQCpQCpQCm__TQCiTQBxTQCbTQCfTQCjZQDcKxQBmZb':
../source/gx/tilix/session.d:(.text._D2gx5tilix6common__T12GenericEventTAyaTQeTQhTQkZQBc11__xopEqualsFKxSQCpQCpQCm__TQCiTQBxTQCbTQCfTQCjZQDcKxQBmZb[_D2gx5tilix6common__T12GenericEventTAyaTQeTQhTQkZQBc11__xopEqualsFKxSQCpQCpQCm__TQCiTQBxTQCbTQCfTQCjZQDcKxQBmZb]+0x39): undefined reference to `_D6object__T8__equalsTxDFAyaQdQfQhZvTxQpZQBdFNaNbNiNfAxQBgQfZb'
/usr/bin/ld: tilix@exe/source_gx_tilix_session.d.o: in function `_D2gx5tilix6common__T12GenericEventTCQBjQBj7session7SessionZQBn11__xopEqualsFKxSQDaQDaQCx__TQCtTQCiZQDbKxQBaZb':
../source/gx/tilix/session.d:(.text._D2gx5tilix6common__T12GenericEventTCQBjQBj7session7SessionZQBn11__xopEqualsFKxSQDaQDaQCx__TQCtTQCiZQDbKxQBaZb[_D2gx5tilix6common__T12GenericEventTCQBjQBj7session7SessionZQBn11__xopEqualsFKxSQDaQDaQCx__TQCtTQCiZQDbKxQBaZb]+0x39): undefined reference to `_D6object__T8__equalsTxDFC2gx5tilix7session7SessionZvTxQBgZQBvFNaNbNiNfAxQByQfZb'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
Works well here, without any linker issues.
OS: Up-to-date Debian Buster/Testing
LDC:
LDC - the LLVM D compiler (1.11.0):
based on DMD v2.081.2 and LLVM 6.0.1
built with LDC - the LLVM D compiler (0.17.6)
Ensured GtkD/VteD are rebuilt against the right LDC release.
GCC: gcc (Debian 8.2.0-4) 8.2.0
Meson: 0.47.1
Just a small note, built with LDC - the LLVM D compiler (0.17.6) is this a typo?
Probably forgot VteD, let me check that.
@FFY00 No, LDC needs to be bootstrapped by something (the latest C++-based LTS compiler release in this case)
No, VteD is provided by GtkD so it was also built against LDC 1.11.0.
Just checked with Wild and the last gtkd version in the repos was built by LDC 1.11.0.
https://git.archlinux.org/svntogit/community.git/commit/trunk?h=packages/gtkd&id=2ebc82bea7afa1e9c6bea657102a0d48077a9c6c
My LDC just says built by LDC 1.10.0.
I am using the ldc available in Arch which is 1.11 as well as the gtkd from Arch. I don't have a branch as I'm working on it locally at the moment. I'll play around with it some more and see if I can make some progress.
Created a PR here https://github.com/gnunn1/tilix/pull/1507 with some updates. Still doesn't build through :/ This will allow us to have some base to work on
Do you also see the linking errors when using the LDC copy shipped by upstream? What does the Travis CI say to this?
@ximion I just tried resolving GtkD and VteD with https://github.com/mesonbuild/meson/pull/4084, which verifies the compiler and D version used, and still fails on both LDC and DMD. Can you paste your output of ninja -v to check if the generated command is the same?
@FFY00 The whole log is a bit excessive, but here's the link command:
[65/66] ldc2 -Itilix@exe -I. -I.. -I../source/ -I/usr/include/d/gtkd-3/ -enable-color -wi -g -O0 -of 'tilix@exe/source_gx_tilix_terminal_terminal.d.o' -c ../source/gx/tilix/terminal/terminal.d
[66/66] ldc2 -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/x86_64-linux-gnu/ -L-lgtkd-3 -L-ldl -L-lvted-3 -L-L/usr/lib/x86_64-linux-gnu/ -L-lgtkd-3 -L-ldl -L-lX11
(except for the multiarch paths it's identical to what @gnunn1 showed)
Yes, the commands are exactly the same, apart from -O0 in the compile commands and the multiarch path in the linker. Shouldn't influence anything. What's your ldc config? Extra flags could have been passed through there. Here's mine:
// The default group is required
default:
{
// default switches injected before all explicit command-line switches
switches = [
"-I/usr/include/dlang/ldc/ldc",
"-I/usr/include/dlang/ldc",
"-L--no-warn-search-mismatch",
"-L--export-dynamic",
"-defaultlib=phobos2-ldc,druntime-ldc",
"-link-defaultlib-shared"
];
// default switches appended after all explicit command-line switches
post-switches = [
"-L-L/usr/lib"
];
};
Found the problem. -L--export-dynamic is breaking the build. Removing it from /etc/ldc2.conf resolves the issue.
Interesting - where is -L--export-dynamic coming from? It doesn't appear to be in the configuration shipped by upstream.
EDIT: Ah, I see arch is replacing that file in its entirety with its own version... That should likely be changed. In Debian, we only modify the configuration with this patch: https://salsa.debian.org/d-team/ldc/blob/master/debian/patches/03_ldc_include_path.diff to ensure the right include directory is added (but I am not sure whether that is even needed anymore).
@FFY00 Confirmed, removing that switch fixes the issue for me as well. The description of that switch seems fairly innocuous though so I'm not sure why it is causing an issue:
--export-dynamic When creating a dynamically linked executable, add all symbols to the dynamic symbol table. The dynamic symbol table is the set of symbols which are visible from dynamic objects at run time. If you do not use this option, the dynamic symbol table will normally contain only those symbols which are referenced by some dynamic object mentioned in the link. If you use dlopen to load a dynamic object which needs to refer back to the symbols defined by the program, rather than some other dynamic object, then you will probably need to use this option when linking the program itself.
@Vild Since you maintain the Arch ldc2 package, do you have any thoughts?
Hi, I'm playing around to try and find the problem.
I'm not sure why --export-dynamic would do this, and I don't think removing it globally would be a good choice (unless there are no other ways of fixing it :/ ). I find it really weird that it works in autotool, but not meson. So I'm trying to figure out why the linking error happens and I will get back when I know more.
The biggest differences I see so far is that meson compile each file separately, compiler- and linker flags are not the same.
This is the build commands from autotool:
/usr/bin/ldmd -O -inline -release -version=StdLoggerDisableTrace -I/usr/include/d/gtkd-3/ -L-L/usr/lib// -L-lgtkd-3 -L-ldl -L-lvted-3 -c ../source/app.d ../source/gx/gtk/actions.d ../source/gx/gtk/cairo.d ../source/gx/gtk/clipboard.d ../source/gx/gtk/color.d ../source/gx/gtk/dialog.d ../source/gx/gtk/resource.d ../source/gx/gtk/settings.d ../source/gx/gtk/threads.d ../source/gx/gtk/util.d ../source/gx/gtk/vte.d ../source/gx/gtk/x11.d ../source/gx/i18n/l10n.d ../source/gx/tilix/application.d ../source/gx/tilix/appwindow.d ../source/gx/tilix/bookmark/bmchooser.d ../source/gx/tilix/bookmark/bmeditor.d ../source/gx/tilix/bookmark/bmtreeview.d ../source/gx/tilix/bookmark/manager.d ../source/gx/tilix/closedialog.d ../source/gx/tilix/cmdparams.d ../source/gx/tilix/colorschemes.d ../source/gx/tilix/common.d ../source/gx/tilix/constants.d ../source/gx/tilix/customtitle.d ../source/gx/tilix/encoding.d ../source/gx/tilix/prefeditor/advdialog.d ../source/gx/tilix/prefeditor/bookmarkeditor.d ../source/gx/tilix/prefeditor/common.d ../source/gx/tilix/prefeditor/prefdialog.d ../source/gx/tilix/prefeditor/profileeditor.d ../source/gx/tilix/prefeditor/titleeditor.d ../source/gx/tilix/preferences.d ../source/gx/tilix/session.d ../source/gx/tilix/shortcuts.d ../source/gx/tilix/sidebar.d ../source/gx/tilix/terminal/actions.d ../source/gx/tilix/terminal/activeprocess.d ../source/gx/tilix/terminal/advpaste.d ../source/gx/tilix/terminal/exvte.d ../source/gx/tilix/terminal/layout.d ../source/gx/tilix/terminal/monitor.d ../source/gx/tilix/terminal/password.d ../source/gx/tilix/terminal/regex.d ../source/gx/tilix/terminal/search.d ../source/gx/tilix/terminal/terminal.d ../source/gx/tilix/terminal/util.d ../source/gx/util/array.d ../source/gx/util/path.d ../source/gx/util/string.d ../source/secret/Collection.d ../source/secret/Item.d ../source/secret/Prompt.d ../source/secret/Schema.d ../source/secret/SchemaAttribute.d ../source/secret/Secret.d ../source/secret/Service.d ../source/secret/Value.d ../source/secretc/secret.d ../source/secretc/secrettypes.d ../source/x11/X.d ../source/x11/Xlib.d -oftilix.o
/usr/bin/ldmd -O -inline -release -version=StdLoggerDisableTrace -L-L/usr/lib// -L-lgtkd-3 -L-ldl -L-lvted-3 -L-lX11 tilix.o -oftilix
And this is the commands from meson:
[1/2] ldc2 -Itilix@exe -I. -I.. -I../source/ -I/usr/include/d/gtkd-3/ -enable-color -wi -O3 -release -of 'tilix@exe/source_gx_gtk_actions.d.o' -c ../source/gx/gtk/actions.d
[2/2] ldc2 -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
@Vild
I'm not sure why --export-dynamic would do this, and I don't think removing it globally would be a good choice
Why? No other distribution except Arch adds it by default, and applying it selectively seems to actually be the right thing to do here. The upstream LDC project also doesn't add this flag combo to all builds.
I find it really weird that it works in autotool, but not meson.
Autotools in Tilix wasn't actually using splitbuild correctly, I would guess that there is some relation to that.
It was a nice learning experience putting together autotools support in Tilix. It will also be nice to see it go away :smile:.
On the issue, though, I'm not sure but I remember something about ldmd being a DMD compatibility wrapper, so it may be doing something different from ldc2. Also, from what I can remember, I decided to compile all sources together because it generated a much smaller executable, but probably it was something I was doing wrong too.
Meson doesn't support ldmd or gdmd as they are just frontends for ldc and gdc, respectively. Even if it did, using those binaries would result in the same problem as they only translate dmd arguments/flags to ldc/gdc's backend.
@dsboger I don't think there's anything you did wrong - this is simply a LDC bug triggered by an unusual flag combination.
Autotools usually does split builds, so the unity build was just unusual, not wrong :-) (and it also helped to get Tilix into Linux distributions early on, before Meson's D support was fully ready - in fact, back in the day I converted Tilix to Meson mainly to test Meson's D support on a complex project)
@ximion this doesn't seem like just an LDC bug. It's reproducible in DMD.
One potential workaround that is a bit ugh is to have a local version of ldc2.conf that removes the export-dynamic flag.
I still don't understand why it is applied globally and unconditionally on Arch when every other distribution as well as upstream doesn't have issues without it.
@FFY00 Could be a DMD frontend problem (in which case testing with GDC would make sense)
just FYI: I added --export-dynamic to match dmd.conf (which is set in the upstream config).
Why I'm against removing is that it should not create this problem, as all it does it add the private symbols to the symbol table.
But unless the underlying problem is found, I guess I'm force to remove the flag.
@ximion, way ahead of you. The last gdc master branch is not compilable, some of libphobos' functions required by tilix are broken in gcc-8 and sadly gcc-8-stable is only on v2.068.2, so no luck compiling tilix with gdc :/
If someone wants to look at the broken functions, an arch package built from the gcc-8 branch is available here http://pkgbuild.com/~ffy00/repo/.
@FFY00 Have you opened a bug for this against ldc or dmd, it would be worthwhile to have someone with more knowledge of the compiler/linker to have a look. If you are already in communication with them and are handling it no worries.
I don't have that much knowledge about the compiler/linker. The knowledge I have comes from a user position, not a compiler developer. I think @ximion (sorry for @ you again :/) would be better suited to deal with this, if he's fine with it.
No worries, I'll open an issue with ldc2 later this afternoon.
I've posted to the dlang forum first but no reply, so I've created an issue in LDC here:
just FYI: I added --export-dynamic to match dmd.conf (which is set in the upstream config).
Why I'm against removing is that it should not create this problem, as all it does it add the private symbols to the symbol table.
DMD uses it because it is required by the current stacktrace code in druntime, in order to show the function name for each frame. Without it, you still get file/line infos if compiled with -g, but no function names. We (LDC) don't by default because it may increase the binary size significantly, as no functions can be stripped this way by the linker.
@kinke, do you have any idea why the presence of --export-dynamic might be leading to this error?
I guess it leads to 1) retaining some functions which would otherwise be stripped by the linker, and 2) those functions referencing missing symbols.
Point 2, undefined templated functions, are a known issue in the frontend - it tries to be smart and not emit all templates in each instantiating module, but it's buggy and sometimes doesn't emit a function at all, especially when compiling separately.
@Vild Based on the comments from @kinke, does it make sense to remove that flag for LDC? My only other option would be to include a local ldc2.conf with tilix that overrides whatever the distro has set. I'd prefer not to do that so the distros could tweak things as needed.
@gnunn1 I released ldc 2:1.11.0-1 which should fix it. Plese beware that DMD still fails, this is something that really needs to get fixed!
Thanks @FFY00
Now that the LDC issue is sorted out on Arch, I'm wondering if we should have autotools and meson available in parallel for one more release in order to let things shake out. Thoughts?
I think so but you should put a warning saying that autotools is deprecated and that the packagers should use meson. This way we will know if anyone is having issues.
@gnunn1 From Debian's perspective that would not be necessary, we only build with GDC or LDC anyway (first, we want an optimizing compiler and secondly dmd isn't available in Debian).
Builds with other compilers would happen only manually, in which case people could use dub.
There would also not be any drawback if Autotools would still be available though.
I'm having a go at getting @bilelmoussaoui PR working but I seem to be hitting a bug in either meson or the meson/dub integration. When I run Ninja it generates the following command for ldc2:
ldc2 -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-L/usr/lib// -L=-L-lgtkd-3 -L=-L-ldl -L=-L-lvted-3 -L=-L-L/usr/lib// -L=-L-lgtkd-3 -L=-L-ldl -L=-lX11
Notice the extra -L added everywhere after the equals for the parameters at the end, i.e. -L=-L-lgtkd-3 instead of -L=-lgtkd-3
@FFY00 Do you have any idea what the issue is here?
I'm using meson 0.48 from the Arch repository.
@Vild Is it possible to have libphobos2-ldc.a and libdruntime-ldc.a included in the Arch LDC package like they are in the LDC2 binaries. I use the following switches in dub.json to create a statically linked version of Tilix for releases since I don't want people who download it having to install phobos and the runtime separately.
"dflags-ldc": ["-disable-linker-strip-dead","-defaultlib=:libphobos2-ldc.a,:libdruntime-ldc.a"]
@gnunn1 that doesn't actually have anything to do with the dub module. The extra -L makes sense because we want to pass -L-lgtkd-3 to the linker. I can build tilix fine here. Can you paste the error?
Regarding LDC and phobos, they really should be packaged separately. Besides, both of those files are provided by liblphobos, so the users will install them together. Also, ldc has a dependency on liblphobos, so even if the files were packaged separately, it wouldn't mater.
Wait, I just installed meson from the repos and I can reproduce.
Okay, it looks like that was already fixed in master.
You can still use the dub module to resolve the dependencies.
dub fetch gtk-d
dub build gtk-d:gtkd
dub build gtk-d:vte
gtkd_dep = dependency('gtk-d:gtkd', version: '>=3.5.0', method: 'dub')
vted_dep = dependency('gtk-d:vte', version: '>=3.5.0', method: 'dub')
Thanks for the quick response, I tried those changes but the build is still not working albeit with much less errors. I have checked in the meson files so if you want to have a look and see what I'm doing wrong I would appreciate it.
gnunn master … dlang tilix build ninja
[1/1] Linking target tilix.
FAILED: tilix
ldc2 -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' /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2081-DDA037AA548BBBFBBB5892AD9A8FF5BB/libgtkd-3.a /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2078-4F4650D9559F5386968D8E9A28F886BF/libvted-3.a -L=-lX11
/usr/bin/ld: /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2078-4F4650D9559F5386968D8E9A28F886BF/libvted-3.a(vte.Pty.o): in function `_D3std6format__T15formatValueImplTSQBh5array__T8AppenderTAyaZQoTPvTaZQCbFNaNfKQBsQrKxSQDgQDf__T10FormatSpecTaZQpZv':
/opt/ldc2-1.8.0/bin/../import/std/format.d:3959: undefined reference to `_D3std9exception__T9enforceExHTCQBe6format15FormatExceptionZ__TQBsTbZQByFNaNfbLAyaQdmZb'
/usr/bin/ld: /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2078-4F4650D9559F5386968D8E9A28F886BF/libvted-3.a(vte.Terminal.o): in function `_D3vte8TerminalQj7getTextMFPUPSQBd1c5types11VteTerminalllPvZiQeJC4glib6ArrayGQhZAya':
/home/gnunn/Development/dlang/tilix/../../../.dub/packages/gtk-d-3.8.3/gtk-d/generated/vte/vte/Terminal.d:599: undefined reference to `_d_eh_resume_unwind'
/usr/bin/ld: /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2078-4F4650D9559F5386968D8E9A28F886BF/libvted-3.a(vte.Terminal.o): in function `_D3vte8TerminalQj28getTextIncludeTrailingSpacesMFPUPSQBz1c5types11VteTerminalllPvZiQeJC4glib6ArrayGQhZAya':
/home/gnunn/Development/dlang/tilix/../../../.dub/packages/gtk-d-3.8.3/gtk-d/generated/vte/vte/Terminal.d:639: undefined reference to `_d_eh_resume_unwind'
/usr/bin/ld: /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2078-4F4650D9559F5386968D8E9A28F886BF/libvted-3.a(vte.Terminal.o): in function `_D3vte8TerminalQj12getTextRangeMFllllPUPSQBn1c5types11VteTerminalllPvZiQeJC4glib6ArrayGQhZAya':
/home/gnunn/Development/dlang/tilix/../../../.dub/packages/gtk-d-3.8.3/gtk-d/generated/vte/vte/Terminal.d:671: undefined reference to `_d_eh_resume_unwind'
/usr/bin/ld: /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2078-4F4650D9559F5386968D8E9A28F886BF/libvted-3.a(vte.Terminal.o): in function `_D3vte8TerminalQj19hyperlinkCheckEventMFC3gdk5EventQgZAya':
/home/gnunn/Development/dlang/tilix/../../../.dub/packages/gtk-d-3.8.3/gtk-d/generated/vte/vte/Terminal.d:718: undefined reference to `_d_eh_resume_unwind'
/usr/bin/ld: /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2078-4F4650D9559F5386968D8E9A28F886BF/libvted-3.a(vte.Terminal.o): in function `_D3vte8TerminalQj10matchCheckMFllJiZAya':
/home/gnunn/Development/dlang/tilix/../../../.dub/packages/gtk-d-3.8.3/gtk-d/generated/vte/vte/Terminal.d:783: undefined reference to `_d_eh_resume_unwind'
/usr/bin/ld: /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2078-4F4650D9559F5386968D8E9A28F886BF/libvted-3.a(vte.Terminal.o):/home/gnunn/Development/dlang/tilix/../../../.dub/packages/gtk-d-3.8.3/gtk-d/generated/vte/vte/Terminal.d:808: more undefined references to `_d_eh_resume_unwind' follow
collect2: error: ld returned 1 exit status
Error: /usr/bin/gcc failed with status: 1
ninja: build stopped: subcommand failed.
And on the dub build side, using the ldc package from Arch it fails on the following missing files libphobos2-ldc.a-shared and libdruntime-ldc.a-shared. Those are the files needed to do a static build that are not included in the ldc package, my apologies for the confusion.
I do a dub release build as follows:
dub build --build=release --compiler=ldc2
dub build --build=release --compiler=ldc2
Performing "release" build using ldc2 for x86_64.
gtk-d:gtkd 3.8.3: target for configuration "library" is up to date.
gtk-d:vte 3.8.3: target for configuration "library" is up to date.
tilix ~master: building configuration "default"...
/usr/bin/ld: cannot find -l:libphobos2-ldc.a-shared
/usr/bin/ld: cannot find -l:libdruntime-ldc.a-shared
collect2: error: ld returned 1 exit status
Error: /usr/bin/gcc failed with status: 1
ldc2 failed with exit code 1.
Try to add libunwind as a dependency. Don't know why that isn't resolved by dub.
@Vild is probably more suited to answer the those ldc questions.
No change with adding libunwind, still get the same issue as per below. I also fixed the flags which were not being added properly and tried setting them to the same as what dub is using but no luck either.
gnunn master … dlang tilix build ninja
[66/66] Linking target tilix.
FAILED: tilix
ldc2 -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' -disable-linker-strip-dead /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2081-DDA037AA548BBBFBBB5892AD9A8FF5BB/libgtkd-3.a /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2078-4F4650D9559F5386968D8E9A28F886BF/libvted-3.a -L=-lX11 -L=-lunwind
/usr/bin/ld: tilix@exe/source_gx_tilix_appwindow.d.o: in function `_D2gx5tilix6common__T12GenericEventTCQBjQBj7session7SessionZQBn11__xopEqualsFKxSQDaQDaQCx__TQCtTQCiZQDbKxQBaZb':
/home/gnunn/Development/dlang/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':
/home/gnunn/Development/dlang/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':
/home/gnunn/Development/dlang/tilix/build/../source/gx/tilix/common.d:28: undefined reference to `_D6object__T8__equalsTxDFAyaQdQfQhZvTxQpZQBdFNaNbNiNfAxQBgQfZb'
/usr/bin/ld: /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2078-4F4650D9559F5386968D8E9A28F886BF/libvted-3.a(vte.Pty.o): in function `_D3std6format__T14formattedWriteTSQBg5array__T8AppenderTAyaZQoTaTmTmZQCbFNaNfKQBtxAammZk':
/opt/ldc2-1.8.0/bin/../import/std/format.d:478: undefined reference to `_D3std9exception__T9enforceExHTCQBe6format15FormatExceptionZ__TQBsTbZQByFNaNfbLAyaQdmZb'
/usr/bin/ld: /opt/ldc2-1.8.0/bin/../import/std/format.d:547: undefined reference to `_D3std9exception__T9enforceExHTCQBe6format15FormatExceptionZ__TQBsTbZQByFNaNfbLAyaQdmZb'
/usr/bin/ld: /opt/ldc2-1.8.0/bin/../import/std/format.d:586: undefined reference to `_D3std6format15FormatException6__ctorMFNaNbNfAyaQdmC6object9ThrowableZCQCrQCqQCm'
/usr/bin/ld: /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2078-4F4650D9559F5386968D8E9A28F886BF/libvted-3.a(vte.Pty.o): in function `_D3std6format__TQkTaTmTmZQtFxAammZ12__dgliteral5MFNaNbNfZC6object9Throwable':
/opt/ldc2-1.8.0/bin/../import/std/format.d:5838: undefined reference to `_D3std6format15FormatException6__ctorMFNaNbNfAyaQdmC6object9ThrowableZCQCrQCqQCm'
/usr/bin/ld: /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2078-4F4650D9559F5386968D8E9A28F886BF/libvted-3.a(vte.Pty.o): in function `_D3std6format__T6getNthVAyaa19_736570617261746f7220636861726163746572SQCq6traits10isSomeCharTwTmTmZQDfFNaNfkmmZw':
/opt/ldc2-1.8.0/bin/../import/std/format.d:4108: undefined reference to `_D3std6format15FormatException6__ctorMFNaNbNfAyaQdmC6object9ThrowableZCQCrQCqQCm'
/usr/bin/ld: /opt/ldc2-1.8.0/bin/../import/std/format.d:4108: undefined reference to `_D3std6format15FormatException6__ctorMFNaNbNfAyaQdmC6object9ThrowableZCQCrQCqQCm'
/usr/bin/ld: /opt/ldc2-1.8.0/bin/../import/std/format.d:4114: undefined reference to `_D3std6format15FormatException6__ctorMFNaNbNfAyaQdmC6object9ThrowableZCQCrQCqQCm'
/usr/bin/ld: /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2078-4F4650D9559F5386968D8E9A28F886BF/libvted-3.a(vte.Pty.o):/opt/ldc2-1.8.0/bin/../import/std/format.d:4114: more undefined references to `_D3std6format15FormatException6__ctorMFNaNbNfAyaQdmC6object9ThrowableZCQCrQCqQCm' follow
/usr/bin/ld: /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2078-4F4650D9559F5386968D8E9A28F886BF/libvted-3.a(vte.Pty.o): in function `_D3std6format__T15formatValueImplTSQBh5array__T8AppenderTAyaZQoTPvTaZQCbFNaNfKQBsQrKxSQDgQDf__T10FormatSpecTaZQpZv':
/opt/ldc2-1.8.0/bin/../import/std/format.d:3959: undefined reference to `_D3std9exception__T9enforceExHTCQBe6format15FormatExceptionZ__TQBsTbZQByFNaNfbLAyaQdmZb'
/usr/bin/ld: /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2078-4F4650D9559F5386968D8E9A28F886BF/libvted-3.a(vte.Terminal.o): in function `_D3vte8TerminalQj7getTextMFPUPSQBd1c5types11VteTerminalllPvZiQeJC4glib6ArrayGQhZAya':
/home/gnunn/Development/dlang/tilix/../../../.dub/packages/gtk-d-3.8.3/gtk-d/generated/vte/vte/Terminal.d:599: undefined reference to `_d_eh_resume_unwind'
/usr/bin/ld: /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2078-4F4650D9559F5386968D8E9A28F886BF/libvted-3.a(vte.Terminal.o): in function `_D3vte8TerminalQj28getTextIncludeTrailingSpacesMFPUPSQBz1c5types11VteTerminalllPvZiQeJC4glib6ArrayGQhZAya':
/home/gnunn/Development/dlang/tilix/../../../.dub/packages/gtk-d-3.8.3/gtk-d/generated/vte/vte/Terminal.d:639: undefined reference to `_d_eh_resume_unwind'
/usr/bin/ld: /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2078-4F4650D9559F5386968D8E9A28F886BF/libvted-3.a(vte.Terminal.o): in function `_D3vte8TerminalQj12getTextRangeMFllllPUPSQBn1c5types11VteTerminalllPvZiQeJC4glib6ArrayGQhZAya':
/home/gnunn/Development/dlang/tilix/../../../.dub/packages/gtk-d-3.8.3/gtk-d/generated/vte/vte/Terminal.d:671: undefined reference to `_d_eh_resume_unwind'
/usr/bin/ld: /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2078-4F4650D9559F5386968D8E9A28F886BF/libvted-3.a(vte.Terminal.o): in function `_D3vte8TerminalQj19hyperlinkCheckEventMFC3gdk5EventQgZAya':
/home/gnunn/Development/dlang/tilix/../../../.dub/packages/gtk-d-3.8.3/gtk-d/generated/vte/vte/Terminal.d:718: undefined reference to `_d_eh_resume_unwind'
/usr/bin/ld: /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2078-4F4650D9559F5386968D8E9A28F886BF/libvted-3.a(vte.Terminal.o): in function `_D3vte8TerminalQj10matchCheckMFllJiZAya':
/home/gnunn/Development/dlang/tilix/../../../.dub/packages/gtk-d-3.8.3/gtk-d/generated/vte/vte/Terminal.d:783: undefined reference to `_d_eh_resume_unwind'
/usr/bin/ld: /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2078-4F4650D9559F5386968D8E9A28F886BF/libvted-3.a(vte.Terminal.o):/home/gnunn/Development/dlang/tilix/../../../.dub/packages/gtk-d-3.8.3/gtk-d/generated/vte/vte/Terminal.d:808: more undefined references to `_d_eh_resume_unwind' follow
collect2: error: ld returned 1 exit status
Error: /usr/bin/gcc failed with status: 1
ninja: build stopped: subcommand failed.
I've checked in meson.build with libunwind if @FFY00 want to give it a try.
So downgrading meson to 0.47.2 and switching the dependencies back to non-dub method gives a better result but still doesn't work, some of this may be the templating issue that ximion referred to in https://github.com/dlang/dmd/pull/6961 since GenericEvent is a template.
Are any major D projects currently using Meson, might be nice to have a look at what they are doing for comparison purposes.
gnunn master … dlang tilix build ninja
[66/66] Linking target tilix.
FAILED: tilix
ldc2 -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' -disable-linker-strip-dead -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':
/home/gnunn/Development/dlang/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':
/home/gnunn/Development/dlang/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':
/home/gnunn/Development/dlang/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.
This is really weird. Using dub as the dependency method works just fine for me using meson 0.48.0 from arch.
I'm not sure what the issue is either. I restored meson 0.48 and tried doing a complete build from scratch. Here are the exact commands I am using:
rm -rf ~/.dub/packages/gtk-d-3.8.3
dub fetch gtk-d
dub build gtk-d:gtkd --compiler=ldc2
dub build gtk-d:vte --compiler=ldc2
git clone https://github.com/gnunn1/tilix
cd tilix
meson build
cd build
ninja
And here is the result:
gnunn master / tmp tilix build ninja
[7/66] Generating com.gexperts.Tilix.desktop_data_merge with a custom command.
msgfmt: /tmp/tilix/po/LINGUAS does not exist
[8/66] Generating com.gexperts.Tilix.appdata.xml_data_merge with a custom command.
msgfmt: /tmp/tilix/po/LINGUAS does not exist
[66/66] Linking target tilix.
FAILED: tilix
ldc2 -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' -disable-linker-strip-dead /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2081-DDA037AA548BBBFBBB5892AD9A8FF5BB/libgtkd-3.a /home/gnunn/.dub/packages/gtk-d-3.8.3/gtk-d/.dub/build/library-debug-linux.posix-x86_64-ldc_2081-2AE399196476AD45451BB4CD3E964CD8/libvted-3.a -L=-lX11 -L=-lunwind
/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.
My LDC version is:
ldc2 --version
LDC - the LLVM D compiler (1.11.0):
based on DMD v2.081.2 and LLVM 6.0.1
built with LDC - the LLVM D compiler (1.11.0)
Default target: x86_64-pc-linux-gnu
Host CPU: skylake
http://dlang.org - http://wiki.dlang.org/LDC
My ldc2.conf is:
// See comments in driver/config.d in ldc source tree for grammar description of
// this config file.
// The default group is required
default:
{
// default switches injected before all explicit command-line switches
switches = [
"-I/usr/include/dlang/ldc/ldc",
"-I/usr/include/dlang/ldc",
"-L--no-warn-search-mismatch",
"-defaultlib=phobos2-ldc,druntime-ldc",
"-link-defaultlib-shared"
];
// default switches appended after all explicit command-line switches
post-switches = [
"-L-L/usr/lib"
];
};
OK got it to work, it was one of the flags I added from DUB, investigating.
Issue was the -disable-linker-strip-dead flag, removed it and it works fine. Repo updated with it deleted.
One question, should meson.build be updated to strip the executable automatically or do distros typically take care of that?
At least for arch, we do it by default.
If you want to static link to phobos and druntime you can add -link-defaultlib-shared=false (It could also be 0 or off instead of false).
You don't need to use the -defaultlib= flag anymore, as -link-defaultlib-shared selects the correct library for you.
Thanks @Vild, that works great, much appreciated.
So meson is mostly there, a couple of things that still need to be worked out:
Wait for meson update that fixes dub dependency issue, current way of using dub to fetch dependencies won't be acceptable to many distros like Debian
The desktop file doesn't work when installed from ninja, need to look into that. Launching tilix from the command line works fine.
@gnunn1 Can you paste the generated desktop file here? My wifi is pretty slow, I can't even clone the repository to try the meson build locally :/
@gnunn1
As a packager, that actually seems acceptable. That's how the javascript, go, ruby, etc. ecosystems work. It's always better to use distro provided dependencies but I don't think that's a dealbreaker.
Weird. I'll look into that later. Did you double check the permissions?
@bilelmoussaoui Here you go, I don't see anything obviously wrong with it. Note that ninja is installing it under /usr/local/share/applications rather then /usr/share/applications.
[Desktop Entry]
Version=1.0
Name[bg]=Tilix
Name[cs]=Tilix
Name[de]=Tilix
Name[en]=Tilix
Name[es]=Tilix
Name[fi]=Tilix
Name[fr]=Tilix
Name[he]=Tilix
Name[id]=Tilix
Name[it]=Tilix
Name[ja]=Tilix
Name[ko]=Tilix
Name[nb_NO]=Tilix
Name[nl]=Tilix
Name[pl]=Tilix
Name[pt_BR]=Tilix
Name[pt_PT]=Tilix
Name[ru]=Tilix
Name[sr]=Тајликс
Name[sv]=Tilix
Name[tr]=Tilix
Name[uk]=Tilix
Name[zh_CN]=Tilix
Name[zh_TW]=Tilix
Name=Tilix
Comment[cs]=Dlaždicový terminál pro Gnome
Comment[de]=Ein Terminal für GNOME mit Kacheldarstellung
Comment[en]=A tiling terminal for Gnome
Comment[es]=Una terminal divisible para Gnome
Comment[fi]=Laatoittava pääte Gnomelle
Comment[fr]=Un terminal scindable pour Gnome
Comment[he]=מסוף בריצוף עבור GNOME
Comment[it]=Un terminale a riquadri per Gnome
Comment[ko]=그놈을 위한 타일링 터미널
Comment[nl]=Een terminal voor Gnome met tegelmogelijkheid
Comment[pl]=Emuluje działanie terminala w środowisku GNOME wykorzystując interfejs kafli
Comment[pt_BR]=Um terminal em mosaico para o GNOME
Comment[pt_PT]=Um terminal em mosaico para o GNOME
Comment[ru]=Тайлинговый терминал для Gnome
Comment[sr]=Плочасти терминал за Гном
Comment[sv]=En sida-vid-sida-terminal för GNOME
Comment[tr]=Gnome için döşeyen bir terminal
Comment[uk]=Мозаїчний термінал для Gnome
Comment[zh_CN]=GNOME 的平铺终端模拟器
Comment=A tiling terminal for Gnome
Keywords[cs]=shell;terminál;příkaz;příkazový řádek;cmd;
Keywords[de]=Shell;Prompt;Befehl;Befehlszeile;command;commandline;cmd;
Keywords[en]=shell;prompt;command;commandline;cmd;
Keywords[es]=shell;prompt;command;commandline;cmd;
Keywords[fi]=shell;prompt;command;commandline;cmd;komentorivi;pääte;
Keywords[fr]=shell;prompt;commande;ligne de commande;cmd;
Keywords[he]=מעטפת;של;פרומפט;מסוף;טרמינל;שורת פקודה;חלון שחור;פקודה;פקודות;
Keywords[id]=shell;prompt;perintah;baris perintah;cmd;
Keywords[it]=shell;prompt;comando;linea di comando;cmd;
Keywords[nl]=shell;prompt;opdracht;opdrachtprompt;cmd;
Keywords[pl]=powłoka;terminal;polecenie;wiersz poleceń;cmd;
Keywords[pt_BR]=shell;prompt;comando;linha de comando;cmd;
Keywords[ru]=shell;prompt;command;commandline;cmd;
Keywords[sr]=shell;prompt;command;commandline;cmd;terminal;školjka;skoljka;komanda;naredba;linija;šel;терминал;шкољка;команда;наредба;линија;шел;
Keywords[sv]=skal;prompt;kommando;kommandorad;cmd;
Keywords[tr]=shell;prompt;command;commandline;cmd;
Keywords[uk]=shell;prompt;command;commandline;cmd;
Keywords[zh_CN]=shell;prompt;command;commandline;cmd;命令行;提示符;
Keywords[zh_TW]=shell;prompt;command;commandline;cmd;命令列;
Keywords=shell;prompt;command;commandline;cmd;
Exec=tilix
Terminal=false
Type=Application
StartupNotify=true
Categories=System;TerminalEmulator;X-GNOME-Utilities;
Icon[cs]=com.gexperts.Tilix
Icon[de]=com.gexperts.Tilix
Icon[en]=com.gexperts.Tilix
Icon[es]=com.gexperts.Tilix
Icon[fi]=com.gexperts.Tilix
Icon[fr]=com.gexperts.Tilix
Icon[he]=com.gexperts.Tilix
Icon[id]=com.gexperts.Tilix
Icon[it]=com.gexperts.Tilix
Icon[nl]=com.gexperts.Tilix
Icon[pl]=com.gexperts.Tilix
Icon[pt_BR]=com.gexperts.Tilix
Icon[ru]=com.gexperts.Tilix
Icon[sr]=com.gexperts.Tilix
Icon[sv]=com.gexperts.Tilix
Icon[tr]=com.gexperts.Tilix
Icon[uk]=com.gexperts.Tilix
Icon[zh_CN]=com.gexperts.Tilix
Icon[zh_TW]=com.gexperts.Tilix
Icon=com.gexperts.Tilix
DBusActivatable=true
Actions=new-window;new-session;
[Desktop Action new-window]
Name[bg]=Нов прозорец
Name[cs]=Nové okno
Name[de]=Neues Fenster
Name[el]=Νέο παράθυρο
Name[en]=New Window
Name[es]=Ventana nueva
Name[fi]=Uusi ikkuna
Name[fr]=Nouvelle fenêtre
Name[he]=חלון חדש
Name[id]=Jendela Baru
Name[it]=Nuova finestra
Name[ja]=新しいウィンドウ
Name[ko]=새 창
Name[nb_NO]=Nytt vindu
Name[nl]=Nieuw venster
Name[pl]=Nowe okno
Name[pt_BR]=Nova janela
Name[pt_PT]=Nova janela
Name[ru]=Новое окно
Name[sr]=Нови прозор
Name[sv]=Nytt fönster
Name[tr]=Yeni Pencere
Name[uk]=Створити вікно
Name[zh_CN]=新建窗口
Name[zh_TW]=新建視窗
Name=New Window
Exec=tilix --action=app-new-window
[Desktop Action new-session]
Name[bg]=Нова сесия
Name[cs]=Nové sezení
Name[de]=Neue Sitzung
Name[el]=Νέα συνεδρία
Name[en]=New Session
Name[es]=Sesión nueva
Name[fi]=Uusi istunto
Name[fr]=Nouvelle session
Name[he]=הפעלה חדשה
Name[id]=Sesi Baru
Name[it]=Nuova sessione
Name[ja]=新しいセッション
Name[ko]=새 세션
Name[nb_NO]=Ny økt
Name[nl]=Nieuwe sessie
Name[pl]=Nowa sesja
Name[pt_BR]=Nova sessão
Name[pt_PT]=Nova sessão
Name[ru]=Новый сеанс
Name[sr]=Нова сесија
Name[sv]=Ny session
Name[tr]=Yeni Oturum
Name[uk]=Створити сеанс
Name[zh_CN]=新建会话
Name[zh_TW]=新建會話
Name=New Session
Exec=tilix --action=app-new-session
@FFY00 Unfortunately Debian has strict rules around this, at least they did when I looked into it a couple of years ago. As an example, see the Rust packaging policy where they have a tool to help manage dependencies in terms of converting them to debian source packages.
@gnunn1 Have you set the prefix correctly using meson builddir --prefix=/usr? The default prefix is set to /usr/local
I see the problem, the file data/dbus/com.gexperts.Tilix.service is hard wired for /usr/bin/tilix, trying just tilix now.
I guess that it should work as expected; otherwise we can configure the file at build time to make sure it uses the right bin path
Unfortunately tilix doesn't work, it has to point to the exact location of the binary. Changing it to Exec=/usr/local/bin/tilix --gapplication-service works fine but as you mentioned needs to be configurable.
OK, so setting the prefix works fine, I'll need to add that to the documentation. Ideally though this should be configurable and I'll have a look at that as well.
Will take care of that right now! the changes should be backported to autotools too?
I wouldn't bother with autotools since the intent is for this to replace it. Thanks for taking care of this
I have added a wiki page on building with Meson and included deprecation notices for autotools. I am closing this issue as I think it's mission accomplished at this point. If any issues are found with the Meson build please open new individual issues as required.
Thank you everyone for your help with this, it could not have happened without the efforts of @ximion, @bilelmoussaoui , @FFY00 and @Vild.
I'd also like to give a shout out to @dsboger for his original work on autotools. While it is being deprecated, without that work it is unlikely Tilix would have been packaged by as many distros as it as been to date.
I'm seeing the three object__T8__equals undefined symbols on FreeBSD with LDC 1.15.0 as well.
One "solution" I found is (thin)LTO :D
extra_args = ['-vcolumns','-d-version=StdLoggerDisableTrace', '-flto=thin']
What's your /etc/ldc2.conf.
default:
{
// default switches injected before all explicit command-line switches
switches = [
"-defaultlib=phobos2-ldc,druntime-ldc",
];
// default switches appended after all explicit command-line switches
post-switches = [
"-I/usr/local/include/d",
];
// default directories to be searched for libraries when linking
lib-dirs = [
"/usr/local/lib",
];
// default rpath when linking against the shared default libs
rpath = "/usr/local/lib";
};
"^wasm(32|64)-":
{
switches = [
"-defaultlib=",
"-link-internally",
];
lib-dirs = [];
};
So, looks like indeed --export-dynamic and lack of gc-sections both cause the same error.
ldc did not strip dead symbols on FreeBSD at all (my PR fixes that). Funnily enough, after that fix, I've reintroduced the error on my system by adding a gmodule-2.0 requirement to GtkD's pkg-config file (tilix build was complaining about an undefined symbol g_module_something, though it doesn't now) — Meson added --export-dynamic from that file :D (adding it to Requires.private seems fine)
It's a bit weird that --export-dynamic can come from pkg-config.. that's kind of intentional for gmodule I guess, but still.
Most helpful comment
I have added a wiki page on building with Meson and included deprecation notices for autotools. I am closing this issue as I think it's mission accomplished at this point. If any issues are found with the Meson build please open new individual issues as required.
Thank you everyone for your help with this, it could not have happened without the efforts of @ximion, @bilelmoussaoui , @FFY00 and @Vild.
I'd also like to give a shout out to @dsboger for his original work on autotools. While it is being deprecated, without that work it is unlikely Tilix would have been packaged by as many distros as it as been to date.