Compilation works fine apart from some deprecation warnings that seem unrelated. Running tilix results in a crash with the following error message:
$ tilix
Aborting from rt/sections_elf_shared.d(500) Only one D shared object allowed for static runtime
Abortado (imagem do n煤cleo gravada)
Some additional info from syslog:
10:17:27 systemd-coredum: Process 10077 (tilix) of user 1000 dumped core.
Stack trace of thread 10077:
#0 0x00007f724bbce860 raise (libc.so.6)
#1 0x00007f724bbcfec9 abort (libc.so.6)
#2 0x00007f724daafc47 _D4core8internal5abortQgFNbNiNfAyaQdmZv (libgtkd-3.so.0)
#3 0x00007f724da9d0c6 _d_dso_registry (libgtkd-3.so.0)
#4 0x00007f724e181586 n/a (libvted-3.so.0)
#5 0x00007f724e3ad4fa call_init.part.0 (ld-linux-x86-64.so.2)
#6 0x00007f724e3ad606 _dl_init (ld-linux-x86-64.so.2)
#7 0x00007f724e39ef6a _dl_start_user (ld-linux-x86-64.so.2)
10:17:27 dbus-daemon: [session uid=1000 pid=444] Activated service 'com.gexperts.Tilix' failed: Process com.gexperts.Tilix received signal 6
Arch Linux x64 on GNOME 3.26. Using packages:
gtk3 3.22.26+47+g3a1a7135a2-3
liblphobos 1:1.7.0-1
ldc 1:1.7.0-1
gtkd 3.7.3-1 (AUR)
vte3-tilix 0.50.1+1.7.1-1 (AUR)
tilix 1.7.3-1 (AUR)
I have the exact same issue
Running tilix in a fully updated arch, results in the following crash:
Aborting from rt/sections_elf_shared.d(500) Only one D shared object allowed for static runtime[1] 1331 abort (core dumped) tilix
Building with dub seems to work OK for me:
dub build --build=release --compiler=ldc2
I assume you are using autotools? I'll have a look at that as well.
I can reproduce the issue with autotools but I'm not seeing an obvious reason for it. I've opened an issue with the LDC folks, hopefully someone can give me a pointer in the right direction.
Meanwhile, I've tried a bunch of different building configurations and here are the results I have:
dub build --build=release --compiler=ldc2 or simply dub build --build=release works perfectly, although Arch package's size has been increased due to static linking (but no gtkd/liblphobos external dependencies overlaps this a lot).dub build --build=release --config=dynamic does not start with all the problems described in first posts.For Arch Linux / AUR users I've uploaded a PKGBUILD for building Tilix package with dub: https://gist.github.com/solbjorn/05899b318f7f62dcf06e0d66ddcc1e7c
It has been tested and can be used as a temporary solution until AUR package maintainer will submit his own fixed version.
Hi, I'm the package maintainer for ldc on ArchLinux.
This is probably because the previous packages didn't ship {libdruntime,libphobos}-ldc.a only the .so. Which meant that all programs that where compiled with ldc always linked to the shared library,
instead of the static lib, like dmd does.
I changed this in this release, so you need to recompile all the dependencies that also where compiled with ldc (gtkd).
@Vild,
I've tried to recompile all the dependencies after ldc and liblphobos last update, but still got runtime error described in second post.
I've updated the LDC bug. @Vild I did a fresh install of the Arch gtkd package (since I always use dub not the autotools I never had it installed previously) and it didn't make any difference.
oh, now the problem is that gtkd is compile as a shared lib, and it statically links in the D runtime.
So either the gtkd packages needs to be compile as a static lib and tilix need to link to it. or
gtkd need to link to lib{druntime,phobos}-ldc.so, for tilix to be able to link to the shared version of gtkd
So either the gtkd packages needs to be compile as a static lib and tilix need to link to it. or
gtkd need to link to lib{druntime,phobos}-ldc.so, for tilix to be able to link to the shared version of gtkd
Exactly, and in the latter case, Tilix itself needs to be linked against shared druntime/phobos too. The shared versions in official prebuilt LDC packages have a -shared filename suffix, so they are currently selected via something like -defaultlib=druntime-ldc-shared,phobos2-ldc-shared [-debuglib=druntime-ldc-debug-shared,phobos2-ldc-debug-shared]. A nicer switch is about to be introduced, see https://github.com/ldc-developers/ldc/pull/2443.
@kinke @Vild thanks for the info! I changed the gtkd to link dynamically against liblphobos and it works again! I'm closing this.
I was a bit eager to close this, as it worked for me after changing gtkd to link dynamically with druntime/phobos. But after I rebuilt tilix itself, the problem came back. I think both gtkd and tilix are using the shared druntime/phobos, as per:
$ ldd /usr/bin/tilix | grep -e phobos -e runtime
libdruntime-ldc-shared.so.77 => /usr/lib/libdruntime-ldc-shared.so.77 (0x00007fdb42840000)
libphobos2-ldc-shared.so.77 => /usr/lib/libphobos2-ldc-shared.so.77 (0x00007fdb421e3000)
$ ldd /usr/lib/libvted-3.so | grep -e phobos -e runtime
libdruntime-ldc-shared.so.77 => /usr/lib/libdruntime-ldc-shared.so.77 (0x00007fd8f156c000)
libphobos2-ldc-shared.so.77 => /usr/lib/libphobos2-ldc-shared.so.77 (0x00007fd8f0f0f000)
$ ldd /usr/lib/libgtkd-3.so | grep -e phobos -e runtime
libdruntime-ldc-shared.so.77 => /usr/lib/libdruntime-ldc-shared.so.77 (0x00007fe66f7da000)
libphobos2-ldc-shared.so.77 => /usr/lib/libphobos2-ldc-shared.so.77 (0x00007fe66f17d000)
Am I missing something?
Seems like tilix still links to the static version of druntime
$ grep -i "Only one D shared object allowed for static runtime" /bin/tilix /usr/lib/lib{druntime,phobos2}-ldc{-shared.so,.a}
Binary file /bin/tilix matches
Binary file /usr/lib/libdruntime-ldc.a matches
I'm running into the same issue with arch, after recompiling tilix. Any workaround for now ?
@ArchiFleKs
compile with 聽DMD, no issues whatsoever
@rancidfrog , @ArchiFleKs
For AUR tilix, confirmed, changing the PKGBUILDs of both gtkd and tilix to use DC='dmd'and AUR tilix works again. dmd then has to become a dependency.
@Vild: The proper way to fix this IMO is releasing a new ArchLinux 1.7 package which links against the shared libs by default again (-defaultlib=druntime-ldc-shared,phobos2-ldc-shared -debuglib=druntime-ldc-debug-shared,phobos2-ldc-debug-shared in default switches in ldc2.conf). A breaking change such as this is bound to produce issues for many users.
@domschl
tilix already builds automatically with dmd if it is found.
So, not sure where all these issues are coming from. Because tilix used to fail on ldc unless you use libphobos-dev, I believe.
@dsboger Can you have a look at @Vild PR and update the package. I'm re-opening this issue until it's confirmed fixed.
@gnunn1 just installed the latest version from AUR (1.7.3-2) and indeedd it works.
@gnunn1 Done. Fix works for me (Thanks again @Vild).
Sorry for bringing a totally Arch Linux issue here. I lacked knowledge/awareness of the cause, so I opened this. I'll try to keep a closer look on LDC releases/changes in the future.
Thanks @dsboger and @Vild, closing issue.
@dsboger
You might want to push an update to AUR tilix packages, as it need to be rebuilt following gtkd updates.
If not you get:
tilix: error while loading shared libraries: libphobos2-ldc.so.76: cannot open shared object file: No such file or directory
After reinstalling tilix-git everything works fine.
But, users unaware of issue might bring up as a new issue after updating gtkd
@rancidfrog tilix packages were fixed after the gtkd packages, so no point in bumping again. AUR users are responsible for rebuilding in the correct order anyway.
But I just got a notice for gtkd update in yaourt, maybe a day or two ago, whereas tilix had none. As of a few hours ago.
just noticed that tilix would not launch after the update of gtkd without a rebuild.
@rancidfrog As a general rule (for compiled code), you always need to rebuild a package (e.g. tilix) if some of it's deps (e.g. gtkd) are updated. In this case, tilix wouldn't build for ~a day because of a packaging bug, as mentioned in the comments above, that got fixed. I know it is a highly technical rule, that most users end up learning the hard way, and I'm well aware that new users will keep reporting those rebuild issues, and I'll keep trying to educate them about the rule. There is no other way in AUR.
If you'd like to discuss more about this, please let's do so in AUR.
Most helpful comment
Meanwhile, I've tried a bunch of different building configurations and here are the results I have:
dub build --build=release --compiler=ldc2or simplydub build --build=releaseworks perfectly, although Arch package's size has been increased due to static linking (but no gtkd/liblphobos external dependencies overlaps this a lot).dub build --build=release --config=dynamicdoes not start with all the problems described in first posts.For Arch Linux / AUR users I've uploaded a PKGBUILD for building Tilix package with dub: https://gist.github.com/solbjorn/05899b318f7f62dcf06e0d66ddcc1e7c
It has been tested and can be used as a temporary solution until AUR package maintainer will submit his own fixed version.