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: 2.11.1 -> 2.12.0 #39513

Merged
merged 3 commits into from Apr 29, 2018
Merged

qemu: 2.11.1 -> 2.12.0 #39513

merged 3 commits into from Apr 29, 2018

Conversation

xeji
Copy link
Contributor

@xeji xeji commented Apr 25, 2018

Motivation for this change

Bump and remove obsolete patches. Closes #39423 .

Edit: also include a fix by @dtzWill for musl and remove the now obsolete qemu-riscv package.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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/)
  • Fits CONTRIBUTING.md.

@xeji
Copy link
Contributor Author

xeji commented Apr 25, 2018

@dtzWill I didn't check the musl patches, feel free to look at them now or fix whatever breaks later 😄

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: qemu

Partial log (click to expand)

  CC      s390x-linux-user/target/s390x/gdbstub.o
  CC      s390x-linux-user/target/s390x/interrupt.o
  GEN     trace/generated-helpers.c
  CC      m68k-linux-user/trace/control-target.o
  CC      mips64-softmmu/hw/misc/ivshmem.o
  CC      aarch64-linux-user/target/arm/op_helper.o
  CC      mips64-softmmu/hw/misc/mips_cmgcr.o
  CC      i386-linux-user/target/i386/kvm-stub.o
building of '/nix/store/0b40bcnsajj0a75il9x5i3161xbpmpwc-qemu-2.12.0.drv' timed out after 3600 seconds
�[31;1merror:�[0m build of '/nix/store/0b40bcnsajj0a75il9x5i3161xbpmpwc-qemu-2.12.0.drv' failed

@dtzWill
Copy link
Member

dtzWill commented Apr 26, 2018

@dtzWill I didn't check the musl patches, feel free to look at them now or fix whatever breaks later

Thanks for the heads-up, I'll take a look and let you know / file PR to fix it. I gotta call it for the night, but will take a look in the morning. If there's anyone waiting to see this merged please go ahead, don't block it on my account :).

@dtzWill
Copy link
Member

dtzWill commented Apr 26, 2018

LGTM re:musl --there's an issue but it's not QEMU's fault and I'll fix it separately. With that addressed it builds and works in tests and such.

@dtzWill
Copy link
Member

dtzWill commented Apr 26, 2018

FWIW dtzWill@91b5f5a adds fix w/musl, I was planning to submit it separately but can probably be added along with if you don't have any objections.

Not sure who else should look at this... @shlevy ? :)

@shlevy
Copy link
Member

shlevy commented Apr 26, 2018

Does this version include the riscv support?

@dtzWill
Copy link
Member

dtzWill commented Apr 26, 2018

Does this version include the riscv support?

I thought so, and looking at the changelog it looks like "yes": https://wiki.qemu.org/ChangeLog/2.12#RISC-V

@xeji
Copy link
Contributor Author

xeji commented Apr 26, 2018

FWIW dtzWill/nixpkgs@91b5f5a adds fix w/musl, I was planning to submit it separately but can probably be added along with if you don't have any objections.

I'll include your fix here.

@xeji
Copy link
Contributor Author

xeji commented Apr 26, 2018

Does this version include the riscv support?

Yes, and builds by default: qemu-system-riscv32 qemu-system-riscv64. Didn't test it though.

Most everyone using musl patches the linux headers instead,
but various software uses a local workaround like the
one added in this commit (psutils, for example).

It's not obvious to me which project has the "bug",
and I'm reluctant to even propose modifying our headers
without clear answer on the issue.

Also, modifying those headers triggers rebuild-all-the-things.

Hopefully upstream projects sort this out, in the meantime
adding this define is a bit of a kludge but does the job.

-------

For the curious, the patch usually is something like this:
https://patchwork.kernel.org/patch/3833241/

Here's an updated version that also ensures
kernel users get the sysinfo struct as expected too:
https://raw.githubusercontent.com/openwrt/openwrt/e3c43ade0bae9491aeea50fa361e846bb5002dc0/target/linux/generic/pending-4.14/270-uapi-kernel.h-glibc-specific-inclusion-of-sysinfo.h.patch

(cherry picked from commit dtzWill/nixpkgs@91b5f5a)
Copy link
Member

@dtzWill dtzWill left a comment

Choose a reason for hiding this comment

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

LGTM.

@xeji
Copy link
Contributor Author

xeji commented Apr 26, 2018

Should we remove the separate qemu-riscv package then ?

@shlevy
Copy link
Member

shlevy commented Apr 26, 2018

Please do!

upstream qemu 2.12 includes riscv support
@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: qemu

Partial log (click to expand)

  CC      arm-softmmu/gdbstub.o
  CC      microblazeel-linux-user/target/microblaze/gdbstub.o
  CC      sh4-linux-user/trace/control-target.o
  CC      or1k-linux-user/linux-user/uname.o
  CC      sh4eb-softmmu/hw/char/sh_serial.o
  CC      cris-softmmu/migration/ram.o
  CC      ppc64-softmmu/migration/ram.o
  CC      riscv64-linux-user/target/riscv/op_helper.o
building of '/nix/store/0b40bcnsajj0a75il9x5i3161xbpmpwc-qemu-2.12.0.drv' timed out after 3600 seconds
�[31;1merror:�[0m build of '/nix/store/0b40bcnsajj0a75il9x5i3161xbpmpwc-qemu-2.12.0.drv' failed

@xeji
Copy link
Contributor Author

xeji commented Apr 26, 2018

that ofborg timeout is normal for a full qemu build.

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: qemu

Partial log (click to expand)

  CC      x86_64-linux-user/linux-user/main.o
  CC      tilegx-linux-user/linux-user/strace.o
  CC      riscv64-softmmu/accel/tcg/translate-all.o
  CC      arm-linux-user/linux-user/uname.o
  CC      mips64-softmmu/hw/block/virtio-blk.o
  CC      xtensa-softmmu/hw/net/rocker/qmp-norocker.o
  CC      mips-linux-user/accel/tcg/user-exec.o
  CC      mips-softmmu/dump.o
building of '/nix/store/0b40bcnsajj0a75il9x5i3161xbpmpwc-qemu-2.12.0.drv' timed out after 3600 seconds
�[31;1merror:�[0m build of '/nix/store/0b40bcnsajj0a75il9x5i3161xbpmpwc-qemu-2.12.0.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: qemu

Partial log (click to expand)

./configure: line 4384: can't create config-temp/qemu-conf.c: Permission denied
./configure: line 4394: can't create config.log: Permission denied
./configure: line 4394: can't create config.log: Permission denied
./configure: line 4394: can't create config.log: Permission denied
./configure: line 4394: can't create config.log: Permission denied

ERROR: libm check failed

builder for '/nix/store/3ljdasnlymf1zl44mzcip2dfy9dv2dfd-qemu-2.12.0.drv' failed with exit code 1
error: build of '/nix/store/3ljdasnlymf1zl44mzcip2dfy9dv2dfd-qemu-2.12.0.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: qemu

Partial log (click to expand)

patching script interpreter paths in /nix/store/88qv0sp9id8cwdn9nswjakf7qqzwdj0y-qemu-2.12.0
checking for references to /build in /nix/store/88qv0sp9id8cwdn9nswjakf7qqzwdj0y-qemu-2.12.0...
cannot find section .dynamic
cannot find section .dynamic
cannot find section .dynamic
cannot find section .dynamic
cannot find section .dynamic
cannot find section .dynamic
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
/nix/store/88qv0sp9id8cwdn9nswjakf7qqzwdj0y-qemu-2.12.0

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: qemu

Partial log (click to expand)

these derivations will be built:
  /nix/store/3ljdasnlymf1zl44mzcip2dfy9dv2dfd-qemu-2.12.0.drv
waiting for locks or build slots...
/nix/store/88qv0sp9id8cwdn9nswjakf7qqzwdj0y-qemu-2.12.0

@xeji xeji merged commit 8b6fe66 into NixOS:master Apr 29, 2018
@xeji xeji deleted the qemu-2-12 branch April 29, 2018 16:41
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.

qemu 2.12.0 released
4 participants