Skip to content

texlive.bin.core{,-big}: fix cross compilation#223303

Merged
veprbl merged 2 commits intoNixOS:stagingfrom
apfelkuchen6:texlive-fix-cross
Apr 6, 2023
Merged

texlive.bin.core{,-big}: fix cross compilation#223303
veprbl merged 2 commits intoNixOS:stagingfrom
apfelkuchen6:texlive-fix-cross

Conversation

@apfelkuchen6
Copy link
Copy Markdown
Contributor

@apfelkuchen6 apfelkuchen6 commented Mar 26, 2023

Description of changes

This (hopefully) fixes cross compilation of texlive.bin.core and texlive.bin.core-big.

I tested execution of some binaries on aarch64-linux built on x86_64-linux.

Things done
  • Built on platform(s)
    • x86_64-linux:
      • pkgs.texlive.bin.core{,-big}
      • pkgsCross.aarch64-multilpatform.texlive.bin.core{,-big}
      • pkgsi686Linux.texlive.bin.core{,-big}
    • 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/)
  • 23.05 Release Notes (or backporting 22.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
  • Fits CONTRIBUTING.md.

@apfelkuchen6 apfelkuchen6 requested a review from veprbl March 26, 2023 21:41
@github-actions github-actions bot added the 6.topic: TeX Issues regarding texlive and TeX in general label Mar 26, 2023
@apfelkuchen6 apfelkuchen6 requested a review from xworld21 March 26, 2023 21:41
@apfelkuchen6 apfelkuchen6 changed the title texlive: fix cross compilation texlive.bin: fix cross compilation Mar 26, 2023
@ofborg ofborg bot added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Mar 26, 2023
@ofborg ofborg bot added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Mar 26, 2023
Copy link
Copy Markdown

@ghost ghost left a comment

Choose a reason for hiding this comment

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

LGTM other than the issues pointed out below.

The build system generates the file "hitables.c" with the program
"./himktables" that is also compiled by the build system.

This does not work when cross-compiling since this program is built for the
wrong architecture. We already use a natively built copy of texlive.bin.core for
various other tools (like tangle, weave), so this change just adds himktables to the
this native copy and uses this program in the cross build.
@apfelkuchen6 apfelkuchen6 requested a review from a user April 6, 2023 05:19
@ghost
Copy link
Copy Markdown

ghost commented Apr 6, 2023

@ofborg build pkgsCross.aarch64-multiplatform.texlive.bin

@ghost
Copy link
Copy Markdown

ghost commented Apr 6, 2023

@ofborg build texlive

Copy link
Copy Markdown

@ghost ghost left a comment

Choose a reason for hiding this comment

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

It's been a long long time since I used TeX. However:

I verified with nix-diff that the only change to the native-compile drv is adding a new output (dev) and two lines of postInstall that populate that new output.

So the risk of breakage here is very small.

If ofborg succeeds with the two builds I asked it to do, I intend to merge this.

@apfelkuchen6
Copy link
Copy Markdown
Contributor Author

(The cross builds of texlive.bin.latexindent, texlive,bin.xdvi and texlive.bin.biber still fail. This PR only fixes core and core-big. Updating the title to reflect that. I'll look into the others tomorrow.)

@apfelkuchen6 apfelkuchen6 changed the title texlive.bin: fix cross compilation texlive.bin.{core,-big}: fix cross compilation Apr 6, 2023
@apfelkuchen6 apfelkuchen6 changed the title texlive.bin.{core,-big}: fix cross compilation texlive.bin.core{,-big}: fix cross compilation Apr 6, 2023
@veprbl veprbl merged commit 07ab1f1 into NixOS:staging Apr 6, 2023
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 6.topic: TeX Issues regarding texlive and TeX in general 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants