Skip to content

Having gap use libgap (at least the binary installed by make install); and set a good SYS_DEFAULT_PATHS default in the installed GAP #5096

Closed
@fingolfin

Description

@antonio-rojas (packages GAP for Arch Linux) pointed out that kernel extension in package like io can not be loaded from Sage or other programs which use libgap, at least not without additional work. One fix is to link those kernel extensions against libgap, i.e., adding -lgap to the linker flags.

I actually was aware of this (but never logged it as an issue before; I should have...) because I have to deal with the exact same situation in GAP.jl, the Julia wrapper for GAP.

However, we cannot just add -lgap to the linker flags. First off, GAP itself does not use libgap, so it wouldn't work. Secondly, in a "classic" GAP set up, GAP is not installed but used from its source folder where it was built.

One possible solution for this would be to leave things as they are in the "classic" GAP builds.

But for make install, we already install a different sysinfo.gap; it would be trivial to add -lgap to the linker flags for use by kernel extensions. Then, we could build a second gap binary just for the installation; that GAP binary would link against libgap, and basically just contain a main function calling into libgap. (This is by the way precisely how the Windows binary works, so it's not exactly new).

That way, we'd have the best of both worlds: for "classic" builds, nothing changes. For installed builds, things start working better.


And if we build a separate GAP binary anyway, we could also use that to #define SYS_DEFAULT_PATHS sensibly

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions