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

Relocatable is not fully working yet #4

Open
viferga opened this issue Sep 4, 2024 · 0 comments
Open

Relocatable is not fully working yet #4

viferga opened this issue Sep 4, 2024 · 0 comments

Comments

@viferga
Copy link
Member

viferga commented Sep 4, 2024

On arm64, python does not work because it uses python executable from Framework and it is not being patched properly:

2024-09-03T21:42:11.8519700Z /Users/runner/work/brew-pkg/brew-pkg/distributable/opt/homebrew/bin/python3:
2024-09-03T21:42:11.8520880Z 	@executable_path/../../../../../Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/Python (compatibility version 3.12.0, current version 3.12.0)
2024-09-03T21:42:11.8522140Z 	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1345.100.2)
2024-09-03T21:42:11.8606490Z /Users/runner/work/brew-pkg/brew-pkg/distributable/opt/homebrew/Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/Python:
2024-09-03T21:42:11.8607610Z 	@loader_path/../opt/[email protected]/Frameworks/Python.framework/Versions/3.12/Python (compatibility version 3.12.0, current version 3.12.0)
2024-09-03T21:42:11.8608730Z 	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 2420.0.0)
2024-09-03T21:42:11.8609560Z 	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1345.100.2)
2024-09-03T21:42:11.8688810Z binary
2024-09-03T21:42:11.8770850Z /Users/runner/work/brew-pkg/brew-pkg/distributable/opt/homebrew/Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/Resources/Python.app/Contents/MacOS/Python:
2024-09-03T21:42:11.8772160Z 	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 2420.0.0)
2024-09-03T21:42:11.8773230Z 	/opt/homebrew/Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/Python (compatibility version 3.12.0, current version 3.12.0)
2024-09-03T21:42:11.8774240Z 	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1345.100.2)
2024-09-03T21:42:11.8848020Z /Users/runner/work/brew-pkg/brew-pkg/distributable/opt/homebrew/bin/ruby:
2024-09-03T21:42:11.8848850Z 	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 2420.0.0)
2024-09-03T21:42:11.8849770Z 	@executable_path/../Cellar/ruby/3.3.4/lib/libruby.3.3.dylib (compatibility version 3.3.0, current version 3.3.4)
2024-09-03T21:42:11.8850480Z 	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1345.100.2)
2024-09-03T21:42:11.8851060Z 	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
2024-09-03T21:42:11.9217650Z dyld[24086]: Library not loaded: /opt/homebrew/Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/Python
2024-09-03T21:42:11.9219740Z   Referenced from: <8CCEA289-D14F-34E3-9A64-9D7AE7D7B015> /Users/runner/work/brew-pkg/brew-pkg/distributable/opt/homebrew/Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/Resources/Python.app/Contents/MacOS/Python
2024-09-03T21:42:11.9222580Z   Reason: tried: '/opt/homebrew/Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/Python' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/Python' (no such file), '/opt/homebrew/Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/Python' (no such file)

I do not understand how the Framework mechanism works, and how it's possible that ./bin/python3.12 is referencing to: Referenced from: <8CCEA289-D14F-34E3-9A64-9D7AE7D7B015> /Users/runner/work/brew-pkg/brew-pkg/distributable/opt/homebrew/Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/Resources/Python.app/Contents/MacOS/Python

On amd64, python works but ruby requires to set properly the paths of the dependencies:

2024-09-03T21:43:33.9524600Z /Users/runner/work/brew-pkg/brew-pkg/distributable/usr/local/bin/python3:
2024-09-03T21:43:34.0050410Z 	@executable_path/../../../../../Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/Python (compatibility version 3.12.0, current version 3.12.0)
2024-09-03T21:43:34.0054400Z 	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)
2024-09-03T21:43:34.0058730Z /Users/runner/work/brew-pkg/brew-pkg/distributable/usr/local/Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/Python:
2024-09-03T21:43:34.0062910Z 	@loader_path/../opt/[email protected]/Frameworks/Python.framework/Versions/3.12/Python (compatibility version 3.12.0, current version 3.12.0)
2024-09-03T21:43:34.0066550Z 	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1971.0.0)
2024-09-03T21:43:34.0069340Z 	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)
2024-09-03T21:43:34.0070820Z binary
2024-09-03T21:43:34.0354210Z /Users/runner/work/brew-pkg/brew-pkg/distributable/usr/local/Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/Resources/Python.app/Contents/MacOS/Python:
2024-09-03T21:43:34.0750310Z 	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1971.0.0)
2024-09-03T21:43:34.0753800Z 	/usr/local/Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/Python (compatibility version 3.12.0, current version 3.12.0)
2024-09-03T21:43:34.0756040Z 	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)
2024-09-03T21:43:34.0757490Z /Users/runner/work/brew-pkg/brew-pkg/distributable/usr/local/bin/ruby:
2024-09-03T21:43:34.0759250Z 	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1971.0.0)
2024-09-03T21:43:34.0761350Z 	@executable_path/../Cellar/ruby/3.3.4/lib/libruby.3.3.dylib (compatibility version 3.3.0, current version 3.3.4)
2024-09-03T21:43:34.0762920Z 	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)
2024-09-03T21:43:34.0764230Z 	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
2024-09-03T21:43:34.1783640Z ['-c']
2024-09-03T21:43:34.2025810Z /Users/runner/work/brew-pkg/brew-pkg/distributable/usr/local/lib/ruby/3.3.0/rubygems.rb:9:in `require': cannot load such file -- rbconfig (LoadError)
2024-09-03T21:43:34.2104180Z 	from /Users/runner/work/brew-pkg/brew-pkg/distributable/usr/local/lib/ruby/3.3.0/rubygems.rb:9:in `<top (required)>'
2024-09-03T21:43:34.2109300Z 	from <internal:gem_prelude>:2:in `require'
2024-09-03T21:43:34.2115140Z 	from <internal:gem_prelude>:2:in `<internal:gem_prelude>'

For testing, it is necessary to uncomment this CI:

# TODO: Relocatable

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

No branches or pull requests

1 participant