-
Notifications
You must be signed in to change notification settings - Fork 565
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
Non Portable binary, doesn't work with sudo or without LD_LIBRARY_PATH #871
Comments
Hello @jaswanthikolla, Thank you for creating this issue and we will get back to you once we have some feedback on this :) |
@aparnajyothi-y I raised the issue just for documentation. PR is already raised to fix this issue, Can you review that. |
@jaswanthikolla thank you for your efforts thus far, it's a shame there hasn't been more movement on this. @aparnajyothi-y This is affecting certain ansible modules as well now. I am unable to run my checks now due to this. |
@priya-kinthali Any update on the PR as it's been 2 months? I see reduced activity with so many open PRs, also see that It's outsourced to some other company. Is this repo still maintained, if not better to handover to other companies which can manage it. |
Hello @jaswanthikolla 👋, Here is a potential workaround that you might consider. - name: Create Python temp_script.sh and check python version
run: |
PYTHON_PATH=$(which python3)
PYTHON_DIR=$(dirname $PYTHON_PATH)
echo "export LD_LIBRARY_PATH=$PYTHON_DIR/../lib" >> temp_script.sh
echo "export PATH=$PYTHON_DIR:\$PATH" >> temp_script.sh
echo "python --version" >> temp_script.sh
chmod +x temp_script.sh
sudo ./temp_script.sh Thank you again for the PR. We have already started reviewing it, and testing is underway to check its impact on the overall build environment for both GitHub and self-hosted runners. We will provide feedback once we have tested all possible scenarios. |
Hi @jaswanthikolla ,
On which runners do you see such behaviour? I would expect all github hosted runners to have tool cache under |
Hello @jaswanthi,
Additionally could you please confirm? |
@maxim-lobanov For ARSS runners, the default path is Yes, that workaround will work, but we pursued another workaround internally. Following up if there are any updates on the PR as It's been 3 months. I can't maintain context on it forever to address review comments and so I guess it's time to abandon/close the PR. |
I'm not exactly sure why there is a lengthy discussion around this issue. Using Of course there are workarounds, but they decrease the quality of user experience and they increase the maintenance burden of users for their actions and workflows. So let's reverse the question: what are the downsides of starting to use If there is no significant downsides, why not just benefit from the community's work and merge the pull request ASAP? 😎 |
@klalumiere I've resorted to forking both repositories and using that for now. It's been months without a resolution despite @jaswanthikolla's efforts. Her PR works and should be merged. |
This workaround does not work on self-hosted runners with pantsbuild. |
We're also affected by this (with our self-hosted runners), did not realize by the end of 2024 there are still real-world Python compiled without relocatability 😢 This is very frustrating for people trying to rely more on GHA and less on custom Python distros (ex: conda)... |
Description:
Python binary is compiled with
rpath
that's/opt/hostedtoolcache/Python
. Now, latest github runners defineRUNNER_TOOL_CACHE/AGENT_TOOLSDIRECTORY
differently than/opt/hostedtoolcache
and that installs python at/home/runner/_work/_tool/Python/
. So, with this, there are 2 issues.sudo python --version
doesn't work ( See Error section) because most systems's doesn't allow passing LD_LIBRARY_PATH due to security issues.python --version
doesn't work without setting environment variable LD_LIBRARY_PATHoutput of ldd :
Error:
What could be the reason:
rpath is hardcoded to
/opt/hostedtoolcache/Python
. if we use $ORIGIN, binaries will be portable. Fix is raised here actions/python-versions#275Action version:
v5.1.0
Platform:
Runner type:
Tools version:
All versions of Python 3.9.x, 3.10.x, etc.
Repro steps:
You can easily reproduce using following steps. And also, you can unset
LD_LIBRARY_PATH
and just use without sudoExpected behavior:
There are times we need to use
sudo python
and Most system ( also not acceptable to pass) doesn't pass LD_LIBRARY_PATH as environment variable due to security issues.Actual behavior:
sudo python --version
to work.The text was updated successfully, but these errors were encountered: