-
-
Notifications
You must be signed in to change notification settings - Fork 519
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
Fix building html documentation on macOS #30351
Comments
comment:4
Erik (in cc) was the last who changed parallel docbuild. If noone understands the parallel docbuild system, it might be tempting to dump it, and replace by a straight sphinx build. The current system looks like something inviting trouble, with explicit checks for OS flags, etc etc. |
comment:5
Not related to parallel docbuild a priori: I was always building with Homebrew-related. See below two trials on a MacBook Air (early 2014) with macOS 10.14.6 Mojave. The error occurs when using Homebrew packages:
It does not occur when using the least system things possible:
Next piece of fun could be: isolate which Homebrew package causes trouble. |
comment:6
The problem goes away if I do
(I have Homebrew packages for these installed.) Note that
triggers building both openblas and gsl. Note also that gsl fails to build with
The log file complains
So I don't know if it's Homebrew's openblas or gsl that's causing the problem. Actually, I really don't understand the
The confusing part: if I instead do |
comment:7
Given my problems with Can anyone else verify? |
comment:8
At which point during the docbuild does it hang? Does |
comment:9
I think I have reproduced the bug on my system.
and then interrupting when it has stalled shows that it's in |
comment:10
I'm hoping that people who know about It hangs in It needs to be investigated whether one of the worker processes hangs and therefore |
comment:11
Replying to @mkoeppe:
This seems to be the case. Easier to test by setting
|
comment:12
I don't have time over the next few days, but two potential parallel lines of investigation: why do Homebrew's openblas combined with #29766 cause this? And are there problems in the rst source for constructions and thematic_tutorials that, if fixed, could avoid this issue? |
comment:13
Some superficial debugging revealed the following: The worker process is stuck with all threads waiting in Some directions to explore:
|
comment:14
This is not good:
|
comment:15
Yes, giac link to gslcblas if it can find it by default when gsl is enabled. Even if you provide a blas/lapack. A long time ago I rewrote that part of the |
Changed keywords from none to macos, openblas, glsblas, giac |
Changed keywords from macos, openblas, glsblas, giac to none |
comment:17
The patch didn't include anything about cblas because I don't think cblas is used in giac's code, it is only pulled by libgsl which need a cblas. If you link libgsl against a cblas it should all work whatever it is without providing it for linking to libgiac. |
comment:18
homebrew's libgsl is underlinked and can be linked against openblas.
|
comment:19
Probably best to take care of this on the giac upgrade ticket #29552 |
comment:20
I never tried it, is it possible to override .pc defined variable by environment variables? I would guess not but that would be interesting. |
comment:21
We already take care of the gsl.pc file by installing a patched version in $SAGE_LOCAL/lib/pkgconfig. So only libraries that do not use pkgconfig can still fall into the gslblas trap |
comment:22
Just for the record
|
comment:23
Sure, but the problem is of course that the pkg-config invocation is usually in a package's |
comment:24
Replying to @mkoeppe:
Unfortunately you are right. It is even less useful than I thought it could be. |
comment:66
The question is whether allowing |
comment:67
I think adding doctests would be good. For me, though, running doctests on the file |
comment:68
The problem is that Sage (and Python - cf. attachment :-)) contains multiprocessing/parallel stuff which uses fork(), and thus does not play well with extension modules, e.g. numpy, which may use OpenMP (in particular an implementation of OpenMP that is not fork-safe, such as libgopenmp). So in principle this means that Sage was already broken years ago :-) I think that in addition to the patch at comment:65, some docs should be updated to reflect the issue. |
comment:69
I tried --- a/src/bin/sage-runtests
+++ b/src/bin/sage-runtests
@@ -27,6 +27,9 @@ def _get_optional_defaults():
if __name__ == "__main__":
+ import multiprocessing
+ multiprocessing.set_start_method('spawn')
+
parser = optparse.OptionParser()
def optional_argument(option, opt_str, value, parser, typ, default_arg): instead of
This is due to similar problem pops up trying |
Changed work issues from ensure OMP_NUM_THREADS=1 to none |
Reviewer: John Palmieri |
Author: Dima Pasechnik |
Changed branch from public/ticket/30351public/ticket/30351 to public/ticket/30351 |
Commit: |
New commits:
|
comment:72
to try this on home-brew, one needs to install a fresh openblas, which in turn needs #29456 (that's why I put the latter In deps, it's not yet in beta) |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:75
rebased over beta10 |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:77
This works for me (although I didn't use #29552). |
comment:78
while running
but the tests pass independently, e.g.,
So for me it's ok too. Thank you all ! |
Changed branch from public/ticket/30351 to |
Building html documentation fails on macOS for Sage 9.2.beta8.
Initial report:
Depends on #29552
CC: @jhpalmieri @slel @embray @kiwifb @kwankyu @tscrim @fchapoton @vbraun
Component: build
Author: Dima Pasechnik
Branch/Commit:
4b11a70
Reviewer: John Palmieri
Issue created by migration from https://trac.sagemath.org/ticket/30351
The text was updated successfully, but these errors were encountered: