-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Closed
Labels
0.kind: bugSomething is brokenSomething is broken6.topic: cross-compilationBuilding packages on a different platform than they will be used onBuilding packages on a different platform than they will be used on6.topic: darwinRunning or building packages on DarwinRunning or building packages on Darwin
Description
Describe the bug
I was trying to build a Linux cross compiler on Darwin, but it fails when configuring glibc.
To Reproduce
Steps to reproduce the behavior:
nix-build -A pkgsCross.gnu64.glibc '<nixpkgs>'
Expected behavior
Cross-compiled glibc should be built.
Additional context
I believe this is related to #77632. Commendable work has been done there, but the passing of macOS-specific linker options in NIX_LDFLAGS appears to be problematic for cross builds.
I am not knowledgeable enough about Nix’ cross compilation infrastructure to fully diagnose the problem, let alone suggest a fix. But I think NIX_LDFLAGS should not be passed to linkers targeting non-Darwin platforms, because they would not understand the -macosx_version_min options.
Metadata
- system:
"x86_64-darwin" - host os:
Darwin 19.4.0, macOS 10.15.4 - multi-user?:
no - sandbox:
yes - version:
nix-env (Nix) 2.3.3 - channels(Michael):
"nixpkgs-20.09pre214168.686274ea62c" - nixpkgs:
/Users/Michael/.nix-defexpr/channels/nixpkgs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
0.kind: bugSomething is brokenSomething is broken6.topic: cross-compilationBuilding packages on a different platform than they will be used onBuilding packages on a different platform than they will be used on6.topic: darwinRunning or building packages on DarwinRunning or building packages on Darwin