-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
erlang: cross compile support #58042
Conversation
buildPackages.perl | ||
buildPackages.gnum4 | ||
buildPackages.libxslt | ||
buildPackages.libxml2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the buildPackages prefix here actually makes a difference?
I only know that sometimes overrides in all-packages.nix
breaks splicing
of the correct architecture. The problem when using this approach is
that it is no longer possible to override packages externally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea you're right, not sure, let me try it without those
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Mic92 just tried it and it doesn't work if I don't explicitly set buildPackages
, maybe i'm going about this wrong but it seems to not be able to find perl
if I remove buildPackages
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I was building it with wxSupport, which doesn't work right now, this patch is to cross-compile erlang without wxSupport (GUI stuff). after fiddling the smallest I can get it is:
{
nativeBuildInputs = [
autoreconfHook
makeWrapper
perl
gnum4
buildPackages.libxslt
libxml2
];
}
if I remove that buildPackages
from libxslt
I get a format error for xsltproc
:
xsltproc --output "../man3/array.3" --stringparam company "Ericsson AB" --stringparam docgen "/build/source/bootstrap/lib/erl_docgen" --stringparam gendate "$date" --stringparam appname "stdlib" --stringparam appver "3.4.5" --stringparam specs_file "$specs_file" --xinclude -path /build/source/bootstrap/lib/erl_docgen/priv/dtd -path /build/source/bootstrap/lib/erl_docgen/priv/dtd_man_entities /build/source/bootstrap/lib/erl_docgen/priv/xsl/db_man.xsl array.xml
/nix/store/cinw572b38aln37glr0zb8lxwrgaffl4-bash-4.4-p23/bin/bash: line 2: /nix/store/rlv5jd00hksp449aqizf33q8nnrx6j80-libxslt-1.1.33-armv7l-unknown-linux-gnueabihf-bin/bin/xsltproc: cannot execute binary file: Exec format error
make[5]: *** [/build/source/make/armv7l-unknown-linux-gnueabihf/otp.mk:293: ../man3/array.3] Error 126
make[5]: Leaving directory '/build/source/lib/stdlib/doc/src'
make[4]: *** [/build/source/make/otp_release_targets.mk:182: release_docs] Error 2
make[4]: Leaving directory '/build/source/lib/stdlib/doc/src'
make[3]: *** [/build/source/make/otp_subdir.mk:29: release_docs] Error 2
make[3]: Leaving directory '/build/source/lib/stdlib'
make[2]: *** [/build/source/make/otp_subdir.mk:29: release_docs] Error 2
make[2]: Leaving directory '/build/source/lib'
make[1]: *** [Makefile:416: release_docs] Error 2
make[1]: Leaving directory '/build/source'
make: *** [Makefile:1029: install-docs] Error 2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for investigating! We should definitely get to the bottom of why libxslt
is different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened #58327 in case that makes a difference.
I only know that sometimes overrides in all-packages.nix breaks splicing
of the correct architecture.
This PR works around that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That other PR causes more problems. (I almost rather remove the with pkgs
!) Can we do everything but xslt
leaving a TODO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do everything but xslt leaving a TODO?
Am I right if I think it then will work already with erlang_nox?
Is there anything I could help in bringing this forward? |
Please rebase. This PR looks good to me. |
Per https://github.com/NixOS/nixpkgs/pull/58042/files#r292261100 we should get rid of most of the |
Thank you for your contributions.
|
👍 to move this forward. |
I marked this as stale due to inactivity. → More info |
#100835 is still outdated, but slightly newer. |
Motivation for this change
Adds support to cross compile the erlang interpreter, patchShebangs is still broken for other architectures but it still works on the physical board. (#33956)
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)