Skip to content

Use meson in sage-the-distro #39030

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

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

Conversation

tobiasdiez
Copy link
Contributor

@tobiasdiez tobiasdiez commented Nov 25, 2024

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

  • 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

@tobiasdiez tobiasdiez changed the title Distro-meson Use meson in sage-the-distro Nov 25, 2024
@tobiasdiez
Copy link
Contributor Author

@dimpase @orlitzky Here is a first version of replacing the old setuptools-based build with meson in sage-the-distro. I'm not familiar enough with sage-the-distro to effectively finish this PR. Do you have the resources to take over from here?

@dimpase
Copy link
Member

dimpase commented Nov 30, 2024

Sure, I'm ready to help as much as I can. Could you share an outline of how this is meant to work?

I imagine it is an adaptation to the Sage's venv (which is a more or less standard venv, no?) of what one can get e.g. with a standard venv on Gentoo Linux, or another environment where all the dependencies are available. Would this approach also work for a Conda-based environment?

@tobiasdiez
Copy link
Contributor Author

As a first step, I would not change how sage-the-distro works. So leave all the dependency installation (python and non-python deps) untouched for now. (We can discuss later how to transfer the configure checks to meson, and perhaps even completely replace the install scripts by mesons wrap files)

So, basically the only required change would be pip install ./src to pip install . , i.e. instead of using the pyproject.toml in src, the meson-based one in the root should be used to install sagelib. I tried to that in build/pkgs/sagelib/spkg-install.in in this branch, but not sure if the changes are correct. Then see what errors popup and resolve those.

@dimpase
Copy link
Member

dimpase commented Dec 1, 2024

running ./bootstrap gives

sed: can't read ../sagelib/package-version.txt: No such file or directory

@dimpase
Copy link
Member

dimpase commented Dec 1, 2024

that's cause

$ git grep "sagelib/package-version.txt"
pkgs/sagemath-bliss/requirements.txt.m4:sagemath-standard==esyscmd(`printf $(sed "s/[.]p.*//;" ../sagelib/package-version.txt)')
pkgs/sagemath-coxeter3/requirements.txt.m4:sagemath-standard==esyscmd(`printf $(sed "s/[.]p.*//;" ../sagelib/package-version.txt)')
pkgs/sagemath-mcqd/requirements.txt.m4:sagemath-standard==esyscmd(`printf $(sed "s/[.]p.*//;" ../sagelib/package-version.txt)')
pkgs/sagemath-meataxe/requirements.txt.m4:sagemath-standard==esyscmd(`printf $(sed "s/[.]p.*//;" ../sagelib/package-version.txt)')
pkgs/sagemath-sirocco/requirements.txt.m4:sagemath-standard==esyscmd(`printf $(sed "s/[.]p.*//;" ../sagelib/package-version.txt)')
pkgs/sagemath-tdlib/requirements.txt.m4:sagemath-standard==esyscmd(`printf $(sed "s/[.]p.*//;" ../sagelib/package-version.txt)')

@tobiasdiez
Copy link
Contributor Author

I think these requirements files can be safely deleted. At least I'm not aware of any usage of them.

@dimpase
Copy link
Member

dimpase commented Dec 1, 2024

I think these requirements files can be safely deleted. At least I'm not aware of any usage of them.

these are for building all these sagemath-* pseudo-packages.

By the way, can you resolve the git conflict?

@tobiasdiez
Copy link
Contributor Author

I think these requirements files can be safely deleted. At least I'm not aware of any usage of them.

these are for building all these sagemath-* pseudo-packages.

You are right, these are actually used.

Does ae33069 works for you? (I cannot test it atm on linux)

@tobiasdiez tobiasdiez marked this pull request as draft December 1, 2024 11:05
@dimpase
Copy link
Member

dimpase commented Dec 1, 2024

something in your branch broke the build system, with recursive make running wild. Not much fun to debug.
after ./bootstrap && ./configure (and hitting Ctrl-C after a short while):

$ make build
make build/make/Makefile --stop
make[1]: Entering directory '/mnt/opt/Sage/sage-dev'
make build/make/Makefile --stop
make[2]: Entering directory '/mnt/opt/Sage/sage-dev'
make build/make/Makefile --stop
...
make[24]: Entering directory '/mnt/opt/Sage/sage-dev'
make build/make/Makefile --stop
^Cmake[24]: *** [Makefile:39: build/pkgs/sage_conf/package-version.txt] Interrupt
make[23]: *** [Makefile:39: build/pkgs/sage_conf/package-version.txt] Interrupt
make[22]: *** [Makefile:39: build/pkgs/sage_conf/package-version.txt] Interrupt
...
make[2]: *** [Makefile:39: build/pkgs/sage_conf/package-version.txt] Interrupt
make[1]: *** [Makefile:39: build/pkgs/sage_conf/package-version.txt] Interrupt
make: *** [Makefile:39: base-toolchain] Interrupt
$ 

@dimpase
Copy link
Member

dimpase commented Dec 1, 2024

by the way, can this be based on the grayskull branch - this would make working a bit faster, as bootstrap-conda takes a nontrivial amount of time to run.

@dimpase
Copy link
Member

dimpase commented Dec 1, 2024

the recursion (I ran make -d in broken and in the non-broken environments, to compare) starts at

  Considering target file 'build/pkgs/saclib/package-version.txt'.
   Looking for an implicit rule for 'build/pkgs/saclib/package-version.txt'.
    Trying pattern rule '%::' with stem 'package-version.txt'.
   Found implicit rule '%::' for 'build/pkgs/saclib/package-version.txt'.
  Finished prerequisites of target file 'build/pkgs/saclib/package-version.txt'.
  No need to remake target 'build/pkgs/saclib/package-version.txt'.
  Considering target file 'build/pkgs/sage_conf/package-version.txt'.
   File 'build/pkgs/sage_conf/package-version.txt' does not exist.
   Looking for an implicit rule for 'build/pkgs/sage_conf/package-version.txt'.
    Trying pattern rule '%::' with stem 'package-version.txt'.
   Found implicit rule '%::' for 'build/pkgs/sage_conf/package-version.txt'.
  Finished prerequisites of target file 'build/pkgs/sage_conf/package-version.txt'.
  Must remake target 'build/pkgs/sage_conf/package-version.txt'.
make[1]: Entering directory '/mnt/opt/Sage/sage-dev'
Makefile:38: update target 'build/pkgs/sage_conf/package-version.txt' due to: target does not exist
if [ -x relocate-once.py ]; then ./relocate-once.py; fi

So the problem is that build/pkgs/sage_conf/package-version.txt is no longer there. I'll now try with ./configure --disable-sage_conf to see if it makes a difference.

@dimpase
Copy link
Member

dimpase commented Dec 1, 2024

--disable-sage_conf has no effect. Has it ever worked? I see

configure: WARNING: unrecognized options: --disable-sage_conf

in the output of ./configure.

It needs, and always needed, the following fix:

--- a/configure.ac
+++ b/configure.ac
@@ -431,7 +431,7 @@ AS_IF([test "x$enable_download_from_upstream_url" = "xyes"], [
 ])
 AC_SUBST([SAGE_SPKG_OPTIONS])
 
-AC_ARG_ENABLE([sagelib],
+AC_ARG_ENABLE([sage_conf],
   AS_HELP_STRING([--disable-sage_conf],
                  [disable build of the sage_conf package]), [
     for pkg in sage_conf; do

@dimpase
Copy link
Member

dimpase commented Dec 1, 2024

your fix for VERSION.txt didn't work:

$ ls -l build/pkgs/sage_conf/
total 16
-rw-r--r-- 1 dima dima 167 Jan 26  2024 dependencies
lrwxrwxrwx 1 dima dima  12 Dec  1 12:17 package-version.txt -> 'VERSION.txt'$'\n'
...

@dimpase
Copy link
Member

dimpase commented Dec 1, 2024

To unblock this, one needs to fix

build/pkgs/sage_*/package-version.txt and build/pkgs/sagemath_*/package-version.txt - they should be links to VERSION.txt.
A failed attempt was make in this branch. Instead why not just

cd build/pkgs/sage_conf
ln -sf  ../../../VERSION.txt package-version.txt
... etc

?

After these changes, make starts to run OK.

@dimpase
Copy link
Member

dimpase commented Dec 2, 2024

with changes as above, ./configure && make ends with

make --no-print-directory sagelib-SAGE_VENV-no-deps
[sagelib-10.5.rc2] Setting up build directory /mnt/opt/Sage/sage-dev/local/var/lib/sage/venv-python3.12/var/tmp/sage/build/sagelib-10.5.rc2
[sagelib-10.5.rc2] Host system: Linux hilbert 6.0.8-gentoo-x86_64 #2 SMP PREEMPT_DYNAMIC Sun Dec 18 22:31:12 GMT 2022 x86_64 Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz GenuineIntel GNU/Linux
[sagelib-10.5.rc2] C compiler: gcc, Using built-in specs., COLLECT_GCC=gcc, COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/14/lto-wrapper, Target: x86_64-pc-linux-gnu, Configured with: /var/tmp/portage/sys-devel/gcc-14.2.1_p20240817/work/gcc-14-20240817/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/14 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14 --disable-silent-rules --disable-dependency-tracking --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/14/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --disable-libunwind-exceptions --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 14.2.1_p20240817 p4' --with-gcc-major-version-only --enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --disable-multilib --with-multilib-list=m64 --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libssp --disable-libada --enable-cet --disable-systemtap --disable-valgrind-annotations --disable-vtable-verify --disable-libvtv --with-zstd --without-isl --enable-default-pie --enable-host-pie --enable-host-bind-now --enable-default-ssp --disable-fixincludes --with-build-config='bootstrap-O3 bootstrap-cet', Thread model: posix, Supported LTO compression algorithms: zlib zstd, gcc version 14.2.1 20240817 (Gentoo 14.2.1_p20240817 p4)
[sagelib-10.5.rc2] No stamp file for package 'sagelib' in /mnt/opt/Sage/sage-dev/local/var/lib/sage/venv-python3.12/var/lib/sage/installed
[sagelib-10.5.rc2] No spkg-legacy-uninstall script; nothing to do
[sagelib-10.5.rc2] [spkg-install] Installing sagelib-10.5.rc2 (editable mode)
[sagelib-10.5.rc2] [spkg-install] Using pip 24.2 from /mnt/opt/Sage/sage-dev/local/var/lib/sage/venv-python3.12/lib/python3.12/site-packages/pip (python 3.12)
[sagelib-10.5.rc2] [spkg-install] Obtaining file:///mnt/opt/Sage/sage-dev/local/var/lib/sage/venv-python3.12/var/tmp
[sagelib-10.5.rc2] [spkg-install] ERROR: file:///mnt/opt/Sage/sage-dev/local/var/lib/sage/venv-python3.12/var/tmp does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.
[sagelib-10.5.rc2] [spkg-install] ***************************************************************************************************************************************************************************************************
[sagelib-10.5.rc2] [spkg-install] Error installing sagelib-10.5.rc2
[sagelib-10.5.rc2] [spkg-install] ***************************************************************************************************************************************************************************************************

the ERROR comes from load_pyproject_toml() in local/var/lib/sage/venv-python3.12/lib64/python3.12/site-packages/pip/_internal/pyproject.py, i.e. from pip.

Indeed, there is no pyproject.toml in local/var/lib/sage/venv-python3.12/var/tmp (and, needless to say, no setup.py)
The latter directory is set up by extract_the_package() from build/bin/sage-spkg, with $PKG_SRC_TYPE being script (sic!), and $PKG_SRC being sagelib-10.5.rc2.

One way or another, spkg-install is not invoked from build/pkgs/sagelib, but rather from local/var/lib/sage/venv-python3.12/var/tmp [etc], so cd ../../../ in there does not bring us to the correct place, which is $SAGE_ROOT.

With

--- a/build/pkgs/sagelib/spkg-install.in
+++ b/build/pkgs/sagelib/spkg-install.in
@@ -1,7 +1,7 @@
 if [ "$SAGE_EDITABLE" = yes ]; then
-    cd ../../..
+    cd $SAGE_ROOT
 else
-    cd ../../..
+    cd $SAGE_ROOT
     # Issue #34181: Do not allow scripts with shebang lines from old
     # venvs leak into new venvs. (Changes only seem to be necessary
     # for non-editable builds.)

one gets to meson being invoked for building. However, it ends with

[sagelib-10.5.rc2] [spkg-install]   The Meson build system
[sagelib-10.5.rc2] [spkg-install]   Version: 1.5.1
[sagelib-10.5.rc2] [spkg-install]   Source dir: /mnt/opt/Sage/sage-dev
[sagelib-10.5.rc2] [spkg-install]   Build dir: /mnt/opt/Sage/sage-dev/build/cp312
[sagelib-10.5.rc2] [spkg-install]   Build type: native build
[sagelib-10.5.rc2] [spkg-install]   Project name: SageMath
[sagelib-10.5.rc2] [spkg-install]   Project version: 10.5.rc2
[sagelib-10.5.rc2] [spkg-install]   C compiler for the host machine: gcc (gcc 14.2.1 "gcc (Gentoo 14.2.1_p20240817 p4) 14.2.1 20240817")
[sagelib-10.5.rc2] [spkg-install]   C linker for the host machine: gcc ld.bfd 2.43
[sagelib-10.5.rc2] [spkg-install]   C++ compiler for the host machine: g++ -std=gnu++11 (gcc 14.2.1 "g++ (Gentoo 14.2.1_p20240817 p4) 14.2.1 20240817")
[sagelib-10.5.rc2] [spkg-install]   C++ linker for the host machine: g++ -std=gnu++11 ld.bfd 2.43
[sagelib-10.5.rc2] [spkg-install]   Cython compiler for the host machine: cython (cython 3.0.11)
[sagelib-10.5.rc2] [spkg-install]   Host machine cpu family: x86_64
[sagelib-10.5.rc2] [spkg-install]   Host machine cpu: x86_64
[sagelib-10.5.rc2] [spkg-install]   Program python found: YES (/mnt/opt/Sage/sage-dev/local/var/lib/sage/venv-python3.12/bin/python3)
[sagelib-10.5.rc2] [spkg-install]   Found pkg-config: YES (/usr/bin/pkg-config) 2.3.0
[sagelib-10.5.rc2] [spkg-install]   Run-time dependency python found: YES 3.12
[sagelib-10.5.rc2] [spkg-install]   Program python (pytest) found: NO
[sagelib-10.5.rc2] [spkg-install] 
[sagelib-10.5.rc2] [spkg-install]   ../../src/meson.build:18:8: ERROR: Tried to form an absolute path to a dir in the source tree.
[sagelib-10.5.rc2] [spkg-install]   You should not do that but use relative paths instead, for
[sagelib-10.5.rc2] [spkg-install]   directories that are part of your project.
[sagelib-10.5.rc2] [spkg-install] 

where the log says

--- stderr ---


Running command: /mnt/opt/Sage/sage-dev/local/var/lib/sage/venv-python3.12/bin/python3 -c 'import numpy
print(numpy.get_include())'
--- stdout ---
/mnt/opt/Sage/sage-dev/local/var/lib/sage/venv-python3.12/lib/python3.12/site-packages/numpy/core/include

--- stderr --- 

So meson isn't happy about the full path here. Not sure what an easy fix is.

@@ -128,7 +128,6 @@ build-requires = [
host-requires = [
"virtual:interface/blas",
"virtual:compiler/fortran",
"pkg:generic/boost",
Copy link
Member

@dimpase dimpase Aug 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is boost removed? Are we there yet qua removal of boost spkg? Without boost one cannot build some standard parts of sagelib, no?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took liberty to fix it

@vbraun
Copy link
Member

vbraun commented Aug 16, 2025

The buildbot repo includes the worker secrets, not super secret but you could in principle use it to submit incorrect build reports.

vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 17, 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 17, 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
@tobiasdiez
Copy link
Contributor Author

@vbraun I've noticed that the build bot fails with a similar error also on another file (http://build.sagemath.org/?#/builders/32/builds/26/steps/10/logs/sagelib). This should be fixed in 46a3e78.

@kiwifb
Copy link
Member

kiwifb commented Aug 17, 2025

Apologies for interjecting in this thread. I have a working sage-on-gentoo ebuild that uses meson for some time now, but I have not figured out how you are supposed to build the doc in the meson model.
Currently I build the doc as a separate package once sage is installed, is it still a valid strategy in the meson setup?

@kiwifb kiwifb closed this Aug 17, 2025
@kiwifb kiwifb reopened this Aug 17, 2025
@kiwifb
Copy link
Member

kiwifb commented Aug 17, 2025

Apologies for the closing as well, my finger slipped and I_was_shocked_to_have_that_power.

@vbraun
Copy link
Member

vbraun commented Aug 17, 2025

I'm getting a bunch of build failures on macos: http://build.sagemath.org/?#/builders/24/builds/1/steps/11/logs/stdio

@vbraun
Copy link
Member

vbraun commented Aug 17, 2025

he-man-i-have-the-power

vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 17, 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
@dimpase
Copy link
Member

dimpase commented Aug 17, 2025

do you really have to build gmp on the buildbot?

@tobiasdiez
Copy link
Contributor Author

I'm getting a bunch of build failures on macos: http://build.sagemath.org/?#/builders/24/builds/1/steps/11/logs/stdio

I only see

g++ -std=gnu++11 -Isrc/sage/rings/polynomial/pbori/pbori.cpython-312-darwin.so.p -Isrc/sage/rings/polynomial/pbori -I../../src/sage/rings/polynomial/pbori -Isrc/sage/cpython -I../../src/sage/cpython -Isrc/sage/ext -I../../src/sage/ext -Isrc/sage/rings -I../../src/sage/rings -Isrc -I../../src -I../../local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/cysignals -I/Users/buildbot-sage/worker/sage_git/build/local/var/lib/sage/venv-python3.12.5/include/python3.12 -I/Users/buildbot-sage/worker/sage_git/build/local/include/libpng16 -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -g -O2 -MD -MQ src/sage/rings/polynomial/pbori/pbori.cpython-312-darwin.so.p/meson-generated_src_sage_rings_polynomial_pbori_pbori.pyx.cpp.o -MF src/sage/rings/polynomial/pbori/pbori.cpython-312-darwin.so.p/meson-generated_src_sage_rings_polynomial_pbori_pbori.pyx.cpp.o.d -o src/sage/rings/polynomial/pbori/pbori.cpython-312-darwin.so.p/meson-generated_src_sage_rings_polynomial_pbori_pbori.pyx.cpp.o -c src/sage/rings/polynomial/pbori/pbori.cpython-312-darwin.so.p/src/sage/rings/polynomial/pbori/pbori.pyx.cpp
[sagelib-10.8.beta0] [spkg-install]   In file included from src/sage/rings/polynomial/pbori/pbori.cpython-312-darwin.so.p/src/sage/rings/polynomial/pbori/pbori.pyx.cpp:1144:
[sagelib-10.8.beta0] [spkg-install]   In file included from ../../src/sage/libs/polybori/pb_wrap.h:1:
[sagelib-10.8.beta0] [spkg-install]   In file included from /Users/buildbot-sage/worker/sage_git/build/local/include/polybori/BoolePolynomial.h:36:
[sagelib-10.8.beta0] [spkg-install]   In file included from /Users/buildbot-sage/worker/sage_git/build/local/include/polybori/BooleSet.h:25:
[sagelib-10.8.beta0] [spkg-install]   In file included from /Users/buildbot-sage/worker/sage_git/build/local/include/polybori/diagram/CCuddDDFacade.h:50:
[sagelib-10.8.beta0] [spkg-install]   In file included from /Users/buildbot-sage/worker/sage_git/build/local/include/polybori/routines/pbori_routines_hash.h:19:
[sagelib-10.8.beta0] [spkg-install]   In file included from /Users/buildbot-sage/worker/sage_git/build/local/include/boost/functional/hash.hpp:6:
[sagelib-10.8.beta0] [spkg-install]   /Users/buildbot-sage/worker/sage_git/build/local/include/boost/functional/hash/hash.hpp:74:33: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?

and that should be fixed in the latest commit 46a3e78. Are there other errors?

@tobiasdiez
Copy link
Contributor Author

Apologies for interjecting in this thread. I have a working sage-on-gentoo ebuild that uses meson for some time now, but I have not figured out how you are supposed to build the doc in the meson model. Currently I build the doc as a separate package once sage is installed, is it still a valid strategy in the meson setup?

You can run meson compile -C <builddir> doc-html to build the html docs (and the pdfs with doc-pdf, but that may require #40597). For this you need to have to specify the builddir that you also used for the sage compilation (and have sage installed).

@kiwifb
Copy link
Member

kiwifb commented Aug 18, 2025

Apologies for interjecting in this thread. I have a working sage-on-gentoo ebuild that uses meson for some time now, but I have not figured out how you are supposed to build the doc in the meson model. Currently I build the doc as a separate package once sage is installed, is it still a valid strategy in the meson setup?

You can run meson compile -C <builddir> doc-html to build the html docs (and the pdfs with doc-pdf, but that may require #40597). For this you need to have to specify the builddir that you also used for the sage compilation (and have sage installed).

OK, from where do I run this command? And do you mean to say I need to have both sage installed and the tree I used to compile it? Will a clean source tree suffice?

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.

8 participants