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

meson: set multiple output dirs in setup hook #36326

Merged
merged 2 commits into from
Mar 22, 2018

Conversation

jtojnar
Copy link
Member

@jtojnar jtojnar commented Mar 5, 2018

Motivation for this change

Will allow us to build gdk_pixbuf using meson (#36312)

Closes: #32636

Things done

I built json-glib with this and the include directory was created correctly (did not need to be moved).

  • 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.

Sorry, something went wrong.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

warning: no directories found matching 'syntax-highlighting'
warning: no files found matching 'authors.txt'
writing manifest file 'meson.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
/nix/store/4m5wh4s5cxf2sa511ypw811jqd8g4d7z-meson-0.44.0

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Partial log (click to expand)

warning: no directories found matching 'syntax-highlighting'
warning: no files found matching 'authors.txt'
writing manifest file 'meson.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
/nix/store/346a91ghr7nc90mc9fahhya28ac9a52x-meson-0.44.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

warning: no directories found matching 'syntax-highlighting'
warning: no files found matching 'authors.txt'
writing manifest file 'meson.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.002s

OK
/nix/store/fxy7dv8ki54a6xs2k5c7frvr0404ji5n-meson-0.44.0

@jtojnar jtojnar added this to the 18.03 milestone Mar 5, 2018
@jtojnar jtojnar added the 1.severity: blocker This is preventing another PR or issue from being completed label Mar 5, 2018
+ if commonpath([value, prefix]) == str(PurePath(prefix)):
+ # Convert path to be relative to prefix
+ skip = len(prefix) + 1
+ value = value[skip:]
Copy link
Member

Choose a reason for hiding this comment

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

Should this be allowed outside of nix builds?

Copy link
Member Author

Choose a reason for hiding this comment

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

Unlike the other patches, this should not have any side effects, so it is probably fine.

@jtojnar jtojnar mentioned this pull request Mar 13, 2018
@jtojnar jtojnar force-pushed the meson-fuck-prefix branch from 761cf6a to 671361f Compare March 20, 2018 19:56
@jtojnar jtojnar changed the base branch from staging to master March 20, 2018 19:56
@jtojnar
Copy link
Member Author

jtojnar commented Mar 20, 2018

Rebasing onto master as it will be merged with GNOME 3.28.

@GrahamcOfBorg GrahamcOfBorg added 6.topic: haskell 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: python labels Mar 20, 2018
@GrahamcOfBorg GrahamcOfBorg added 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: clean-up 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 501+ 10.rebuild-darwin: 101-500 and removed 6.topic: haskell 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: python 6.topic: qt/kde 6.topic: steam Steam game store/launcher (store.steampowered.com) 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 101-500 10.rebuild-darwin: 501+ labels Mar 20, 2018
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: meson

Partial log (click to expand)

warning: no directories found matching 'syntax-highlighting'
warning: no files found matching 'authors.txt'
writing manifest file 'meson.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
/nix/store/1051n8g79i6dd6nw9z5rkn7xiw55761y-meson-0.44.0

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: meson

Partial log (click to expand)

warning: no directories found matching 'syntax-highlighting'
warning: no files found matching 'authors.txt'
writing manifest file 'meson.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
/nix/store/vb2lm4sc96kkk2ig3hrl2m8x9zbw7mba-meson-0.44.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: meson

Partial log (click to expand)

warning: no directories found matching 'syntax-highlighting'
warning: no files found matching 'authors.txt'
writing manifest file 'meson.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.002s

OK
/nix/store/9vmdws64di028kjjb6zcfmbjcnzynnh7-meson-0.44.0

jtojnar added 2 commits March 22, 2018 07:33
Upstream insists on not allowing bindir and other dir options
outside of prefix for some reason:

mesonbuild/meson#2561

We remove the check so multiple outputs can work sanely.
@jtojnar jtojnar force-pushed the meson-fuck-prefix branch from 671361f to bfa24c1 Compare March 22, 2018 06:34
@jtojnar jtojnar merged commit bfa24c1 into NixOS:master Mar 22, 2018
@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux and removed 10.rebuild-darwin: 101-500 10.rebuild-linux: 501+ labels Mar 22, 2018
@jtojnar jtojnar deleted the meson-fuck-prefix branch March 22, 2018 13:29
@vcunat
Copy link
Member

vcunat commented Jul 28, 2019

I'm afraid we have a general meson problem here; according to docs:

Installation options are all relative to the prefix, except [...adjustments not much relevant to us]

I wonder how this has been working so far? It feels like I'm missing something. If not, maybe we could use relative paths like --libdir=../$hash-$pname-$version/lib but those would be a bit more difficult to code.

What brought me here: #65095 /cc @worldofpeace

@jtojnar
Copy link
Member Author

jtojnar commented Jul 29, 2019

Most packages use join_paths, which works. We are fixing issues when they occur and advocating for changing Meson expectations on related issues but we will need to step up offensive.

@vcunat
Copy link
Member

vcunat commented Jul 29, 2019

As long as they conform to meson docs, it seems a bit hard for me to argue that they should (also) work with absolute paths.

@worldofpeace
Copy link
Contributor

I've been having a hard time arguing this as well, ref the PR to gtk3 was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.severity: blocker This is preventing another PR or issue from being completed 8.has: clean-up 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

meson should set install dir flags
5 participants