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

Bug when trying to build docs on an M1 mac #249

Open
ajessup opened this issue Jul 29, 2022 · 2 comments
Open

Bug when trying to build docs on an M1 mac #249

ajessup opened this issue Jul 29, 2022 · 2 comments

Comments

@ajessup
Copy link
Member

ajessup commented Jul 29, 2022

When trying to build the docs on an M1 mac, with Docker provided by Docker Desktop, the following error arises when running make docker-serve.

Building sites … WARN 2022/07/29 14:33:55 Page.URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url
Traceback (most recent call last):
  File "/home/appuser/.local/share/virtualenvs/app-4PlAip0Q/bin/watchmedo", line 8, in <module>
    sys.exit(main())
  File "/home/appuser/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.8/site-packages/watchdog/watchmedo.py", line 672, in main
    args.func(args)
  File "/home/appuser/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.8/site-packages/watchdog/watchmedo.py", line 526, in shell_command
    observe_with(observer, handler, args.directories, args.recursive)
  File "/home/appuser/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.8/site-packages/watchdog/watchmedo.py", line 180, in observe_with
    observer.start()
  File "/home/appuser/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.8/site-packages/watchdog/observers/api.py", line 262, in start
    emitter.start()
  File "/home/appuser/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.8/site-packages/watchdog/utils/__init__.py", line 93, in start
    self.on_thread_start()
  File "/home/appuser/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.8/site-packages/watchdog/observers/inotify.py", line 118, in on_thread_start
    self._inotify = InotifyBuffer(path, self.watch.is_recursive)
  File "/home/appuser/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.8/site-packages/watchdog/observers/inotify_buffer.py", line 35, in __init__
    self._inotify = Inotify(path, recursive)
  File "/home/appuser/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.8/site-packages/watchdog/observers/inotify_c.py", line 155, in __init__
    Inotify._raise_error()
  File "/home/appuser/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.8/site-packages/watchdog/observers/inotify_c.py", line 406, in _raise_error
    raise OSError(err, os.strerror(err))
OSError: [Errno 38] Function not implemented
make: *** [docker-serve] Error 1

The likely reason for this is that Docker Desktop on M1 macs uses QMEU to emulate, which is incompatible with inotify. Similar issues have been reported with the watchdog library elsewhere, for example:

Unfortunately a cursory examination suggests this might not be a simple fix (I tried updating to watchdog 2.1.9 but that didn't solve anything). It's likely that either we'll need to ask M1 users to use a different emulation layer, build from an ARM base image, or just swap out watchdog for something that's not inotify based.

@ajessup
Copy link
Member Author

ajessup commented Jul 29, 2022

cc @mchurichi would love to hear any thoughts you have here

@mchurichi
Copy link
Member

Thanks for opening this, @ajessup. Looks to me that the simplest fix would be to avoid the use of any inotify-based utility. I'll do some research on alternatives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants