Skip to content

Conversation

tyrken
Copy link

@tyrken tyrken commented Jul 12, 2024

Description:

On Linux we already set LD_LIBRARY_PATH to the lib folder under the extracted Python, to allow running apps to find libPython and other libraries. This is not enough to let gcc find those libraries during compilation, e.g. as some Python dependencies do when installing. For this we also need to add the lib folder to the LIBRARY_PATH env-var.

Related issue:
Should fix #275
Not sure if the suggestion to override AGENT_TOOLSDIRECTORY for Linux if the existing advanced-docs is needed any more. It certainly didn't work for me and between the two *LIBRARY_PATH env-vars that should be enough.

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.
@tyrken tyrken force-pushed the set-library-path branch from 36977c0 to 42afbee Compare July 12, 2024 20:06
@tyrken tyrken marked this pull request as ready for review July 12, 2024 20:18
@tyrken tyrken requested a review from a team as a code owner July 12, 2024 20:18
@tyrken
Copy link
Author

tyrken commented Jul 12, 2024

While this PR has been tested and Works-For-Me (tm), actions/python-versions#275 sounds like it would be a better fix if it works as advertised, gets released & the pythons rebuilt...

if (!libPath.split(':').includes(pyLibPath)) {
core.exportVariable('LD_LIBRARY_PATH', pyLibPath + libPath);
}
ensurePathInEnvVar('LIBRARY_PATH', pyLibPath);
Copy link

@jaswanthikolla jaswanthikolla Jul 19, 2024

Choose a reason for hiding this comment

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

TBH, I wouldn't go with the route of LD_LIBRARY_PATH as some systems ( including containers) doesn't allow it as it's a security issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants