-
-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build fails with gdc 13.x #2577
Comments
#2548 for WIP changes, but was needing a GDC update. Your error message looks like the |
Bad commit 8a25429 |
If there was a (even temporary) fix available soonish, we could still get dub 1.30 into the next Debian release. Otherwise this will need a freeze exception, and even though it's a low popularity package, it technically also is a toolchain package which means it's not guaranteed to get that exception (switching to LDC would mean loosing architecture support, which comes with its own administrative issues). |
building master seems to work on my machine with |
It fails here with the same error, using |
You need to build with |
invocation:
|
Indeed! Removing the |
on alpine with GDC 12.2.1 the build seems to "work", but gets a linker error at the end: https://github.com/dlang/dub/actions/runs/4068606217/jobs/7007362399 |
Ah! I was building dub using the |
ah I got the invocation from |
Weird that linking fails on Alpine, but Alpine also is a quite different environment compared to traditional GNU/Linux... |
Well, I have to correct myself saying that this works on Debian... Dub itself links fine, but dub compiling another program then fails:
Flags used:
|
Trying to use dub 1.31 to build the manual pages yields even more linker errors:
|
That's not good at all - I'll see if missing references can be boiled down to something palatable, but no guarantees on time. Will try reducing that dub -Werror in the meantime. |
It's a bit sad that we'll miss the Debian freeze deadline - I can ask for an exception, but I doubt I'll get it for a new upstream release (so Debian will be stuck at dub 1.28 ...). In any case, once this works again I'll submit a PR for the dub CI, so we can catch these issues sooner next time :-) |
you can usually workaround these issues with |
@ximion By the way, this PR was backported for 12.3, can't say for sure whether it would help. |
Not in this case, at least not completely :(
|
@WebFreak001 looks like it might be related to that Not close to an actual reduction, but this is as far as the mechanical one has taken it.
|
that remaining linker error definitely looks like the bug link Iain just posted (it was the initial linker error that broke the alpine build at the start iirc) So this remaining linker error you have has actually been known for a few months since I restarted the alpine GDC PR and was fixed by Iain, but still takes some time to sync up with the GCC release cycle. |
Doesn't prevent Debian/Ubuntu from backporting early. |
Yep, building dub with |
Reduction for the original build failure - not actually a compiler bug, rather a small discrepancy between what warnings-as-errors means between dmd and gdc. There is no distinction between deprecation and warning in gdc diagnostics, so
Likely dub should be fixed to not use a deprecated interface in the code that makes use of SumTypes. |
Confirmed. With PR108055 applied, this whittles down to:
With PR108055 and Likely being bitten by the template emission changes in the front-end. Will have to adjust for 12.x to get the least surprising behaviour, maybe rethink strategy before 13.x. |
Looks like a simple fix, can you raise a PR or provide a link ? |
@Geod24 it comes from this function. dub/source/dub/packagemanager.d Lines 222 to 244 in 5f756ca
|
Looks like a DMD bug as it doesn't trigger a deprecation when it should. |
I build dub 1.30.0 failed with the similar errors using ldc 1.30.0 on Fedora 37. $ ldmd2 -run build.d
Using pre-existing version file. To force a rebuild, provide an explicit version (first argument) or remove: /home/ruby/rpmbuild/SOURCES/dub-1.30.0/source/dub/version_.d
Building dub using ldmd2 (dflags: ["-g", "-O", "-w"]), this may take a while...
Command `["ldmd2", "-of/home/ruby/rpmbuild/SOURCES/dub-1.30.0/bin/dub", "-I/home/ruby/rpmbuild/SOURCES/dub-1.30.0/source", "-version=DubUseCurl", "-version=DubApplication", "-g", "-O", "-w", "@build-files.txt"]` failed, output was:
Serializing composite type Flags!(BuildRequirement) which has no serializable fields
Serializing composite type Flags!(BuildOption) which has no serializable fields
Error: Error executing /usr/bin/ldc2: Killed
Error: /tmp/build-fc6919 failed with status: 1
$ ldmd2 --version
LDC - the LLVM D compiler (1.30.0):
based on DMD v2.100.1 and LLVM 14.0.5
built with LDC - the LLVM D compiler (1.30.0)
Default target: x86_64-redhat-linux-gnu |
how much memory does your build machine have? It looks like it was rather OOM killed instead of this being an LDC problem. |
My machine memory is 8G. I retried the build and it succeeded, maybe it caused by OOM. Thanks for your reply. |
@ximion : Still having issues with the latest release ? |
Yes, but it's probably GDC's faul. With GDC 12.2.0-14 I get:
So, dub builds fine now, but when trying to build the manual pages using |
This is unfortunately still an issue, just with less symbols (GDC 13.x now):
|
This was last tested with Dub 1.34.0 and GDC 13.2.x and it's unfortunately currently still blocking dub upgrades in Debian and its derivatives. |
Just as I wrote this, I found out that |
System information
Bug Description
When trying to compile dub using GDC, the build fails while the previous 1.29 version built fine.
Error message:
How to reproduce?
Try to build dub using gdc
Expected Behavior
Either the build succeeds as it did before, or dub emits a message that the compiler/version is unsupported for building dub.
The text was updated successfully, but these errors were encountered: