Skip to content

Comments

libgnome-games-support: support cross compilation#267373

Merged
Artturin merged 1 commit intoNixOS:masterfrom
uninsane:pr-cross-libgnome-games-support
Nov 14, 2023
Merged

libgnome-games-support: support cross compilation#267373
Artturin merged 1 commit intoNixOS:masterfrom
uninsane:pr-cross-libgnome-games-support

Conversation

@uninsane
Copy link
Contributor

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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.11 Release Notes (or backporting 23.05 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.

@uninsane uninsane added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Nov 14, 2023
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Nov 14, 2023
@Artturin
Copy link
Member

libgnome-games-support-aarch64-unknown-linux-gnu> valac -C --pkg gtk+-3.0 --target-glib ' 2.40.0' --pkg glib-2.0 --pkg gio-2.0 --pkg gee-0.8 --color=always --directory games/libgnome-games-support-1.so.3.0.4.p --basedir ../games --library gnome-games-support-1 --header games/libgnome-games-support.h --vapi ../libgnome-games-support-1.vapi --abi-stability --target-glib=2.44 ../games/config.vapi ../games/gridframe.vala ../games/scores/category.vala ../games/scores/context.vala ../games/scores/dialog.vala ../games/scores/directory-importer.vala ../games/scores/history-file-importer.vala ../games/scores/importer.vala ../games/scores/score.vala
libgnome-games-support-aarch64-unknown-linux-gnu> error: Package `gee-0.8' not found in specified Vala API directories or GObject-Introspection GIR directories

weird that it only fails when cross-compiling

@Artturin Artturin merged commit ec3540a into NixOS:master Nov 14, 2023
@uninsane
Copy link
Contributor Author

libgnome-games-support-aarch64-unknown-linux-gnu> valac -C --pkg gtk+-3.0 --target-glib ' 2.40.0' --pkg glib-2.0 --pkg gio-2.0 --pkg gee-0.8 --color=always --directory games/libgnome-games-support-1.so.3.0.4.p --basedir ../games --library gnome-games-support-1 --header games/libgnome-games-support.h --vapi ../libgnome-games-support-1.vapi --abi-stability --target-glib=2.44 ../games/config.vapi ../games/gridframe.vala ../games/scores/category.vala ../games/scores/context.vala ../games/scores/dialog.vala ../games/scores/directory-importer.vala ../games/scores/history-file-importer.vala ../games/scores/importer.vala ../games/scores/score.vala
libgnome-games-support-aarch64-unknown-linux-gnu> error: Package `gee-0.8' not found in specified Vala API directories or GObject-Introspection GIR directories

weird that it only fails when cross-compiling

@Artturin grep nixpkgs for "TODO: the vala setuphook should look for vala filess in targetOffset instead of hostOffset". i never dug into this, but if those comments are true then it might explain this (speculating: native compilation was getting the package via vala, unsupported for cross; this patch causes the package to instead be located via gobject-introspection, which better handles the cross compilation case?).

@Artturin
Copy link
Member

@Artturin grep nixpkgs for "TODO: the vala setuphook should look for vala filess in targetOffset instead of hostOffset". i never dug into this, but if those comments are true then it might explain this (speculating: native compilation was getting the package via vala, unsupported for cross; this patch causes the package to instead be located via gobject-introspection, which better handles the cross compilation case?).

I see, blame shows that I added those lines and said I was going to do it in a separate PR #189397 (comment)

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: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants