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

fpc: 3.0.4 -> 3.2.0, add support for aarch64-linux #97006

Merged
merged 4 commits into from Sep 3, 2020

Conversation

timokau
Copy link
Member

@timokau timokau commented Sep 3, 2020

Motivation for this change

I want to play hedgewars on my raspberry pi. For that I need fpc on aarch64, which required an fpc update.

There was no 3.1 for some reason. The old sed-based path patching was
broken and resulted in syntax errors since it was a bit over-eager.
Instead of fixing it, I decided to replace it with a patch file which is
easier to inspect and will fail in a more obvious way next time.

The patch is now applied unconditionally, since it actually applies to
all linux platforms. The changes are localized to linux-specific code,
so it does not hurt to apply it on non-linux platforms as well.

CC @7c6f434c

Also updates ddrescueview and ultrastardx since those were broken by the fpc update.

Unfortunately hedgewars still doesn't quite build on aarch64, but that is an unrelated issue.

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.

@timokau timokau changed the title Fpc 3.2.0 aarch64 fpc: 3.0.4 -> 3.2.0, add support for aarch64-linux Sep 3, 2020
@ofborg ofborg bot requested a review from 7c6f434c September 3, 2020 11:40
@timokau timokau marked this pull request as draft September 3, 2020 12:10
Update required for compatibility with fpc 3.2.0.
Might as well update it while I fix it up for the fpc update.
There was no 3.1 for some reason. The old sed-based path patching was
broken and resulted in syntax errors since it was a bit over-eager.
Instead of fixing it, I decided to replace it with a patch file which is
easier to inspect and will fail in a more obvious way next time.

The patch is now applied unconditionally, since it actually applies to
all linux platforms. The changes are localized to linux-specific code,
so it does not hurt to apply it on non-linux platforms as well.

Hedgewars needs a small fix to work with the new version. Done in the
same commit to avoid a broken commit.
Supported since fpc 3.2.0.
@timokau timokau marked this pull request as ready for review September 3, 2020 13:02
@timokau
Copy link
Member Author

timokau commented Sep 3, 2020

I have run nix-review and fixed all regressions. This should be good to go.

versionBase = "0.4";
versionSuffix = "alpha4";
in stdenv.mkDerivation rec {
pname = "ddrescueview";
Copy link
Member

Choose a reason for hiding this comment

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

Wrong branch?

Copy link
Member Author

Choose a reason for hiding this comment

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

No. As I said in the PR description, ddrescueview would be broken by the fpc update and the update fixes it. The ultrastardx update is not strictly necessary (the patch would also apply to the old version), but why not do it while I'm at it.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, a race condition in our GitHub use, I guess.

@7c6f434c
Copy link
Member

7c6f434c commented Sep 3, 2020

Yeah, the patch is of course likely to fail in a slightly more obvious way but sooner…

But the state after the PR looks OK

@timokau
Copy link
Member Author

timokau commented Sep 3, 2020

Yes but it should be trivial to adapt. I spent quite some time debugging the build because I didn't realize the "sed" was having unintended side-effects. Do you think the PR is okay as-is?

@ofborg ofborg bot requested review from Profpatsch and 7c6f434c September 3, 2020 14:01
@7c6f434c
Copy link
Member

7c6f434c commented Sep 3, 2020 via email

@timokau
Copy link
Member Author

timokau commented Sep 3, 2020

Great, I wasn't entirely sure what you meant by "state after the PR". Thanks for the review, I'll merge after ofBorg approves then :)

@timokau
Copy link
Member Author

timokau commented Sep 3, 2020

The darwin check has been pending for 2.5h now and I think failure probability is very low (since darwin as a platform is not even enabled for fpc). Merging without it as all other checks pass.

@timokau timokau merged commit c25a7cd into NixOS:master Sep 3, 2020
@timokau timokau deleted the fpc-3.2.0-aarch64 branch September 3, 2020 16:44
@timokau timokau mentioned this pull request Sep 3, 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

2 participants