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

bintools-wrapper: symlink all programs that do not need wrapping #33110

Closed
wants to merge 1 commit into from

Conversation

bnikolic
Copy link
Contributor

Motivation for this change

Cross compilation for mingw32 targets is broken earlier than before the binutil-wrapping. This gets us back to where we were ~6weeks ago.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • [X ] other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@globin
Copy link
Member

globin commented Dec 27, 2017

cc @Ericson2314

@Ericson2314
Copy link
Member

Ericson2314 commented Dec 28, 2017

Thanks for the contribution! But how does this help, exactly? the bintools-wrapper should add the unwrapped derivation behind it to the path behind it, I believe.

@bnikolic
Copy link
Contributor Author

When cross-compiling neither bintools is added directly to the path as far as I can see:

nix-shell /home/bnikolic/oss/nixpkgs -I /home/bnikolic/oss/  -A windows.mingw_w64 --arg crossSystem '(import <nixpkgs/lib>).systems.examples.mingwW64'                    
[nix-shell:~]$ env | grep binutils                                                                                                                                                                                 
                                                                                                                                                                                                               
[nix-shell:~]$                          

Instead they the GCC-wrapper symlinks to executables from binutils-wrapper (as far as I can understand things). Presumably this is why the assembler is already symlinked from the plain binutils to the wrapped version ?

@Ericson2314
Copy link
Member

Hmm the

addToSearchPath _PATH @bintools_bin@/bin

In bintools-wrapper's setup hook should be doing that.

@Ericson2314 Ericson2314 added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Dec 29, 2017
@Ericson2314
Copy link
Member

Based on my experiments with #33167 it looks like this indeed isn't necessary, but haven't yet fixed all regressions so I'll keep it open until I know for sure, at least until #26805 lands.

@Ericson2314 Ericson2314 added the 6.topic: windows Running, or buiding, packages on Windows label Jan 2, 2018
@vcunat
Copy link
Member

vcunat commented Jan 21, 2018

@Ericson2314: now these PRs have been merged.

@Ericson2314
Copy link
Member

Good catch. It was indeed not needed, but I do want to take the exlanded listof programs to make env vars in bintool-wrapper's setup hook.

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 6.topic: windows Running, or buiding, packages on Windows 10.rebuild-darwin: 501+ 10.rebuild-darwin-stdenv 10.rebuild-linux: 501+ 10.rebuild-linux-stdenv
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants