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

qemu: fix cross compilation #147692

Merged
merged 1 commit into from
Jan 1, 2022
Merged

qemu: fix cross compilation #147692

merged 1 commit into from
Jan 1, 2022

Conversation

NickCao
Copy link
Member

@NickCao NickCao commented Nov 28, 2021

tested by crossing from x86_64 to riscv64 and x86_64 to x86_64

Motivation for this change
Things done
  • Built on platform(s)
    • x86_64-linux
    • 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/)
  • 21.11 Release Notes (or backporting 21.05 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.

@Mindavi Mindavi added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Nov 28, 2021
Copy link
Member

@alyssais alyssais left a comment

Choose a reason for hiding this comment

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

Sorry for hijacking the existing thread — GitHub won't let me start a new one on the same line. I'm sure it used to?

pkgs/applications/virtualization/qemu/default.nix Outdated Show resolved Hide resolved
pkgs/applications/virtualization/qemu/default.nix Outdated Show resolved Hide resolved
@symphorien symphorien merged commit 86d63a1 into NixOS:master Jan 1, 2022
@NickCao NickCao deleted the qemu branch January 1, 2022 23:32
dramforever added a commit to dramforever/nixpkgs that referenced this pull request Feb 9, 2023
The python dependencies were fixed for cross in NixOS#147692, but the changes
are reversed NixOS#190560 due to concerns of accidentally mixing python
versions. Compromise by using python3Packages.python.
dramforever added a commit to dramforever/nixpkgs that referenced this pull request Feb 9, 2023
'./configure --cpu=$(uname -m)' (essentially) breaks the case of riscv,
where the configure script expects '--cpu=riscv', but 'uname -m' gives
'riscv{32,64}'. This eventually leads to user-mode emulation being
disabled.

Since the configure script can auto-detect the parameter based on
compilers, remove this flag.

Originally added in NixOS#147692, but apparently it's not needed and @NickCao
couldn't remember why it was added.
@dramforever dramforever mentioned this pull request Feb 9, 2023
13 tasks
dramforever added a commit to dramforever/nixpkgs that referenced this pull request Feb 9, 2023
'./configure --cpu=$(uname -m)' (essentially) breaks the case of riscv,
where the configure script expects '--cpu=riscv', but 'uname -m' gives
'riscv{32,64}'. This eventually leads to user-mode emulation being
disabled.

Since the configure script can auto-detect the parameter based on
compilers, remove this flag.

Originally added in NixOS#147692, but apparently it's not needed and @NickCao
couldn't remember why it was added. See also mailing list discussion at
https://lore.kernel.org/qemu-devel/[email protected]/T/
Shawn8901 pushed a commit to Shawn8901/nixpkgs that referenced this pull request Feb 17, 2023
The python dependencies were fixed for cross in NixOS#147692, but the changes
are reversed NixOS#190560 due to concerns of accidentally mixing python
versions. Compromise by using python3Packages.python.
Shawn8901 pushed a commit to Shawn8901/nixpkgs that referenced this pull request Feb 17, 2023
'./configure --cpu=$(uname -m)' (essentially) breaks the case of riscv,
where the configure script expects '--cpu=riscv', but 'uname -m' gives
'riscv{32,64}'. This eventually leads to user-mode emulation being
disabled.

Since the configure script can auto-detect the parameter based on
compilers, remove this flag.

Originally added in NixOS#147692, but apparently it's not needed and @NickCao
couldn't remember why it was added. See also mailing list discussion at
https://lore.kernel.org/qemu-devel/[email protected]/T/
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: 11-100 10.rebuild-linux: 11-100
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants