building documentation: says I should use a sage shell, but i am

48 views
Skip to first unread message

Matthew Lancellotti

unread,
Jun 17, 2018, 7:08:00 PM6/17/18
to sage-support
I am trying to build documentation for my own sage project on my sage server.  I get the error

$ sage -sh -c "make html"
sphinx-build -b html -d build/doctrees   source build/html
Running Sphinx v1.6.3
making output directory...
Exception occurred:
  File "conf.py", line 30, in <module>
RuntimeError: to build the documentation you need to be inside a Sage shell (run first the command 'sage -sh' in a shell
The full traceback has been saved in /tmp/sphinx-err-ajlNRU.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
Setting permissions of DOT_SAGE directory so only you can read and write it.
make: *** [html] Error 1

This is a very surprising error!  It works fine on my local machine, but not on my server.  My Travis server is running the following script to build the documentation (ignore the dashes):

- uname -a
- DIR_REPO=$(pwd)
- DIR_INSTALL="${DIR_REPO}"/temp-install-sage
- mkdir "${DIR_INSTALL}"
- cd "${DIR_INSTALL}"
- FILE_NAME="sage-8.2-Ubuntu_16.04-x86_64.tar.bz2"
- tar -xf "${FILE_NAME}"
- sudo ln -s "${DIR_INSTALL}"/SageMath/sage /usr/local/bin/sage
- sage --version
- sage --version
- sage -pip install sphinxcontrib-websupport
- cd "${DIR_REPO}"/docs
- sage -sh -c "make html"

Happy to provide more info if you need it!

Matthew Lancellotti

unread,
Jun 17, 2018, 10:22:32 PM6/17/18
to sage-support
I am able to get around the first error by commenting out the try catch loop in conf.py:

# try:
#    import sage.all
# except ImportError:
#    raise RuntimeError("to build the documentation you need to be inside a Sage shell (run first the command 'sage -sh' in a shell")

Then sphinx runs, but hits the following error:

ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.23' not found (required by /home/travis/build/MareoRaft/k_combinat_for_sage/temp-install-sage/SageMath/local/lib/../lib64/libquadmath.so.0)

any ideas of how to install GLIBC_2.23?

Matthew Lancellotti

unread,
Jun 17, 2018, 11:54:05 PM6/17/18
to sage-support
Every closer, I am now installing the http://mirrors.mit.edu/sage/linux/64bit/sage-7.6-Ubuntu_14.04-x86_64.tar.bz2 version of sage, which seems like the right thing to do because my server is running Ubuntu_14.04, but now I run into the following error:

ImportError: libgfortran.so.3: cannot open shared object file: No such file or directory

I think this could be as easy as stealing the appropriate file from another computer and putting it into the correct location on my Travis server.

slelievre

unread,
Jun 18, 2018, 5:25:51 AM6/18/18
to sage-support
Mon 2018-06-18 03:54:05 UTC, Matthew Lancellotti:

> Every closer, I am now installing the
> version of sage, which seems like the right thing to do because my
> server is running Ubuntu_14.04, but now I run into the following error:
>
>   ImportError: libgfortran.so.3: cannot open shared object file:
>   No such file or directory
>
> I think this could be as easy as stealing the appropriate file from another
> computer and putting it into the correct location on my Travis server.

The installation instructions recommend some prerequisites,
whether you install from source or from binaries.


In particular, you need gfortran to be installed, and under
Ubuntu you can achieve that by running in a terminal:

    sudo apt install gfortran

Jeroen Demeyer

unread,
Jun 19, 2018, 4:02:58 AM6/19/18
to sage-s...@googlegroups.com
On 2018-06-18 05:54, Matthew Lancellotti wrote:
> sage-7.6-Ubuntu_14.04-x86_64.tar.bz2

Do you have a good reason to use an outdated version of Sage? Version
8.2 has been released.

Jeroen Demeyer

unread,
Jun 19, 2018, 4:21:52 AM6/19/18
to sage-s...@googlegroups.com
On 2018-06-18 04:22, Matthew Lancellotti wrote:
> I am able to get around the first error by commenting out the try catch
> loop in conf.py:

Which conf.py file are you talking about?

Reply all
Reply to author
Forward
0 new messages