Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make library linking survive -Wl,--as-needed #217

Merged
merged 1 commit into from
Sep 5, 2023

Conversation

ellert
Copy link
Member

@ellert ellert commented Aug 30, 2023

The libglobus_rsl_assist library is an empty backwards compatibility library that is there to fulfil link dependencies from earlier versions of GT/GCT. The functionality that used to be provided by this library now is in libglobus_rsl. When linking the libglobus_rsl_assist library it links to libglobus_rsl (-lglobus_rsl), so that loading the empty compatibility library will load the globus_rsl library. However, many Linux distribution by default uses -Wl,--as-needed when linking during package builds (rpm/dpkg). This means that the link from libglobus_rsl_assist to libglobus_rsl is lost. This commit adds a dummy function that references a symbol in the libglobus_rsl library so that the link information is not removed when linking using -Wl,--as-needed.

In addition this commit declares the symbol "lvl" in libglobus_rsl static. This symbol is not in the globus_* namespace and has a very generic name and should therefore not by globally accessible.

The libglobus_rsl_assist library is an empty backwards compatibility
library that is there to fulfil link dependencies from earlier
versions of GT/GCT. The functionality that used to be provided by this
library now is in libglobus_rsl. When linking the libglobus_rsl_assist
library it links to libglobus_rsl (-lglobus_rsl), so that loading the
empty compatibility library will load the globus_rsl library. However,
many Linux distribution by default uses -Wl,--as-needed when linking
during package builds (rpm/dpkg). This means that the link from
libglobus_rsl_assist to libglobus_rsl is lost. This commit adds a
dummy function that references a symbol in the libglobus_rsl library
so that the link information is not removed when linking using
-Wl,--as-needed.

In addition this commit declares the symbol "lvl" in libglobus_rsl
static. This symbol is not in the globus_* namespace and has a very
generic name and should therefore not by globally accessible.
Copy link
Member

@msalle msalle left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@ellert ellert merged commit 61f7eb2 into gridcf:master Sep 5, 2023
11 checks passed
@ellert ellert deleted the link-fix branch September 5, 2023 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants