Skip to content

Meson: make it compile on recent ubuntu #40071

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

Merged
merged 51 commits into from
Aug 2, 2025

Conversation

tobiasdiez
Copy link
Contributor

@tobiasdiez tobiasdiez commented May 8, 2025

Successfully install sage with meson on recent ubuntu (like 25.04), only with system packages pre-installed.

Ubuntu is missing maxima (with ecl), so we have to add maxima as a subproject that is build on-the-fly.
Also make the python dep lrcalc an optional dependency, since it fails to build (due to missing lrcalc).
The other changes are mostly minor updates to the dependency installing and handling in meson.

Fixes #31347.

📝 Checklist

  • The title is concise and informative.
  • 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 and checked the documentation preview.

⌛ Dependencies

Copy link

github-actions bot commented May 8, 2025

Documentation preview for this PR (built with commit 7b1307f; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@dimpase
Copy link
Member

dimpase commented Jul 20, 2025

for me,

wget  https://sourceforge.net/projects/maxima/files/Maxima-source/5.47.0-source/maxima-5.47.0.tar.gz/download

works fine.

--2025-07-20 14:44:17--  https://sourceforge.net/projects/maxima/files/Maxima-source/5.47.0-source/maxima-5.47.0.tar.gz/download
Resolving sourceforge.net... 2606:4700::6812:d95, 2606:4700::6812:c95, 104.18.12.149, ...
Connecting to sourceforge.net|2606:4700::6812:d95|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://downloads.sourceforge.net/project/maxima/Maxima-source/5.47.0-source/maxima-5.47.0.tar.gz?ts=gAAAAABofUccuxaGMnymW30kvzPZLZUQ3hSfipggXb4Uu8IVJ2o_NO3ZR5oT1vAdQlAPuMamF2ASkNR7FXMHnb7NpXB4Nc8sgQ%3D%3D&use_mirror=pilotfiber&r= [following]
--2025-07-20 14:44:18--  https://downloads.sourceforge.net/project/maxima/Maxima-source/5.47.0-source/maxima-5.47.0.tar.gz?ts=gAAAAABofUccuxaGMnymW30kvzPZLZUQ3hSfipggXb4Uu8IVJ2o_NO3ZR5oT1vAdQlAPuMamF2ASkNR7FXMHnb7NpXB4Nc8sgQ%3D%3D&use_mirror=pilotfiber&r=
Resolving downloads.sourceforge.net... 2606:4700::6812:c95, 2606:4700::6812:d95, 104.18.13.149, ...
Connecting to downloads.sourceforge.net|2606:4700::6812:c95|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://pilotfiber.dl.sourceforge.net/project/maxima/Maxima-source/5.47.0-source/maxima-5.47.0.tar.gz?viasf=1 [following]
--2025-07-20 14:44:18--  https://pilotfiber.dl.sourceforge.net/project/maxima/Maxima-source/5.47.0-source/maxima-5.47.0.tar.gz?viasf=1
Resolving pilotfiber.dl.sourceforge.net... 216.158.133.250
Connecting to pilotfiber.dl.sourceforge.net|216.158.133.250|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 47939891 (46M) [application/x-gzip]
Saving to: ‘download’

download                    100%[=========================================>]  45.72M  29.8MB/s    in 1.5s

2025-07-20 14:44:20 (29.8 MB/s) - ‘download’ saved [47939891/47939891]

@tobiasdiez
Copy link
Contributor Author

Actually buildbot only prohibits internet access when running tests, but it should work at build time (i.e. when running make start)

Something is wrong with the sourceforge cert? Either way

* please don't rely solely on sourceforge urls, those not super reliable

Is there a better source for the maxima tarball? The maxima spkg also specifies sourceforge as source.

* please don't download tarballs from third-party pages without verifying checksums

They are actually verified.

@tobiasdiez
Copy link
Contributor Author

Program ecl found: YES (/Users/buildbot-sage/worker/sage_git/build/local/bin/ecl)
Running command: /Users/buildbot-sage/worker/sage_git/build/local/bin/ecl --eval '(require '"'"'maxima)' --eval '(quit)'
--- stdout ---

--- stderr ---
An error occurred during initialization:
Module error: Don't know how to REQUIRE MAXIMA..

Thanks. Not sure what's wrong here. The cmd encoding looks a bit strange, but then it does try to load maxima... Is this happening on all buildbots? Could you run the above command manually?

I also tried to change the command a bit, so maybe now the encoding works better?

@tobiasdiez tobiasdiez force-pushed the ubuntu-devcontainer-meson branch from 2f93c8b to 7c599c0 Compare July 20, 2025 21:51
@vbraun
Copy link
Member

vbraun commented Jul 20, 2025

Is there a better source for the maxima tarball? The maxima spkg also specifies sourceforge as source.

yes, our mirrors have the maxima tarball

@tobiasdiez tobiasdiez force-pushed the ubuntu-devcontainer-meson branch from 7c599c0 to de5e820 Compare July 21, 2025 08:10
@tobiasdiez
Copy link
Contributor Author

Is there a better source for the maxima tarball? The maxima spkg also specifies sourceforge as source.

yes, our mirrors have the maxima tarball

That sadly doesn't work as the meson parts should stay independent of sage-the-distro (which is used to populate the mirrors). For example, there is no guarantee that the spkg version is the same as the one used by meson.

I've now improved the maxima discovery to also query the sage-the-distro path. I currently don't have means to try it if its really working (but will test it in about 2 weeks). Nonetheless, this should be ready to go, since only it only conflicts with #39030. So setting it back to positive review once the tests are green unless someone protests.

@vbraun
Copy link
Member

vbraun commented Jul 21, 2025

That sounds a lot like you are reinventing the distro wheel. I don't particularly care.

But relying solely on sourceforge download urls is going to be super painful.

@dimpase
Copy link
Member

dimpase commented Jul 21, 2025

one can add a Sage mirror as source_fallback_url for Maxima, no?

@tobiasdiez tobiasdiez mentioned this pull request Jul 24, 2025
5 tasks
vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 26, 2025
sagemathgh-40071: Meson: make it compile on recent ubuntu
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Successfully install sage with meson on recent ubuntu (like 25.04), only
with system packages pre-installed.

Ubuntu is missing maxima (with ecl), so we have to add maxima as a
subproject that is build on-the-fly.
Also make the python dep lrcalc an optional dependency, since it fails
to build (due to missing lrcalc).
The other changes are mostly minor updates to the dependency installing
and handling in meson.

Fixes sagemath#31347.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] 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 and checked the documentation
preview.

### ⌛ Dependencies

- sagemath#40038

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#40071
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik, Tobias Diez
vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 27, 2025
sagemathgh-40071: Meson: make it compile on recent ubuntu
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Successfully install sage with meson on recent ubuntu (like 25.04), only
with system packages pre-installed.

Ubuntu is missing maxima (with ecl), so we have to add maxima as a
subproject that is build on-the-fly.
Also make the python dep lrcalc an optional dependency, since it fails
to build (due to missing lrcalc).
The other changes are mostly minor updates to the dependency installing
and handling in meson.

Fixes sagemath#31347.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] 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 and checked the documentation
preview.

### ⌛ Dependencies

- sagemath#40038

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#40071
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik, Tobias Diez
vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 28, 2025
sagemathgh-40071: Meson: make it compile on recent ubuntu
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Successfully install sage with meson on recent ubuntu (like 25.04), only
with system packages pre-installed.

Ubuntu is missing maxima (with ecl), so we have to add maxima as a
subproject that is build on-the-fly.
Also make the python dep lrcalc an optional dependency, since it fails
to build (due to missing lrcalc).
The other changes are mostly minor updates to the dependency installing
and handling in meson.

Fixes sagemath#31347.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] 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 and checked the documentation
preview.

### ⌛ Dependencies

- sagemath#40038

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#40071
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik, Tobias Diez
vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 29, 2025
sagemathgh-40071: Meson: make it compile on recent ubuntu
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Successfully install sage with meson on recent ubuntu (like 25.04), only
with system packages pre-installed.

Ubuntu is missing maxima (with ecl), so we have to add maxima as a
subproject that is build on-the-fly.
Also make the python dep lrcalc an optional dependency, since it fails
to build (due to missing lrcalc).
The other changes are mostly minor updates to the dependency installing
and handling in meson.

Fixes sagemath#31347.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] 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 and checked the documentation
preview.

### ⌛ Dependencies

- sagemath#40038

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#40071
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik, Tobias Diez
@vbraun vbraun merged commit 23e4bfc into sagemath:develop Aug 2, 2025
24 of 30 checks passed
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 12, 2025
sagemathgh-39030: Use meson in sage-the-distro
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Replace the old setuptools-based build by the new meson-based one in
sage-the-distro. Delete most of the old stuff that is no longer needed
now.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] 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 and checked the documentation
preview.

### ⌛ Dependencies

- sagemath#40133
- sagemath#39973
- sagemath#40071
<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39030
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 13, 2025
sagemathgh-39030: Use meson in sage-the-distro
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Replace the old setuptools-based build by the new meson-based one in
sage-the-distro. Delete most of the old stuff that is no longer needed
now.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] 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 and checked the documentation
preview.

### ⌛ Dependencies

- sagemath#40133
- sagemath#39973
- sagemath#40071
<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39030
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Installation of sagelib without running ./configure on Ubuntu
4 participants