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

Both gccCrossStageStatic and gccCrossStageFinal don't build #16014

Closed
dvc94ch opened this issue Jun 5, 2016 · 6 comments
Closed

Both gccCrossStageStatic and gccCrossStageFinal don't build #16014

dvc94ch opened this issue Jun 5, 2016 · 6 comments
Labels
2.status: work-in-progress This PR isn't done

Comments

@dvc94ch
Copy link
Contributor

dvc94ch commented Jun 5, 2016

Issue description

gccCrossStageStatic complains about infinite recursion and can be worked around with this patch:

diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 17a1c1d..3a72618 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -4240,6 +4240,8 @@ in
         langCC = false;
         libcCross = libcCross1;
         enableShared = false;
+        gettext = null;
+        libelf = null;
       });
       libc = libcCross1;
       binutils = binutilsCross;

gccCrossStageFinal fails with unrecognized file format when attempting to strip debug symbols. I think this commit is d5bb6a1 the problem. Still testing, will take a while to verify.

Steps to reproduce

with import <nixpkgs> {};

let
  pkgsCross = import <nixpkgs> {
    inherit system;
    crossSystem = rec {
      config = "armv7l-unknown-linux-gnueabi";
      bigEndian = false;
      arch = "arm";
      float = "hard";
      fpu = "vfpv3-d16";
      withTLS = true;
      libc = "glibc";
      platform = platforms.armv7l-hf-multiplatform;
      openssl.system = "linux-generic32";
      inherit (platform) gcc;
    };
  };
in
stdenv.mkDerivation rec {
    name = "gcc-arm";
    buildInputs = [ pkgsCross.gccCrossStageFinal ];
}

Technical details

  • System: 16.09pre84674.fbde3a7 (Flounder)
  • Nix version: nix-env (Nix) 1.11.2
  • Nixpkgs version: "16.09pre84674.fbde3a7"
@dezgeg
Copy link
Contributor

dezgeg commented Jun 5, 2016

This is fixed by #15867 which I hope to integrate soonish.

@dvc94ch
Copy link
Contributor Author

dvc94ch commented Jun 7, 2016

@dezgeg I'm having trouble with building both pkgsCross.ubootZybo.crossDrv and pkgsCross.linux_4_1.crossDrv and was wondering if those were also regressions.

@dezgeg
Copy link
Contributor

dezgeg commented Jun 7, 2016

I can build U-Boot (for Wandboard) with #15867 successfully, never tried kernel builds but I think someone successfully used them ~6 months ago or so.

@dvc94ch
Copy link
Contributor Author

dvc94ch commented Jun 7, 2016

I'm getting this error message when trying to build U-Boot. I can't find any recent changes to stdenv/generic/default.nix that would cause this. Allowing broken isn't the solution is it?

while evaluating the attribute ‘ubootWandboard.crossDrv’ at /home/dvc/nixpkgs/pkgs/top-level/all-packages.nix:11296:41:
while evaluating the attribute ‘ubootWandboard’ at /home/dvc/nixpkgs/pkgs/misc/uboot/default.nix:97:3:
while evaluating ‘buildUBoot’ at /home/dvc/nixpkgs/pkgs/misc/uboot/default.nix:4:16, called from /home/dvc/nixpkgs/pkgs/misc/uboot/default.nix:97:20:
while evaluating ‘mkDerivation’ at /home/dvc/nixpkgs/pkgs/stdenv/adapters.nix:60:22, called from /home/dvc/nixpkgs/pkgs/misc/uboot/default.nix:10:12:
while evaluating ‘mkDerivation’ at /home/dvc/nixpkgs/pkgs/stdenv/generic/default.nix:95:5, called from /home/dvc/nixpkgs/pkgs/stdenv/adapters.nix:80:25:
while evaluating ‘throwEvalHelp’ at /home/dvc/nixpkgs/pkgs/stdenv/generic/default.nix:120:23, called from /home/dvc/nixpkgs/pkgs/stdenv/generic/default.nix:169:21:
Package ‘uboot-wandboard_defconfig-2016.01’ in ‘/home/dvc/nixpkgs/pkgs/misc/uboot/default.nix:46’ is not supported on ‘x86_64-linux’, 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` or any other Nix command you can add
  { allowBroken = true; }
to ~/.nixpkgs/config.nix.

@dvc94ch
Copy link
Contributor Author

dvc94ch commented Jun 8, 2016

Turns out that allowing broken is the solution...

@vcunat vcunat added the 2.status: work-in-progress This PR isn't done label Jun 9, 2016
@dezgeg
Copy link
Contributor

dezgeg commented Aug 20, 2016

I think cross compiling has been working for a while now (at least the bootstrap tool jobs I added at http://hydra.nixos.org/jobset/nixpkgs/cross-trunk#tabs-jobs still work).

@dezgeg dezgeg closed this as completed Aug 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: work-in-progress This PR isn't done
Projects
None yet
Development

No branches or pull requests

3 participants