Title: macOS built Python3.11b5 can't find lib-dynload in relocatable framework if framework is relocated and python run from external symlink · Issue #95400 · python/cpython · GitHub
Open Graph Title: macOS built Python3.11b5 can't find lib-dynload in relocatable framework if framework is relocated and python run from external symlink · Issue #95400 · python/cpython
X Title: macOS built Python3.11b5 can't find lib-dynload in relocatable framework if framework is relocated and python run from external symlink · Issue #95400 · python/cpython
Description: Bug report A build of Python 3.11b5's fails to find lib-dynload path if the following normally ok combination of criteria are met: The framework is made or modified in such a away to be relocatable (dynamic links are relative using @load...
Open Graph Description: Bug report A build of Python 3.11b5's fails to find lib-dynload path if the following normally ok combination of criteria are met: The framework is made or modified in such a away to be relocatable...
X Description: Bug report A build of Python 3.11b5's fails to find lib-dynload path if the following normally ok combination of criteria are met: The framework is made or modified in such a away to be relocat...
Opengraph URL: https://github.com/python/cpython/issues/95400
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"macOS built Python3.11b5 can't find lib-dynload in relocatable framework if framework is relocated and python run from external symlink","articleBody":"\u003c!--\r\n If you're new to Python and you're not sure whether what you're experiencing is a bug, the CPython issue tracker is not\r\n the right place to seek help. Consider the following options instead:\r\n\r\n - reading the Python tutorial: https://docs.python.org/3/tutorial/\r\n - posting in the \"Users\" category on discuss.python.org: https://discuss.python.org/c/users/7\r\n - emailing the Python-list mailing list: https://mail.python.org/mailman/listinfo/python-list\r\n - searching our issue tracker (https://github.com/python/cpython/issues) to see if\r\n your problem has already been reported\r\n--\u003e\r\n\r\n# Bug report\r\n\r\nA build of Python 3.11b5's fails to find lib-dynload path if the following normally ok combination of criteria are met:\r\n- The framework is made or modified in such a away to be relocatable (dynamic links are relative using @loader_path, etc) instead of absolute path\r\n- The framework is installed in a location it wasn't built at\r\n- python is executed by a symlink from elsewhere\r\n\r\n# Your environment\r\n\r\nTo reproduce this easily, I decompressed the installable package into my home directory, making a framework structure that would normally run. I do have to modify the linking to work relocated, using the following commands:\r\n```\r\n install_name_tool -change /Library/Frameworks/Python.framework/Versions/3.11/Python @loader_path/../Python Python.framework/Versions/3.11/bin/python3.11\r\n install_name_tool -change /Library/Frameworks/Python.framework/Versions/3.11/Python @loader_path/../../../../Python Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python\r\n\r\n```\r\nI then symlink the python executable.\r\n\r\n`ln -s Python.framework/Versions/3.11/bin/python3.11 python3.11\r\n`\r\n\r\nthe following command works fine\r\n\r\n` ./Python.framework/Versions/3.11/bin/python3.11 -c \"import math\"\r\n`\r\n\r\nwhile this does not\r\n```\r\n ./python3.11 -c \"import math\"\r\nCould not find platform dependent libraries \u003cexec_prefix\u003e\r\nTraceback (most recent call last):\r\n File \"\u003cstring\u003e\", line 1, in \u003cmodule\u003e\r\nModuleNotFoundError: No module named 'math'\r\n\r\n```\r\neven though the shell itself works normally, just the lib-dynload is not being found.\r\n\r\nI can make it work with the attached patch, but I don't assume it is the correct way to fix it\r\n[relocated_framework.patch.gz](https://github.com/python/cpython/files/9213546/relocated_framework.patch.gz)\r\n.","author":{"url":"https://github.com/jpgarcia-ssec","@type":"Person","name":"jpgarcia-ssec"},"datePublished":"2022-07-28T19:25:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/95400/cpython/issues/95400"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:affb7df1-d0e8-b11c-c0b5-4ff0cc6047eb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8028:1F19:4817D4A:6709735:6A5002C2 |
| html-safe-nonce | b1f293abc4a836c9e43bb51e47ca0b68a1c3f3dc1f613722b50efa151ce2e36b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDI4OjFGMTk6NDgxN0Q0QTo2NzA5NzM1OjZBNTAwMkMyIiwidmlzaXRvcl9pZCI6IjIzNzU1NzQ1MDY1ODIzMTE2MTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 59f7d24ca2ca84fff8a8ee8aa07b9a88c5493cb383bb9b15e3a5a3f9fec47151 |
| hovercard-subject-tag | issue:1321381107 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/95400/issue_layout |
| twitter:image | https://opengraph.githubassets.com/36929759bc43657403327a6e308086432fee477a4ca59056bf8bdc7f49240a52/python/cpython/issues/95400 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/36929759bc43657403327a6e308086432fee477a4ca59056bf8bdc7f49240a52/python/cpython/issues/95400 |
| og:image:alt | Bug report A build of Python 3.11b5's fails to find lib-dynload path if the following normally ok combination of criteria are met: The framework is made or modified in such a away to be relocatable... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jpgarcia-ssec |
| hostname | github.com |
| expected-hostname | github.com |
| None | 56eec25a3430492dd6ec2a480eb33256a0da5192d5714b0db4f5ab5f33203d94 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e155b8a71f9284454f73118dfe5e634e74f7afb3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width