Skip to content
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

import inotify.adapters does not work on M1 Mac #2145

Open
PetarMax opened this issue Oct 30, 2023 · 0 comments
Open

import inotify.adapters does not work on M1 Mac #2145

PetarMax opened this issue Oct 30, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@PetarMax
Copy link
Contributor

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
@yale-vinson yale-vinson added the bug Something isn't working label Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants