Skip to content

Commit 3a46e87

Browse files
tornariadimpase
authored andcommitted
singular: remove LIBSINGULAR_PATH, no longer needed
1 parent 177eb5d commit 3a46e87

File tree

3 files changed

+1
-71
lines changed

3 files changed

+1
-71
lines changed

build/pkgs/singular/spkg-configure.m4

Lines changed: 1 addition & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -9,52 +9,7 @@ SAGE_SPKG_CONFIGURE([singular], [
99
AC_MSG_CHECKING([that Singular's help is working])
1010
AS_IF([test x`printf "system(\"--browser\", \"builtin\"); \n help;" | Singular 2>&1 | grep "error occurred"` = x], [
1111
AC_MSG_RESULT(yes)
12-
dnl We have Singular. Now determine the shared library path on
13-
dnl platforms on which sage.libs.singular needs to reload the library with RTLD_GLOBAL.
14-
AS_CASE([$host_os],
15-
[cygwin*], [dnl Nothing to do
16-
],
17-
[dnl Use pkg-config to get singular's libdir while we're at it. As a
18-
dnl moral compromise for using pkg-config, this ultimately allows us
19-
dnl to pass an absolute path to dlopen(), which is the only approach
20-
dnl that POSIX guarantees will work.
21-
PKG_CHECK_VAR([SINGULAR_LIB_DIR], [Singular], [libdir])
22-
dnl The acl_shlibext variable is set in the top-level configure.ac.
23-
AC_LANG_PUSH(C)
24-
ORIG_LIBS="${LIBS}"
25-
LIBS="${LIBS} -ldl"
26-
AC_MSG_CHECKING([if we can dlopen($LIBSINGULAR_PATH)])
27-
LIBSINGULAR_PATH="${SINGULAR_LIB_DIR}/libSingular.${acl_shlibext}"
28-
29-
dnl if we can dlopen() it, substitute the name for sage_conf;
30-
dnl otherwise, fall back to using the SPKG.
31-
AC_RUN_IFELSE(
32-
[AC_LANG_PROGRAM(
33-
[[#include <dlfcn.h>]],
34-
[[void* h = dlopen("${LIBSINGULAR_PATH}", RTLD_LAZY | RTLD_GLOBAL);
35-
if (h == 0) { return 1; } else { return dlclose(h); }]]
36-
)], [
37-
AC_MSG_RESULT(yes)
38-
], [
39-
dnl try Debian-specific name
40-
LIBSINGULAR_PATH="${SINGULAR_LIB_DIR}/libsingular-Singular.${acl_shlibext}"
41-
AC_RUN_IFELSE(
42-
[AC_LANG_PROGRAM(
43-
[[#include <dlfcn.h>]],
44-
[[void* h = dlopen("${LIBSINGULAR_PATH}", RTLD_LAZY | RTLD_GLOBAL);
45-
if (h == 0) { return 1; } else { return dlclose(h); }]]
46-
)], [
47-
AC_MSG_RESULT(yes)
48-
], [
49-
AC_MSG_RESULT(no)
50-
sage_spkg_install_singular=yes
51-
], [AC_MSG_RESULT(yes)])
52-
], [AC_MSG_RESULT(yes)])
53-
54-
AC_LANG_POP()
55-
LIBS="${ORIG_LIBS}"
56-
]
57-
)], [
12+
], [
5813
AC_MSG_RESULT(no)
5914
sage_spkg_install_singular=yes
6015
]
@@ -64,20 +19,4 @@ SAGE_SPKG_CONFIGURE([singular], [
6419
])
6520
])
6621
])
67-
],[],[],[
68-
dnl Post-check phase
69-
dnl We make the sage_conf substitutions here, because the "default"
70-
dnl substitution needs to be made even if we skipped the system-Singular
71-
dnl checks themselves.
72-
AS_IF([test "x${sage_spkg_install_singular}" = "xyes"], [
73-
AS_CASE([$host_os],
74-
[cygwin*], [dnl Nothing to do
75-
],
76-
[dnl Set shared library path, needed for reloading the library with RTLD_GLOBAL
77-
LIBSINGULAR_PATH="\$SAGE_LOCAL/lib/libSingular.${acl_shlibext}"
78-
]
79-
)
80-
])
81-
82-
AC_SUBST(LIBSINGULAR_PATH, "${LIBSINGULAR_PATH}")
8322
])

pkgs/sage-conf/_sage_conf/_conf.py.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ THREEJS_DIR = SAGE_LOCAL + "/share/threejs-sage"
5555
OPENMP_CFLAGS = "@OPENMP_CFLAGS@"
5656
OPENMP_CXXFLAGS = "@OPENMP_CXXFLAGS@"
5757

58-
# The full absolute path to the main Singular library.
59-
LIBSINGULAR_PATH = "@LIBSINGULAR_PATH@".replace('$SAGE_LOCAL', SAGE_LOCAL)
60-
6158
# Installation location of wheels. This is determined at configuration time
6259
# and does not depend on the installation location of sage-conf.
6360
SAGE_SPKG_WHEELS = "@SAGE_VENV@".replace('${SAGE_LOCAL}', SAGE_LOCAL) + "/var/lib/sage/wheels"

src/sage/env.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,6 @@ def var(key: str, *fallbacks: Optional[str], force: bool = False) -> Optional[st
230230
LIE_INFO_DIR = var("LIE_INFO_DIR", join(SAGE_LOCAL, "lib", "LiE"))
231231
SINGULAR_BIN = var("SINGULAR_BIN") or "Singular"
232232

233-
# The path to libSingular, to be passed to dlopen(). This will
234-
# typically be set to an absolute path in sage_conf, but the relative
235-
# fallback path here works on systems where dlopen() searches the
236-
# system's library locations.
237-
LIBSINGULAR_PATH = var("LIBSINGULAR_PATH", "libSingular.so")
238-
239233
# OpenMP
240234
OPENMP_CFLAGS = var("OPENMP_CFLAGS", "")
241235
OPENMP_CXXFLAGS = var("OPENMP_CXXFLAGS", "")

0 commit comments

Comments
 (0)