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

libical: fix cross-compilation #98818

Merged
merged 1 commit into from Sep 30, 2020
Merged

Conversation

lopsided98
Copy link
Contributor

Motivation for this change

gobject-introspection cannot be cross-compiled, so disable it (and vala support, which depends on it) when cross-compiling.

cc @jtojnar @dtzWill

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.

@worldofpeace
Copy link
Contributor

We could very easily add this wherever gobject-introspection is non-essential (since it doesn't cross compile right now).
See #88222 (@Ericson2314), though upstream hasn't responded for 4 months which is very sad.

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

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

Seems fine to me for now.
(I didn't check that builds)

@Ericson2314
Copy link
Member

Yeah this is fine with me.

@lopsided98
Copy link
Contributor Author

Unfortunately, I just realized that the machine I was testing this on had binfmt_misc configured, and part of the libical's glib build process compiles an executable that generates code during the build. The build fails on machines that cannot execute host arch binaries.

I'm looking into fixing this upstream, or alternatively we could disable glib support when cross-compiling as well.

@Ericson2314
Copy link
Member

Ugh that it does that without gobject-introspection. Upstream should indeed fix that, but I'm fine skipping glib too.

@lopsided98
Copy link
Contributor Author

I created an upstream PR to fix the glib issue, and added it to this PR: libical/libical#439

@ofborg build pkgsCross.armv7l-hf-multiplatform.libical

gobject-introspection cannot be cross-compiled, so disable it when
cross-compiling. The glib bindings attempt to run a binary compiled for the
host during the build, so add a patch that allows the binary to be provided
by buildPackages.libical.
@lopsided98
Copy link
Contributor Author

The patch has been merged upstream.

@Ericson2314 Ericson2314 merged commit 6a0cf06 into NixOS:master Sep 30, 2020
@lopsided98 lopsided98 deleted the libical-cross branch September 30, 2020 18:23
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

3 participants