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

Cross compilation regression due to ccCross #5944

Closed
ambrop72 opened this issue Jan 25, 2015 · 6 comments
Closed

Cross compilation regression due to ccCross #5944

ambrop72 opened this issue Jan 25, 2015 · 6 comments
Labels
6.topic: cross-compilation Building packages on a different sort platform than than they will be run on

Comments

@ambrop72
Copy link
Contributor

Commit 28b6fb6 broke cross compilation, since it changed lots of packages to refer to stdenv.ccCross, which does not exit. Only gccCross does.
Grepping for gccCross reveals a lot of definitions and uses which may not all be related to the stdenv meaning, so I'm not sure what the fix is. Maybe just rename all gccCross to ccCross?

Simple test case:

[ambro@nixos:/etc/nixos/nixpkgs/pkgs/stdenv/linux]$ nix-build make-bootstrap-tools-crosspi.nix -A build -o ~/bootstrap-tools
error: attribute ‘ccCross.libc’ missing, at "/etc/nixos/nixpkgs/pkgs/tools/misc/coreutils/default.nix":30:22
(use ‘--show-trace’ to show detailed location information)
@jgeerds
Copy link
Member

jgeerds commented Jan 25, 2015

CC: @jwiegley

@ambrop72
Copy link
Contributor Author

This seems to fix the issue (through there are other problems with cross compiling):

diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix
index 6d8ca55..1f0d728 100644
--- a/pkgs/stdenv/adapters.nix
+++ b/pkgs/stdenv/adapters.nix
@@ -114,6 +114,7 @@ rec {
         };
     } // {
       inherit cross gccCross binutilsCross;
+      ccCross = gccCross;
     };

@wmertens
Copy link
Contributor

Not quite a fix, more of a workaround. Since we became compiler agnostic in
our naming, I think it would be best to rename all gccCross to ccCross.

On Sun, Jan 25, 2015, 2:09 AM Ambroz Bizjak notifications@github.com
wrote:

This seems to fix the issue (through there are other problems with cross
compiling):

diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix
index 6d8ca55..1f0d728 100644
--- a/pkgs/stdenv/adapters.nix
+++ b/pkgs/stdenv/adapters.nix
@@ -114,6 +114,7 @@ rec {
};
} // {
inherit cross gccCross binutilsCross;

  •  ccCross = gccCross;
    
    };


Reply to this email directly or view it on GitHub
#5944 (comment).

@ambrop72
Copy link
Contributor Author

Could we just merge this? It's a one-liner :)
One could even argue that it's fine the way it is, since cross-compilation is only supported with gcc.

@wmertens
Copy link
Contributor

wmertens commented Feb 8, 2015

@ambrop72 can you open a PR then? 😄

@ambrop72
Copy link
Contributor Author

ambrop72 commented Feb 8, 2015

Ah, forgot to close this one, it's already in staging. 4b9729f

@ambrop72 ambrop72 closed this as completed Feb 8, 2015
@Ericson2314 Ericson2314 added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Jun 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: cross-compilation Building packages on a different sort platform than than they will be run on
Projects
None yet
Development

No branches or pull requests

4 participants