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

gobject-introspection: fix cross-compilation #166199

Closed
wants to merge 1 commit into from
Closed

gobject-introspection: fix cross-compilation #166199

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 29, 2022

Currently pkgsCross.aarch64-multiplatform.gobject-introspection does
not build due to breakage in (a) generating the docs and (b)
generating the introspection data.

There really isn't proper support in gobject-introspection for
cross-compiles with -Dintrospection=true, just a collection of hacks
in meson_options.txt that are rumored to be useful somehow. I ave
not been able to find any reports of people actually getting this to
work.

Let's disable the docs nd introspection data for cross-compiles,
since a build without docs or introspection is still very useful, and
definitely more useful than no build at all.

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux cross to aarch64-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/)
  • 22.05 Release Notes (or backporting 21.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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

Currently pkgsCross.aarch64-multiplatform.gobject-introspection does
not build due to breakage in (a) generating the docs and (b)
generating the introspection data.

There really isn't proper support in gobject-introspection for
cross-compiles with -Dintrospection=true, just a collection of hacks
in meson_options.txt that are rumored to be useful somehow. I have
not been able to find any reports of people actually getting this to
work.

Let's disable the docs and introspection data for cross-compiles,
since a build without docs or introspection is still very useful, and
definitely more useful than no build at all.

Currently pkgsCross.aarch64-multiplatform.gobject-introspection does
not build due to breakage in (a) generating the docs and (b)
generating the introspection data.

There really isn't proper support in gobject-introspection for
cross-compiles with -Dintrospection=true, just a collection of hacks
in meson_options.txt that are rumored to be useful somehow.  I have
not been able to find any reports of people actually getting this to
work.

Let's disable the docs and introspection data for cross-compiles,
since a build without docs or introspection is still very useful, and
definitely more useful than no build at all.
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 0 This PR does not cause any packages to rebuild labels Mar 29, 2022
@NickCao
Copy link
Member

NickCao commented Mar 29, 2022

And, gobject-introspection is not really designed to be used in cross compilations, in short, even if it build, we can not build packages that depends on it. Then what's the point of fixing it in the first place?

@ghost
Copy link
Author

ghost commented Mar 29, 2022

even if it build, we can not build packages that depends on it.

We can. I am about to submit the patch that makes gtk3 cross-compile.

Stay tuned. It's worth it.

@NickCao
Copy link
Member

NickCao commented Mar 29, 2022

even if it build, we can not build packages that depends on it.

We can. I am about to submit the patch that makes gtk3 cross-compile.

Stay tuned. It's worth it.

Some previous work on cross compiling gtk3 is at #148618, hope it helps.

@ghost ghost mentioned this pull request Mar 29, 2022
13 tasks
@ghost
Copy link
Author

ghost commented Mar 29, 2022

We can. I am about to submit the patch that makes gtk3 cross-compile.

#166219

@ghost
Copy link
Author

ghost commented Mar 29, 2022

Some previous work on cross compiling gtk3 is at #148618, hope it helps.

Ah crap, I wish I had known about that before I spent a ton of time on #166219

@ghost ghost mentioned this pull request Mar 29, 2022
9 tasks
@Mindavi Mindavi added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Mar 29, 2022
@ghost ghost marked this pull request as draft March 31, 2022 03:41
@Artturin
Copy link
Member

Artturin commented Apr 4, 2022

See #88222 for prior art

@ghost ghost closed this Apr 5, 2022
@Artturin
Copy link
Member

#176464

@ghost ghost deleted the gobject-introspection-fix-cross-compile branch June 12, 2022 20:20
This pull request was closed.
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: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 0 This PR does not cause any packages to rebuild
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants