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

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

Merged
merged 2 commits into from
Apr 6, 2023

Conversation

apfelkuchen6
Copy link
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.

@github-actions github-actions bot added the 6.topic: TeX Issues regarding texlive and TeX in general label Mar 26, 2023
@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 sort platform than than they will be run on label Mar 26, 2023
Copy link

@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.

pkgs/tools/typesetting/tex/texlive/bin.nix Outdated Show resolved Hide resolved
pkgs/tools/typesetting/tex/texlive/bin.nix Outdated Show resolved Hide resolved
pkgs/tools/typesetting/tex/texlive/bin.nix Outdated Show resolved Hide resolved
pkgs/tools/typesetting/tex/texlive/bin.nix Outdated Show resolved Hide resolved
pkgs/tools/typesetting/tex/texlive/bin.nix Outdated Show resolved Hide resolved
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.
@ghost
Copy link

ghost commented Apr 6, 2023

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

@ghost
Copy link

ghost commented Apr 6, 2023

@ofborg build texlive

Copy link

@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
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 sort platform than than they will be run on 6.topic: TeX Issues regarding texlive and TeX in general 10.rebuild-darwin: 101-500 10.rebuild-linux: 101-500
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants