Skip to content

Unable to cross compile pkgs.gcc #25212

@expipiplus1

Description

@expipiplus1

Issue description

One is unable to cross compile a native wrapped gcc.

Steps to reproduce

Given cross.nix in the nixpkgs root

let
  aarch64 = rec {
    config = "aarch64-linux-gnu";
    bigEndian = false;
    arch = "aarch64";
    withTLS = true;
    libc = "glibc";
    platform = (import ./lib/systems/platforms.nix).aarch64-multiplatform;
    inherit (platform) gcc;
    openssl.system = "linux-generic64";
  };
in
import <nixpkgs> {
  crossSystem = aarch64;
}

The command nix-instantiate --show-trace cross.nix -A pkgs.gcc fails with the following error message:

error: while evaluating the attribute ‘shell’ of the derivation ‘gcc-wrapper-5.4.0-aarch64-linux-gnu-aarch64-linux-gnu’ at /tmp/src/nixpkgs/pkgs/stdenv/adapters.nix:87:11:
value is a string while a set was expected, at /tmp/src/nixpkgs/pkgs/build-support/cc-wrapper/default.nix:283:13

It is possible to build pkgs.gcc.cc however.

It is possible to build pkgs.buildPackages.gcc too.

It is possible to build pkgs.gcc without crossSystem being set.

Technical details

  • System: 17.03.945.5acb454e2a (Gorilla)
  • Nix version: nix-env (Nix) 1.11.8
  • Nixpkgs version: 17.09pre-git

Metadata

Metadata

Assignees

Labels

6.topic: cross-compilationBuilding packages on a different platform than they will be used on

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions