-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
spkg-configure.m4 for singular #29024
Comments
comment:1
Which versions of singular are good? |
comment:3
well, Debian does have a Singular version which is compatible with their Sage package (v8.6 or so, I guess). |
comment:4
Thanks for the info. I'll check back when #25993 is done. |
comment:5
This ticket should be listed in #27330 (ATM singular is listed in "No Tickets yet"). |
comment:6
Replying to @thierry-FreeBSD:
I've added it |
Attachment: spkg-configure.m4.gz spkg-configure.m4 to be put under /build/pkgs/singular/ |
comment:8
[Copying elements from #29024]
Now it is OK for me (on FreeBSD). |
This comment has been minimized.
This comment has been minimized.
comment:12
the error message
should be modified, too. |
comment:13
Moving this ticket forward is great, but note that it is unrelated to the build problem on homebrew reported on sage-devel... and it is also unlikely that the homebrew version of singular actually works for us (homebrew does not like to patch). As I explained in https://groups.google.com/d/msg/sage-devel/KXK_zxzfhIQ/RO3FryYWAwAJ, on the reporter's system the computed order of |
comment:14
Replying to @thierry-FreeBSD:
The fix in SageMath needs some programming - specifically, the code in singular.pyx calls dlopen on SINGULAR_SO, |
comment:15
Is it known whether this comment added in 2009 to singular.pyx is still valid:
|
comment:16
Someone working on innards of Singular might know. Singular is not alone - this hack is also applied to libgap. |
Attachment: homebrew-singular-experiment.patch.gz |
comment:17
Replying to @dimpase:
Yes, this function certainly would need changing if we continue to use it. But I think better solution would be to wrap loading of modules that are linked to singular by sys.setdlopenflags. This is what pytorch does when it has to use RTLD_GLOBAL (see https://github.com/pytorch/pytorch/blob/master/torch/__init__.py#L132) |
comment:19
I have opened #30561 for this |
This comment has been minimized.
This comment has been minimized.
comment:151
Replying to @dimpase:
What messages are these, and when are they issued? |
comment:152
Replying to @mkoeppe:
The impetus for the last round of major changes was comment:93 which found that homebrew worked with some modification -- particularly using the full path to libSingular. |
Changed branch from u/mjo/ticket/29024 to |
Changed commit from |
comment:154
Replying to @orlitzky:
I don't have a comment on using the homebrew singular package; I haven't tested this ticket. The issue lies in installing the singular package on homebrew when a non-standard prefix (= not /usr/local) is in use -- which is what our testing workflows on GH Actions do. |
comment:155
using Homebrew with non-standard prefix is not something the upstream is keen on supporting. |
comment:156
This is true, but for us it is a valuable mechanism to test homebrew configurations. |
comment:157
well, one ends up running into homebrew bugs for no good reason this way. (I must say I looked at tox.ini and stuff in .github, and failed to see how this is done) |
comment:158
Let me explain the purpose in case it is really unclear: By using a local installation of homebrew, a developer can actually do testing against different homebrew package configurations without compromising the normal environment on one's machine that one uses for ... you know ... other work. |
comment:159
Replying to @dimpase:
There are 2 lines around line 512 in tox.ini, |
comment:160
well, yes, what I don't understand is the purpose of having a nonstandard Homebrew location (as well as what this location actually is). |
comment:161
Replying to @mkoeppe:
The homebrew docs pretty clearly say "Pick another prefix at your peril!" If singular works well in a supported homebrew configuration, it's mean to hide the system package suggestion from everyone for the sake of an unsupported, non-user-facing test scenario. Can't we add a |
comment:162
Yes, this is a solution that I would support. |
comment:163
On Debian 11 (a.k.a. bullseye, stable) Singular's libs have different names, and are failing to be picked up: they all are installed in
While it's not hard to test for Library names may be obtained from
I suppose this needs a followup ticket. |
comment:164
Replying to @dimpase:
File a bug? Sometimes, people are going to want to use non-debian packages on debian. The name of the library is libSingular, and that's what everyone will (and should) try to use. It's as fundamental to the API as anything can be. There's probably a name conflict with some other library that is better avoided some other way, e.g. by having the two packages with conflicting files block each other. Or at the very least, by renaming only the problematic library. I doubt some other package is installing |
comment:165
other packages may be installing bug report or not, knowing Debian pace it ought to be fixed regardless. |
comment:166
Replying to @dimpase:
Looks like a pre-emptive change: |
comment:167
I have opened #32789 for the follow up. |
comment:168
On an OS X machine I used
This is because |
comment:169
could this be due to the path to |
comment:170
Replying to @jhpalmieri:
Accidentally, like anything that uses |
comment:171
Replying to @dimpase:
|
comment:172
Will fix it in #32880. |
For singular, the location of the dynamic library needs to be communicated to the sage runtime.
We add a configuration variable
SINGULAR_SO
tosage_conf.py.in
.The filename can be found from
src/Singular/libSingular.la
(currently not installed):This will:
reduce the need for downstream patching (see for example https://salsa.debian.org/science-team/sagemath/-/blob/master/debian/patches/d0-singular.patch),
enable venv builds of sagelib (Add src/requirements.txt for installation of sagelib in a venv #30578, Add configure option --with-sage-venv=SAGE_VENV to create venv there instead of in SAGE_LOCAL #29013) -- for which
_get_shared_lib_filename
is wrongprovide preparation for adding an
spkg-configure.m4
forsingular
.src/bin/sage-env
unconditionally sets environment variableSINGULARPATH="$SAGE_LOCAL/share/singular"
If
SINGULARPATH
is already set by the user, perhaps the directory in $SAGE_LOCAL should be prepended instead of overwriting it.(After Obtain singular.hlp location via libsingular_resources #32254,
SINGULARPATH
is only used byqepcad
-- this last use should be removed in QEPCAD: improve installation locations #31275.)src/bin/sage-env
unconditionally sets environment variableSINGULAR_EXECUTABLE="$SAGE_LOCAL/bin/Singular"
.It should be investigated whether this is actually needed in any supported configuration. If not, remove.
(Removed in Drop SINGULAR_EXECUTABLE from src/bin/sage-env #32302.)
src/sage/interfaces/singular.py
tries to useSINGULARPATH
as if it is a directory name (it is a colon-separated list of directories):This should be fixed so that it works when
SINGULARPATH
is set by a user to a colon-separated list.(Solved in #32254 - Obtain singular.hlp location via libsingular_resources)
Upstream: Reported upstream. No feedback yet.
CC: @dimpase @kiwifb @slel @isuruf @orlitzky @tobiasdiez @antonio-rojas @dkwo
Component: build: configure
Keywords: sd111
Author: Michael Orlitzky, Samuel Lelièvre
Branch:
f01ff1f
Reviewer: Dima Pasechnik, Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/29024
The text was updated successfully, but these errors were encountered: