Skip to content

adding meson-build to the linux VM provisioning script#12224

Closed
marzer wants to merge 1 commit intomicrosoft:masterfrom
marzer:master
Closed

adding meson-build to the linux VM provisioning script#12224
marzer wants to merge 1 commit intomicrosoft:masterfrom
marzer:master

Conversation

@marzer
Copy link
Contributor

@marzer marzer commented Jul 2, 2020

A number of minor things relating to the use of the meson build system:

  • Adds a step to the x64-linux provisioning script to install meson 0.54.3
  • Fixes vcpkg_find_acquire_program suggesting that linux users use apt to install meson, instead of pip3
  • Updates vcpkg_find_acquire_program meson version to 0.54.3
  • Updates ports/tool-meson/CONTROL version to 0.54.3

What does your PR fix?
Doesn't fix, but contributes to, the resolution of #10786. A quick search of the issues for meson suggests that it would be useful for a number of others, too.

Which triplets are supported/not supported? Have you updated the CI baseline?
I don't think this question is relevant to my change, since I'm not submitting a port.

Does your PR follow the maintainer guide?
I believe so.

@Neumann-A
Copy link
Contributor

actually it is better to use the meson supplied by VCPKG on linux and macos since the version in the system package manager is probably outdated by a lot and meson is more or less a moving target currently.
E.g. to correctly use meson with cmake dependency lookup it is basically required to use at least version 0.54.3

@marzer
Copy link
Contributor Author

marzer commented Jul 2, 2020

@Neumann-A I don't follow. meson doesn't seem to be on the x64-linux CI servers at all. That's what this PR is addressing.

@Neumann-A
Copy link
Contributor

@marzer: The trick is to make vcpkg_find_acquire_program work on linux. The main reason it is not working is because the script name in the download is meson.py and not just meson.

@Neumann-A
Copy link
Contributor

considering that mesonbuild/meson#7190 is still not merged we may be forced to manually patch meson from within VCPKG.

@MVoz
Copy link
Contributor

MVoz commented Jul 2, 2020

example ubuntu
https://launchpad.net/meson/+packages

...
Ubuntu | Cosmic (18.10) | meson | 0.47.2-1ubuntu2 |  
-- | -- | -- | -- | --
Ubuntu | Trusty (14.04) | meson |   |  
Ubuntu | Bionic (18.04) | meson | 0.45.1-2ubuntu0.18.04.2 |  
Ubuntu | Xenial (16.04) | meson | 0.40.1-1~ubuntu16.04.1
...

@c72578
Copy link
Contributor

c72578 commented Jul 2, 2020

example ubuntu
https://launchpad.net/meson/+packages

...
Ubuntu | Cosmic (18.10) | meson | 0.47.2-1ubuntu2 |  
-- | -- | -- | -- | --
Ubuntu | Trusty (14.04) | meson |   |  
Ubuntu | Bionic (18.04) | meson | 0.45.1-2ubuntu0.18.04.2 |  
Ubuntu | Xenial (16.04) | meson | 0.40.1-1~ubuntu16.04.1
...

Exactly - outdated versions.
And a recent version of meson can be obtained using pip - as suggested here in the PR.

@MVoz
Copy link
Contributor

MVoz commented Jul 2, 2020

@marzer
https://pypi.org/project/meson/

latest
meson 0.54.3

pip3 install meson

@marzer
Copy link
Contributor Author

marzer commented Jul 2, 2020

@voskrese ...I know? That's what's being installed by this PR.

@MVoz
Copy link
Contributor

MVoz commented Jul 2, 2020

@marzer
you do not need to specify the version to constantly change it to a newer one, the latest release is always installed

@Neumann-A
Copy link
Contributor

please also update:

elseif(VAR MATCHES "MESON")
set(PROGNAME meson)
set(REQUIRED_INTERPRETER PYTHON3)
set(BREW_PACKAGE_NAME "meson")
set(APT_PACKAGE_NAME "meson")
if(CMAKE_HOST_WIN32)
set(SCRIPTNAME meson.py)
else()
set(SCRIPTNAME meson)
endif()
set(PATHS ${DOWNLOADS}/tools/meson/meson-0.54.2)
set(URL "https://github.com/mesonbuild/meson/archive/0.54.2.zip")
set(ARCHIVE "meson-0.54.2.zip")
set(HASH 8d19110bad3e6a223d1d169e833b746b884ece9cd23d2539ec02dccb5cd0c56542414b7afc0f7f2adcec9d957e4120d31f41734397aa0a7ee7f9c29ebdc9eb4c)
elseif(VAR MATCHES "FLEX")

@Neumann-A
Copy link
Contributor

@voskrese:
We need a fixed version for tools in vcpkg. Especially for meson where behavior might change drastically between versions

@marzer
Copy link
Contributor Author

marzer commented Jul 2, 2020

@voskrese I know. I added the explicit version as a result of a comment by @c72578 above.

@MVoz
Copy link
Contributor

MVoz commented Jul 2, 2020

@Neumann-A

elseif(VAR MATCHES "MESON")
set(PROGNAME meson)
set(REQUIRED_INTERPRETER PYTHON3)
set(BREW_PACKAGE_NAME "meson")
set(APT_PACKAGE_NAME "meson")
if(CMAKE_HOST_WIN32)
set(SCRIPTNAME meson.py)
else()
set(SCRIPTNAME meson)
endif()
set(PATHS ${DOWNLOADS}/tools/meson/meson-0.54.2)
set(URL "https://github.com/mesonbuild/meson/archive/0.54.2.zip")
set(ARCHIVE "meson-0.54.2.zip")
set(HASH 8d19110bad3e6a223d1d169e833b746b884ece9cd23d2539ec02dccb5cd0c56542414b7afc0f7f2adcec9d957e4120d31f41734397aa0a7ee7f9c29ebdc9eb4c)
elseif(VAR MATCHES "FLEX")

set(APT_PACKAGE_NAME "meson")

for users need to redo

@Neumann-A
Copy link
Contributor

@BillyONeal: The question is do you want to update the VM or do you want to have vcpkg_find_acquire_program work on linux for meson. #11543 should have the required changes for vcpkg_find_acquire_program

@Neumann-A
Copy link
Contributor

@voskrese: Maybe we should just make vcpkg_find_acquire_program just work on linux and osx

@ghost
Copy link

ghost commented Jul 2, 2020

CLA assistant check
All CLA requirements met.

@BillyONeal BillyONeal added the depends:vm-update PR contains changes to the VM provisioning scripts label Jul 2, 2020
@BillyONeal
Copy link
Member

@BillyONeal: The question is do you want to update the VM or do you want to have vcpkg_find_acquire_program work on linux for meson. #11543 should have the required changes for vcpkg_find_acquire_program

Just making find_acquire_program do the right thing would be preferable because there's less stuff for users to do.

@voskrese I know. I added the explicit version as a result of a comment by @c72578 above.

That's fixing our test machines to use the same version but I think @voskrese's comment is that we want the same version used on everyone's machine, so vcpkg should acquire this thing itself if possible.

@marzer
Copy link
Contributor Author

marzer commented Jul 2, 2020

Right, well I updated vcpkg_find_acquire_program, though I did nothing to fix it to use pip instead of apt. I know exactly zero cmake so I lack the skills to perform that in this PR (the other edits were simple substitutions)...

Edit: Oh, wait, it seems that APT_PACKAGE_NAME is just used for a help message. That wouldn't be too hard to add. Anything else would be well beyond me, though.

@BillyONeal
Copy link
Member

I see, I'm not super familiar myself. Tagging 'requires:discussion' so other maintainers see.

@marzer
Copy link
Contributor Author

marzer commented Jul 2, 2020

I've also just realized I need to add ninja-build to the VM for meson to work, too.

@BillyONeal
Copy link
Member

@marzer We should use the copy of ninja that Vcpkg already acquires in bootstrap if possible.

After some discussion we think this PR is OK: we still would prefer to see a better solution in vcpkg_find_acquire_program but this PR isn't really changing the status quo, it is only changing the specific version.

@marzer
Copy link
Contributor Author

marzer commented Jul 2, 2020

@BillyONeal

We should use the copy of ninja that Vcpkg already acquires in bootstrap if possible.

Alrighty, so should I remove ninja-build from the apt list?

we still would prefer to see a better solution in vcpkg_find_acquire_program

After reading the script a bit I'm starting to understand what's wrong with the current approach, given that (new, pip-installed) meson is a python script masquerading as a regular application, though I don't know how to make it work myself. @Neumann-A has some changes in another PR that might be relevant

@c72578
Copy link
Contributor

c72578 commented Jul 3, 2020

Please update also:
ports/tool-meson/CONTROL
Then, the version of meson is in sync at 0.54.3 with the other involved files.

also:
- updated meson version in `vcpkg_find_acquire_program` to 0.54.3
- added a `PIP3_PACKAGE_NAME` option to the `vcpkg_find_acquire_program` help message generator
- updated `ports/tool-meson/CONTROL` version to 0.54.3
@marzer marzer closed this Aug 11, 2020
@marzer
Copy link
Contributor Author

marzer commented Aug 11, 2020

I'm going to re-create this PR from a branch other than master because I've just realized doing it from master was, ahem, less-than-smart

New PR: #12858 Never mind. #12393 is a thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

depends:vm-update PR contains changes to the VM provisioning scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants