Skip to content

stdenv: mesonFlags: specify more targetPrefix'd binaries#183507

Merged
SuperSandro2000 merged 3 commits intoNixOS:stagingfrom
Artturin:stdenvmeson1
Aug 1, 2022
Merged

stdenv: mesonFlags: specify more targetPrefix'd binaries#183507
SuperSandro2000 merged 3 commits intoNixOS:stagingfrom
Artturin:stdenvmeson1

Conversation

@Artturin
Copy link
Copy Markdown
Member

@Artturin Artturin commented Jul 28, 2022

see commit msgs

Description of changes
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.

@alyssais
Copy link
Copy Markdown
Member

alyssais commented Jul 28, 2022

Can you please explain in the commit message what the purpose of this change is? "improve" isn't really enough information. I can try to infer the context from the linked PR but would be much better to have it properly explained in the commit message.

@Artturin Artturin changed the title stdenv: improve meson flags stdenv: mesonFlags: specify more targetPrefix'd binaries Jul 28, 2022
@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Jul 29, 2022
@Artturin
Copy link
Copy Markdown
Member Author

Artturin commented Jul 29, 2022

TODO: investigate using the env vars we already set by adding entries to
https://github.com/mesonbuild/meson/blob/1e1dee738b7eae9e9c22601522798f4945391379/mesonbuild/envconfig.py#L114

@ofborg ofborg bot requested review from alyssais, codyopel, primeos and vcunat July 29, 2022 05:35
@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: 1001-2500 This PR causes many rebuilds on Darwin and should most likely 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. and removed 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Jul 29, 2022
@Artturin
Copy link
Copy Markdown
Member Author

mesonbuild/meson#10640

@ofborg ofborg bot requested review from AndersonTorres and jtojnar July 29, 2022 06:25
@ofborg ofborg bot added 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. and removed 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. labels Jul 29, 2022
@alyssais
Copy link
Copy Markdown
Member

The commit message is fantastic now, thank you! :) (And thanks for going upstream!)

meson did not use these

therefore some packages had to do things
like this

```
    substituteInPlace meson.build --replace \
      "find_program('nm')" \
      "find_program('${stdenv.cc.targetPrefix}nm')"
```
they are unnecessary since 32e36bd429f804fd1468f51e39020f7360d8a5a8
NixOS#183507
Copy link
Copy Markdown
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

This is really great! Great job!!

@SuperSandro2000 SuperSandro2000 merged commit 09cb5e8 into NixOS:staging Aug 1, 2022
@alyssais
Copy link
Copy Markdown
Member

alyssais commented Aug 17, 2022

9f309c8 ("stdenv: mesonFlags: use canExecute in needs_exe_wrapper") broke pkgsStatic.glib:

FAILED: glib/tests/getpwuid-preload.so
x86_64-unknown-linux-musl-gcc  -o glib/tests/getpwuid-preload.so glib/tests/getpwuid-preload.so.p/getpwuid-preload.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,getpwuid-preload.so -Wl,--end-group
/nix/store/cja158bhs3cplv0w8zdib822524rwqw9-x86_64-unknown-linux-musl-binutils-2.38/bin/x86_64-unknown-linux-musl-ld: /nix/store/vn93aipraqpva34gz3y9vzjfw3kzdyac-x86_64-unknown-linux-musl-stage-final-gcc-11.3.0/lib/gcc/x86_64-unknown-linux-musl/11.3.0/crtbeginT.o: relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a shared object
/nix/store/cja158bhs3cplv0w8zdib822524rwqw9-x86_64-unknown-linux-musl-binutils-2.38/bin/x86_64-unknown-linux-musl-ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status

@alyssais
Copy link
Copy Markdown
Member

Ah, because now glib builds its tests, and lots of those tests involve building shared libraries. Maybe I can get them to disable the tests if default_library=static.

@alyssais alyssais mentioned this pull request Sep 14, 2022
13 tasks
@Artturin Artturin deleted the stdenvmeson1 branch October 23, 2022 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: stdenv Standard environment 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.

4 participants