Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
LDC 1.3.x/1.4.x + LLVM 4.0/5.0 results in compiler crashes when building rdeps #2300
Comments
It might well be, or it might turn out that we hit an assertion when building with them enabled – the debug info interface is not very well-documented or intuitive to use and has been a constant source of trouble (cf. all the other recent debug info issues).
I don't think there is an issue open for it, and personally haven't seen it before. |
|
Okay :-) Backtrace of LDC-related stuff:
|
|
And here is the full version, with all the debug symbols (should probably have used pastebin, but this way the data will always be available in this report and not time out): Command:
|
|
This one fortunately turned out to be easy to reproduce locally :-) |
|
Is the |
|
This flag combination is ubiquitous in Debian packages, because it's the default. We need optimized builds (obviously) to run the software quickly, and debug information to help with debugging problems in thee post-installation. |
|
For reference, something along the lines of |
LocutusOfBorg
commented
Sep 15, 2017
|
Hello, any news for this? |
|
Well, an easy to reproduce, self-contained testcase is the best way to get things fixed. |
|
I have uploaded LDC 1.4.0 built against LLVM 5.0 to Debian yesterday, once it clears NEW we will at least know whether that fixed anything. It's really annoying that something like this appears to happen so frequently, I think maybe having the CI not only build LDC and test it, but also have it build a comple of complex D projects and their dependencies would be pretty helpful. I don't have time to create a minimized testcase for this right now, but this bug is at least 100% reproducible, and it happens on amd64 as well, so making one should not be too hard. |
Correction: It actually does break everything, no matter whether there is a shared library involved or not. |
At least in this case, I'd expect the projects to use an |
LocutusOfBorg
commented
Sep 17, 2017
not really difficult to do that... |
We would need development snapshots of LDC in Debian, which we don't do and which would be very impractical for every commit. As soon as stuff has hit Debian, we already have problems, so testing this upstream would be much more helpful. That being said... LDC 1.4.0 built against LLVM 5 does not show the issue found in this bug report. It's rather crazy and makes me thing even more that this might actually be an LLVM bug (just like the last elusive crash on armhf & co. with LDC was). |
Oh, good news at last ;) - some last-minute debuginfo fixes made it into LDC 1.4 exactly because LLVM 5.0 brought quite a few changes (and improvements) to their debuginfo interface/generation. Thanks Matthias, I hope it works out for the other packages as well. |
LocutusOfBorg
commented
Sep 18, 2017
somewhat I think they broke the Ubuntu builds:
|
|
Yeah compiling the stdlibs with debuginfo on is broken with 0.17.5+LLVM5. You have to disable it: perhaps try |
LocutusOfBorg
commented
Sep 18, 2017
|
hurray! seems to be working! I still have a zlib link failure I'll figure out tomorrow thanks |
|
Reminds me that we should really upstream most of the patches Debian carries... Fedora already asked for that, since they need to apply exactly the same changes. |
LocutusOfBorg
commented
Sep 19, 2017
|
https://launchpadlibrarian.net/337519002/buildlog_ubuntu-artful-armhf.ldc_1%3A1.4.0-1ubuntu2_BUILDING.txt.gz |
|
@LocutusOfBorg Thank you! I wonder why this doesn't show on Debian...
We likely want that one too... Do you want to become member of the pkg-d team? That would give you commit access to the LDC Git branch and you could add the changes yourself (and you don't even need to be Debian Developer for that, an Alioth (or soon Salsa) account is enough). |
LocutusOfBorg
commented
Sep 19, 2017
probably the llvm in Debian has not built against new gcc-7 and they are still warnings (I'm wondering that gcc-switch is the culprit for that segfault) so maybe this change (that will be uploaded in Debian soon, e.g. already uploaded in llvm 3.9 yesterday), will make ldc fail on armhf.
I would like to avoid that, I definitively have no interest in maintaining packages I don't understand :)
I would like a double review for the changes I'm making to be honest |
|
So you guys replace the zlib embedded in Phobos by a reference to the shared zlib library? Do you only ship with shared druntime/Phobos? And do you add |
LocutusOfBorg
commented
Sep 20, 2017
|
I'll leave @ximion to answer here :) and the one above |
ximion
changed the title from
LDC 1.3.x + LLVM 4.0 results in compiler crashes when building rdeps
to
LDC 1.3.x/1.4.x + LLVM 4.0/5.0 results in compiler crashes when building rdeps
Sep 20, 2017
|
@kinke It appears like the issue is not fixed yet... Instead it just seems to happen less frequently: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=875535#34 |
|
Nope, that is something completely different, independent of
Crashes with LDC 1.4 and 1.3; 1.2 compiles. Most likely once again specific to separate compilation; the official sambamba (master) Makefile compiles fine with LDC 1.4 (all-at-once compilation). |
|
@kinke Ah, "good" :P Thanks for looking at it more closely, I just got the bug report last night... |
|
@kinke So, should I close this bug and file another one for the crash shown in builds like https://buildd.debian.org/status/fetch.php?pkg=libundead&arch=amd64&ver=1.0.7-1%2Bb1&stamp=1504166890&raw=0 ? |
|
Actually, it appears like this build was done against an older LDC version... So, let's wait for all things to rebuild again, this time against an even newer version. |
|
@kinke This sounds like a patch we want anyway though, thanks! (applied now) - let's see what builds and what doesn't (our build team should start a mass rebuild of D stuff in the archive soonish). |
|
Oh, an OT (abusing this report a little for general messages): @LocutusOfBorg the Debian package is updated with your changes now, and @kinke Does 5bbdac0 maybe resolve this error? -> https://anonscm.debian.org/git/pkg-d/ldc.git/commit/?id=ab626fb773e0a1a8181820d8cbb4117e6cd65d0c ( |
|
I highly doubt that. No idea what effect the comma had (part of the option name? probably :D). This smells more like an LLVM bug; something like the RISCV backend not being usable/compiled for the host architecture, but some other part of LLVM still trying to initialize it. LDC doesn't invoke that function directly. |
|
@kinke I thought it was LLVm too, but for some weird reason it only happens if we use a pre-built LDC and do not bootstrap from the C++ version, which is pretty weird (I would expect to see this error in both cases). In any case, I guess it might be worth to report a new bug for this, or, once again, wait for LLVm to get fixed. |
LocutusOfBorg
commented
Oct 1, 2017
|
thanks @ximion now armhf is good, to finish the transition we need to fix sambamba |
|
@LocutusOfBorg That one looks very close to this bug here again... Can you maybe also generate a backtrace? |
|
The official sambamba Makefile uses rdmd and compiles all files at once. So IMO the best way to move forward is to adapt the official Makefile or at least compile all files at once too (strongly recommended). A very ugly workaround, |
|
@kinke We don't have rdmd and Ubuntu is in freeze right now - so this is not an option. Additionally, the Sambamba makefile does not fetch dependencies correctly (if I remember this), so quite a bit of work would be involved to make it work properly. Switching Meson to make an unity build might be an option, but in any case, I don't think the archive admins in Ubuntu will like that. |
|
@LocutusOfBorg Do you also get #2352 in Ubuntu? |
Indeed – the flag with the correct name was still unset, but an option showed up with the comma in |
LocutusOfBorg
commented
Oct 2, 2017
dont' know, I never tried to run it :) |
|
@LocutusOfBorg It gets run as part of the build process of other packages, so it's rather easy to notice :P |
LocutusOfBorg
commented
Oct 2, 2017
|
oh... ok :) |
|
@LocutusOfBorg Yeah, we have the exact same bug in Debian:
https://buildd.debian.org/status/logs.php?pkg=gir-to-d&ver=0.11.1-2&arch=ppc64el |
LocutusOfBorg
commented
Oct 2, 2017
|
https://db.debian.org/machines.cgi?host=plummer this works there:
G. |
|
@LocutusOfBorg The following is tried to be built & run in order to determine whether the compiler works:
Does that also work on ppc64el? (also, why did you return 1?) |
LocutusOfBorg
commented
Oct 2, 2017
|
this is on ppc64el (plummer)
|
LocutusOfBorg
commented
Oct 2, 2017
because I didn't pay attention to what I wrote :p (actually, who cares about the return value? the problem is not there I presume) anyhow, it segfaults during startup, so I presume ldc is seriously broken on ppc64el right now |
|
@LocutusOfBorg Can you report a new bug for this? |
ximion commentedAug 31, 2017
•
Edited 1 time
-
ximion
Aug 31, 2017
Hi!
We just updated to LDC 1.3.x in Debian a few days ago, which is using LLVM 4 as well now (3.9 was default previously).
While LDC itself built well (bootstrap from scratch), we now get mass build failures in reverse-dependencies of LDC (status being tracked at https://release.debian.org/transitions/html/auto-ldc.html).
See for example the diet-ng build on amd64: https://buildd.debian.org/status/fetch.php?pkg=diet-ng&arch=amd64&ver=1.4.2-1%2Bb1&stamp=1504166958&raw=0
As usual, this is annoying to reproduce locally, but I did manage to do that in a pristine amd64 chroot once. To me, it appears like this might actually be a bug in LLVM.
We primarily experience this bug on amd64 and other arches, i386 seems to be safe from it.
Have you seen this with LDC before? I think I can work on generating a better backtrace, probably later next week (or at the weekend if I find the time).