Skip to content

meson: 0.61.2 -> 0.63.0#181132

Closed
ajs124 wants to merge 4 commits intoNixOS:stagingfrom
helsinki-systems:upd/meson
Closed

meson: 0.61.2 -> 0.63.0#181132
ajs124 wants to merge 4 commits intoNixOS:stagingfrom
helsinki-systems:upd/meson

Conversation

@ajs124
Copy link
Member

@ajs124 ajs124 commented Jul 11, 2022

Description of changes

https://mesonbuild.com/Release-notes-for-0-62-0.html
https://mesonbuild.com/Release-notes-for-0-63-0.html

built dav1d, qemu, systemd and mesa for testing on x86_64-linux.
also a subset of them cross to aarch64-linux and native on aarch64-linux

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 requested review from AndersonTorres and jtojnar July 11, 2022 16:57
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Jul 11, 2022
@ajs124 ajs124 changed the base branch from master to staging July 11, 2022 17:12
@ajs124
Copy link
Member Author

ajs124 commented Jul 11, 2022

mesa and qemu don't build with this, because wayland-protocols fail with a bunch of messages like this:

[82/277] Compiling C++ object tests/test-build-cxx-unstable_idle_inhibit_idle_inhibit_unstable_v1_xml.p/meson-generated_.._test-build-cxx-unstable_idle_inhibit_idle_inhibit_unstable_v1_xml.cc.o
FAILED: tests/test-build-cxx-unstable_idle_inhibit_idle_inhibit_unstable_v1_xml.p/meson-generated_.._test-build-cxx-unstable_idle_inhibit_idle_inhibit_unstable_v1_xml.cc.o 
g++ -Itests/test-build-cxx-unstable_idle_inhibit_idle_inhibit_unstable_v1_xml.p -Itests -I../tests -I/nix/store/26irg7wnjyfh7w1dd3mbd2qp6jcvbmy5-wayland-1.20.0-dev/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -O0 -Wall -Werror -MD -MQ tests/test-build-cxx-unstable_idle_inhibit_idle_inhibit_unstable_v1_xml.p/meson-generated_.._test-build-cxx-unstable_idle_inhibit_idle_inhibit_unstable_v1_xml.cc.o -MF tests/test-build-cxx-unstable_idle_inhibit_idle_inhibit_unstable_v1_xml.p/meson-generated_.._test-build-cxx-unstable_idle_inhibit_idle_inhibit_unstable_v1_xml.cc.o.d -o tests/test-build-cxx-unstable_idle_inhibit_idle_inhibit_unstable_v1_xml.p/meson-generated_.._test-build-cxx-unstable_idle_inhibit_idle_inhibit_unstable_v1_xml.cc.o -c tests/test-build-cxx-unstable_idle_inhibit_idle_inhibit_unstable_v1_xml.cc
In file included from /nix/store/x35d72904sc58is4j4lsgzh3jkbidig4-glibc-2.34-210-dev/include/bits/libc-header-start.h:33,
                 from /nix/store/x35d72904sc58is4j4lsgzh3jkbidig4-glibc-2.34-210-dev/include/stdint.h:26,
                 from /nix/store/zs6hnk47hcrrcrd885d66xmhlvp05jxm-gcc-11.3.0/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/include/stdint.h:9,
                 from /build/wayland-protocols-1.25/build/tests/idle-inhibit-unstable-v1-client.h:6,
                 from tests/test-build-cxx-unstable_idle_inhibit_idle_inhibit_unstable_v1_xml.cc:1:
/nix/store/x35d72904sc58is4j4lsgzh3jkbidig4-glibc-2.34-210-dev/include/features.h:412:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
  412 | #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
      |    ^~~~~~~
cc1plus: all warnings being treated as errors

@ajs124
Copy link
Member Author

ajs124 commented Jul 11, 2022

Seems to come from mesonbuild/meson#9287, se we can fix it by setting hardeningDisable, but that doesn't seem great, especially since it's only needed for the tests. Ideas?

@ofborg ofborg bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jul 11, 2022
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Jul 11, 2022
@alyssais
Copy link
Member

We should set mesonBuildType to debugoptimized or release for wayland-protocols, I think.

And probably reconsider our default of "plain", because I don't think it's a good idea to be building all our packages that use Meson with -O0 by default.

(Upstream docs)

@jtojnar
Copy link
Member

jtojnar commented Jul 12, 2022

See also #171069.

@jtojnar
Copy link
Member

jtojnar commented Jul 12, 2022

And probably reconsider our default of "plain", because I don't think it's a good idea to be building all our packages that use Meson with -O0 by default.

Huh? Should not -O2 be on, when we have hardening enabled by default?

supportedHardeningFlags = [ "fortify" "stackprotector" "pie" "pic" "strictoverflow" "format" "relro" "bindnow" ];
# Musl-based platforms will keep "pie", other platforms will not.
# If you change this, make sure to update section `{#sec-hardening-in-nixpkgs}`
# in the nixpkgs manual to inform users about the defaults.
defaultHardeningFlags = if stdenv.hostPlatform.isMusl &&
# Except when:
# - static aarch64, where compilation works, but produces segfaulting dynamically linked binaries.
# - static armv7l, where compilation fails.
!((stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isAarch32) && stdenv.hostPlatform.isStatic)
then supportedHardeningFlags
else lib.remove "pie" supportedHardeningFlags;
enabledHardeningOptions =
if builtins.elem "all" hardeningDisable
then []
else lib.subtractLists hardeningDisable (defaultHardeningFlags ++ hardeningEnable);

hardeningCFlags+=('-O2' '-D_FORTIFY_SOURCE=2')

@jtojnar
Copy link
Member

jtojnar commented Jul 12, 2022

Tried to resolve it on Meson side: mesonbuild/meson#10593

@ajs124
Copy link
Member Author

ajs124 commented Jul 18, 2022

This can probably be closed in in favor of #171069 then?

@ajs124 ajs124 closed this Aug 1, 2022
@ajs124 ajs124 deleted the upd/meson branch August 1, 2022 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants