Opened 2 years ago
Last modified 3 months ago
#30561 new enhancement
Use sys.setdlopenflags while loading libgap, libSingular - eliminate _get_shared_lib_filename
Reported by: | Matthias Köppe | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.8 |
Component: | build | Keywords: | sd111 |
Cc: | Dima Pasechnik, Michael Orlitzky | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
(from #29024)
Change History (11)
comment:1 Changed 2 years ago by
Milestone: | sage-9.2 → sage-9.3 |
---|
comment:2 Changed 2 years ago by
Keywords: | sd111 added |
---|
comment:3 Changed 22 months ago by
Milestone: | sage-9.3 → sage-9.4 |
---|
Setting new milestone based on a cursory review of ticket status, priority, and last modification date.
comment:4 follow-up: 5 Changed 22 months ago by
In the case of libgap this is made moot by #31297.
It also might be worth a look at how this is handled in gappy: https://github.com/embray/gappy/blob/13e2a1bdc10c343071e1e2dbb23a5156e78e3102/gappy/utils.pyx#L83
AFAICT on most platforms simply passing the filename without the full path is good-enough since it will search for the library in the same manner that the linker would have anyways.
But using sys.setdlopenflags
is also certainly an option if all we care about is the dlopen flags, as seems to be the case with Singular.
In gappy I still wanted the full path to libgap, since it be helpful to find the location of the GAP root, but for that I use dlsym()
+dladdr()
as demonstrated here and which appears to be reasonably portable.
comment:5 follow-up: 6 Changed 22 months ago by
I think it would be good if you could make the .so filename statically configurable in gappy. We may want to link to a specific library known at build time; rather than relying on whatever is found in the runtime library paths.
comment:6 Changed 22 months ago by
Replying to mkoeppe:
I think it would be good if you could make the .so filename statically configurable in gappy. We may want to link to a specific library known at build time; rather than relying on whatever is found in the runtime library paths.
In fact it used to have that but I removed it because it didn't seem useful.
comment:7 Changed 17 months ago by
Milestone: | sage-9.4 → sage-9.5 |
---|
comment:8 Changed 17 months ago by
Cc: | Michael Orlitzky added |
---|
comment:9 Changed 12 months ago by
Milestone: | sage-9.5 → sage-9.6 |
---|
comment:10 Changed 8 months ago by
Milestone: | sage-9.6 → sage-9.7 |
---|
comment:11 Changed 3 months ago by
Milestone: | sage-9.7 → sage-9.8 |
---|
Hoping we can make progress on this ticket this week - https://wiki.sagemath.org/days111