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

pkgsMusl.vte: fix build #193930

Merged
merged 1 commit into from
Oct 10, 2022
Merged

pkgsMusl.vte: fix build #193930

merged 1 commit into from
Oct 10, 2022

Conversation

yu-re-ka
Copy link
Contributor

@yu-re-ka yu-re-ka commented Oct 1, 2022

Description of changes

"Needs GCC ≥10 but aarch64 defaults to GCC 9."

Actually it needs gcc11+, so use gcc11Stdenv explicitly on aarch64, and the default stdenv otherwise.

This fixes pkgsMusl.vte.

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/)
  • 22.11 Release Notes (or backporting 22.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.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 101-500 labels Oct 1, 2022
@yu-re-ka yu-re-ka changed the title vte: use gcc10Stdenv on aarch64 vte: use gcc11Stdenv on aarch64 Oct 1, 2022
@yu-re-ka yu-re-ka marked this pull request as draft October 1, 2022 21:28
@yu-re-ka
Copy link
Contributor Author

yu-re-ka commented Oct 1, 2022

Needs more investigation. The comment is not true, it is not a thing of the gcc version, it just doesn't work with gcc on aarch64 at all.

@yu-re-ka
Copy link
Contributor Author

yu-re-ka commented Oct 2, 2022

Matrix of where vte is working and where not:

✅ musl + x86 + gcc
✅ glibc + x86 + gcc
❌ musl + aarch64 + gcc
❌ glibc + aarch64 + gcc
❌ musl + x86 + clang
✅ glibc + x86 + clang
❌ musl + aarch64 + clang
✅ glibc + aarch64 + clang

aarch64 + gcc9 => missing c++20 support
aarch64 + gcc10|gcc11 => libgcc_s

musl + clang fails for some weird reason where meson thinks the compiler doesn't support the --std=...

@yu-re-ka
Copy link
Contributor Author

yu-re-ka commented Oct 2, 2022

the musl + clang failure is the following: meson compiles a test program with --std=gnu11, encounters error: argument unused during compilation: '-pie' [-Werror,-Wunused-command-line-argument] and aborts.

This can be fixed either by

NIX_CFLAGS_COMPILE = "-Wno-unused-command-line-argument";

or by

  hardeningDisable = [ "pie" ];

or by switching to gcc stdenv for musl (would not recommend since that won't work on aarch64+musl)

@yu-re-ka yu-re-ka changed the title vte: use gcc11Stdenv on aarch64 pkgsMusl.vte: fix build Oct 2, 2022
@yu-re-ka yu-re-ka marked this pull request as ready for review October 2, 2022 19:39
@ofborg ofborg bot added 10.rebuild-darwin: 11-100 and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild labels Oct 2, 2022
@jtojnar
Copy link
Member

jtojnar commented Oct 2, 2022

Related #183278, cc @alyssais

@yu-re-ka
Copy link
Contributor Author

yu-re-ka commented Oct 2, 2022

I also saw that, and afterwards chose to use a different approach: not changing anything about the stdenv used (use clangStdenv everywhere) but instead adding a fix for the musl + clang combination
I have no idea if any cross-compilation stuff works now though

@superherointj
Copy link
Contributor

Result of nixpkgs-review pr 193930 run on x86_64-linux 1

5 packages marked as broken and skipped:
  • aqemu
  • linuxKernel.packages.hardkernel_4_14.virtualbox
  • linuxKernel.packages.linux_testing_bcachefs.virtualbox
  • linuxPackages_hardkernel_latest.virtualbox
  • linuxPackages_testing_bcachefs.virtualbox
94 packages built:
  • alpine-make-vm-image
  • appvm
  • cloud-init
  • cloud-utils
  • colima
  • cot (python310Packages.cot)
  • diffoscope
  • geany-with-vte
  • germinal
  • gnome-builder
  • gnome-console
  • gnome.gnome-boxes
  • gnome.gnome-color-manager
  • gnome.gnome-control-center
  • gnome.gnome-terminal
  • gnome.vinagre
  • gnomeExtensions.ddterm
  • gnomeExtensions.drop-down-terminal
  • gtkd
  • gtkterm
  • guake
  • haskellPackages.gi-vte
  • haskellPackages.termonad
  • kermit-terminal
  • libguestfs
  • lima
  • linuxKernel.packages.linux_4_14.virtualbox
  • linuxPackages_4_14_hardened.virtualbox (linuxKernel.packages.linux_4_14_hardened.virtualbox)
  • linuxKernel.packages.linux_4_19.virtualbox
  • linuxPackages_4_19_hardened.virtualbox (linuxKernel.packages.linux_4_19_hardened.virtualbox)
  • linuxKernel.packages.linux_4_9.virtualbox
  • linuxKernel.packages.linux_5_10.virtualbox
  • linuxPackages_5_10_hardened.virtualbox (linuxKernel.packages.linux_5_10_hardened.virtualbox)
  • linuxPackages.virtualbox (linuxKernel.packages.linux_5_15.virtualbox)
  • linuxPackages_hardened.virtualbox (linuxPackages_5_15_hardened.virtualbox)
  • linuxKernel.packages.linux_5_19.virtualbox
  • linuxKernel.packages.linux_5_19_hardened.virtualbox
  • linuxKernel.packages.linux_5_4.virtualbox
  • linuxPackages_latest-libre.virtualbox (linuxKernel.packages.linux_latest_libre.virtualbox)
  • linuxPackages-libre.virtualbox (linuxKernel.packages.linux_libre.virtualbox)
  • linuxPackages_lqx.virtualbox (linuxKernel.packages.linux_lqx.virtualbox)
  • linuxPackages_xanmod.virtualbox (linuxKernel.packages.linux_xanmod.virtualbox)
  • linuxPackages_xanmod_latest.virtualbox (linuxKernel.packages.linux_xanmod_latest.virtualbox)
  • linuxPackages_xanmod_tt.virtualbox (linuxKernel.packages.linux_xanmod_tt.virtualbox)
  • linuxPackages_zen.virtualbox (linuxKernel.packages.linux_zen.virtualbox)
  • linuxPackages_latest.virtualbox
  • lxterminal
  • mate.caja-extensions
  • mate.caja-with-extensions
  • mate.mate-terminal
  • mlterm
  • nemiver
  • o
  • open-watcom-bin
  • open-watcom-bin-unwrapped
  • out-of-tree
  • pantheon-tweaks
  • pantheon.elementary-code
  • pantheon.elementary-terminal
  • pantheon.xdg-desktop-portal-pantheon
  • phosh
  • python310Packages.guestfs
  • python39Packages.cot
  • python39Packages.guestfs
  • qemu
  • qemu-utils
  • qemu_full
  • qemu_kvm
  • qtemu
  • quickemu
  • remmina
  • roxterm
  • sakura
  • solo5
  • stupidterm
  • terminator
  • termite (termite-unwrapped)
  • termonad (termonad-with-packages)
  • tilda
  • tilix
  • timeshift
  • timeshift-minimal
  • timeshift-unwrapped
  • vagrant
  • vala-language-server
  • virt-manager
  • virt-viewer
  • virtualbox
  • virtualboxHardened
  • virtualboxHeadless
  • virtualboxWithExtpack
  • vte
  • xfce.xfce4-terminal
  • zpool-auto-expand-partitions

@superherointj superherointj removed their request for review October 4, 2022 19:25
@yu-re-ka yu-re-ka merged commit bb49dde into NixOS:master Oct 10, 2022
@yu-re-ka yu-re-ka deleted the musl-vte branch October 10, 2022 21:07
@wegank wegank mentioned this pull request Jan 15, 2023
13 tasks
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.

3 participants