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

texinfo: fix cross compilation #51268

Closed
wants to merge 1 commit into from

Conversation

eburimu
Copy link
Contributor

@eburimu eburimu commented Nov 30, 2018

Motivation for this change

Better try to avoid cross compiling texinfo, for all the other cases...
Motivation for this change is adminspotting.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@c0bw3b c0bw3b added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Nov 30, 2018
@@ -212,10 +213,12 @@
# env -i gives this build host configure a clean environment;
# consequently, we have to re-initialize $PATH.
env -i CC="$BUILD_CC" AR="$BUILD_AR" RANLIB="$BUILD_RANLIB" \
Copy link
Member

Choose a reason for hiding this comment

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

How about removing env -i here instead?

Copy link
Contributor Author

@eburimu eburimu Dec 1, 2018

Choose a reason for hiding this comment

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

It runs configure second time with almost null environment to get tools.

Copy link
Member

Choose a reason for hiding this comment

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

It would be better to add NIX_BUILD_CFLAGS_COMPILE=$NIX_BUILD_CFLAGS_COMPILE and NIX_BUILD_LDFLAGS=$NIX_BUILD_LDFLAGS to that list, and maybe also LD=$BUILD_LD.


# These are hand-written.
-man_MANS += info.5 texinfo.5
+#man_MANS += info.5 texinfo.5
Copy link
Member

Choose a reason for hiding this comment

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

Can you explain why we cannot cross-compile this?

Copy link
Member

Choose a reason for hiding this comment

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

Help2man runs the program to generate the man page. See coreutils for prior art of pulling the man pages from the native version.

Copy link
Contributor Author

@eburimu eburimu Dec 1, 2018

Choose a reason for hiding this comment

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

Ive fixed some of them (.1's) but cannot fix those (.5's). I got "no rules to make ginfo.5" err. Feel free to look into it.

@mmahut
Copy link
Member

mmahut commented Aug 19, 2019

Are there any updates on this pull request, please?

@dguibert
Copy link
Member

Without this patch, the cross-compilation of texinfoInteractive fails
$ nix build --arg crossSystem '{ system = "aarch64-linux"; }' -f http://github.com/nixos/nixpkgs/archive/master.tar.gz texinfoInteractive
[...] ../tools/info/makedoc ./session.c ./echo-area.c ./infodoc.c ./m-x.c ./indices.c ./nodemenu.c ./footnotes.c ./variables.c /nix/store/v2x1ks46fq3yn8c94qfv38wrvmr5xn5r-bash-4.4-p23/bin/bash: ../tools/info/makedoc: No such file or directory

With this patch (merged into master) it is OK via nix build --arg crossSystem '{ system = "aarch64-linux"; }' texinfoInteractive.

@Ericson2314
Copy link
Member

I requested one more thing, then this is good to go. Sorry for not getting back to it quicker.

@doronbehar
Copy link
Contributor

Don't know why, but as of today. This:

nix-build --arg crossSystem '{ system = "aarch64-linux"; }' -A texinfoInteractive

Doesn't fail, as well as:

nix-build -A pkgsCross.aarch64-multiplatform.texinfoInteractive

So I'm closing also because this PR is ancient.

@doronbehar doronbehar closed this May 16, 2020
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 10.rebuild-darwin: 0 10.rebuild-linux: 0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants