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

Initial cross-compilation support for RISC-V #35092

Merged
merged 12 commits into from Feb 18, 2018

Conversation

shlevy
Copy link
Member

@shlevy shlevy commented Feb 18, 2018

Tested up to building nixUnstable which ran a repl successfully under qemu-riscv.

Part of #35089

@shlevy
Copy link
Member Author

shlevy commented Feb 18, 2018

cc @bgamari as well.

@shlevy shlevy added this to To do in riscv via automation Feb 18, 2018
@shlevy shlevy moved this from To do to In progress in riscv Feb 18, 2018
@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

these paths will be fetched (0.16 MiB download, 0.52 MiB unpacked):
  /nix/store/dj1ny4kh403akxl562yd14mgfl57fi9c-pcre-8.41
  /nix/store/xlg0qpv6ma7gv7r25yrjih1kknyprw7q-pcre-8.41-bin
copying path '/nix/store/dj1ny4kh403akxl562yd14mgfl57fi9c-pcre-8.41' from 'https://cache.nixos.org'...
copying path '/nix/store/xlg0qpv6ma7gv7r25yrjih1kknyprw7q-pcre-8.41-bin' from 'https://cache.nixos.org'...
/nix/store/xlg0qpv6ma7gv7r25yrjih1kknyprw7q-pcre-8.41-bin

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

/nix/store/pjjas9yri9jhgaxk1ig71r7m90hvwbqw-pcre-8.41-bin

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Partial log (click to expand)

/nix/store/rxlpm1cbn1wxm8xb9icak4b7bagyzzcm-pcre-8.41-bin

@shlevy
Copy link
Member Author

shlevy commented Feb 18, 2018

nixUnstable now building.

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Package ‘busybox-1.28.0’ in /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/os-specific/linux/busybox/default.nix:100 is not supported on ‘x86_64-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

@shlevy
Copy link
Member Author

shlevy commented Feb 18, 2018

@GrahamcOfBorg @grahamc This isn't a change from where things were before, right?

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

running test tests/brotli.sh... [PASS]
running test tests/pure-eval.sh... [PASS]
running test tests/check.sh... [PASS]
running test tests/plugins.sh... [PASS]
All tests succeeded
/nix/store/ijdwa720w7blmf0393ir77zi9hd8lv27-boehm-gc-7.6.4
/nix/store/n3m5p5a8jzzc4ayzd36jypnyjfdrqiy0-busybox-1.28.0
/nix/store/b88xihjy5gsm1nakdj75wwxj631g7psb-libatomic_ops-7.6.2
/nix/store/j6nxvcvrwq4jy1kl26jqsdd87c68ilnp-nix-2.0pre5951_690ac7c9
/nix/store/pjjas9yri9jhgaxk1ig71r7m90hvwbqw-pcre-8.41-bin

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

running test tests/brotli.sh... [PASS]
running test tests/pure-eval.sh... [PASS]
running test tests/check.sh... [PASS]
running test tests/plugins.sh... [PASS]
All tests succeeded
/nix/store/89r6xyr36sn3jz7skkb3dlaf12xkzzpf-boehm-gc-7.6.4
/nix/store/gg1zx5isllnikmb8sdw1r3syvgd44371-busybox-1.28.0
/nix/store/zgz0pxbs0lg5k976459jl11hjqv0k15b-libatomic_ops-7.6.2
/nix/store/vivy1pybfbi91j7chrk42pin5ypmcrmg-nix-2.0pre5951_690ac7c9
/nix/store/xlg0qpv6ma7gv7r25yrjih1kknyprw7q-pcre-8.41-bin

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Package ‘busybox-1.28.0’ in /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/os-specific/linux/busybox/default.nix:100 is not supported on ‘x86_64-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

cannot find section .dynamic
cannot find section .dynamic
cannot find section .dynamic
cannot find section .dynamic
/nix/store/ijdwa720w7blmf0393ir77zi9hd8lv27-boehm-gc-7.6.4
/nix/store/n3m5p5a8jzzc4ayzd36jypnyjfdrqiy0-busybox-1.28.0
/nix/store/b88xihjy5gsm1nakdj75wwxj631g7psb-libatomic_ops-7.6.2
/nix/store/j6nxvcvrwq4jy1kl26jqsdd87c68ilnp-nix-2.0pre5951_690ac7c9
/nix/store/pjjas9yri9jhgaxk1ig71r7m90hvwbqw-pcre-8.41-bin
/nix/store/ly21v01jwjyc2xz9486whla690d77wix-qemu-2.11.50pre58771_af435b709d

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

cannot find section .dynamic
cannot find section .dynamic
cannot find section .dynamic
cannot find section .dynamic
/nix/store/89r6xyr36sn3jz7skkb3dlaf12xkzzpf-boehm-gc-7.6.4
/nix/store/gg1zx5isllnikmb8sdw1r3syvgd44371-busybox-1.28.0
/nix/store/zgz0pxbs0lg5k976459jl11hjqv0k15b-libatomic_ops-7.6.2
/nix/store/vivy1pybfbi91j7chrk42pin5ypmcrmg-nix-2.0pre5951_690ac7c9
/nix/store/xlg0qpv6ma7gv7r25yrjih1kknyprw7q-pcre-8.41-bin
/nix/store/y9p80byj23jxh84xga8mwjfn7dlkshxx-qemu-2.11.50pre58771_af435b709d

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

/nix/store/89r6xyr36sn3jz7skkb3dlaf12xkzzpf-boehm-gc-7.6.4
/nix/store/gg1zx5isllnikmb8sdw1r3syvgd44371-busybox-1.28.0
/nix/store/ssg44zkv00g531qx790zk3pvfpw0cg4f-gnumake-4.2.1
/nix/store/zgz0pxbs0lg5k976459jl11hjqv0k15b-libatomic_ops-7.6.2
/nix/store/vivy1pybfbi91j7chrk42pin5ypmcrmg-nix-2.0pre5951_690ac7c9
/nix/store/xlg0qpv6ma7gv7r25yrjih1kknyprw7q-pcre-8.41-bin
/nix/store/y9p80byj23jxh84xga8mwjfn7dlkshxx-qemu-2.11.50pre58771_af435b709d

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Package ‘busybox-1.28.0’ in /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/os-specific/linux/busybox/default.nix:100 is not supported on ‘x86_64-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

@shlevy
Copy link
Member Author

shlevy commented Feb 18, 2018

@GrahamcOfBorg eval

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

running test tests/check.sh... [PASS]
running test tests/plugins.sh... [PASS]
All tests succeeded
/nix/store/xh57h2c4dvhvfssf3fj5gy0vpk0j74li-boehm-gc-7.6.4
/nix/store/n3m5p5a8jzzc4ayzd36jypnyjfdrqiy0-busybox-1.28.0
/nix/store/qgcjwcqi7h8br5ka34m77gkdgnr618xg-gnumake-4.2.1
/nix/store/gkw12mqi9s3idzxi8ik5saws2a6lc6k5-libatomic_ops-7.6.2
/nix/store/r898lhymi3bn2mhlqcz9cm1kqgfp8yg1-nix-2.0pre5951_690ac7c9
/nix/store/pjjas9yri9jhgaxk1ig71r7m90hvwbqw-pcre-8.41-bin
/nix/store/zcpzxxrzj8h0w1y5q29vjma5qjwf5hxj-qemu-2.11.50pre58771_af435b709d

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

/nix/store/xh57h2c4dvhvfssf3fj5gy0vpk0j74li-boehm-gc-7.6.4
/nix/store/n3m5p5a8jzzc4ayzd36jypnyjfdrqiy0-busybox-1.28.0
/nix/store/qgcjwcqi7h8br5ka34m77gkdgnr618xg-gnumake-4.2.1
/nix/store/gkw12mqi9s3idzxi8ik5saws2a6lc6k5-libatomic_ops-7.6.2
/nix/store/r898lhymi3bn2mhlqcz9cm1kqgfp8yg1-nix-2.0pre5951_690ac7c9
/nix/store/pjjas9yri9jhgaxk1ig71r7m90hvwbqw-pcre-8.41-bin
/nix/store/zcpzxxrzj8h0w1y5q29vjma5qjwf5hxj-qemu-2.11.50pre58771_af435b709d

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Package ‘busybox-1.28.0’ in /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/os-specific/linux/busybox/default.nix:100 is not supported on ‘x86_64-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

/nix/store/xh57h2c4dvhvfssf3fj5gy0vpk0j74li-boehm-gc-7.6.4
/nix/store/n3m5p5a8jzzc4ayzd36jypnyjfdrqiy0-busybox-1.28.0
/nix/store/qgcjwcqi7h8br5ka34m77gkdgnr618xg-gnumake-4.2.1
/nix/store/gkw12mqi9s3idzxi8ik5saws2a6lc6k5-libatomic_ops-7.6.2
/nix/store/r898lhymi3bn2mhlqcz9cm1kqgfp8yg1-nix-2.0pre5951_690ac7c9
/nix/store/pjjas9yri9jhgaxk1ig71r7m90hvwbqw-pcre-8.41-bin

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Package ‘busybox-1.28.0’ in /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/os-specific/linux/busybox/default.nix:100 is not supported on ‘x86_64-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

@shlevy
Copy link
Member Author

shlevy commented Feb 18, 2018

@grahamc Is there an easy way to see the list of packages ofborg thinks will rebuild?

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

running test tests/pure-eval.sh... [PASS]
running test tests/check.sh... [PASS]
running test tests/plugins.sh... [PASS]
All tests succeeded
/nix/store/9c2vy77i4m1vs0gvvy7kxq27019s3vs9-boehm-gc-7.6.4
/nix/store/gg1zx5isllnikmb8sdw1r3syvgd44371-busybox-1.28.0
/nix/store/ssg44zkv00g531qx790zk3pvfpw0cg4f-gnumake-4.2.1
/nix/store/d3l8nf0xmhmsl23a8i08lw9yhfq2r8db-libatomic_ops-7.6.2
/nix/store/krdvn7jj8sq0yb5kd0adyyr6r0v0knjv-nix-2.0pre5951_690ac7c9
/nix/store/xlg0qpv6ma7gv7r25yrjih1kknyprw7q-pcre-8.41-bin

@shlevy shlevy merged commit 0a0ecc4 into NixOS:master Feb 18, 2018
riscv automation moved this from In progress to Done Feb 18, 2018
@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

/nix/store/9c2vy77i4m1vs0gvvy7kxq27019s3vs9-boehm-gc-7.6.4
/nix/store/gg1zx5isllnikmb8sdw1r3syvgd44371-busybox-1.28.0
/nix/store/ssg44zkv00g531qx790zk3pvfpw0cg4f-gnumake-4.2.1
/nix/store/d3l8nf0xmhmsl23a8i08lw9yhfq2r8db-libatomic_ops-7.6.2
/nix/store/krdvn7jj8sq0yb5kd0adyyr6r0v0knjv-nix-2.0pre5951_690ac7c9
/nix/store/xlg0qpv6ma7gv7r25yrjih1kknyprw7q-pcre-8.41-bin

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Package ‘busybox-1.28.0’ in /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/os-specific/linux/busybox/default.nix:100 is not supported on ‘x86_64-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

/nix/store/xh57h2c4dvhvfssf3fj5gy0vpk0j74li-boehm-gc-7.6.4
/nix/store/n3m5p5a8jzzc4ayzd36jypnyjfdrqiy0-busybox-1.28.0
/nix/store/qgcjwcqi7h8br5ka34m77gkdgnr618xg-gnumake-4.2.1
/nix/store/gkw12mqi9s3idzxi8ik5saws2a6lc6k5-libatomic_ops-7.6.2
/nix/store/r898lhymi3bn2mhlqcz9cm1kqgfp8yg1-nix-2.0pre5951_690ac7c9
/nix/store/pjjas9yri9jhgaxk1ig71r7m90hvwbqw-pcre-8.41-bin

@bgamari
Copy link
Contributor

bgamari commented Feb 19, 2018

Excellent, I have been very interested in adding RISC-V support to GHC at some point. This will be quite useful.

@shlevy shlevy deleted the riscv-initial-cross-support branch February 19, 2018 01:49
@Ericson2314
Copy link
Member

Wooo! This is a fun thing to come back to.

@shlevy
Copy link
Member Author

shlevy commented Feb 20, 2018

@Ericson2314 Does it look OK?

@shlevy
Copy link
Member Author

shlevy commented Feb 20, 2018

@Ericson2314 FYI https://github.com/shlevy/nixos-riscv-bootstrap

@Ericson2314
Copy link
Member

@shlevy Indeed it does! I might try to remove the need for a musl-multiplatform as part of my #34274 crusade, but that's a separate goal and not at all a problem with this PR :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
riscv
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants