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
Contributor

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

@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
+ 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
Contributor 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
Copy link
Contributor Author

jtojnar commented Mar 20, 2018

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

@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

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.
@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
Contributor 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
Projects
Development

Successfully merging this pull request may close these issues.

meson should set install dir flags
5 participants