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

cc-wrapper: wrap cpp for cross just like to native #221677

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

trofi
Copy link
Contributor

@trofi trofi commented Mar 17, 2023

Without this change $target-cpp is used unwrapped and is missing standard header search paths among other things).

Example failure:

$ nix build -f. -L pkgsStatic.netbsd.compat
...
   > checking how to run the C preprocessor... x86_64-unknown-linux-musl-cpp
   > configure: error: in `/build/cvs-export/tools/compat':
   > configure: error: C preprocessor "x86_64-unknown-linux-musl-cpp" fails sanity check
   > See `config.log' for more details
Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@trofi trofi requested a review from Ericson2314 as a code owner March 17, 2023 15:37
@trofi trofi requested a review from alyssais March 17, 2023 15:39
@ofborg ofborg bot added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Mar 17, 2023
Copy link
Member

@alyssais alyssais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get a conditional cross-only version of this into staging-next as well?

@trofi
Copy link
Contributor Author

trofi commented Mar 17, 2023

Yeah, that should be easy. I'll try to amend this PR to make it a no-op for native.

Without this change $target-cpp is used unwrapped and is missing
standard header search paths among other things).

Example failure:

    $ nix build -f. -L pkgsStatic.netbsd.compat
    ...
       > checking how to run the C preprocessor... x86_64-unknown-linux-musl-cpp
       > configure: error: in `/build/cvs-export/tools/compat':
       > configure: error: C preprocessor "x86_64-unknown-linux-musl-cpp" fails sanity check
       > See `config.log' for more details
@trofi trofi changed the base branch from staging to staging-next March 17, 2023 16:48
@trofi trofi changed the title cc-wrapper: wrap cpp for cross lust like to native cc-wrapper: wrap cpp for cross just like to native Mar 17, 2023
@trofi
Copy link
Contributor Author

trofi commented Mar 17, 2023

Made the change conditional and rebased against staging-next. Builds pkgsStatic.glib for me.

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 platform than they will be used on 10.rebuild-darwin: 11-100 10.rebuild-linux: 101-500
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants