#32954 closed defect (fixed)

sage.libs.singular: On cygwin, do not try to reload the singular library

Reported by: mkoeppe Owned by:
Priority: blocker Milestone: sage-9.5
Component: porting: Cygwin Keywords:
Cc: mjo, slelievre, dimpase Merged in:
Authors: Matthias Koeppe Reviewers: Michael Orlitzky
Report Upstream: N/A Work issues:
Branch: 7e8b42f (Commits, GitHub, GitLab) Commit: 7e8b42fc70ee8c254934bfc90b1c2704e68d5bcd
Dependencies: #32944, #32945 Stopgaps:

Status badges

Description (last modified by mkoeppe)

(split out from #32789)

#29024 broke Cygwin. With singular from SPKG (as the cygwin-provided Singular is too old and is correctly rejected), as reported in https://groups.google.com/g/sage-release/c/FXpakLURP_0/m/La20cB4rBgAJ:

  [sagemath_doc_html-none]     File "sage/libs/singular/singular.pyx", line 1555, in init sage.libs.singular.singular (build/cythonized/sage/libs/singular/singular.cpp:15622)
  [sagemath_doc_html-none]     File "sage/libs/singular/singular.pyx", line 1530, in sage.libs.singular.singular.init_libsingular (build/cythonized/sage/libs/singular/singular.cpp:12925)
  [sagemath_doc_html-none]   ImportError: cannot load Singular library from /home/s/sage9n/local/bin/libSingular.dll (b'No such file or directory')
  [sagemath_doc_html-none]   Error: './sage --docbuild --all-documents' failed

On the cygwin platform, there is no need to make library symbols global.

This sidesteps the issue of determining the correct DLL file name in #32789.

The branch is on top of other Cygwin fixes for convenience of testing.

Change History (10)

comment:1 Changed 14 months ago by mkoeppe

Status: newneeds_review

comment:2 Changed 14 months ago by mkoeppe

Reviewers: https://github.com/sagemath/sagetrac-mirror/runs/4381311754

comment:3 Changed 14 months ago by mkoeppe

Description: modified (diff)

comment:4 Changed 14 months ago by mjo

Can you also remove the two cygwin-specific cases in spkg-configure.m4?

comment:5 Changed 14 months ago by git

Commit: 3d4f91b09d4f1e7b998fe9fb056657ac6e7cbdb97e8b42fc70ee8c254934bfc90b1c2704e68d5bcd

Branch pushed to git repo; I updated commit sha1. New commits:

7e8b42fpkgs/singular/spkg-configure.m4: On Cygwin, do not determine LIBSINGULAR_PATH

comment:6 Changed 14 months ago by mjo

Reviewers: https://github.com/sagemath/sagetrac-mirror/runs/4381311754Michael Orlitzky
Status: needs_reviewpositive_review

I wonder what, if anything, goes wrong on Linux/OSX if we skip the dlopen(). There isn't much of an explanation in the code. Maybe the whole thing is some crazy corner case.

comment:7 Changed 14 months ago by mkoeppe

Thanks.

comment:8 Changed 14 months ago by slelievre

With this branch, the sagemath_doc_html-none build failure no longer seems to involve Singular.

$ make -s V=0 ptestlong
...
[sagemath_doc_html-none] installing. Log file: /home/s/sage9m/logs/pkgs/sagemath_doc_html-none.log
  [sagemath_doc_html-none] error installing, exit status 2. End of log file:
  [sagemath_doc_html-none]   [reference]     sat: 0 todos, 8 index, 4 citations, 7 modules
  [sagemath_doc_html-none]   [reference]     schemes: 5 todos, 53 index, 0 citations, 52 modules
  [sagemath_doc_html-none]   [reference]     semirings: 0 todos, 3 index, 0 citations, 2 modules
  [sagemath_doc_html-none]   [reference]     sets: 4 todos, 19 index, 0 citations, 18 modules
  [sagemath_doc_html-none]   [reference]     spkg: 0 todos, 341 index, 0 citations, 0 modules
  [sagemath_doc_html-none]   [reference]     stats: 0 todos, 11 index, 0 citations, 10 modules
  [sagemath_doc_html-none]   [reference]     structure: 7 todos, 32 index, 0 citations, 31 modules
  [sagemath_doc_html-none]   [reference]     tensor_free_modules: 2 todos, 19 index, 0 citations, 15 modules
  [sagemath_doc_html-none]   [reference]     topology: 0 todos, 14 index, 0 citations, 13 modules
  [sagemath_doc_html-none]   [reference]     valuations: 1 todos, 14 index, 0 citations, 13 modules
  [sagemath_doc_html-none]   [reference] ... done (358 todos, 2093 index, 1442 citations, 1730 modules)
  [sagemath_doc_html-none]   [reference] WARNING: Unable to fetch /home/s/sage9m/local/share/doc/sage/doctrees/en/reference/combinat/environment.pickle
  [sagemath_doc_html-none]   [reference] WARNING: Unable to fetch /home/s/sage9m/local/share/doc/sage/doctrees/en/reference/manifolds/environment.pickle
  [sagemath_doc_html-none]   [reference] preparing documents... skipping loading of indexes... done
  [sagemath_doc_html-none]   [reference] /home/s/sage9m/src/doc/en/reference/index.rst:85: WARNING: unknown document: combinat/index
  [sagemath_doc_html-none]   [reference] /home/s/sage9m/src/doc/en/reference/index.rst:102: WARNING: unknown document: manifolds/index
  [sagemath_doc_html-none]   [reference] The inventory files are in local/share/doc/sage/inventory/en/reference.
  [sagemath_doc_html-none]   Error building the documentation.
  [sagemath_doc_html-none]   Traceback (most recent call last):
  [sagemath_doc_html-none]     File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
  [sagemath_doc_html-none]       return _run_code(code, main_globals, None,
  [sagemath_doc_html-none]     File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
  [sagemath_doc_html-none]       exec(code, run_globals)
  [sagemath_doc_html-none]     File "/home/s/sage9m/local/var/lib/sage/venv-python3.8/lib/python3.8/site-packages/sage_docbuild/__main__.py", line 2, in <module>
  [sagemath_doc_html-none]       main()
  [sagemath_doc_html-none]     File "/home/s/sage9m/local/var/lib/sage/venv-python3.8/lib/python3.8/site-packages/sage_docbuild/__init__.py", line 1815, in main
  [sagemath_doc_html-none]       builder()
  [sagemath_doc_html-none]     File "/home/s/sage9m/local/var/lib/sage/venv-python3.8/lib/python3.8/site-packages/sage_docbuild/__init__.py", line 133, in f
  [sagemath_doc_html-none]       runsphinx()
  [sagemath_doc_html-none]     File "/home/s/sage9m/local/var/lib/sage/venv-python3.8/lib/python3.8/site-packages/sage_docbuild/sphinxbuild.py", line 323, in runsphinx
  [sagemath_doc_html-none]       sys.stderr.raise_errors()
  [sagemath_doc_html-none]     File "/home/s/sage9m/local/var/lib/sage/venv-python3.8/lib/python3.8/site-packages/sage_docbuild/sphinxbuild.py", line 258, in raise_errors
  [sagemath_doc_html-none]       raise OSError(self._error)
  [sagemath_doc_html-none]   OSError: WARNING: Unable to fetch /home/s/sage9m/local/share/doc/sage/doctrees/en/reference/combinat/environment.pickle
  [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" first and try again.
  [sagemath_doc_html-none]   make[6]: *** [Makefile:20: doc-inventory--reference_top] Error 1
  [sagemath_doc_html-none]   make[5]: *** [Makefile:38: doc-inventory-reference] Error 2
  [sagemath_doc_html-none] Full log file: /home/s/sage9m/logs/pkgs/sagemath_doc_html-none.log
make[4]: *** [Makefile:2789: sagemath_doc_html-SAGE_DOCS-no-deps] Error 2
make[3]: *** [Makefile:2789: /home/s/sage9m/local/var/lib/sage/installed/sagemath_doc_html-none] Error 2
make[2]: *** [Makefile:2332: all-start] Error 2

real    670m5.381s
user    1085m16.267s
sys     293m31.592s
***************************************************************
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: *** [Makefile:13: all] Error 2

comment:9 Changed 14 months ago by mkoeppe

Yes, there are some other issues on Cygwin that now become visible. The actual error is further up in the log file sagemath_doc_html-none.log

comment:10 Changed 14 months ago by vbraun

Branch: u/mkoeppe/fix_spkg_configure_m4_for_singular7e8b42fc70ee8c254934bfc90b1c2704e68d5bcd
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.