Skip to content
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

To determine GAP_SO sage.env looks for libgap.so but it should look for libgap.so* #35094

Merged

Conversation

dimpase
Copy link
Member

@dimpase dimpase commented Feb 12, 2023

๐Ÿ“š Description

In short, sometimes there is no lib**.so available, but only lib**.so.*. This breaks GAP and Singular related things.
See #33446 for details.

Closes #33446

โŒ› Dependencies

Depends on #35093 #34391 (GAP update to 4.12.2)

antonio-rojas and others added 30 commits February 12, 2023 16:30
also add a workaround for Semigroups (see comment in the code)
`make install` installs files in both paths
The 'packagemanager' package does not load without it
This needs the soname (as in sage.env.GAP_SO) which has issues for
system gap as explained in sagemath#33446.

Instead we dlopen() the extension module sage.libs.gap.util which,
having a link time dependency to libgap, will indirectly dlopen() it.

For the record: by the time we run dlopen() the libgap should be already
loaded. The purpose of doing it is to change mode to RTLD_GLOBAL so that
symbols in libgap are placed in the global symbol table. This is
required to compiled load gap packages.

An easy test that this is working ok is:

    sage: libgap.LoadPackage("io")
    true

This requires optional spkg `gap_packages` to be installed.
Same as for gap in the previous commit. Instead of requiring the soname
(as in sage.env.LIBSINGULAR_PATH) we dlopen() the extension module
sage.libs.singular.singular which will indirectly dlopen() libSingular.
โ€ฆisambiguate the workspace file, not SAGE_LOCAL"

This reverts commit a801e6d.

See sagemath#33446.
@codecov-commenter
Copy link

codecov-commenter commented Feb 12, 2023

Codecov Report

Base: 88.57% // Head: 88.58% // Increases project coverage by +0.01% ๐ŸŽ‰

Coverage data is based on head (ac4b671) compared to base (52a81cb).
Patch coverage: 100.00% of modified lines in pull request are covered.

โ— Current head ac4b671 differs from pull request most recent head 406e21b. Consider uploading reports for the commit 406e21b to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #35094      +/-   ##
===========================================
+ Coverage    88.57%   88.58%   +0.01%     
===========================================
  Files         2140     2136       -4     
  Lines       397273   396119    -1154     
===========================================
- Hits        351891   350915     -976     
+ Misses       45382    45204     -178     
Impacted Files Coverage ฮ”
src/sage/coding/linear_code.py 81.12% <รธ> (รธ)
src/sage/combinat/posets/posets.py 93.87% <รธ> (รธ)
...mbinat/root_system/hecke_algebra_representation.py 93.11% <รธ> (รธ)
src/sage/combinat/symmetric_group_algebra.py 94.35% <รธ> (รธ)
src/sage/groups/finitely_presented.py 95.88% <รธ> (รธ)
src/sage/groups/fqf_orthogonal.py 88.48% <รธ> (รธ)
src/sage/groups/matrix_gps/finitely_generated.py 90.50% <รธ> (รธ)
src/sage/groups/perm_gps/permgroup.py 90.56% <รธ> (-0.49%) โฌ‡๏ธ
src/sage/tests/gap_packages.py 94.59% <รธ> (รธ)
src/sage/env.py 88.77% <100.00%> (+0.77%) โฌ†๏ธ
... and 107 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

โ˜” View full report at Codecov.
๐Ÿ“ข Do you have feedback about the report comment? Let us know in this issue.

@dimpase
Copy link
Member Author

dimpase commented Feb 12, 2023

the test failure (yes, just 1) is unrelated, and addressed by #35058

sage -t --random-seed=136480729433508966711661003720220671146 sage/schemes/toric/sheaf/klyachko.py
**********************************************************************
File "sage/schemes/toric/sheaf/klyachko.py", line 951, in sage.schemes.toric.sheaf.klyachko.KlyachkoBundle_class.random_deformation
Failed example:
    Vtilde.cohomology(dim=True, weight=(0,))
Expected:
    (1, 0)
Got:
    (0, 0)

@tornaria
Copy link
Contributor

@dimpase dont forget to rebase this one as well on top of dimpase:u/dimpase/packages/gap/4_12_2

@dimpase dimpase requested a review from mkoeppe February 27, 2023 13:39
@tornaria tornaria added this to the sage-10.0 milestone Mar 6, 2023
@tornaria
Copy link
Contributor

tornaria commented Mar 6, 2023

@vbraun @mkoeppe can we please get #35093 and #35094 in? The sooner the better... it almost made it into 9.8. It is the largest and more intrusive patch I'm carrying, and I can't use develop branch at all without merging this so testing other PR is a pain.

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 6, 2023

I've now set it to "blocker", which used to be the way to give a ticket priority in merging.
But it seems that @vbraun's new merging script does not take priority into account.
@vbraun is this by intentional design or is it something that should be fixed in /~https://github.com/sagemath/sage-release-management?

@github-actions
Copy link

github-actions bot commented Mar 7, 2023

Documentation preview for this PR is ready! ๐ŸŽ‰
Built with commit: 6c3afe6

@vbraun vbraun merged commit dc933bd into sagemath:develop Mar 19, 2023
vbraun pushed a commit that referenced this pull request Oct 8, 2023
    
### ๐Ÿ“š system pkgs info and GH actions for alpine linux

Will fix #33083. This is the rebase of the branch of the latter on top
of 10.0.beta4, reduced to the scripts and package lists.

Workarounds for musl libc from #33083 will be revisited in a follow up.

### ๐Ÿ“ Checklist


- [X] I have made sure that the title is self-explanatory and the
description concisely explains the PR.
- [X] I have linked an issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### Dependencies

- #35290 - pplpy 0.8.7
- #35094 - saner libsingular linking
    
URL: #35285
Reported by: Dima Pasechnik
Reviewer(s): Dima Pasechnik, Matthias Kรถppe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

To determine GAP_SO sage.env looks for libgap.so but it should look for libgap.so*
6 participants