Skip to content

Conversation

@fingolfin
Copy link
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
... 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).
# Linking rule and dependencies for libgap
$(LIBGAP_FULL): $(OBJS) cnf/GAP-LDFLAGS cnf/GAP-LIBS cnf/GAP-OBJS
$(QUIET_LINK)$(LINK) -o $@ $(LINK_SHLIB_FLAGS) $(GAP_LDFLAGS) $(OBJS) $(GAP_LIBS)
$(QUIET_LINK)$(LINK) -o $@ $(LINK_SHLIB_FLAGS) $(GAP_LDFLAGS) -Wl,-rpath,$(abs_builddir) $(OBJS) $(GAP_LIBS)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be relinked for install. macOS build works around this using install_name_tool, but instead we can just relink, just like we do for the gap executable itself.

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