Error building Sage 9.6 due to openssl

140 views
Skip to first unread message

Max Kölbl

unread,
Jul 19, 2022, 4:51:16 AM7/19/22
to sage-devel
Hello everyone!

While running the 'make' command in cygwin on my Windows 8 laptop, I received the following output.

[openssl-3.0.4] ************************************************************************
[openssl-3.0.4] Error installing package openssl-3.0.4
[openssl-3.0.4] ************************************************************************
[openssl-3.0.4] Please email sage-devel (http://groups.google.com/group/sage-devel)
[openssl-3.0.4] explaining the problem and including the log files
[openssl-3.0.4]   /home/Ray/sage/sage/logs/pkgs/openssl-3.0.4.log
[openssl-3.0.4] and
[openssl-3.0.4]   /home/Ray/sage/sage/config.log
[openssl-3.0.4] Describe your computer, operating system, etc.
[openssl-3.0.4] If you want to try to fix the problem yourself, *don't* just cd to
[openssl-3.0.4] /home/Ray/sage/sage/local/var/tmp/sage/build/openssl-3.0.4 and type 'make' or whatever is appropriate.
[openssl-3.0.4] Instead, the following commands setup all environment variables
[openssl-3.0.4] correctly and load a subshell for you to debug the error:
[openssl-3.0.4]   (cd '/home/Ray/sage/sage/local/var/tmp/sage/build/openssl-3.0.4' && '/home/Ray/sage/sage/sage' --buildsh)
[openssl-3.0.4] When you are done debugging, you can type "exit" to leave the subshell.
[openssl-3.0.4] ************************************************************************
make[4]: *** [Makefile:2858: openssl-SAGE_LOCAL-no-deps] Error 1
make[3]: *** [Makefile:2858: /home/Ray/sage/sage/local/var/lib/sage/installed/openssl-3.0.4] Error 2
make[2]: *** [Makefile:2562: all-start] Error 2
make[2]: Leaving directory '/home/Ray/sage/sage/build/make'

real    346m50.600s
user    35m57.071s
sys     30m16.874s
***************************************************************
Error building Sage.

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

* package:         openssl-3.0.4
  last build time: Jul 19 17:04
  log file:        /home/Ray/sage/sage/logs/pkgs/openssl-3.0.4.log
  build directory: /home/Ray/sage/sage/local/var/tmp/sage/build/openssl-3.0.4

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:40: all-start] Error 1
make[1]: Leaving directory '/home/Ray/sage/sage'
make: *** [Makefile:13: all] Error 2

Attached, you will find the logfile.

Thank you very much in advance!

Max
openssl-3.0.4.log

Matthias Koeppe

unread,
Jul 19, 2022, 1:41:27 PM7/19/22
to sage-devel
"configure" should have printed advice on what system packages to install. See config.log

Max Kölbl

unread,
Jul 21, 2022, 9:11:54 AM7/21/22
to sage-devel
Thank you very much for your advice!
I looked at config.log, ran the commands recommended there.
Apparently it had not worked properly before (which I didn't realise).
I ran "configure" again and now I get "exit 0".
So I ran "make" again, but the failed version of openssl is still there.

Could you please help me fix it?
I attached the config.log in case it is useful.
The openssl-log has not changed.

Thank you very much in advance!

Max

config.log

Samuel Lelievre

unread,
Jul 23, 2022, 10:01:07 AM7/23/22
to sage-devel
You could try this:
```
make openssl-clean openssl-uninstall
make configure
./configure
make
```

Max Kölbl

unread,
Jul 24, 2022, 1:01:08 PM7/24/22
to sage-devel
Thanks! I gave it a shot but unfortunately it still didn't work.

However, the reasons are strange because now python3 seems to be the culprit.
Perhaps relevant: I installed openssl via apt-cyg and it seems like 'make' is not trying to build openssl anymore.
Perhaps also relevant: python3 is installed on my machine, but it's Python 3.9.10 whereas Sage seems to require Python 3.10.5. But cygwin doesn't seem to have it: https://cygwin.com/packages/summary/python3.html

I attached the config log and the python log.

Once again, thank you very much in advance!
config.log
python3-3.10.5.log

Matthias Koeppe

unread,
Jul 24, 2022, 1:34:53 PM7/24/22
to sage-devel
On Sunday, July 24, 2022 at 10:01:08 AM UTC-7 max.w....@gmail.com wrote:
Thanks! I gave it a shot but unfortunately it still didn't work.

However, the reasons are strange because now python3 seems to be the culprit.
Perhaps relevant: I installed openssl via apt-cyg and it seems like 'make' is not trying to build openssl anymore.
Perhaps also relevant: python3 is installed on my machine, but it's Python 3.9.10 whereas Sage seems to require Python 3.10.5.

No, Sage accepts any system Python >= 3.8. 
 
But cygwin doesn't seem to have it: https://cygwin.com/packages/summary/python3.html

I attached the config log and the python log.

In your config.log one can see that system python3 is not rejected because of a version check:
## -------------------------------------------------------- ## 
## Checking whether SageMath should install SPKG python3... ## 
## -------------------------------------------------------- ## 
configure:34869: checking whether any of bzip2 liblzma libffi is installed as or will be installed as SPKG 
configure:34874: result: yes; install python3 as well 
configure:36263: no suitable system package found for SPKG python3



Max Kölbl

unread,
Jul 24, 2022, 6:49:40 PM7/24/22
to sage-devel
Thank you very much for your reply!

> No, Sage accepts any system Python >= 3.8.

Okay, that's good to know.

> In your config.log one can see that system python3 is not rejected because of a version check:
> ## -------------------------------------------------------- ## 
> ## Checking whether SageMath should install SPKG python3... ## 
> ## -------------------------------------------------------- ## 
> configure:34869: checking whether any of bzip2 liblzma libffi is installed as or will be installed as SPKG 
> configure:34874: result: yes; install python3 as well 
> configure:36263: no suitable system package found for SPKG python3

I see. Does that mean that the install script can't find my python3?
Is there any path variable that I should change? If not, how do I find out what's broken?
I apologise in advance if these questions are naive; I'm quite new new all this.

Thanks very much in advance!

Dima Pasechnik

unread,
Jul 24, 2022, 6:54:33 PM7/24/22
to sage-devel
On Mon, Jul 25, 2022 at 12:49 AM Max Kölbl <max.w....@gmail.com> wrote:
>
> Thank you very much for your reply!
>
> > No, Sage accepts any system Python >= 3.8.
>
> Okay, that's good to know.
>
> > In your config.log one can see that system python3 is not rejected because of a version check:
> > ## -------------------------------------------------------- ##
> > ## Checking whether SageMath should install SPKG python3... ##
> > ## -------------------------------------------------------- ##
> > configure:34869: checking whether any of bzip2 liblzma libffi is installed as or will be installed as SPKG
> > configure:34874: result: yes; install python3 as well
> > configure:36263: no suitable system package found for SPKG python3
>
> I see. Does that mean that the install script can't find my python3?

no, read what it says:
configure:34869: checking whether any of bzip2 liblzma libffi is
installed as or will be installed as SPKG
configure:34874: result: yes; install python3 as well

it says that one of the the Cygwin packages: bzip2, or liblzma, or
libffi is not installed, and
this is the reason that the system Python3 cannot be used.

You need to install bzip2 liblzma libffi
and try running ./configure again

> Is there any path variable that I should change? If not, how do I find out what's broken?
> I apologise in advance if these questions are naive; I'm quite new new all this.
>
> Thanks very much in advance!
>
> Matthias Koeppe schrieb am Montag, 25. Juli 2022 um 02:34:53 UTC+9:
>>
>> On Sunday, July 24, 2022 at 10:01:08 AM UTC-7 max.w....@gmail.com wrote:
>>>
>>> Thanks! I gave it a shot but unfortunately it still didn't work.
>>>
>>> However, the reasons are strange because now python3 seems to be the culprit.
>>> Perhaps relevant: I installed openssl via apt-cyg and it seems like 'make' is not trying to build openssl anymore.
>>> Perhaps also relevant: python3 is installed on my machine, but it's Python 3.9.10 whereas Sage seems to require Python 3.10.5.
>>
>>
>> No, Sage accepts any system Python >= 3.8.
>>
>>>
>>> But cygwin doesn't seem to have it: https://cygwin.com/packages/summary/python3.html
>>>
>>> I attached the config log and the python log.
>>
>>
>> In your config.log one can see that system python3 is not rejected because of a version check:
>> ## -------------------------------------------------------- ##
>> ## Checking whether SageMath should install SPKG python3... ##
>> ## -------------------------------------------------------- ##
>> configure:34869: checking whether any of bzip2 liblzma libffi is installed as or will be installed as SPKG
>> configure:34874: result: yes; install python3 as well
>> configure:36263: no suitable system package found for SPKG python3
>>
>>
>>
> --
> 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/fdfbc9c7-4a45-48f1-8b61-931eeca8b5b4n%40googlegroups.com.

Samuel Lelievre

unread,
Jul 24, 2022, 8:17:47 PM7/24/22
to sage-devel
Install the relevant cygwin packages:
```
$ apt-cyg install bzip2 libbz2-devel liblzma-devel libffi-devel xz
```
Clean up the corresponding Sage packages:
```
$ make bzip2-clean liblzma-clean libffi-clean xz-clean

Then configure again:
```
$ make configure
$ ./configure
```

Follow any recommendations at end of configure output.

Finally decide number of parallel jobs
```
$ export MAKE='make -j8'
```
and run make again:
```
$ make -s V=0
```

Max Kölbl

unread,
Jul 26, 2022, 4:18:37 AM7/26/22
to sage-devel
Thank you very much for your help!
That helped. Sage is now *almost* completely installed.
However, now a different problem appeared.
While installing the docs, the following error occured:

>[reference] /home/Ray/sage/sage/src/doc/en/reference/index.rst:34: WARNING: unknown document: categories/index
>[reference] /home/Ray/sage/sage/src/doc/en/reference/index.rst:76: WARNING: unknown document: groups/index
>[reference] /home/Ray/sage/sage/src/doc/en/reference/index.rst:79: WARNING: unknown document: algebras/index
>[reference] /home/Ray/sage/sage/src/doc/en/reference/index.rst:84: WARNING: unknown document: combinat/index
>[reference] /home/Ray/sage/sage/src/doc/en/reference/index.rst:85: WARNING: unknown document: graphs/index
>[reference] /home/Ray/sage/sage/src/doc/en/reference/index.rst:89: WARNING: unknown document: coding/index
>[reference] /home/Ray/sage/sage/src/doc/en/reference/index.rst:105: WARNING: unknown document: knots/index
>[reference] /home/Ray/sage/sage/src/doc/en/reference/index.rst:157: WARNING: unknown document: libs/index
>[reference] The inventory files are in ../../local/share/doc/sage/inventory/en/reference.
>Error building the documentation.
>Traceback (most recent call last):
>  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
>    return _run_code(code, main_globals, None,
>  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
>    exec(code, run_globals)
>  File "/home/Ray/sage/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage_docbuild/__main__.py", line 500, in <module>
>    sys.exit(main())
>  File "/home/Ray/sage/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage_docbuild/__main__.py", line 497, in main
>    builder()
>  File "/home/Ray/sage/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage_docbuild/builders.py", line 167, in f
>    runsphinx()
>  File "/home/Ray/sage/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage_docbuild/sphinxbuild.py", line 327, in runsphinx
>    sys.stderr.raise_errors()
>  File "/home/Ray/sage/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage_docbuild/sphinxbuild.py", line 263, in raise_errors
>    raise OSError(self._error)
>OSError: /home/Ray/sage/sage/src/doc/en/reference/index.rst:34: WARNING: unknown document: categories/index
>
>    Note: incremental documentation builds sometimes cause spurious
>    error messages. To be certain that these are real errors, run
>    "make doc-clean doc-uninstall" first and try again.
>make[6]: *** [Makefile:27: doc-inventory--reference_top] Error 1
>make[5]: *** [Makefile:45: doc-inventory-reference] Error 2

I tried
```
$make doc-clean doc-uninstall
$make configure
$./configure
$make -s V=0
```
and it raised the same error (log file is attached).
It appears that some of the docs are not building completely; this is a part of the log:
>[knots    ] building [inventory]: targets for 4 source files that are out of date
>[knots    ] updating environment: [new config] 4 added, 0 changed, 0 removed
>[lfunction] building [inventory]: targets for 5 source files that are out of date
>[lfunction] updating environment: [new config] 5 added, 0 changed, 0 removed
>[lfunction] The inventory files are in ../../local/share/doc/sage/inventory/en/reference/lfunctions.
>Build finished. The built documents can be found in /home/Ray/sage/sage/local/share/doc/sage/inventory/en/reference/lfunctions
And later I get this:
>[reference] /home/Ray/sage/sage/src/doc/en/reference/index.rst:105: WARNING: unknown document: knots/index

What is the best thing to do there?
It's the same packages that cause the trouble in both runs.

Thank you very much in advance!

Max
sagemath_doc_html-none.log

Dima Pasechnik

unread,
Jul 26, 2022, 5:10:20 AM7/26/22
to sage-devel
documentation building is currently broken on Cygwin.

instead of running 'make', run 'make build'.

Anyhow, you probably have mostly functional Sage installation now.



--
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.

Max Kölbl

unread,
Jul 26, 2022, 10:05:34 AM7/26/22
to sage-devel
Ah okay, that's good to know. I probably won't need that feature in the near future anyway.
But thank you; I ran `make build` and finally the process terminated without a fatal error.

I also ran it and it works fine now.
Reply all
Reply to author
Forward
0 new messages