Skip to content

Conversation

@FliegendeWurst
Copy link
Member

@FliegendeWurst FliegendeWurst commented Jan 3, 2025

ref. #178468

Things done

  • Built on platform(s)
    • x86_64-linux: and cross to aarch64
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Fits CONTRIBUTING.md.

@FliegendeWurst FliegendeWurst added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Jan 3, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jan 3, 2025
@nix-owners nix-owners bot requested a review from primeos January 3, 2025 10:42
Copy link
Contributor

@uninsane uninsane left a comment

Choose a reason for hiding this comment

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

haven't tried building it, but aside from the patch substitution the rest LGTM

@uninsane
Copy link
Contributor

uninsane commented Jan 5, 2025

new version breaks native compilation. error message suggests to use substitute (or substituteAll)

$ nix-build -A fim
these 2 derivations will be built:
  /nix/store/abf4yr0jwmginynh2mk7vip8q5czq9y0-native-tools.patch.drv
  /nix/store/w2q0r4s43xlzcc0a6bsl1s9xs5sc3wks-fim-0.7.drv
building '/nix/store/abf4yr0jwmginynh2mk7vip8q5czq9y0-native-tools.patch.drv'...
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
Running phase: checkPhase
The following look like unsubstituted Nix identifiers that remain in /nix/store/118rabdw0xy671p8ijsdxnxvn1g7nbxb-native-tools.patch:
@FIM_WANT_CUSTOM_HARDCODED_CONSOLEFONT_TRUE@
@HAVE_RUNNABLE_TESTS_TRUE@
@FIM_WANT_CUSTOM_HARDCODED_CONSOLEFONT_TRUE@
@HAVE_RUNNABLE_TESTS_TRUE@
Use the more precise `substitute` function if this check is in error.

@FliegendeWurst
Copy link
Member Author

Fixed. Bit of a silly check since uppercase variables can't be substituted anyway #28086

@uninsane
Copy link
Contributor

uninsane commented Jan 5, 2025

$ nix-build -A pkgsCross.aarch64-multiplatform.fim
...
checking for libpng-config... no

native build has png support: would ideally also have png support when cross compiling (or at the very least, change up the pngSupport package option to reflect reality).

@FliegendeWurst
Copy link
Member Author

Since we switched SDL to SDL_compat -> sdl2-compat -> sdl3 -> ... -> Qt, x11Support now defaults to false for cross.

libpng fixed.

@github-actions github-actions bot added the 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. label Mar 29, 2025
@uninsane
Copy link
Contributor

$ nix-build -A pkgsCross.aarch64-multiplatform.fim
$ head -n1 ./result/bin/fimgs
#!/bin/bash

needs its shebang fixed

@uninsane
Copy link
Contributor

also, cross is building without ascii art support:

configure: Enabling aalib driver.
checking for aalib-config... no
configure: WARNING: ***  no aalib-config ? ***

can likely be fixed the same way png was fixed.

other than that i think it's correct.

@FliegendeWurst
Copy link
Member Author

Fixed, and I've now just compared the build logs, as I should have perhaps done from the start. And found two more things that differed, fixed via configureFlags.

@uninsane uninsane added the 12.approvals: 1 This PR was reviewed and approved by one person. label Mar 30, 2025
@Aleksanaa Aleksanaa merged commit 1ab4bd4 into NixOS:master Apr 21, 2025
28 checks passed
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 on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants