asking for setting up cythonizing compiling

100 views
Skip to first unread message

Randall

unread,
Jan 17, 2022, 6:27:01 PM1/17/22
to sage-devel

I would like to find some developer who is willing to show me how to set up the cythonizing part of the compile for the Sage build. I did fix 371 warnings in 110 code units, but have to push these changes back up into the cython code.

Please contact me if you are willing to give me a few pointers on how to set this up. I already have git cloned the image and have a trac account.

Randall

Michael Orlitzky

unread,
Jan 17, 2022, 7:43:00 PM1/17/22
to sage-...@googlegroups.com
On Mon, 2022-01-17 at 15:27 -0800, Randall wrote:
> I would like to find some developer who is willing to show me how to set up
> the cythonizing part of the compile for the Sage build. I did fix 371
> warnings in 110 code units, but have to push these changes back up into the
> cython code.

It's dark magic. The best way to do it is to,

(1) build sage (i.e. run "make build")
(2) edit the pyx/pxd file you want to change
(3) run "make build" again

The last step will do a bunch of stuff, but ultimately it will detect
that the modified files need to be re-cythonized, recompiled, and
relinked. If you figure out how to make the process verbose so that the
end user can see what's happening, please let me know.

I've also just started to fix some of the easier Cython warnings,

* https://trac.sagemath.org/ticket/33197
* https://trac.sagemath.org/ticket/33201
* https://trac.sagemath.org/ticket/33193
* https://trac.sagemath.org/ticket/33186
* https://trac.sagemath.org/ticket/33185
* https://trac.sagemath.org/ticket/33176

so that may take some of the work off your plate.


William Stein

unread,
Jan 17, 2022, 8:03:21 PM1/17/22
to sage-devel
On Mon, Jan 17, 2022 at 4:43 PM Michael Orlitzky <mic...@orlitzky.com> wrote:
On Mon, 2022-01-17 at 15:27 -0800, Randall wrote:
> I would like to find some developer who is willing to show me how to set up
> the cythonizing part of the compile for the Sage build. I did fix 371
> warnings in 110 code units, but have to push these changes back up into the
> cython code.

It's dark magic. The best way to do it is to,

  (1) build sage (i.e. run "make build")
  (2) edit the pyx/pxd file you want to change
  (3) run "make build" again

The last step will do a bunch of stuff, but ultimately it will detect
that the modified files need to be re-cythonized, recompiled, and
relinked. If you figure out how to make the process verbose so that the
end user can see what's happening, please let me know.

When I wrote this, the steps were:

(1) build sage
(2) edit the pyx/pxd file you want to change, or really anything in SAGE_ROOT/src/sage
(3) type "sage -br" to build any changes and start sage. 

Doing "sage -br" should hopefully not "do bunch of [dark magic] stuff".
Did it go away?  "sage -advanced" for sage-9.4 still lists the "-b" option, so there is hope:

Building the Sage library:

  -b                  -- build Sage library -- do this if you have
                         modified any source code files in SAGE_ROOT/src/sage/
  -ba                 -- same as -b, but rebuild *all* Cython
                         code.
  -br                 -- build and run Sage

  -bt [...]           -- build Sage and test; same options as -t
  -btp <N> [...]      -- build Sage and test in parallel; same options as -tp
  -btnew [...]        -- build Sage and test modified files, as in -t --new
  -bn [...], --build-and-notebook [...]
                      -- build the Sage library (as by running "sage -b")
                         and then start the notebook



 

I've also just started to fix some of the easier Cython warnings,

  * https://trac.sagemath.org/ticket/33197
  * https://trac.sagemath.org/ticket/33201
  * https://trac.sagemath.org/ticket/33193
  * https://trac.sagemath.org/ticket/33186
  * https://trac.sagemath.org/ticket/33185
  * https://trac.sagemath.org/ticket/33176

so that may take some of the work off your plate.


--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/51029486c16cf37d238791e0be1c18142605fb4b.camel%40orlitzky.com.


--

Michael Orlitzky

unread,
Jan 17, 2022, 8:14:30 PM1/17/22
to sage-...@googlegroups.com
On Mon, 2022-01-17 at 17:02 -0800, William Stein wrote:
>
>
> When I wrote this, the steps were:
>
> (1) build sage
> (2) edit the pyx/pxd file you want to change, or really anything in
> SAGE_ROOT/src/sage
> (3) type "sage -br" to build any changes and start sage.
>
> Doing "sage -br" should hopefully not "do bunch of [dark magic] stuff".
> Did it go away? "sage -advanced" for sage-9.4 still lists the "-b" option,
> so there is hope:
>
>

It's still there, but vaguely deprecated if I'm remembering correctly.
It still works, but is conceptually a bit awkward. (Not my main point.)

Dark magic is relative, but for someone new, the makefile or sage -b
checks about a million dependencies and re-runs and re-builds
everything that it needs to but that you'd never know about. Then there
are sage_setup and sage_conf and sagemath-standard and sagelib packages
and symlinks everywhere, and a bundled/patched cython package, a
setup.py with cython initialization that in turn refers to
cython/distutils code inside of the very package it describes, and this
is all maybe done inside of a venv...


William Stein

unread,
Jan 17, 2022, 8:31:24 PM1/17/22
to sage-devel
That sounds really complicated.  For example, it is in theory not necessary to copy files around
or have any symlinks and multiple copies of the same file.   Unfortunately, the
"python setup.py develop"  workflow didn't even exist when we first made "sage -b".  I should
have redone things to use the "python setup.py develop" approach (instead of "python setup.py install"), 
but maybe nobody ever got around to it, and at some point things get stuck being really complicated.

In any case, all that *should* happen when you change a py file and do "sage -b" is exactly nothing.
What should happen when you change a pyx/pyd file is that the corresponding autogenerated c/c++
for all dependencies gets updated and built via the compiler as .so (or dylib) files right next to the
pyx files, and that's it.  (I'm not saying that's what actually happens -- just that it could be that way,
and it was my intention.)    One great thing about the longterm project Matthias Koeppe has
been spearheading (to modularize sage) is that at some point it'll be possible to redo the dev process
for individual modules to be more standard and understandable. 


 -- William
 


--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.

Matthias Koeppe

unread,
Jan 17, 2022, 9:35:51 PM1/17/22
to sage-devel
On Monday, January 17, 2022 at 5:14:30 PM UTC-8 Michael Orlitzky wrote:
Dark magic is relative, but for someone new [...]

(rant deleted)

1) "make build" just works
2) "./sage -b" just works.


 

Matthias Koeppe

unread,
Jan 17, 2022, 9:38:55 PM1/17/22
to sage-devel
On Monday, January 17, 2022 at 5:31:24 PM UTC-8 wst...@gmail.com wrote:
Unfortunately, the
"python setup.py develop"  workflow didn't even exist when we first made "sage -b".  [...]

It exists now, it is called "pip install --editable" these days.

In the Sage distribution, you activate it for the Sage library by saying "./configure --enable-editable".
This has been available since Sage 9.3, thanks to the work by Tobias Diez.
 

William Stein

unread,
Jan 17, 2022, 9:51:31 PM1/17/22
to sage-...@googlegroups.com
Wow that is soooooo awesome.  Thanks Tobias!!

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
--
-- William Stein

Michael Orlitzky

unread,
Jan 17, 2022, 9:56:51 PM1/17/22
to sage-...@googlegroups.com
It wasn't a rant, that was my point.

Someone with development experience but who is new to sage is tempted
to think, "I'll just read the Cython documentation and then all I have
to do is figure out how to cythonize and compile this file." Never say
never, but you'll never do it.


Randall

unread,
Jan 20, 2022, 5:07:06 PM1/20/22
to sage-devel
Thanks for all the posts, I think I am tracking. But I discovered a bad problem, on the original "git clone" command my download has file corruption errors and some of the files are truncated. We used to deal with this, by md5sums or sha256 sums on files and folders, so we could make sure of bit copy accuracy. I tried to do a repull using the "git pull origin branch" command but git says everything is fine, latest is "Already up to date."

Well it might be up to date, bu the files are corrupted.

Is there a way I cat get a perfect file copy 100% to the last bit?

Thanks

Randall

unread,
Jan 20, 2022, 5:09:09 PM1/20/22
to sage-devel
I had to fix 110 files to fix the 371 warnings, but there are 3 legitimate warnings, 2 appear to be missing code in the cython file. One warning is legitimate, but it is a chicken versus egg argument, I can explain in detail in case anyone wants to know. Now all I have to do is push all these changes back up into the cython code and see if they take.

William Stein

unread,
Jan 20, 2022, 5:49:53 PM1/20/22
to sage-devel
On Thu, Jan 20, 2022 at 2:07 PM Randall <randall...@gmail.com> wrote:
>
> Thanks for all the posts, I think I am tracking. But I discovered a bad problem, on the original "git clone" command my download has file corruption errors and some of the files are truncated. We used to deal with this, by md5sums or sha256 sums on files and folders, so we could make sure of bit copy accuracy. I tried to do a repull using the "git pull origin branch" command but git says everything is fine, latest is "Already up to date."
>
> Well it might be up to date, bu the files are corrupted.
>
> Is there a way I cat get a perfect file copy 100% to the last bit?

Git clone does use sha hashes, etc. Is it possible there is something
else wrong, e.g., with your filesystem or how you used "git clone"?

1. What is the exact "git clone" command you used?
2. When you tried the same thing again, did it have errors, or was
this a one off problem?
3. How did you know there are errors in the first place?

I've used git clone a huge number of times without ever encountering
what you describe above, so I'm very curious to learn how it happens
and avoid it in the future. Maybe it has to do with the remote remote
server you cloned from or the options you used?

-- William

>
> Thanks
>
>
> On Monday, January 17, 2022 at 6:56:51 PM UTC-8 Michael Orlitzky wrote:
>>
>> On Mon, 2022-01-17 at 18:35 -0800, Matthias Koeppe wrote:
>> > On Monday, January 17, 2022 at 5:14:30 PM UTC-8 Michael Orlitzky wrote:
>> >
>> > > Dark magic is relative, but for someone new [...]
>> > >
>> >
>> > (rant deleted)
>> >
>> > 1) "make build" just works
>> > 2) "./sage -b" just works.
>> >
>>
>> It wasn't a rant, that was my point.
>>
>> Someone with development experience but who is new to sage is tempted
>> to think, "I'll just read the Cython documentation and then all I have
>> to do is figure out how to cythonize and compile this file." Never say
>> never, but you'll never do it.
>>
>>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/e749bc74-ded1-47b7-92c2-cfc49071e500n%40googlegroups.com.



--
William (http://wstein.org)

Randall

unread,
Jan 20, 2022, 6:42:30 PM1/20/22
to sage-devel
Well, since I am new at this... can anyone answer my questions?

To start, I tried to force a hard rewrite of ALL the code in my branch, which which came from the develop branch.
This is to protect any mistakes being made.

I did a hard reset and deleted any intermediate files, using 2 git commands and also running the make command to remove the spurious documenation files as the sage messages said.

Then I ran make again and got this error:

[sagemath_doc_html-none] [hyperboli] The inventory files are in local/share/doc/sage/inventory/en/reference/hyperbolic_geometry.
[sagemath_doc_html-none] Error building the documentation.
[sagemath_doc_html-none] Traceback (most recent call last):
[sagemath_doc_html-none]   File "/home/owner/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
[sagemath_doc_html-none]     return _run_code(code, main_globals, None,
[sagemath_doc_html-none]   File "/home/owner/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/runpy.py", line 87, in _run_code
[sagemath_doc_html-none]     exec(code, run_globals)
[sagemath_doc_html-none]   File "/home/owner/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage_docbuild/__main__.py", line 2, in <module>
[sagemath_doc_html-none]     main()
[sagemath_doc_html-none]   File "/home/owner/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage_docbuild/__init__.py", line 1775, in main
[sagemath_doc_html-none]     builder()
[sagemath_doc_html-none]   File "/home/owner/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage_docbuild/__init__.py", line 823, in _wrapper
[sagemath_doc_html-none]     getattr(DocBuilder, build_type)(self, *args, **kwds)
[sagemath_doc_html-none]   File "/home/owner/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage_docbuild/__init__.py", line 137, in f
[sagemath_doc_html-none]     runsphinx()
[sagemath_doc_html-none]   File "/home/owner/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage_docbuild/sphinxbuild.py", line 323, in runsphinx
[sagemath_doc_html-none]     sys.stderr.raise_errors()
[sagemath_doc_html-none]   File "/home/owner/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage_docbuild/sphinxbuild.py", line 258, in raise_errors
[sagemath_doc_html-none]     raise OSError(self._error)
[sagemath_doc_html-none] OSError: /home/owner/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py:docstring of sage.geometry.hyperbolic_spac
e.hyperbolic_geodesic.HyperbolicGeodesic.perpendicular_bisector:12: WARNING: Exception occurred in plotting hyperbolic_geodesic-18
[sagemath_doc_html-none]  
[sagemath_doc_html-none]     Note: incremental documentation builds sometimes cause spurious
[sagemath_doc_html-none]     error messages. To be certain that these are real errors, run
[sagemath_doc_html-none]     "make doc-clean doc-uninstall" first and try again.
[sagemath_doc_html-none] make[6]: *** [Makefile:20: doc-inventory--reference-hyperbolic_geometry] Error 1
[sagemath_doc_html-none] make[5]: *** [Makefile:37: doc-inventory-reference] Error 2
make[4]: *** [Makefile:2866: sagemath_doc_html-SAGE_DOCS-no-deps] Error 2
make[3]: *** [Makefile:2866: /home/owner/sage/local/var/lib/sage/installed/sagemath_doc_html-none] Error 2
make[2]: *** [Makefile:2427: all-start] Error 2
make[2]: Leaving directory '/home/owner/sage/build/make'

real    8m56.327s
user    5m1.098s
sys     0m11.358s
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all-start'):

It is safe to delete any log files and build directories, but they
contain information that is helpful for debugging build problems.
WARNING: If you now run 'make' again, the build directory of the
same version of the package will, by default, be deleted. Set the
environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.

make[1]: *** [Makefile:39: all-start] Error 1
make[1]: Leaving directory '/home/owner/sage'
make: *** [Makefile:13: all] Error 2
owner@localhost:~/sage>
-------------------------
==================================================
I followed the suggestion above.

I tried the make command again.. and a failure occurs.
=================================================
[sagemath_doc_html-none] cd /home/owner/sage && ./sage --docbuild --no-pdf-links reference/interfaces inventory --no-prune-empty-dirs
[sagemath_doc_html-none] Error building the documentation.
[sagemath_doc_html-none] Traceback (most recent call last):
[sagemath_doc_html-none]   File "/home/owner/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
[sagemath_doc_html-none]     return _run_code(code, main_globals, None,
[sagemath_doc_html-none]   File "/home/owner/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/runpy.py", line 87, in _run_code
[sagemath_doc_html-none]     exec(code, run_globals)
[sagemath_doc_html-none]   File "/home/owner/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage_docbuild/__main__.py", line 2, in <module>
[sagemath_doc_html-none]     main()
[sagemath_doc_html-none]   File "/home/owner/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage_docbuild/__init__.py", line 1775, in main
[sagemath_doc_html-none]     builder()
[sagemath_doc_html-none]   File "/home/owner/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage_docbuild/__init__.py", line 811, in _wrapper
[sagemath_doc_html-none]     self.write_auto_rest_file(module_name)
[sagemath_doc_html-none]   File "/home/owner/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage_docbuild/__init__.py", line 1107, in write_auto_rest_file
[sagemath_doc_html-none]     title = self.get_module_docstring_title(module_name)
[sagemath_doc_html-none]   File "/home/owner/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage_docbuild/__init__.py", line 1068, in get_module_docstring_title
[sagemath_doc_html-none]     __import__(module_name)
[sagemath_doc_html-none]   File "/home/owner/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/interfaces/maxima_lib.py", line 112, in <module>
[sagemath_doc_html-none]     ecl_eval("(require 'maxima \"{}\")".format(MAXIMA_FAS))
[sagemath_doc_html-none]   File "sage/libs/ecl.pyx", line 1358, in sage.libs.ecl.ecl_eval (build/cythonized/sage/libs/ecl.c:10847)
[sagemath_doc_html-none]     cpdef EclObject ecl_eval(str s):
[sagemath_doc_html-none]   File "sage/libs/ecl.pyx", line 1381, in sage.libs.ecl.ecl_eval (build/cythonized/sage/libs/ecl.c:10780)
[sagemath_doc_html-none]     o=ecl_safe_eval(python_to_ecl(s, True))
[sagemath_doc_html-none]   File "sage/libs/ecl.pyx", line 327, in sage.libs.ecl.ecl_safe_eval (build/cythonized/sage/libs/ecl.c:5562)
[sagemath_doc_html-none]     raise RuntimeError("ECL says: {}".format(message))
[sagemath_doc_html-none] RuntimeError: ECL says: LOAD: Could not load file #P"/home/owner/sage/local/lib/ecl-21.2.1/maxima.fas" (Error: "/home/owner/sage/local/lib/ecl-21.2.1/maxima.fas: file too short")
[sagemath_doc_html-none]  
[sagemath_doc_html-none]     Note: incremental documentation builds sometimes cause spurious
[sagemath_doc_html-none]     error messages. To be certain that these are real errors, run
[sagemath_doc_html-none]     "make doc-clean doc-uninstall" first and try again.
[sagemath_doc_html-none] make[6]: *** [Makefile:20: doc-inventory--reference-interfaces] Error 1
[sagemath_doc_html-none] make[5]: *** [Makefile:37: doc-inventory-reference] Error 2
make[4]: *** [Makefile:2866: sagemath_doc_html-SAGE_DOCS-no-deps] Error 2
make[3]: *** [Makefile:2866: /home/owner/sage/local/var/lib/sage/installed/sagemath_doc_html-none] Error 2
make[2]: *** [Makefile:2427: all-start] Error 2
make[2]: Leaving directory '/home/owner/sage/build/make'

real    5m6.292s
user    2m45.914s
sys     0m9.745s
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all-start'):

It is safe to delete any log files and build directories, but they
contain information that is helpful for debugging build problems.
WARNING: If you now run 'make' again, the build directory of the
same version of the package will, by default, be deleted. Set the
environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.

make[1]: *** [Makefile:39: all-start] Error 1
make[1]: Leaving directory '/home/owner/sage'
make: *** [Makefile:13: all] Error 2
=========================================================================
QUESTION: Is this behavior normal? I would think compileable code is stored in the server, not crashing code ???
Is maxima.fas TOO short as the message says, or is it fooled and putting out what it think is the best explanation?
I have tried 5 times to build and keep crashing.
=====================================================================================================
git status shows
owner@localhost:~/sage> git status
On branch rlr_code
Your branch is up to date with 'origin/develop'.

nothing to commit, working tree clean
---------
==================================================
Well, I wanted to make sure that I am starting with clean good code, git believes the code is clean
=========================================================
and git show splashes 106 lines or so:

commit 8ea92d580ab9ead3e7837e81bb9c1e5ed532a26a
Author: Release Manager <rel...@sagemath.org>
Date:   Tue Jan 18 23:01:58 2022 +0100

   Updated SageMath version to 9.5.rc3

diff --git a/.zenodo.json b/.zenodo.json
index 64dd9cb67a..ca0a6f7306 100644
--- a/.zenodo.json
+++ b/.zenodo.json
@@ -1,10 +1,10 @@
{
    "description": "Mirror of the Sage https://sagemath.org/ source tree",  
    "license": "other-open",  
-    "title": "sagemath/sage: 9.5.rc2",  
-    "version": "9.5.rc2",  
+    "title": "sagemath/sage: 9.5.rc3",  
+    "version": "9.5.rc3",  
    "upload_type": "software",  
-    "publication_date": "2022-01-16",  
+    "publication_date": "2022-01-18",  
    "creators": [
        {
            "affiliation": "SageMath.org",  
@@ -15,13 +15,13 @@
    "related_identifiers": [
        {
            "scheme": "url",  
-            "identifier": "https://github.com/sagemath/sage/tree/9.5.rc2",  
+            "identifier": "https://github.com/sagemath/sage/tree/9.5.rc3",  
            "relation": "isSupplementTo"
        },  
        {
            "scheme": "doi",  
            "identifier": "10.5281/zenodo.593563",  
-            "relation": "isVersionOf"
+            "relation": "isNewVersionOf"
        }
    ]
}
diff --git a/VERSION.txt b/VERSION.txt
index 6f87024f7f..8660115d9a 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-SageMath version 9.5.rc2, Release Date: 2022-01-16
+SageMath version 9.5.rc3, Release Date: 2022-01-18
diff --git a/build/pkgs/configure/checksums.ini b/build/pkgs/configure/checksums.ini
index 498f4e9b89..54fd1301fa 100644
--- a/build/pkgs/configure/checksums.ini
+++ b/build/pkgs/configure/checksums.ini
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
-sha1=a3188e8ed188d44268d93955bca15fbf654cbb46
-md5=f88319ed9a442a527fece4cdc90e9118
-cksum=807237979
+sha1=82db5472ac5d29950254ec45b1f448dbc4f8e9f0
+md5=92c171e5c495c2c2f601d49f89cdaa36
+cksum=3258581436
diff --git a/build/pkgs/configure/package-version.txt b/build/pkgs/configure/package-version.txt
index 1d9156829f..96d4948a4a 100644
--- a/build/pkgs/configure/package-version.txt
+++ b/build/pkgs/configure/package-version.txt
@@ -1 +1 @@
-69c93648bc6742ec9b84cafdcb65e49ef0bddaa5
+ad7e1731c0dd97d79084a0c3baa0022ba4cfff69
diff --git a/build/pkgs/sagelib/package-version.txt b/build/pkgs/sagelib/package-version.txt
index ff45140297..825ef9d2db 100644
--- a/build/pkgs/sagelib/package-version.txt
+++ b/build/pkgs/sagelib/package-version.txt
@@ -1 +1 @@
-9.5.rc2
+9.5.rc3
diff --git a/src/VERSION.txt b/src/VERSION.txt
index ff45140297..825ef9d2db 100644
--- a/src/VERSION.txt
+++ b/src/VERSION.txt
@@ -1 +1 @@
-9.5.rc2
+9.5.rc3
diff --git a/src/bin/sage-version.sh b/src/bin/sage-version.sh
index 3b5049389a..fac8ca6138 100644
--- a/src/bin/sage-version.sh
+++ b/src/bin/sage-version.sh
@@ -1,5 +1,5 @@
# Sage version information for shell scripts
# This file is auto-generated by the sage-update-version script, do not edit!
-SAGE_VERSION='9.5.rc2'
-SAGE_RELEASE_DATE='2022-01-16'
-SAGE_VERSION_BANNER='SageMath version 9.5.rc2, Release Date: 2022-01-16'
+SAGE_VERSION='9.5.rc3'
+SAGE_RELEASE_DATE='2022-01-18'
+SAGE_VERSION_BANNER='SageMath version 9.5.rc3, Release Date: 2022-01-18'
diff --git a/src/sage/version.py b/src/sage/version.py
index 80194b4f91..62d1a1b670 100644
--- a/src/sage/version.py
+++ b/src/sage/version.py
@@ -1,5 +1,5 @@
# Sage version information for Python scripts
# This file is auto-generated by the sage-update-version script, do not edit!
-version = '9.5.rc2'
-date = '2022-01-16'
-banner = 'SageMath version 9.5.rc2, Release Date: 2022-01-16'
+version = '9.5.rc3'
+date = '2022-01-18'
+banner = 'SageMath version 9.5.rc3, Release Date: 2022-01-18'
-------------
===========
I don't know if the above information indicates that I have a legitimate error-free copy of sage v 9.5.rc3 ???
I know that git says it runs error free...
but I cannot build ..

I am going to erase the whole folder and start all over again, like bare hard metal on the disk drive

Randall

unread,
Jan 20, 2022, 7:04:22 PM1/20/22
to sage-devel
I erased everything and started all over again and this time carefully logged each step.

owner@localhost:~/sage> cat step_1_logged.txt step_2_logged.txt step_3_logged.txt step_4_logged.txt step_5_logged.txt  [my log files]

owner@localhost:~> git clone https://github.com/sagemath/sage.git
Cloning into 'sage'...
remote: Enumerating objects: 817741, done.
remote: Counting objects: 100% (4025/4025), done.
remote: Compressing objects: 100% (1328/1328), done.
remote: Total 817741 (delta 2719), reused 3917 (delta 2636), pack-reused 813716
Receiving objects: 100% (817741/817741), 279.27 MiB | 10.28 MiB/s, done.
Resolving deltas: 100% (644440/644440), done.
Updating files: 100% (9082/9082), done.
======================================
== So I assume that git downloaded safely
======================================

owner@localhost:~/sage> git checkout develop
Already on 'develop'
Your branch is up to date with 'origin/develop'.
owner@localhost:~/sage> git checkout develop
Already on 'develop'
Your branch is up to date with 'origin/develop'.
======================================================
= I want to be on the develop branch, not origin or master branch
======================================================
owner@localhost:~/sage> vim step_2_logged.txt

[ I am manually creating log files as I go here]

owner@localhost:~/sage> git branch rlr_code
owner@localhost:~/sage> git checkout rlr_code
Switched to branch 'rlr_code'
owner@localhost:~/sage> git branch
[shows]
develop
*rlr_code
owner@localhost:~/sage>  
---------------------------
GOAL: make rlr_code a branch exactly matching "develop" code
=======================================================
= It appears that I made another branch named "rlr_code" which is what I want to do
======================================================================
owner@localhost:~/sage> git status
On branch rlr_code
Untracked files:
 (use "git add <file>..." to include in what will be committed)
       step_1_logged.txt
       step_2_logged.txt
       step_3_logged.txt

nothing added to commit but untracked files present (use "git add" to track)
============================================================================
I believe this report 
=================================
Next I list the directory:

owner@localhost:~/sage> ls

bootstrap  CITATION.cff  configure.ac  docker  Makefile    pkgs                README.md  src                step_2_logged.txt  step_4_logged.txt  VERSION.txt
build      condarc.yml   COPYING.txt   m4      Pipfile.m4  pyrightconfig.json  sage       step_1_logged.txt  step_3_logged.txt  tox.ini

===========================================
= and I double check the file type for the "sage" file
===========================================

owner@localhost:~/sage> file sage
sage: POSIX shell script, ASCII text executable 
======================================
= seems reasonable to me
======================================
owner@localhost:~/sage> ./sage -br
./install: line 12: /home/owner/sage/src/bin/sage-env-config: No such file or directory
Error: Failed to read sage-env-config.  Did you run configure?
owner@localhost:~/sage>
================================
But there is NOT configure in the directory!!!! (see above listing)

It is hard to run configure when configure is NOT present in the directory.

configure.ac is present but that's not the configure file
The internet states:

What is an AC file?

Automatic configuration script produced by GNU Autoconf; automatically configures software source code packages to adapt to several types of Posix-like systems; created by testing a software package for each feature the program might need in order to run a specific system; Autoconf then builds a list of system features that the package requires.

More Information

Autoconf scripts are typically named "configure.ac." The automatic configuration script is created by running the preprocessor program m4 with the configure.ac file as input.

=======================================

== So do I need to run "m4 configure.ac" to create the configure file??

Comment and Suggestion

It is hard to build in git when I have to document each step then go to the internet to find out why things are failing to build.

But I am determined to carefully document ALL of this rather than answer just off the top of my head.

So do I need to run the following steps???

1.  run "m4 configure.ac"

2. run "configure"

3. run "make"

Thanks for responding..

- Randall

William Stein

unread,
Jan 20, 2022, 7:10:42 PM1/20/22
to sage-devel
Follow the steps in the README, e.g., here

https://github.com/sagemath/sage/blob/develop/README.md#instructions-to-build-from-source

None of those steps involve explicitly running m4, so I'm guessing you're
not following them.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/c5cd83cb-15c6-4266-beb8-3378af24d605n%40googlegroups.com.



--
William (http://wstein.org)

Randall

unread,
Jan 21, 2022, 5:33:08 PM1/21/22
to sage-devel
but 2 things already have come up.
The latest download version on the tar ball page is version 9.4 sage.
The latest git clone version is 9.5 rc3, but the instructions on the page using the git clone will create a ~/sage folder not a ~/sage/sage-9.5/ folder as the instructions suggest previous in step #2
I had to download the tarball, do the tar xvf command and put the 9.4 folder underneath the ~/sage folder as the instructions state.
I then moved the ~/sage folder and 9.4 subfolder to ~/newsage to temporary set it there before doing the git clone command in step #2
I then moved ~/sage cloned folder to sage-9.5 folder and then moved ~/newsage to ~/sage and then moved ~/sage-9.5 into this root folder.

This gives me two subfolders ~/sage/sage-9.4/ and ~/sage/sage-9.5/ which is what I expect.

Next I had to run the "make configure" command as stated in step #3 and the following log file was obtained.

owner@localhost:~/sage/sage-9.5> make configure
./bootstrap -d
make[1]: Entering directory '/home/owner/sage/sage-9.5'
rm -rf config configure build/make/Makefile-auto.in
rm -f src/doc/en/installation/*.txt
rm -rf src/doc/en/reference/spkg/*.rst
rm -f src/doc/en/reference/repl/*.txt
rm -f environment.yml
rm -f src/environment.yml
rm -f environment-optional.yml
rm -f src/environment-optional.yml
rm -f src/Pipfile
rm -f src/pyproject.toml
rm -f src/requirements.txt
rm -f src/setup.cfg
make[1]: Leaving directory '/home/owner/sage/sage-9.5'
./bootstrap: installing build/pkgs/sagelib/src/Pipfile-dist
./bootstrap: installing build/pkgs/sagelib/src/Pipfile
./bootstrap: installing build/pkgs/sagelib/src/pyproject.toml
./bootstrap: installing build/pkgs/sagelib/src/requirements.txt
./bootstrap: installing build/pkgs/sagelib/src/setup.cfg
src/doc/bootstrap:92: installing src/doc/en/installation/arch.txt and src/doc/en/installation/arch-optional.txt
src/doc/bootstrap:92: installing src/doc/en/installation/debian.txt and src/doc/en/installation/debian-optional.txt
src/doc/bootstrap:92: installing src/doc/en/installation/fedora.txt and src/doc/en/installation/fedora-optional.txt
src/doc/bootstrap:92: installing src/doc/en/installation/cygwin.txt and src/doc/en/installation/cygwin-optional.txt
src/doc/bootstrap:92: installing src/doc/en/installation/homebrew.txt and src/doc/en/installation/homebrew-optional.txt
src/doc/bootstrap:66: installing environment.yml, environment-optional.yml, src/environment.yml and src/environment-optional.yml
src/doc/bootstrap:103: installing src/doc/en/reference/spkg/*.rst
src/doc/bootstrap:184: installing src/doc/en/reference/repl/options.txt
bootstrap:74: installing 'config/config.rpath'
configure.ac:57: installing 'config/compile'
configure.ac:57: installing 'config/config.guess'
configure.ac:57: installing 'config/config.sub'
configure.ac:43: installing 'config/install-sh'
configure.ac:43: installing 'config/missing'
owner@localhost:~/sage/sage-9.5>

I did one more command to check out the code
~/sage/sage-9.5:  and the system responded:

owner@localhost:~/sage/sage-9.5> git checkout develop
Already on 'develop'
Your branch is up to date with 'origin/develop'.
owner@localhost:~/sage/sage-9.5>
-------------
I am happy with this now, and we can see that configure file is now present in the directory
I will start with the 9.4 version and build it first, then change to the 9.5 version (carefully redirecting the SAGE_ROOT and SAGE_LOCAL variables accordingly)

- Randall

Samuel Lelievre

unread,
Jan 22, 2022, 8:27:49 AM1/22/22
to sage-devel
2022-01-21 à 22:33:08 UTC, Randall on sage-devel:

> I am carefully following the steps at

> but 2 things already have come up.
>
> The latest download version on the tar ball page
> is version 9.4 sage.

For development releases see the "download latest" page:
https://www.sagemath.org/download-latest.html


> The latest git clone version is 9.5 rc3, but the instructions
> on the page using the git clone will create a ~/sage folder
> not a ~/sage/sage-9.5/ folder as the instructions suggest
> previous in step #2
> I had to download the tarball, do the tar xvf command and
> put the 9.4 folder underneath the ~/sage folder as the
> instructions state.
> I then moved the ~/sage folder and 9.4 subfolder to
> ~/newsage to temporary set it there before doing the
> git clone command in step #2
> I then moved ~/sage cloned folder to sage-9.5 folder
> and then moved ~/newsage to ~/sage and then moved
> ~/sage-9.5 into this root folder.
>
> This gives me two subfolders ~/sage/sage-9.4/ and
> ~/sage/sage-9.5/ which is what I expect.
>
> Next I had to run the "make configure" command as stated
> in step #3 and the following log file was obtained.
>
> I did one more command to check out the code
>
> ~/sage/sage-9.5> git checkout develop
> Already on 'develop'
> Your branch is up to date with 'origin/develop'.
>
> I am happy with this now, and we can see that configure
> file is now present in the directory
> I will start with the 9.4 version and build it first, then change
> to the 9.5 version (carefully redirecting the SAGE_ROOT
> and SAGE_LOCAL variables accordingly)

To check what branch you are on and what commit it is at:
```
$ git branch -vv
```
If you are on branch develop and want to get the latest develop
```
$ git pull origin develop --tags
```



Reply all
Reply to author
Forward
0 new messages