Closed Antelox closed 1 day ago
The failing tests are possibly related to https://github.com/capstone-engine/capstone/issues/2416. Both are clearly 32bit system issues.
@kabeor This PR opens the question if Capstone supports x86 systems. The tests fail on 32bit systems (at least Windows). I think it is a good idea to support it. Because there are also modern 32bit CPU architectures out there. So having at least a single x86 job is good reduces the chance of bugs also on the other archtectures.
Something is still wrong with the naming: https://github.com/capstone-engine/capstone/actions/runs/11813575581/job/32923353685?pr=2538
Something is still wrong with the naming: https://github.com/capstone-engine/capstone/actions/runs/11813575581/job/32923353685?pr=2538
That is ugly I know, but it's like that because that job is skipped hence the matrix doesn't get created and finally the placeholders don't get replaced
Successfully installed cstest_py-0.1.0 pyyaml-6.0.2
INFO:tests:Running python D:\a\capstone\capstone/bindings/python/tests/test_all.py
INFO:tests:#######################
Traceback (most recent call last):
File "D:\a\capstone\capstone/bindings/python/tests/test_all.py", line 3, in <module>
import test_lite
File "D:\a\capstone\capstone\bindings\python\tests\test_lite.py", line 4, in <module>
from capstone import *
ModuleNotFoundError: No module named 'capstone'
Traceback (most recent call last):
File "D:\a\capstone\capstone/suite/run_tests.py", line 23, in <module>
subprocess.run(test.split(" "), check=True)
File "C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\python.3.8.10\tools\lib\subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['python', 'D:\\a\\capstone\\capstone/bindings/python/tests/test_all.py']' returned non-zero exit status 1.
Error: Command python -m pip install D:\a\capstone\capstone\bindings\python/cstest_py && python D:\a\capstone\capstone/suite/run_tests.py
failed with code 1.
This one is weird: https://github.com/capstone-engine/capstone/actions/runs/11818841771/job/32927697780?pr=2538 Happens also for this job. Let's see after the review of the others if it is fixed.
This one is weird: https://github.com/capstone-engine/capstone/actions/runs/11818841771/job/32927697780?pr=2538 Happens also for this job. Let's see after the review of the others if it is fixed.
Should be internal GitHub networking issue
I can't see if this is also the case for all architectures (like Linux + AArch64, Windows + AArch64 or Windows i686). But if all those are free, we should absolutely enable some more runners.
Those are not native runners so it's not the case. Here you can check what are the specs of the runners. Basically all are x64 plus macos-latest one that is AppleSilicon (ARM).
@kabeor The run in case of tag creation: https://github.com/Antelox/capstone/actions/runs/11839185045
Binaries look good as well:
for f in $(ls ./*/capstone/lib/*); do file $f; done
./capstone-6.0.0a1-cp310-cp310-macosx_10_9_universal2/capstone/lib/libcapstone.dylib: Mach-O universal binary with 2 architectures: [x86_64:\012- Mach-O 64-bit x86_64 dynamically linked shared library, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|NO_REEXPORTED_DYLIBS>] [\012- arm64]
./capstone-6.0.0a1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64/capstone/lib/libcapstone.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=d139511e718f699bc4ff70698f6e5cd7d2c9d26d, not stripped
./capstone-6.0.0a1-cp310-cp310-win_amd64/capstone/lib/capstone.dll: PE32+ executable (DLL) (GUI) x86-64, for MS Windows, 6 sections
./capstone-6.0.0a1-cp310-cp310-win_arm64/capstone/lib/capstone.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows, 6 sections
./capstone-6.0.0a1-cp39-cp39-macosx_10_9_x86_64/capstone/lib/libcapstone.dylib: Mach-O 64-bit x86_64 dynamically linked shared library, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|NO_REEXPORTED_DYLIBS>
./capstone-6.0.0a1-cp39-cp39-macosx_11_0_arm64/capstone/lib/libcapstone.dylib: Mach-O 64-bit arm64 dynamically linked shared library, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|NO_REEXPORTED_DYLIBS>
./capstone-6.0.0a1-cp39-cp39-musllinux_1_2_x86_64/capstone/lib/libcapstone.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=fd9af6ba25a55df236d41a04d6d4776f7b585cab, with debug_info, not stripped
./capstone-6.0.0a1-cp39-cp39-win_amd64/capstone/lib/capstone.dll: PE32+ executable (DLL) (GUI) x86-64, for MS Windows, 6 sections
The sdist
build fails though (on Linux). Please remove the issue from the list above or fix it.
Processing ./capstone-6.0.0a1.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: capstone
Building wheel for capstone (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for capstone (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [69 lines of output]
/tmp/pip-build-env-jwlqop42/overlay/lib/python3.12/site-packages/setuptools/dist.py:330: InformationOnly: Normalizing '6.0.0alpha1' to '6.0.0a1'
self.metadata.version = self._normalize_version(self.metadata.version)
INFO:root:running bdist_wheel
INFO:root:running build
INFO:root:running build_py
INFO:__main__:Building C extensions
INFO:__main__:Build Directory: /tmp/pip-req-build-dqzt6b7j/src/build_python
-- The C compiler identification is GNU 14.2.1
-- The CXX compiler identification is GNU 14.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test SUPPORTS_MU
-- Performing Test SUPPORTS_MU - Success
-- Performing Test SUPPORTS_SHADOWING
-- Performing Test SUPPORTS_SHADOWING - Success
-- Performing Test SUPPORTS_SUNINIT
-- Performing Test SUPPORTS_SUNINIT - Failed
Enabling CAPSTONE_ARM_SUPPORT
Enabling CAPSTONE_AARCH64_SUPPORT
Enabling CAPSTONE_M68K_SUPPORT
Enabling CAPSTONE_MIPS_SUPPORT
Enabling CAPSTONE_PPC_SUPPORT
Enabling CAPSTONE_SPARC_SUPPORT
Enabling CAPSTONE_SYSTEMZ_SUPPORT
Enabling CAPSTONE_XCORE_SUPPORT
Enabling CAPSTONE_X86_SUPPORT
Enabling CAPSTONE_TMS320C64X_SUPPORT
Enabling CAPSTONE_M680X_SUPPORT
Enabling CAPSTONE_EVM_SUPPORT
Enabling CAPSTONE_MOS65XX_SUPPORT
Enabling CAPSTONE_WASM_SUPPORT
Enabling CAPSTONE_BPF_SUPPORT
Enabling CAPSTONE_RISCV_SUPPORT
Enabling CAPSTONE_SH_SUPPORT
Enabling CAPSTONE_TRICORE_SUPPORT
Enabling CAPSTONE_ALPHA_SUPPORT
Enabling CAPSTONE_HPPA_SUPPORT
Enabling CAPSTONE_LOONGARCH_SUPPORT
Enabling CAPSTONE_XTENSA_SUPPORT
CMake Error: File /tmp/pip-req-build-dqzt6b7j/src/capstone.pc.in does not exist.
CMake Error at CMakeLists.txt:879 (configure_file):
configure_file Problem configuring file
CMake Error: File /tmp/pip-req-build-dqzt6b7j/src/capstone-config.cmake.in does not exist.
CMake Error at /usr/share/cmake/Modules/CMakePackageConfigHelpers.cmake:501 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:884 (configure_package_config_file)
CMake Error: File /tmp/pip-req-build-dqzt6b7j/src/cmake_uninstall.cmake.in does not exist.
CMake Error at CMakeLists.txt:924 (configure_file):
configure_file Problem configuring file
-- Configuring incomplete, errors occurred!
gmake: Makefile: No such file or directory
gmake: *** No rule to make target 'Makefile'. Stop.
error: [Errno 2] No such file or directory: 'libcapstone.so.6'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for capstone
Failed to build capstone
ERROR: Could not build wheels for capstone, which is required to install pyproject.toml-based projects
The
sdist
build fails though (on Linux). Please remove the issue from the list above or fix it.Processing ./capstone-6.0.0a1.tar.gz Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: capstone Building wheel for capstone (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for capstone (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [69 lines of output] /tmp/pip-build-env-jwlqop42/overlay/lib/python3.12/site-packages/setuptools/dist.py:330: InformationOnly: Normalizing '6.0.0alpha1' to '6.0.0a1' self.metadata.version = self._normalize_version(self.metadata.version) INFO:root:running bdist_wheel INFO:root:running build INFO:root:running build_py INFO:__main__:Building C extensions INFO:__main__:Build Directory: /tmp/pip-req-build-dqzt6b7j/src/build_python -- The C compiler identification is GNU 14.2.1 -- The CXX compiler identification is GNU 14.2.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test SUPPORTS_MU -- Performing Test SUPPORTS_MU - Success -- Performing Test SUPPORTS_SHADOWING -- Performing Test SUPPORTS_SHADOWING - Success -- Performing Test SUPPORTS_SUNINIT -- Performing Test SUPPORTS_SUNINIT - Failed Enabling CAPSTONE_ARM_SUPPORT Enabling CAPSTONE_AARCH64_SUPPORT Enabling CAPSTONE_M68K_SUPPORT Enabling CAPSTONE_MIPS_SUPPORT Enabling CAPSTONE_PPC_SUPPORT Enabling CAPSTONE_SPARC_SUPPORT Enabling CAPSTONE_SYSTEMZ_SUPPORT Enabling CAPSTONE_XCORE_SUPPORT Enabling CAPSTONE_X86_SUPPORT Enabling CAPSTONE_TMS320C64X_SUPPORT Enabling CAPSTONE_M680X_SUPPORT Enabling CAPSTONE_EVM_SUPPORT Enabling CAPSTONE_MOS65XX_SUPPORT Enabling CAPSTONE_WASM_SUPPORT Enabling CAPSTONE_BPF_SUPPORT Enabling CAPSTONE_RISCV_SUPPORT Enabling CAPSTONE_SH_SUPPORT Enabling CAPSTONE_TRICORE_SUPPORT Enabling CAPSTONE_ALPHA_SUPPORT Enabling CAPSTONE_HPPA_SUPPORT Enabling CAPSTONE_LOONGARCH_SUPPORT Enabling CAPSTONE_XTENSA_SUPPORT CMake Error: File /tmp/pip-req-build-dqzt6b7j/src/capstone.pc.in does not exist. CMake Error at CMakeLists.txt:879 (configure_file): configure_file Problem configuring file CMake Error: File /tmp/pip-req-build-dqzt6b7j/src/capstone-config.cmake.in does not exist. CMake Error at /usr/share/cmake/Modules/CMakePackageConfigHelpers.cmake:501 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): CMakeLists.txt:884 (configure_package_config_file) CMake Error: File /tmp/pip-req-build-dqzt6b7j/src/cmake_uninstall.cmake.in does not exist. CMake Error at CMakeLists.txt:924 (configure_file): configure_file Problem configuring file -- Configuring incomplete, errors occurred! gmake: Makefile: No such file or directory gmake: *** No rule to make target 'Makefile'. Stop. error: [Errno 2] No such file or directory: 'libcapstone.so.6' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for capstone Failed to build capstone ERROR: Could not build wheels for capstone, which is required to install pyproject.toml-based projects
Should be fixed with commit: https://github.com/capstone-engine/capstone/pull/2538/commits/82fe006a60eb4035932a0a52c0733a8b8f7238ba
Your checklist for this pull request
Detailed description
setup.py
to remove hacks regarding packaging of wheels for different platforms, improve and cleanup the codeREADME.txt
Makefile
andbuild_wheel.sh
scriptscstest_py
positional argumentintegration_tests.py
run_tests.py
script to run all the python unittestssrc
folder forsdist
archiveTest plan
There are 6 tests failing for both Linux and Windows x86 arch.
Closing issues
I suppose it should close: