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

Compile everything with meson #36524

Open
wants to merge 237 commits into
base: develop
Choose a base branch
from

Conversation

tobiasdiez
Copy link
Contributor

@tobiasdiez tobiasdiez commented Oct 24, 2023

Add meson configuration to compile sagelib with meson. Basic developer docs are added as well (meant as background info, not real installation instructions and thus under "developer").

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@tobiasdiez tobiasdiez changed the title Meson-compile Compile categories with meson Oct 24, 2023
@tobiasdiez tobiasdiez marked this pull request as ready for review October 24, 2023 03:20
@mkoeppe
Copy link

mkoeppe commented Oct 24, 2023

Note that the sage.categories namespace package is not shipped by one distribution, but rather split into two distribution packages - sagemath-objects and sagemath-categories.

@tobiasdiez
Copy link
Contributor Author

Note that the sage.categories namespace package is not shipped by one distribution, but rather split into two distribution packages - sagemath-objects and sagemath-categories.

I don't see how this is relevant here. I'm trying to build the full sagelib with meson. Just started with a small part to make reviewing easier

@mkoeppe
Copy link

mkoeppe commented Oct 24, 2023

Just a heads up that the monolithic build is going to go away very soon. So it would be unwise to design a new system for the monolithic library.

@tornaria tornaria mentioned this pull request Oct 25, 2023
3 tasks
@tobiasdiez
Copy link
Contributor Author

The separation of sage-the-distribution and sage-the-software is what I advocated years and years ago. I worked on it, got some results, but lost patience... I would be happy to see it come to reality though.

Thanks. @kiwifb - what do you think about this?

I am really interested to see meson being adopted as the build system for sagelib/sagemath-standard.

Happy to hear!

I do not like the presence of the top meson.build file, unless I can do without it.

The top meson.build file is very similar to the top make file, it gives the central starting point to compile the whole sage-library, as well as running tests (and compiling the docs in the future). I kept the requirements of the modularized distributions in mind when I designed the meson files: a modularized distro just needs to provide its own "top-level" meson build file that specifies its name and sets a few variables that control what source files to install and what the required dependencies are. But developing this in detail goes beyond the scope of this PR.

@tobiasdiez
Copy link
Contributor Author

I've cleanup the PR a bit more. In particular, I've removed all the __init__ files from source, and auto-generate them on build time. So hopefully this unblocks the PR.

The installation with build isolation should work now as well.

@dimpase @orlitzky @kiwifb please try it, following the instructions in the newly added meson.rst and let me know if you encounter any errors.

@orlitzky
Copy link
Contributor

orlitzky commented Oct 8, 2024

I'm between hardware right now but I have missed this dearly over the past few weeks. How will I know it's working if it doesn't take me...

$ time (./bootstrap && sage-configure)
...
real	11m31.481s
user	18m33.386s
sys	2m21.382s

eleven and a half minutes to run meson setup?

@dimpase
Copy link
Member

dimpase commented Oct 8, 2024

./bootstrap has been horrendously slow lately. Not the least as it spawns hundreds of python processes at some point.

And unconditionally generates conda config files, without checking whether we are on conda, or not.

And your macros to handle system Python packages are very slow, as creating venv for every package is not fast...

(sorry, I realised I was talking about the standard setup, not about this PR. But bootstrap being slow does not surprise me at all)

@tobiasdiez
Copy link
Contributor Author

Neither bootstrap nor sage-configure are needed for meson. It generates all the files it needs during build time (like it should).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: build disputed PR is waiting for community vote, see https://groups.google.com/g/sage-devel/c/IgBYUJl33SQ p: critical / 2 s: needs review v: large
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants