-
-
Notifications
You must be signed in to change notification settings - Fork 552
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
Update the minimum system requirements #2835
Comments
Testing on M1 here. Wasn't able to build from a git clone. Let me know if I should create a separate issue.
|
Also failed with
|
@jroes Thank you ++ this helps! I am working on a fix for this. See also these: |
For me, running ScanCode on my M1 Mac fails using x86_64 bash and python3.8: ~/bin/scancode-toolkit-30.1.0
❯ arch -x86_64 /opt/local/bin/bash -c "/opt/local/bin/python3.8 -c 'import os; print(os.uname())'"
posix.uname_result(sysname='Darwin', nodename='Marcels-MacBook-Pro.local', release='21.3.0', version='Darwin Kernel Version 21.3.0: Wed Jan 5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T6000', machine='x86_64')
~/bin/scancode-toolkit-30.1.0
❯ arch -x86_64 /opt/local/bin/bash -c "./scancode --help"
* Configuring ScanCode for first use...
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/marcel/bin/scancode-toolkit-30.1.0/etc/thirdparty/virtualenv.pyz/__main__.py", line 4, in <module>
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/zipfile.py", line 6, in <module>
import binascii
ImportError: dynamic module does not define module export function (PyInit_binascii) |
I'm also trying to install on m1 mac, but I get the same error as #2835 (comment). (m1, python 3.9) |
@soimkim @MarcelBochtler Thank you for the reports. I now officially hate Apple and ARM. 👼 |
Downloaded tarball fails on my m1:
scancode-toolkit-30.1.0_py39-macos.tar.xz
|
@nsoft Thanks. The latest 31.* release candidate tarball should work on macOS with an M1 chip. The trick is that it requires to run in x86 emulation mode (aka. "Rosetta")... The installation/setup script in the release tarball handles this. See https://github.com/nexB/scancode-toolkit/blob/746c33683225efe16cf6630753b51ef7697574bb/scancode#L123 Alternatively you can force this mode on older versions by running first See also #2938 and in particular this comment: #2938 (comment) |
@soimkim @MarcelBochtler @jroes I would be grateful if you can try and report if the issue is still there with the latest 31.x release candidate or the procedure explained above #2835 (comment) |
Running `uname -m` on Apple silicon machines always results in `arm64`, regardless if Bash is running under Rosetta 2 emulation or natively. Check if scancode and configure is running under in emulation mode before relaunching it to avoid an infinite loop. Related to aboutcode-org#2835. Signed-off-by: Marcel Bochtler <[email protected]>
Running `uname -m` on Apple silicon machines always results in `arm64`, regardless if Bash is running in Rosetta 2 emulation or natively. Check if scancode and configure is running in emulation mode before relaunching it, to avoid an infinite loop. Related to aboutcode-org#2835. Signed-off-by: Marcel Bochtler <[email protected]>
Running `uname -m` on Apple silicon machines always results in `arm64`, regardless if Bash is running in Rosetta 2 emulation or natively. Check if scancode and configure is running in emulation mode (see [1]), before relaunching it, to avoid an infinite loop. Related to aboutcode-org#2835. [1]: https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment Signed-off-by: Marcel Bochtler <[email protected]>
Running `uname -m` on Apple silicon machines always results in `arm64`, regardless if Bash is running in Rosetta 2 emulation or natively. Check if scancode and configure is running in emulation mode (see [1]), before relaunching it, to avoid an infinite loop. [1]: https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment Signed-off-by: Marcel Bochtler <[email protected]>
This commit carries over a patch applied to the scancode and configure scripts to ensure that extractcode can work correctly in X86 emulated mode on Apple ARM silicon, * Only relaunch extractcode when not in emulation mode Running `uname -m` on Apple silicon machines always results in `arm64`, regardless if Bash is running in Rosetta 2 emulation or natively. Check if extractcode is running in emulation mode (see [1]), before relaunching it, to avoid an infinite loop. *Pass all parameters to the relaunched shell Calling `bash -c` with `$@` results in only the first parameter being passed to the subshell. Use `$*` to ensure all parameters are correctly passed to the Rosetta 2 emulated subshell. [1]: https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment Reported-by: Marcel Bochtler <[email protected]> Authored-by: Marcel Bochtler <[email protected]> Signed-off-by: Philippe Ombredanne <[email protected]>
Fix relaunching scancode on Apple silicon using Rosetta 2 emulation #2835
@pombredanne ,
However, in the environment set with conda, it is installed without error. |
@soimkim Thank you ++ for the report! |
Signed-off-by: Philippe Ombredanne <[email protected]>
The doc is updated in the #3053 PR. |
The tests are also running on release archives on various mac, windows and linux configurations. I am running Apple M1 tests by hand on a borrowed machine. |
https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html?highlight=RAM#system-requirements documents the minimum requirements ...
4GB and 500MB is on the low end and we want a 64 bits processor. We may run OK on Apple ARM M1 too though this is not tested and likely requires the x86 emulation mode.
To do this correctly, the following should be done:
The text was updated successfully, but these errors were encountered: