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:

Status badges

Description

(from #29024)

Change History (11)

comment:1 Changed 2 years ago by Matthias Köppe

Milestone: sage-9.2sage-9.3

comment:2 Changed 2 years ago by Matthias Köppe

Keywords: sd111 added

Hoping we can make progress on this ticket this week - https://wiki.sagemath.org/days111

comment:3 Changed 22 months ago by Matthias Köppe

Milestone: sage-9.3sage-9.4

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

comment:4 Changed 22 months ago by Erik Bray

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 in reply to:  4 ; Changed 22 months ago by Matthias Köppe

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 in reply to:  5 Changed 22 months ago by Erik Bray

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 Matthias Köppe

Milestone: sage-9.4sage-9.5

comment:8 Changed 17 months ago by Michael Orlitzky

Cc: Michael Orlitzky added

comment:9 Changed 12 months ago by Matthias Köppe

Milestone: sage-9.5sage-9.6

comment:10 Changed 8 months ago by Matthias Köppe

Milestone: sage-9.6sage-9.7

comment:11 Changed 3 months ago by Matthias Köppe

Milestone: sage-9.7sage-9.8
Note: See TracTickets for help on using tickets.