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

Compile and link agains the OpenSSL detectected by the configure script #799

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

rgmiller
Copy link
Contributor

@rgmiller rgmiller commented Oct 6, 2023

Ensure all parts of UnifyFS build and link against the version of libcrypto set by the configure script.

Description

This change adds the variables set by the configure script (OPENSSL_CFLAGS and OPENSSL_LIBS) to the UNIFYFS_COMMON_BASE_FLAGS and UNIFYFS_COMMON_BASE_LIBS variables to Makefile.mk.

Motivation and Context

Without this change, it's possible that not all components of UnifyFS will be linked against the same libcrypto.so library. (Full details in the description for issue 792.)

How Has This Been Tested?

Built UnifyFS both with and without the change. Without the change, unifyfsd and unifyfs-stage depended on different instances of libcrypto. With the change, everything used the same libcrypto.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Testing (addition of new tests or update to current tests)
  • Documentation (a change to man pages or other documentation)

Checklist:

  • My code follows the UnifyFS code style requirements.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • All commit messages are properly formatted.

Add OPENSSL_CFLAGS and OPENSSL_LIBS to the UNIFYFS_COMMON_BASE_FLAGS and
UNIFYFS_COMMON_BASE_LIBS variables, respectively.

Fixes issue LLNL#792
@rgmiller
Copy link
Contributor Author

rgmiller commented Oct 6, 2023

Note: We aren't setting --rpath when we link against libcrypto. Furthermore, spack no longer modifies LD_LIBRARY_PATH as part of its module loading process. This results in an odd edge-case: If the user is using a spack environment, then UnifyFS will compile and link against the spack-built version of libcrypto, but at runtime might still dynamically load the system-provided version of libcrypto. (The version number of the libcrypto libraries would have to match, but that doesn't mean the libraries are exactly the same.)

Do we want to do anything about this? And if so, should it be part of this PR or a new one?

@adammoody adammoody merged commit bf7cb38 into LLNL:dev Oct 9, 2023
6 checks passed
@adammoody
Copy link
Collaborator

Thanks, @rgmiller !

@rgmiller rgmiller deleted the 792_CFLAGS_and_LIBS branch October 20, 2023 16:55
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