Skip to content

buildsys: always link gap against libgap#5780

Draft
fingolfin wants to merge 6 commits into
gap-system:masterfrom
fingolfin:mh/always-use-libgap
Draft

buildsys: always link gap against libgap#5780
fingolfin wants to merge 6 commits into
gap-system:masterfrom
fingolfin:mh/always-use-libgap

Conversation

@fingolfin
Copy link
Copy Markdown
Member

... even the copy we don't install system wide.

On macOS this allows us an annoying issue with the linker flags used by e.g.
gac for building kernel extensions: by always linking them against libgap we
don't need to use a flat namespace, nor rely on a bundle loader (which breaks
if you try to load the kernel extension in another binary using libgap).

However, this is not yet working on Linux at all, as there it won't find the not-yet-installed libgap:

$ ./gap
./gap: error while loading shared libraries: libgap.so.9: cannot open shared object file: No such file or directory

In principle this can be dealt with but I don't have time to do that right now, but I also didn't want to let this fragment get lost, so this PR will remind me to finish this one day (if someone would like to help out, that'd be welcome, too).

Alternatively one could restrict this change to macOS.

@fingolfin fingolfin added topic: build system release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes labels Aug 28, 2024
@fingolfin fingolfin force-pushed the mh/always-use-libgap branch from 7ccddc9 to 98f8479 Compare September 5, 2024 22:26
@fingolfin fingolfin added this to the GAP 4.14.0 milestone Oct 13, 2024
@fingolfin fingolfin force-pushed the mh/always-use-libgap branch from 98f8479 to f90cf4f Compare June 23, 2025 20:47
Comment thread Makefile.rules Outdated
fingolfin and others added 6 commits May 11, 2026 23:48
... even the copy we don't install system wide.

On macOS this allows us an annoying issue with the linker flags used by e.g.
gac for building kernel extensions: by always linking them against libgap we
don't need to use a flat namespace, nor rely on a bundle loader (which breaks
if you try to load the kernel extension in another binary using libgap).
Centralize how GAP links against libgap and carries runtime search
paths for the build tree and installed binaries. This keeps the
build-tree Linux case working while preserving the
always-link-against-libgap setup for gac and installed tools.

Normalize compiler-expanded file paths in out-of-tree builds so
installed libgap binaries no longer embed absolute source or build
paths. The install test no longer needs LD_LIBRARY_PATH or
DYLD_LIBRARY_PATH once the binaries carry the right loader
metadata themselves.

AI-assisted with Codex for build-system edits and Linux verification.

Co-authored-by: Codex <codex@openai.com>
@fingolfin fingolfin force-pushed the mh/always-use-libgap branch from c0fd95c to d757e62 Compare May 11, 2026 21:50
@fingolfin fingolfin modified the milestones: GAP 4.16.0, GAP 4.17.0 May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes topic: build system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants