Skip to content

spack external find: library detection improvements#33973

Merged
alalazo merged 1 commit intospack:developfrom
haampie:fix/lib-search-paths
Nov 2, 2023
Merged

spack external find: library detection improvements#33973
alalazo merged 1 commit intospack:developfrom
haampie:fix/lib-search-paths

Conversation

@haampie
Copy link
Copy Markdown
Member

@haampie haampie commented Nov 17, 2022

  • Ensure that we use the correct env variable per platform
  • Dedupe dir paths (e.g. /usr/lib == /lib)
  • On ELF platforms ensure that shared libraries are only added when they are host-compatible (checked against current Python interpreter's own EI_CLASS, EI_DATA and e_machine).

The third point is relevant for multi-arch distros, such as Ubuntu, where sometimes i686 directories have higher priority than x86_64. For executables we typically inspect exe --version which also ensures host-compatibility, so to me it makes sense if for libraries we verify "is the lib compatible with the Python interpreter we're currently running".

This doesn't deal with static libraries, nor with Darwin.

@spackbot-app spackbot-app bot added core PR affects Spack core functionality tests General test capability(ies) utilities labels Nov 17, 2022
@haampie haampie requested a review from bvanessen November 17, 2022 16:07
@alalazo alalazo added this to the v0.20.0 milestone Dec 12, 2022
@alalazo alalazo modified the milestones: v0.20.0, v0.20.1 May 9, 2023
@alalazo alalazo removed this from the v0.20.1 milestone Jul 5, 2023
@haampie haampie added this to the v0.21.0 milestone Aug 2, 2023
@tgamblin tgamblin requested a review from alalazo October 17, 2023 17:48
@haampie haampie force-pushed the fix/lib-search-paths branch from 125f7d2 to 7ce0e2e Compare November 1, 2023 11:34
@alalazo alalazo self-assigned this Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core PR affects Spack core functionality tests General test capability(ies) utilities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants