-
-
Notifications
You must be signed in to change notification settings - Fork 553
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
Many scancode dependencies are broken for Mac M1 #3205
Comments
Additionally, trying to install the [full] scancode option yields:
|
At least one of the issues I am seeing is being tracked here: #3169. |
@rnjudge Thanks for the report! do you know if there is a free (as in beer) hosted CI service that runs Apple ARM silicon on macOS? |
Is there a big difference between the Apple ARM M1 chip and a normal ARM based chip? Meaning, could it be enough to make everything work on a ARM chip (e. g. Raspberry PI or AWS A1 instance). And once it is working one could test it manually on a M1 chip. |
@Jeeppler re:
I have no idea... but I would doubt that macOS can be installed (legally) on non-Apple hardware, so the issue may be part ARM and part macOS? Though, I recall now that I released macOS fat binary wheels for https://github.com/inveniosoftware/intbitset/ and https://github.com/WojciechMula/pyahocorasick in the last few days. Could you test if these pre-built binaries work on your machine with a pip install? |
@pombredanne I have no mac. I was just curious if the solution could be to compile the dependencies on Linux ARM and then try to run it on macOS. @rnjudge has a macOS with M1 chip, as far as I understand. Only she can help you test. |
I installed the latest
|
@rnjudge I had NOT paid attention to all the details you brought... you are not running a macOS with an ARM chip ;) .... you are running Linux on ARM, right? In this case this totally untested and I have no pre-built wheels for pyahocorasick or intbitset (and for also several other more common libs) but I see lxml as aarch builds. Can you try a |
Apologies for not being more clear, @pombredanne! As I noted in my original issue, I do see the same install issues in both environments (M1 shell vs Ubunutu shell on M1 via Fusion) but I am most interested in getting this working for my Linux environment given that is where I do all my development for Tern. I ran the pip upgrade command for lxml but I already had the latest version installed so it didn't try to fetch or build from source. I uninstalled lxml and re-installed it to see what it would pull and it fetched and installed the wheel as is:
|
@pombredanne, my experience on an M1 (both native macOS and Ubuntu w/Parallels) is exactly the same as what @rnjudge experiences. Even have the same issue with intbitset. |
@pombredanne any update on this? This is a large blocker from my POV and one that is making me rethink Tern's integration with Scancode given that there is an increasing developer community (myself included) that still cannot install Scancode :/ |
@rnjudge We support running ScanCode toolkit on macOS M1 using X86 roseta emulation alright as documented in the installation instructions. If you have a properly installed toolchain you should be able otherwise to compile from sources intbitset and pyahocorasick and there are ways to create plugins and configure typecode and extractcode to use OS-provided binaries for these natives. This is rather involved and requires some time to spend. You can also try to use scancode-toolkit-mini for a pip installation that has fewer dependencies (and also fewer features). So the net is that this is not a trivial thing to do AND things are otherwise working fine using the documented roseta/X86 emulation installation when using an application archive. To "support natively macOS on M1 and Linux on ARM" -- we would need all these covered:
A rough estimate is that this is going to take 15 to 20 days of initial setup work and about 1 day per month afterwards to maintain and support this. And the Ci/CD should to be in the $50/month range. Since this requires quite a bit of work and demands using extra paid resources for a CI/CD, are you willing to help there in cash or in kind? I cannot see how this can happen without funding and help. @heliocastro I know you are interested too and started some work there, @stevespringett you too? so may be there is a way to pool efforts to fund this? |
@rnjudge note also that we have a GSoC student selected to help in this area with a project to provide a few pure python, slower alternative for three core libraries: intbitset, pyahocorasick and lxml. This will run over the summer and is only a partial solution. |
responding to ping. I can't contribute. I was just trying to help solve that specific wheel issue, I'm not doing anything on M1 or ARM. |
@pombredanne I was able to install scancode-toolkit-mini and will suggest this to Tern's M1 users going forward. I unfortunately can't pledge other resources right now. |
@rnjudge re:
This is awesome and this was designed for this use case too! Glad you got it to work.
that's cool too. |
Facing the same issue, Im on Mac M1 and I am using the ubuntu docker shell with volume mounted
Inside the docker shell, when I install the pre-requisites and run
|
@jayanth-kumar-morem the workaround is to enable the X86 "rosetta" emulation on your shell (which is also done automatically when you use the app archive's "scancode" root script https://github.com/nexB/scancode-toolkit/blob/f70bbb7d9d9bab40a9d504e664bc945b6a1630e8/scancode#L124) or use the |
Description
This is not necessarily a bug with Scancode, but a handful of the required dependencies are broken and cannot install on Mac M1 platform. This is a huge blocker for anyone using this platform as it is impossible to install scancode using pip. Perhaps the scancode docs should be updated to note that scancode is not usable on this platform?
How To Reproduce
Try to install scancode on Mac M1 computer. In my case, I am running Ubunutu VM using fusion but the same issues arise when I try to install scancode directly on my mac shell (not in a fusion VM).
Specific libraries with issues installing:
bitarray intbitset lxml pyahocorasick pycryptodome cffi
System configuration
What OS are you running on?
MacOS Monteray 12.2.1 (M1 chip)
What version of scancode-toolkit was used to generate the scan file?
Attempting to install scancode_toolkit-31.2.4-cp310-none-any.whl
What installation method was used to install/run scancode? (pip/source download/other)
pip
The text was updated successfully, but these errors were encountered: