google / atheris

Apache License 2.0
1.35k stars 111 forks source link

Atheris fails to build on macOS 14.2.1 with Homebrew clang 17.0.6 #80

Open jordancurve opened 4 months ago

jordancurve commented 4 months ago

❯ python3.12 -m pip install . Processing /Users/somebody/src/atheris Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: atheris Building wheel for atheris (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for atheris (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [43 lines of output] running bdist_wheel running build running build_py copying atheris_no_libfuzzer.py -> build/lib.macosx-10.9-universal2-cpython-312 copying src/custom_crossover_fuzz_test.py -> build/lib.macosx-10.9-universal2-cpython-312/atheris copying src/regex_match_generation_test.py -> build/lib.macosx-10.9-universal2-cpython-312/atheris copying src/fuzz_test.py -> build/lib.macosx-10.9-universal2-cpython-312/atheris copying src/function_hooks.py -> build/lib.macosx-10.9-universal2-cpython-312/atheris copying src/fuzz_test_lib.py -> build/lib.macosx-10.9-universal2-cpython-312/atheris copying src/coverage_test_helper.py -> build/lib.macosx-10.9-universal2-cpython-312/atheris copying src/custom_mutator_and_crossover_fuzz_test.py -> build/lib.macosx-10.9-universal2-cpython-312/atheris copying src/coverage_test.py -> build/lib.macosx-10.9-universal2-cpython-312/atheris copying src/init.py -> build/lib.macosx-10.9-universal2-cpython-312/atheris copying src/version_dependent.py -> build/lib.macosx-10.9-universal2-cpython-312/atheris copying src/utils.py -> build/lib.macosx-10.9-universal2-cpython-312/atheris copying src/instrument_bytecode.py -> build/lib.macosx-10.9-universal2-cpython-312/atheris copying src/import_hook.py -> build/lib.macosx-10.9-universal2-cpython-312/atheris copying src/fuzzed_data_provider_test.py -> build/lib.macosx-10.9-universal2-cpython-312/atheris copying src/custom_mutator_fuzz_test.py -> build/lib.macosx-10.9-universal2-cpython-312/atheris copying src/pyinstaller_coverage_test.py -> build/lib.macosx-10.9-universal2-cpython-312/atheris copying src/hook-atheris.py -> build/lib.macosx-10.9-universal2-cpython-312/atheris copying src/coverage_g3test.py -> build/lib.macosx-10.9-universal2-cpython-312/atheris running build_ext Your libFuzzer is up-to-date. clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -arch arm64 -arch x86_64 -g -I/Users/somebody/src/codegene.com/.venv/include -I/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c /var/folders/_y/99154p1d23l6160p63_yq98h0000gn/T/tmpffongksq.cpp -o var/folders/_y/99154p1d23l6160p63_yq98h0000gn/T/tmpffongksq.o -std=c++14 building 'atheris.native' extension clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -arch arm64 -arch x86_64 -g -DVERSION_INFO='2.3.0' -DATHERIS_MODULE_NAME=native -I/private/var/folders/_y/99154p1d23l6160p63_yq98h0000gn/T/pip-build-env-p5du0366/normal/lib/python3.12/site-packages/pybind11/include -I/Users/somebody/src/codegene.com/.venv/include -I/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c src/native/atheris.cc -o build/temp.macosx-10.9-universal2-cpython-312/src/native/atheris.o -DPYBIND11_DETAILED_ERROR_MESSAGES=1 -Wno-attributes -Wno-address -Wno-deprecated-declarations -stdlib=libc++ -mmacosx-version-min=10.7 -std=c++14 clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -arch arm64 -arch x86_64 -g -DVERSION_INFO='2.3.0' -DATHERIS_MODULE_NAME=native -I/private/var/folders/_y/99154p1d23l6160p63_yq98h0000gn/T/pip-build-env-p5du0366/normal/lib/python3.12/site-packages/pybind11/include -I/Users/somebody/src/codegene.com/.venv/include -I/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c src/native/codetable_gen.cc -o build/temp.macosx-10.9-universal2-cpython-312/src/native/codetable_gen.o -DPYBIND11_DETAILED_ERROR_MESSAGES=1 -Wno-attributes -Wno-address -Wno-deprecated-declarations -stdlib=libc++ -mmacosx-version-min=10.7 -std=c++14 src/native/codetable_gen.cc:45:3: warning: array index 262 is past the end of the array (that has type 'uint8_t[256]' (aka 'unsigned char[256]')) [-Warray-bounds] 45 | opcode_caches[LOAD_METHOD] = 10; | ^ ~~~ src/native/codetable_gen.cc:34:1: note: array 'opcode_caches' declared here 34 | uint8_t opcode_caches[256]; | ^ src/native/codetable_gen.cc:46:17: error: use of undeclared identifier 'PRECALL'; did you mean 'P_ALL'? 46 | opcode_caches[PRECALL] = 1; | ^~~ | P_ALL /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/sys/wait.h:80:2: note: 'P_ALL' declared here 80 | P_ALL, | ^ 1 warning and 1 error generated. error: command '/opt/homebrew/opt/llvm/bin/clang' failed with exit code 1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for atheris Failed to build atheris ERROR: Could not build wheels for atheris, which is required to install pyproject.toml-based projects

❯ which clang /opt/homebrew/opt/llvm/bin/clang

❯ clang --version Homebrew clang version 17.0.6 Target: arm64-apple-darwin23.2.0 Thread model: posix InstalledDir: /opt/homebrew/opt/llvm/bin

tecknicaltom commented 1 month ago

this is likely the same issue as #82 to build against python 3.12