-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
dmd,dtools,dub: 2.079.0 -> 2.079.1 and wrap ldc2 binary with $CC #40228
Conversation
The reason why this is WIP is that the resulting compiler (dmd) is not working properly. The error output of the hello world compilation can be seen at https://forum.dlang.org/post/ooxytxcurfzakjpqhvkt@forum.dlang.org @shlevy Do you have a clue what might be wrong? I am having a hard time here. To compile the hello world program with dmd just run 'dmd hello.d'
|
@shlevy I did a very time consuming bisect and found the error commit to be 3027bca which bumped the binutils to 2.30. Since this PR fixes the build of dmd and the problem with binutils doesn't exist on 18.03 I remove the WIP label and consider it ready to be merged as it also improves the situation on master. This should be cherry picked to 18.03 too to update the packages. |
@GrahamcOfBorg build dmd I don't trigger the build of dtools and dub because they can not build due to the binutils problem. |
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: dmd Partial log (click to expand)
|
Failure on x86_64-linux (full log) Attempted: dmd Partial log (click to expand)
|
The error Removing the phobosUnittests resolves this. |
This seems to be a regression in nix. Opened NixOS/nix#2155 for it. |
I also opened #40397 for the binutils problem. While testing I saw that the ldc package can't compile if there is no gcc installed. I fixed this by wrapping the ldc2 binary like it was already done with the dmd binary. Because the other remaining issues are outside the scope of this PR and this PR fixes the build problems on master, this can now be finally merged as it improves the current situation. |
''; | ||
|
||
postInstall = '' | ||
wrapProgram $out/bin/ldc2 \ | ||
--prefix PATH ":" "${stdenv.cc}/bin" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are care about cross compilation, or might eventually care about cross compilation, it's better if you do targetPackages.stdenv.cc
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, also changed it in the dmd package.
postInstall = '' | ||
wrapProgram $out/bin/ldc2 \ | ||
--prefix PATH ":" "${stdenv.cc}/bin" \ | ||
--set-default CC "$CC" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
likewise
--set-default CC "${targetPackages.stdenv.cc}/bin/cc"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, also changed it in the dmd package.
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: dmd, dtools, dub, ldc Partial log (click to expand)
|
Failure on x86_64-linux (full log) Attempted: dmd, dtools, dub, ldc Partial log (click to expand)
|
I found the linking problem. Since it is better anyway not to strip the dmd package I put a dontStrip = true into the package which fixes the problem immediately. See also #40397 (comment). This means that the only thing left is to merge nix 2.0.2 into release-18.03. See #40652. |
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: dmd, dtools, dub, ldc Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: dmd, dtools, dub, ldc Partial log (click to expand)
|
@ThomasMader Looks like that's merged. Is this PR good to go then? |
Yes can be merged. |
dmd,dtools,dub: 2.079.0 -> 2.079.1 and wrap ldc2 binary with $CC (cherry picked from commit 4aa04d1) Reason: This bumps the version to a newer release and fixes package issues.
dmd,dtools,dub: 2.079.0 -> 2.079.1 and wrap ldc2 binary with $CC (cherry picked from commit 4aa04d1) Reason: This bumps the version to a newer release and fixes package issues.
Motivation for this change
Fix dmd build on Master and update to new version.
Wrap ldc2 binary with C compiler because it's needed for linking.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)