-
Notifications
You must be signed in to change notification settings - Fork 26
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
sci-mathematics/sage-7.5.1[doc] - AssertionError: len(context) = 1 #451
Comments
Apparently I found out how to run the build: cd /var/tmp/portage/sci-mathematics/sage-7.5.1/work/sage-7.5.1/src-python2_7
bash
. ../../../temp/environment
PYTHONPATH="$PWD/build/lib:$PWD" python2 sage_setup/docbuild/__main__.py --no-pdf-links all html This does reproduce both the building of documentation in what appears to be from scratch and the eventual assertion error. By the way, I see my build running on 5 processes, with 2.5G of resident memory each. Do we really need this much memory? If so, we should probably have the ebuild check it's available (like other heavy duty builds do, e.g. webkit, chromium, libre office iirc). Otherwise we might want to (provide a way to) tone this down a bit, at the expense of longer build times. OK, I hacked into my So the sphinx ebuild should be updated to depend on docutils prior to 0.13. I can write a pull request for this. I'll also open a Gentoo bug report (or pull request) to this effect, since ebuilds from the main portage tree appear to be affected as well. |
Thanks for that work. The memory consumption for building the documentation is a known issue in sage upstream. We don't really have a clue. But that is an argument for me providing pre-built documentation - and making it the default option - that I had forgotten. |
Ah yes, pre-build information would be an adequate solution to the memory consumption issue. The way I see this, the sphinx build maintains some 2G worth of information in its in-memory data structures from reading the sources, and it maintains a pool of workers forked from a process with this much memory consumption so they each get a copy of all that bulk. There has to be a control somewhere to tune the number of workers. Likely somewhere in Anyway, my build now made it to the install phase, so things seem to work now. I haven't decided whether I want a bug report for Gentoo main tree, or a pull request backporting the fixes like I did in #452, or just a pull request to express the incompatibility. Probably the last one, I guess. |
Sage doesn't have much control about that. We talked about this issue with grand-upstream (sphinx). It is possible to reduce the memory somewhat (by deleting some caches), but that would only gain a few hundred MB of memory. In the end, you need the whole documentation of Sage in memory at some point, and due to the inefficient data structures used by grand-grand-upstream (docutils), this needs a lot of memory. |
@gagern have you any idea about https://groups.google.com/forum/#!msg/sage-packaging/4W6Lui3Dvyg/Lbg6IGHYBQAJ ? I ask in case you have seen it while debugging. |
@jdemeyer: My concern was because the ebuild sets @kiwifb: You mean that
|
On 25/01/2017, at 23:40, Martin von Gagern ***@***.***> wrote:
mpn/.libs/addmul_2.o: In function `__gmpn_addmul_2':
addmul_2.as:(.text+0x0): multiple definition of `__gmpn_addmul_2'
mpn/.libs/redc_2.o:…/sage/local/var/tmp/sage/build/mpir-2.7.2/src/mpn/redc_2.c:38: first defined here
collect2: error: ld returned 1 exit status
Looks like https://bugs.gentoo.org/show_bug.cgi?id=604764 to me.
Since you are on ~arch you would have the nasty version of sed.
I don’t remember a matching issue on trac but there should be.
|
Indeed, it's |
After downgrading sphinx to 1.4.4::sage-on-gentoo in response to #450, I encounter a different error while building the documentation:
The mentioned log file contains
That error message appears to indicate some inbalance while traversing the document using a visitor. I couldn't reproduce the problem on the command line because I couldn't get the build started:
Not sure how the ebuild does this differently; even importing the
environment
didn't make this succeed. So I triedebuild …/sage-7.5.1.ebuild compile
. This does seem to do a lot of that doc-building over again, instead of just picking up where the former run left off. By chance I spotted an error message which did not prevent the build from continuing:The Sage build appears to consume several gigabytes of memory. OK, I did have a Sage computation running which consumed some 9G of memory. I'm not sure whether the fact that this command failed got handled by not creating more threads, or whether this causes part of the documentation to be missing unnoticed. Or whether this is the reason that my sage build appears to be hung now… So I started the build from scratch, and can reproduce the
AssertionError
. Strange!The text was updated successfully, but these errors were encountered: