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

mbrola: fix cross compilation #154087

Merged
merged 1 commit into from
Jan 10, 2022
Merged

mbrola: fix cross compilation #154087

merged 1 commit into from
Jan 10, 2022

Conversation

NickCao
Copy link
Member

@NickCao NickCao commented Jan 9, 2022

Motivation for this change
Things done
  • Built on platform(s)
    • x86_64-linux
    • riscv64-linux (cross)
    • 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/)
  • 22.05 Release Notes (or backporting 21.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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot requested a review from davidak January 9, 2022 01:50
@NickCao NickCao added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Jan 9, 2022
@davidak
Copy link
Member

davidak commented Jan 9, 2022

I see it fails without this change:

...
gcc -ansi -pedantic -DLITTLE_ENDIAN -O6 -IParser -IStandalone -IMisc -ILibOneChannel -ILibMultiChannel -IEngine -IDatabase -Wall -DROMDATABASE_STORE -DROMDATABASE_INIT -DSIGNAL  -o Bin/Standalone/Standalone/synth.o -c Standalone/synth.c
/nix/store/v1d8l3zqnia3hccqd0701szhlx22g54z-bash-5.1-p8/bin/bash: line 1: gcc: command not found
make: *** [Makefile:150: Bin/Standalone/Standalone/synth.o] Error 127
builder for '/nix/store/5vlkm9r3hdyzgfkivymb3vxq5dbxa0i2-mbrola-riscv64-unknown-linux-gnu-3.3.drv' failed with exit code 2
error: build of '/nix/store/5vlkm9r3hdyzgfkivymb3vxq5dbxa0i2-mbrola-riscv64-unknown-linux-gnu-3.3.drv' failed

and works with this change:

[davidak@gaming:~/code/nixpkgs]$ nix-build . -A pkgsCross.riscv64.mbrola
...
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/bv00bp3k71q8p8gp712n83d914kq31iq-mbrola-riscv64-unknown-linux-gnu-3.3
shrinking /nix/store/bv00bp3k71q8p8gp712n83d914kq31iq-mbrola-riscv64-unknown-linux-gnu-3.3/bin/mbrola
riscv64-unknown-linux-gnu-strip is /nix/store/n4pyn69crs68zmidxhacmmsqajs982jn-riscv64-unknown-linux-gnu-stage-final-gcc-debug-wrapper-10.3.0/bin/riscv64-unknown-linux-gnu-strip
stripping (with command riscv64-unknown-linux-gnu-strip and flags -S) in /nix/store/bv00bp3k71q8p8gp712n83d914kq31iq-mbrola-riscv64-unknown-linux-gnu-3.3/bin
patching script interpreter paths in /nix/store/bv00bp3k71q8p8gp712n83d914kq31iq-mbrola-riscv64-unknown-linux-gnu-3.3
checking for references to /build/ in /nix/store/bv00bp3k71q8p8gp712n83d914kq31iq-mbrola-riscv64-unknown-linux-gnu-3.3...
/nix/store/bv00bp3k71q8p8gp712n83d914kq31iq-mbrola-riscv64-unknown-linux-gnu-3.3

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 10.rebuild-darwin: 11-100 10.rebuild-linux: 11-100
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants