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

Trial use of meson as build system #53

Closed
halfflat opened this issue Oct 28, 2016 · 7 comments
Closed

Trial use of meson as build system #53

halfflat opened this issue Oct 28, 2016 · 7 comments
Assignees

Comments

@halfflat
Copy link
Contributor

halfflat commented Oct 28, 2016

Let's try meson! Dependencies are Python3 and Ninja, and in principle we can install it locally in our environments with Pip.

In the first instance, let's just trial it for a serial (no MPI) build.

Until (if ever) it becomes a robust alternative to the existing CMake scripts, CMake will be the preferred build system and the one which needs to be in a working state.

@bcumming
Copy link
Member

bcumming commented Apr 4, 2019

I have a proof of concept for Meson in the following branch:

https://github.com/bcumming/arbor/tree/meson

It took one day to put together.

It compiles everything needed to build the ring example, i.e. modcc, mechanisms, libarbor, libsup, libenv.

The same effort would have taken a week and a lot of angst to do in CMake.

Still to resolved:

  • CUDA support
  • MPI
  • setting flags specific to compilers (for simd)

noraabiakar pushed a commit to noraabiakar/arbor that referenced this issue Nov 26, 2019
Move common functionality to run-validation.sh.
Implements arbor-sim#53.

* Make validation run script responsible for configuring output directory, printing test status, and capturing test stdout/stderr.
* Pass cache refresh request via environment variable `ns_cache_refresh`.
* Use exit codes to return test failure status.
* Print progress, platform information to stdout in run-validation.sh.
* Set up terminal colours with `tput`, and test for tty.
@halfflat halfflat added the cmake label Feb 4, 2021
@bcumming
Copy link
Member

bcumming commented Dec 1, 2021

This is being revived after a lengthy hiatus.

I will develop a proof of concept, that demonstrates end to implementation of our build process that we can use to analyze whether meson is viable.

I will not support some features, like MPI or GPUs, to reduce the complexity of the demonstrator.

@brenthuisman
Copy link
Contributor

What's the status of this?

@thorstenhater
Copy link
Contributor

Trial is online as a draft PR. We still lack the most crucial part: Passing arguments from pip to cmake/meson (yes, neither!). Until this is fixed, meson isn't a valuable upgrade over cmake.
Freezing this indefinitely until pip/python/setup.py/pyproject.toml get their act together.

@eli-schwartz
Copy link

We still lack the most crucial part: Passing arguments from pip to cmake/meson (yes, neither!).

pip has --config-settings but the backend needs to support this. https://pypi.org/project/meson-python/ can do this both on the command line and via a pyproject.toml setting.

@brenthuisman
Copy link
Contributor

Thanks for chiming in @eli-schwartz. You can find our progress here: #1991

As Arbor is not a pure Python project, currently meson-python is missing a crucial feature for us: "Link against libraries from the Meson project", since we would switch to Meson versions for some of our deps (I assume that's what you mean with 'libraries from the Meson project') and we ship an executable (script) in addition to the library.

Also, mesonbuild/meson#7863 being open made us think the time isn't right for looking into this. Maybe that issue being open isn't the best indicator, but how 'complete' is meson-python?

@eli-schwartz
Copy link

It's not the best indicator IMHO. The meson-python backend is pretty complete, and currently being developed under the mesonbuild organization by the scientific python community (initially for SciPy and NumPy to use).

SciPy successfully released with it for a while now, as have some other projects.

...

The meson issue is about adding a simpler backend directly to Meson (the meson-python can do some stuff that auditwheel is usually used for!) and to an extent, about letting meson-python become a bit simpler by deferring some things to Meson's core. It's also vital for meson itself to build with meson, since obviously if "A" build-depends on "B" then "B" can't also build-depend on "A" -- hence meson cannot build-depend on meson-python.

What's probably going to happen is that the meson-python code is used as the base for merging into meson. A couple nitpicky details will be involved, like avoiding external dependencies (there's ongoing work to improve the python ecosystem so that dependencies such as packaging aren't a requirement for implementing a C extension supporting build backend). But for the moment, it's really just about where the code lives.

Again, meson-python is maintained as part of the @mesonbuild organization.

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

No branches or pull requests

5 participants