Navigation Menu

Skip to content
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: 2.085.1 -> 2.091.1 #82694

Merged
merged 4 commits into from Apr 29, 2020
Merged

dmd: 2.085.1 -> 2.091.1 #82694

merged 4 commits into from Apr 29, 2020

Conversation

lionello
Copy link
Contributor

@lionello lionello commented Mar 15, 2020

Motivation for this change

Current dmd in Nixpkgs uses ldc 0.17.6 to bootstrap ldc 1.x which will finally bootstrap dmd. This was done since the official dmd binaries where not redistributable.
This changed and as of 2.075.0 dmd binaries (and sources) are all using the Boost license. This simplifies bootstrapping so we can use the v-1 binaries to build the latest dmd sources.

Things done
  • Using official 2.090.1 binary for bootstrapping 2.091.1
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@lionello
Copy link
Contributor Author

@adisbladis @ThomasMader Please have a look.

@lionello
Copy link
Contributor Author

WIP. got a test failure here..

@kinke
Copy link

kinke commented Mar 15, 2020

Wrt. LDC, I strongly suggest you look for alternatives to bootstrapping with v0.17: ldc-developers/ldc#3354

@veprbl veprbl changed the title dmd: 2.085.1 -> 2.091.0 [WIP] dmd: 2.085.1 -> 2.091.0 Mar 15, 2020
@adisbladis adisbladis force-pushed the dmd-bootstrap branch 2 times, most recently from 82fd1f1 to 41d23a1 Compare March 16, 2020 01:13
@lionello
Copy link
Contributor Author

This is OK now @adisbladis

@adisbladis
Copy link
Member

@GrahamcOfBorg build ldc dmd

@lionello lionello changed the title [WIP] dmd: 2.085.1 -> 2.091.0 dmd: 2.085.1 -> 2.091.0 Apr 18, 2020
@lionello
Copy link
Contributor Author

lionello commented Apr 18, 2020

@adisbladis Do you want to ask grahamcofborg to build the new toplevel dmdBootstrap as well?

@ThomasMader
Copy link
Contributor

Great work @lionello, thanks.

Would you mind changing the bootstrap of ldc?
The bootstrap version 0.17.x shouldn't be used anymore but instead a solution as you did for bootstrapping dmd should be preferred.
I wanted to do it for a long time but now that you already achieved it with dmd it should be straight forward with ldc I guess.

@lionello
Copy link
Contributor Author

@ThomasMader Good idea.

@ThomasMader
Copy link
Contributor

@lionello Why do you want to build dmdBootstrap explicitly? Isn't it enough that it builds with normal dmd?

@lionello
Copy link
Contributor Author

@lionello Why do you want to build dmdBootstrap explicitly? Isn't it enough that it builds with normal dmd?

Doh. :) Good point.

@lionello lionello mentioned this pull request Apr 18, 2020
10 tasks
@lionello
Copy link
Contributor Author

lionello commented Apr 18, 2020

Would you mind changing the bootstrap of ldc?
The bootstrap version 0.17.x shouldn't be used anymore but instead a solution as you did for bootstrapping dmd should be preferred.
I wanted to do it for a long time but now that you already achieved it with dmd it should be straight forward with ldc I guess.

@ThomasMader Please have a look here: #85488

@lionello lionello changed the title dmd: 2.085.1 -> 2.091.0 [WIP] dmd: 2.085.1 -> 2.091.0 Apr 18, 2020
@lionello lionello mentioned this pull request Apr 18, 2020
10 tasks
Copy link
Contributor

@ThomasMader ThomasMader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this!

pkgs/development/compilers/dmd/bootstrap.nix Show resolved Hide resolved
pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
@ThomasMader
Copy link
Contributor

ThomasMader commented Apr 21, 2020

I tried it and it works for me.

At least on Darwin. Haven't tried it on Linux/NixOS though.

@@ -103,7 +108,7 @@ stdenv.mkDerivation rec {

checkPhase = ''
cd dmd
make -j$NIX_BUILD_CORES -C test -f Makefile PIC=1 CC=$CXX DMD=${pathToDmd} BUILD=release SHELL=$SHELL
make -j$NIX_BUILD_CORES -C test -f Makefile PIC=1 DMD=${pathToDmd} BUILD=release SHELL=$SHELL
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
make -j$NIX_BUILD_CORES -C test -f Makefile PIC=1 DMD=${pathToDmd} BUILD=release SHELL=$SHELL
make -j$NIX_BUILD_CORES -C test -f Makefile PIC=1 HOST_CXX=${CXX} DMD=${pathToDmd} BUILD=release SHELL=$SHELL

IIUC

@Geod24
Copy link

Geod24 commented Apr 21, 2020

BTW 2.091.1 is out now

@worldofpeace
Copy link
Contributor

worldofpeace commented Apr 22, 2020

To avoid breakage on master I reverted the merge of the ldc update #85768. Can we revert that revert here? Ref #85488 (comment)

@lionello lionello changed the title dmd: 2.085.1 -> 2.091.0 dmd: 2.085.1 -> 2.091.1 Apr 24, 2020
@lionello
Copy link
Contributor Author

/private/tmp/d/dmd/test/dshell/test6952.d(32): Error: none of the overloads of `run` are callable using argument types `(string, File, File, string[string])`, candidates are:

:(

@Geod24
Copy link

Geod24 commented Apr 25, 2020

Try to add dlang/dmd@4157298 before the patch.

@PetarKirov
Copy link

Hey @lionello @ThomasMader @worldofpeace, what's left to be done?

@worldofpeace
Copy link
Contributor

@GrahamcOfBorg build dmd

@lionello
Copy link
Contributor Author

Latest patch added a path reference to bash that had to be replaced. Just pushed.

@lionello
Copy link
Contributor Author

@GrahamcOfBorg build dmd

@lionello
Copy link
Contributor Author

To avoid breakage on master I reverted the merge of the ldc update #85768. Can we revert that revert here? Ref #85488 (comment)

Done.

@lionello
Copy link
Contributor Author

@worldofpeace Passed.

@lionello
Copy link
Contributor Author

@worldofpeace I made the change you requested. Can you have a (final?) look?

@worldofpeace
Copy link
Contributor

@lionello All good, can you squash that last commit into 54701d2 ?

@lionello
Copy link
Contributor Author

@worldofpeace Done!

@worldofpeace worldofpeace merged commit 3b00e78 into NixOS:master Apr 29, 2020
@lionello
Copy link
Contributor Author

Wooohoo! Thanks all!

@lionello lionello deleted the dmd-bootstrap branch April 30, 2020 00:18
@lionello lionello mentioned this pull request Dec 14, 2021
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants