pjetkin
pjetkin

Reputation: 31

Pyinotify error when building linux with yocto on mac osx

I'm trying to build a linux with yocto (morty) on my Mac OSX (El Capitan). The source step with source poky/oe-init-build-env buildsucceeded without errors, but when I execute bitbake core-image-baseI get the following error trace:

Traceback (most recent call last):
    File     "/Users/peterblicharski/Entwicklung/dnsPro/yocto/yoctowa/poky/bitbake/bin/bitbake", line 48, in <module>
        cookerdata.CookerConfiguration()))
    File "/Users/peterblicharski/Entwicklung/dnsPro/yocto/yoctowa/poky/bitbake/lib/bb/main.py", line 468, in bitbake_main
        server = start_server(servermodule, configParams, configuration, featureset)
    File "/Users/peterblicharski/Entwicklung/dnsPro/yocto/yoctowa/poky/bitbake/lib/bb/main.py", line 354, in start_server
        cooker = bb.cooker.BBCooker(configuration, features)
    File "/Users/peterblicharski/Entwicklung/dnsPro/yocto/yoctowa/poky/bitbake/lib/bb/cooker.py", line 178, in __init__
        self.configwatcher = pyinotify.WatchManager()
    File "/Users/peterblicharski/Entwicklung/dnsPro/yocto/yoctowa/poky/bitbake/lib/pyinotify.py", line 1759, in __init__
        raise InotifyBindingNotFoundError()
pyinotify.InotifyBindingNotFoundError: Couldn't find any inotify binding
DEBUG: Removed the following variables from the environment: __CF_USER_TEXT_ENCODING, XPC_SERVICE_NAME, SECURITYSESSIONID, PS1, TERM_PROGRAM_VERSION, TMPDIR, _, TERM_PROGRAM, DISPLAY, LANG, SHLVL, GIT_PS1_SHOWDIRTYSTATE, Apple_PubSub_Socket_Render, __PYVENV_LAUNCHER__, OLDPWD, XPC_FLAGS, TERM_SESSION_ID, BUILDDIR

Upvotes: 3

Views: 1493

Answers (1)

Jussi Kukkonen
Jussi Kukkonen

Reputation: 14617

Mac is not a supported build host and currently does not work at all. Quoting Ross Burton from mailing list:

If you install all of the GNU tools using brew or similar and put them first on $PATH then you can get bitbake started. Then you need to stub out the linux-specific bits in bitbake. I've previously started on this work already (http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=ross/darwin). The next step is figuring out how to configure OE to build and link natively on OSX using LLVM instead of GCC.

However all of this is mostly academic because in Sierra (iirc) onwards there is tighter security on processes, which means that pseudo won't work even if you port it to macOS.

Your error would be part of "linux-specific bits in bitbake" and seems to be worked around in ross' branch. But as you can see it's not the last issue you'll face.

Based on the discussion there are probably ways to get pseudo running but after that you would get to fix all the native builds Yocto does: it's likely that many projects we use are not frequently built on Mac and will fail there.

Upvotes: 1

Related Questions