-
Notifications
You must be signed in to change notification settings - Fork 492
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
Broken capstone install on Apple Silicon Macs (arm64) #1196
Comments
@digitalisx @branchvincent @gcmoreira @eve-mem @npetroni Tagging people here who have more pip experience than I do |
@atcuno It seems you can add those options to $ cat requirements.txt
--pre
--no-binary capstone
capstone>=3.0.5 That will include those options in the
I haven't tested that, could you check if that works on Mac? On the other hand, I think we should limit the pre-releases to capstone only. The pre-release-version docs says:
So, I think we could avoid the
EDIT: The above will also include the 3.0.5 pre-releases, such as 3.0.5rc2. See more in the next post. hope that helps |
To test the pre-release setting, I did the following:
To simulate that the lastest available version (including the pre-releases) is i.e. $ pip install --dry-run "capstone>=3.0.5,<5.0.0.post1" | grep "Would install"
Would install capstone-4.0.2
$ pip install --dry-run --pre "capstone>=3.0.5,<5.0.0.post1" | grep "Would install"
Would install capstone-4.0.2 Hm that's weird. In this case $ pip install --dry-run "capstone>=3.0.5,<5.0.1,!=5.0.0.post1" | grep "Would install"
Would install capstone-4.0.2
$ pip install --dry-run --pre "capstone>=3.0.5,<5.0.1,!=5.0.0.post1" | grep "Would install"
Would install capstone-5.0.0rc4 That worked. As it's expected, the Let's try if removing the $ pip install --dry-run "capstone>=3.0.5.dev0,<5.0.1,!=5.0.0.post1" | grep "Would install"
Would install capstone-5.0.0rc4 Even though the Using just
To sum up, as the
That way, we can avoid to activate pre-releases for all modules, and the behaviour will be the same as |
The following also proves that the $ pip install --dry-run --debug -vvv -r requirements.txt 2>&1 | grep "Skipping.*binaries"
Skipping link: No binaries permitted for capstone: https://files.pythonhosted.org/packages/85/10/acee17a5e42f370306aafa732b5d370e736d5a9f258820a6d680d2f68803/capstone-3.0.5rc2-py2-none-manylinux1_i686.whl (from https://pypi.org/simple/capstone/)
Skipping link: No binaries permitted for capstone: https://files.pythonhosted.org/packages/fd/33/d1fc2d01b85572b88c9b4c359f36f88f8c32f2f0b9ffb2d21cd41bad2257/capstone-3.0.5rc2-py2-none-manylinux1_x86_64.whl (from https://pypi.org/simple/capstone/)
Skipping link: No binaries permitted for capstone: https://files.pythonhosted.org/packages/92/78/0bb5949fdd0cc45302fdb7d2e390ed7ba165a0a3df292541cb4ba1a23ea6/capstone-3.0.5rc2-py2-none-win32.whl (from https://pypi.org/simple/capstone/)
Skipping link: No binaries permitted for capstone: https://files.pythonhosted.org/packages/07/6d/5a05b17e65ada4e6940df19f82d248820114fd7a2590
... |
Has this been resolved by merging #1157? |
This is fixed. Thanks @ikelos and @gcmoreira |
Using pip to install Volatility with the provided requirements.txt file breaks on Apple Silicon Macs due to a long standing capstone bug where the amd64 binary of capstone is installed even on arm64 systems.
The current answer to work around it is here:
capstone-engine/capstone#2147 (comment)
which is running this command to install capstone:
pip install --pre --no-binary capstone capstone
And there is a long trail of tickets about the problem, but the latest from the developer team is that it will be properly fixed in 5.0.2, which was made in a comment from April:
capstone-engine/capstone#2221 (comment)
But 5.0.2 is still not yet released by capstone.
So currently, we will be guaranteed a broken Volatility install on Apple Silicon systems, plus presumably other ARM64 systems people might have, like Linux on ARM.
I am not well versed at all in writing complex requirements.txt, so I am not sure if we can replicate the "--pre --no-binary capstone capstone" logic inside of it for some time until capstone releases 5.0.2. If we don't have a workaround though, we will likely be receiving many bug reports soon as people starting using Volatility 3 more in the run up to the October event. In the workshop I ran this week, out of the ~40 students, around half of them had the Apple Silicon Macs and had to manually run the command with --pre after uninstalling the version our requirements.txt installs.
The text was updated successfully, but these errors were encountered: