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 fixes (march 2020) #81858

Merged
merged 30 commits into from Mar 16, 2020

Conversation

matthewbauer
Copy link
Member

Motivation for this change

These changes are spun off from my branch at https://github.com/matthewbauer/nixpkgs/tree/kiosk. These should be safe changes for master (versus my other branch that has some more questionable cross fixes).

Mostly the changes are variants of:

  • things not being correctly in buildInputs or nativeBuildInputs
  • rework bad configure flags
  • build caches with native rather than cross dependency
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • 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 nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This is no longer needed. elfutils compiles out of the box!
This is needed for some scripts needed at build time.
libxslt is actually both a target and native build input because some
libxslt binary is needed to generate files and the built binaries also
link against libxslt.
glib is both a native and target dependency. Some binary from glib is
used to generate files.
This avoids pulling them in when tests are disabled.
Cross needs some extra native tools:

- glib
- wayland
- orc
- glib is needed in nativeBuildInputs

Also:

- bash-completion needs to be available for PKG_CONFIG_PATH
Needed on the build machine
Needed on the build machine
Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

Looks good to me with the thing @volth found

@Ericson2314
Copy link
Member

Should this go to staging?

This is needed for cross because gcrypt-config is not available to
execute. It’s safe to do otherwise as well though.
Unfortunately, CMake looks in CMAKE_PREFIX_PATH for binaries when
cross-compiling. This means that it will use gettext from
CMAKE_PREFIX_PATH even when we provide a gettext binary in PATH! This
is bad because the on in CMAKE_PREFIX_PATH is for the cross system,
not the native one. The only documented way I can find to change this
behavior is by manually setting the CMAKE_IGNORE_PATH variable.
This is needed for build tools.
Some build tools are needed for code gen.
@matthewbauer
Copy link
Member Author

Should this go to staging?

Maybe although ideally i could split out the mass rebuild commits from the less significant commits.

@FRidh
Copy link
Member

FRidh commented Mar 6, 2020

staging iterates quite fast and I don't think these expressions get touched that often.

Copy link
Member

@ttuegel ttuegel left a comment

Choose a reason for hiding this comment

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

breeze-plymouth changes look good to me.

pkgs/tools/admin/bubblewrap/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/webkitgtk/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/webkitgtk/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/pango/default.nix Outdated Show resolved Hide resolved
Co-Authored-By: Jan Tojnar <jtojnar@gmail.com>
makes it more clear why this happens

Co-Authored-By: Jan Tojnar <jtojnar@gmail.com>
@matthewbauer matthewbauer changed the base branch from master to staging March 16, 2020 18:27
@matthewbauer matthewbauer merged commit 655e29d into NixOS:staging Mar 16, 2020
@jtojnar jtojnar mentioned this pull request Jul 8, 2020
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants