Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

`import inotify.adapters` does not work on M1 Mac

Đang mở
#2,145 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
macos, python

Hướng nghiên cứu

Bắt đầu với src/tests/integration/test_prove.py và tái hiện lỗi import bằng các lệnh poetry và make test-integration đã được báo cáo trên máy Mac M1. Hoàn tất khi việc import inotify không còn ngăn cản quá trình thu thập các bài kiểm thử tích hợp trên nền tảng đó và các bài kiểm thử bị ảnh hưởng có thể chạy được.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

There is a problem with the newly introduced inotify dependency. In particular, when I try to run the integrataion tests of KEVM locally on my M1 Mac, I get the following error:

petarmax@PetarMax kevm-pyk % make test-integration PYTEST_ARGS='-k test_prove.py --update-expected-output'
poetry install
Installing dependencies from lock file

No dependencies to install or update

Installing the current project: kevm-pyk (1.0.329)
poetry run pytest src/tests/integration --verbose --durations=0 --dist=worksteal --maxfail=1 --numprocesses=8 -k test_prove.py --update-expected-output
====================================================================================== test session starts ======================================================================================
platform darwin -- Python 3.10.13, pytest-7.4.2, pluggy-1.3.0 -- /Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/bin/python
cachedir: .pytest_cache
rootdir: /Users/petarmax/Projects/RV/kevm/worktree/lemmas/kevm-pyk
plugins: pyk-0.1.478, timeout-2.2.0, cov-4.1.0, mock-3.12.0, xdist-3.3.1
collecting 0 items / 1 error                                                                                                                                                                    
============================================================================================ ERRORS =============================================================================================
_____________________________________________________________________ ERROR collecting src/tests/integration/test_prove.py ______________________________________________________________________
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/_pytest/runner.py:372: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/_pytest/python.py:531: in collect
    self._inject_setup_module_fixture()
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/_pytest/python.py:545: in _inject_setup_module_fixture
    self.obj, ("setUpModule", "setup_module")
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/_pytest/python.py:310: in obj
    self._obj = obj = self._getobj()
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/_pytest/python.py:528: in _getobj
    return self._importtestmodule()
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/_pytest/python.py:617: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/_pytest/pathlib.py:567: in import_path
    importlib.import_module(module_name)
/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1050: in _gcd_import
    ???
<frozen importlib._bootstrap>:1027: in _find_and_load
    ???
<frozen importlib._bootstrap>:1006: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:688: in _load_unlocked
    ???
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:178: in exec_module
    exec(co, module.__dict__)
src/tests/integration/test_prove.py:10: in <module>
    import inotify.adapters  # type: ignore
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/inotify/adapters.py:11: in <module>
    import inotify.calls
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/inotify/calls.py:39: in <module>
    inotify_init = _LIB.inotify_init
/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ctypes/__init__.py:387: in __getattr__
    func = self.__getitem__(name)
/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ctypes/__init__.py:392: in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
E   AttributeError: dlsym(0x3a9c6d5d8, inotify_init): symbol not found
==================================================================================== short test summary info ====================================================================================
ERROR src/tests/integration/test_prove.py - AttributeError: dlsym(0x3a9c6d5d8, inotify_init): symbol not found

which can be isolated to

petarmax@dyn3230-161 kevm-pyk % poetry run python                                                                              
^[[APython 3.10.13 (main, Aug 24 2023, 22:36:46) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import inotify.adapters
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/inotify/adapters.py", line 11, in <module>
    import inotify.calls
  File "/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/inotify/calls.py", line 39, in <module>
    inotify_init = _LIB.inotify_init
  File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ctypes/__init__.py", line 387, in __getattr__
    func = self.__getitem__(name)
  File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ctypes/__init__.py", line 392, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(0x3a9c6d5d8, inotify_init): symbol not found
Ngôn ngữ chính
KCL
Star
592
Fork
156
Merge trung bình
2 giờ 19 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của runtimeverification/evm-semantics

Tất cả issue của runtimeverification/evm-semantics

Issue tương tự

Thêm issue về Operating Systems

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.