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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

lua: fix cross-compilation; fixes #66742 #66883

Merged
merged 1 commit into from Aug 20, 2019

Conversation

vikanezrimaya
Copy link
Member

@vikanezrimaya vikanezrimaya commented Aug 19, 2019

Motivation for this change

Tried to cross-compile Lua. Failed. Fiddled with the build system a bit and fixed it. Now contributing 馃樅 See #66742 for details.

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 nix-review --run "nix-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.
Notify maintainers

Wasn't able to find a maintainer for lua interpreter, sorry!

@@ -40,14 +40,17 @@ self = stdenv.mkDerivation rec {
"PLAT=macosx"
] else [
"PLAT=linux"
])
]) ++ (if stdenv.buildPlatform != stdenv.hostPlatform then [
Copy link
Member

Choose a reason for hiding this comment

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

do we need the if there ? if platfroms are equal then it won't matter

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's cleaner that way. Because if platforms are equal, we don't even need these args, we'll let the build system sort it out.

Copy link
Member Author

Choose a reason for hiding this comment

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

@teto Additionally, this shouldn't cause a rebuild for people who are not cross-compiling!

Copy link
Member

Choose a reason for hiding this comment

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

I am not that familiar with cross compilation. Would like the opinon of @7c6f434c too

Copy link
Member

Choose a reason for hiding this comment

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

Looks reasonable

The makefile isn't able to find the toolchain when cross-compiling. I
helped it a little bit by adding the parameters explicitly.
@vikanezrimaya
Copy link
Member Author

vikanezrimaya commented Aug 19, 2019

Force-pushed a fix for a mass-rebuild of Lua packages! Accidentally left a space there...

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

3 participants