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
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.
Related
On Mac OS 10.13.1
Using Scapy for the first time to do a simple packet-sniffing project.
Was working perfectly fine over the weekend after following the installation instructions here for Mac OS:
https://phaethon.github.io/scapy/api/installation.html
Hardware problems required me to move my work to a different machine, running the exact same OS.
I figured "no problem" - setup a new Python 3 venv and reinstalled dependencies on the second laptop (libdnet via brew, libpcap and scapy3k via pip).
Now a simple test using sniff() in Scapy produces the following error:
Traceback (most recent call last):
File "", line 1, in
File "/Users/ersheff/Virtualenvs/Scapy/lib/python3.6/site->packages/scapy/sendrecv.py", line 576, in sniff
s = L2socket(type=ETH_P_ALL, *arg, **karg)
File "/Users/ersheff/Virtualenvs/Scapy/lib/python3.6/site->packages/scapy/arch/linux.py", line 469, in init
self.ins = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, >socket.htons(type))
AttributeError: module 'socket' has no attribute 'AF_PACKET'
I'm well aware that the AF_PACKET attribute is not available on Mac OS and is specific to Linux, and as you might expect, all of my searching about this problem leads to that answer. However, as mentioned, this method was working for me before on a different machine with the same OS.
Admittedly, I'm a novice, but reading that error makes it look to me like Scapy is erroneously referring to the linux.py file in the arch directory when it should be referring to the bsd.py or unix.py files (both of which are present).
Any ideas?
Thanks in advance.
This question is old. For the record, the official scapy version now supports Python 3. OSX has been fixed on their sides:
https://github.com/secdev/scapy
Have a nice week,
During its startup, Spyder3 IDE crashes under Python(x,y). I have installed a Python(x,y) distribution (2.7.10.0) of Python2.7 under Windows 7 and after updating the package spyder to the most recent version (with pip: V3.0.x), it does not restart anymore. Resetting the spyder config does not help.
It is reproducible as I checked it on 3 computers and also with the Enthought distribution, it has the same problem. Only under Anaconda, it keeps working properly.
The error message is stored in the contents of file spyder_crash.log:
Traceback (most recent call last):
File "c:\python27\lib\site-packages\spyder\app\mainwindow.py", line 3001, in main
mainwindow = run_spyder(app, options, args)
File "c:\python27\lib\site-packages\spyder\app\mainwindow.py", line 2905, in run_spyder
main.setup()
File "c:\python27\lib\site-packages\spyder\app\mainwindow.py", line 1010, in setup
from xy.config import DOC_PATH as xy_doc_path
File "c:\python27\lib\site-packages\xy\config.py", line 40, in <module>
CONF = UserConfig('xy', defaults=DEFAULTS, version=__version__, subfolder='.xy')
File "c:\python27\lib\site-packages\xy\userconfig.py", line 110, in __init__
if version != self.get_version(version):
File "c:\python27\lib\site-packages\xy\userconfig.py", line 130, in get_version
return self.get(self.DEFAULT_SECTION_NAME, 'version', version)
File "c:\python27\lib\site-packages\xy\userconfig.py", line 269, in get
value = cp.ConfigParser.get(self, section, option, raw=self.raw)
File "c:\python27\lib\site-packages\backports\configparser\__init__.py", line 811, in get
d)
File "c:\python27\lib\site-packages\backports\configparser\__init__.py", line 384, in before_get
self._interpolate_some(parser, option, L, value, section, defaults, 1)
File "c:\python27\lib\site-packages\backports\configparser\__init__.py", line 397, in _interpolate_some
rawval = parser.get(section, option, raw=True, fallback=rest)
TypeError: get() got an unexpected keyword argument 'raw'
PS: I see that I could post an issue directly on Github but there are over 600 issues open. Maybe there is someone who knows a fix directly.
Different causes that Spyder crashes:
Spyder IDE won't start WinPython-64bit- 2.7.10.2
Broken links and probably different cause - Spyder/Pythonxy crashes
Edit:
Installation details:
C:\Users\strpeter>pip install spyder
Successfully installed configparser-3.5.0 jupyter-core-4.2.1 nbformat-4.2.0
setuptools-30.0.0 spyder-3.0.2
When uninstalling configparser, as recommended in the comment below, pythonw.exe stops working during the initialization of spyder3. I have no details at hand to report about the crash.
C:\Users\strpeter>pip uninstall configparser
Uninstalling configparser-3.5.0:
c:\python27\lib\site-packages\backports\configparser\__init__.py
c:\python27\lib\site-packages\backports\configparser\__init__.pyc
c:\python27\lib\site-packages\backports\configparser\helpers.py
c:\python27\lib\site-packages\backports\configparser\helpers.pyc
c:\python27\lib\site-packages\configparser-3.5.0-py2.7-nspkg.pth
c:\python27\lib\site-packages\configparser-3.5.0-py2.7.egg-info
c:\python27\lib\site-packages\configparser.py
c:\python27\lib\site-packages\configparser.pyc
Proceed (y/n)? y
Successfully uninstalled configparser-3.5.0
(Spyder developer here) This is an error between PythonXY and Spyder. I opened an issue about it, which we're going to solve in Spyder 3.1.0 (to be released in mid January/2017).
This might be due to incompatibilities due to different Qt wrappers. To test this in Enthought Python, please open a Canopy Command Prompt (or otherwise ensure that Enthought Python is your default python). Then ensure that PyQt is installed and make it the default Qt wrapper:
enpkg pyqt
set QT_API=pyqt
Now does Spyder 3 run ok?
We have impala server on prod and I need connect to it with impala shell from my local macbook w/ mac os x (10.8).
I downloaded Impala-cdh5.1.0-release.tar.gz, unarchived it, tried buildall.sh which failed: .../bin/impala-config.sh: line 123: nproc: command not found
Trying impala-shell directly also fails:
$ shell/impala-shell
ls: /Users/.../Impala-cdh5.1.0-release/shell/ext-py/*.egg: No such file or directory
Traceback (most recent call last):
File "/Users/.../Impala-cdh5.1.0-release/shell/impala_shell.py", line 20, in <module>
import prettytable
ImportError: No module named prettytable
I have jdk installed and JAVA_HOME is set.
Cloudera manager seems doesn't support mac os, does it?
Based on your limited error message:
.../bin/impala-config.sh: line 123: nproc: command not found
I'd say that no, this package from cloudera doesnt support OSX. nproc is a linux command, and anything that references it isn't going to work on OSX.
If you could provide more information - such as where you downloaded it, or what it is, for those of us who aren't cloudera customers, we might be able to devise workarounds.
Or, contact cloudera support and complain about the lack of OSX support?
Your second error message looks like python, not java - and you provide no context around it....
I have a Python 2.7/PyQt4 program that I am attempting to freeze with cx_freeze. The program also uses requests, serial, xml.etree.ElementTree, and collections. Using the unmodified setup.py generated by cxfreeze-quickstart-2.7, I can successfully build as both a console program (python setup.py build) and an .app (python setup.py bdist_mac) in Yosemite using Python from macports. If I run the program directly either from the app bundle or the dist:
$ build/MacDISE-1.0.app/Contents/MacOS/macdise
$ dist/macdise
It runs exactly as expected. If I open from the command line:
$ open -a /Users/jeffemandel/macdise/build/MacDISE-1.0.app
I get the dreaded
LSOpenURLsWithRole() failed for the application /Users/jeffemandel/macdise/build/MacDISE-1.0.app with error -10810.
I worked through a number of potential issues raised by Dan McCombs (distutils.util.get_platform, sys.arg), but these don’t seem to be the problem. Through brute force trial and error, I found that if I put all of my code in a separate module, simply importing that module (without actually invoking it) causes the 10810 error, so I figured it was finding a library when run from the command line, but not from the app. I put the dist directory on a thumb drive and ran it on another Mac that doesn't have Python, Qt4, etc installed, and got this:
packages/cx_Freeze/initscripts/Console.py", line 27, in <module> File "macdise.py", line 4, in <module>
File "ExtensionLoader_PyQt4_QtGui.py", line 11, in <module>
ImportError: dlopen(/Volumes/NO NAME/dist/PyQt4.QtGui.so, 2): Library not loaded: /opt/local/Library/Frameworks/QtGui.framework/Versions/4/QtGui
Referenced from: /Volumes/NO NAME/dist/PyQt4.QtGui.so
Reason: image not found
When I look in dist, there is a file QtGui that is the same size as the one in /opt. So it seems the failure is dlopen(PyQt4.QtGui.so) returning a hard-coded path to the QtGui library. I'm guessing the solution is simple, but I haven't stumbled across it yet.
Update: I looked at the libraries in build/Contents/MacOS/PyQt4.*.so with otool, and these all have #executable_path (as opposed to hard-coded paths in dist). My stupid. So I repeated the process of moving the program, only using the MacOS folder rather than the dist folder, and executing macdise from the command line on my wife's MBP. The problem turned out to be in the way I was looking for the included_files. I changed this to:
if getattr(sys, 'frozen', False):
uiName = os.path.join(os.path.dirname(sys.executable), "tabDISE.ui" )
else:
uiName = "tabDISE.ui"
and it runs. What would have saved me a day would be a way to automagically dump the error message generated when executing from the command line to the console log. If someone knows how to do this, it would be a big help.
I am trying to get Emacs 24.4 running on Mac (Maverick).
I have tried following these instructions, but when I run:
./build-emacs gzr
I get the error:
bzr: ERROR: exceptions.ImportError: Unable to load subvertpy extensions: dlopen(/Library/Python/2.6/site-packages/subvertpy/client.so, 2): Library not loaded: /usr/lib/libsvn_client-1.0.dylib
Referenced from: /Library/Python/2.6/site-packages/subvertpy/client.so
Reason: image not found
Traceback (most recent call last):
File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 930, in exception_to_return_code
return the_callable(*args, **kwargs)
File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 1121, in run_bzr
ret = run(*run_argv)
File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 673, in run_argv_aliases
return self.run(**all_cmd_args)
File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 697, in run
return self._operation.run_simple(*args, **kwargs)
File "/Library/Python/2.6/site-packages/bzrlib/cleanup.py", line 136, in run_simple
self.cleanups, self.func, *args, **kwargs)
File "/Library/Python/2.6/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
result = func(*args, **kwargs)
File "/Library/Python/2.6/site-packages/bzrlib/builtins.py", line 2214, in run
show_bzrdir_info(newdir, verbose=0, outfile=self.outf)
File "/Library/Python/2.6/site-packages/bzrlib/info.py", line 378, in show_bzrdir_info
outfile)
File "/Library/Python/2.6/site-packages/bzrlib/info.py", line 394, in show_component_info
format = describe_format(control, repository, branch, working)
File "/Library/Python/2.6/site-packages/bzrlib/info.py", line 499, in describe_format
format = controldir.format_registry.make_bzrdir(key)
File "/Library/Python/2.6/site-packages/bzrlib/controldir.py", line 1348, in make_bzrdir
return self.get(key)()
File "/Library/Python/2.6/site-packages/bzrlib/registry.py", line 177, in get
return self._dict[self._get_key_or_default(key)].get_obj()
File "/Library/Python/2.6/site-packages/bzrlib/registry.py", line 74, in get_obj
self._obj = get_named_object(self._module_name, self._member_name)
File "/Library/Python/2.6/site-packages/bzrlib/pyutils.py", line 51, in get_named_object
obj = __import__(module_name, {}, {}, from_list)
File "/Library/Python/2.6/site-packages/bzrlib/plugins/svn/workingtree.py", line 28, in <module>
import subvertpy
File "/Library/Python/2.6/site-packages/subvertpy/__init__.py", line 131, in <module>
raise ImportError("Unable to load subvertpy extensions: %s" % e)
ImportError: Unable to load subvertpy extensions: dlopen(/Library/Python/2.6/site- packages/subvertpy/client.so, 2): Library not loaded: /usr/lib/libsvn_client-1.0.dylib
Referenced from: /Library/Python/2.6/site-packages/subvertpy/client.so
Reason: image not found
bzr 2.6.0 on python 2.6.8 (Darwin-13.0.0-x86_64-i386-64bit)
arguments: ['/usr/local/bin/bzr', 'init-repo', 'emacs-bzr']
plugins: bash_completion[2.6.0], bzrtools[2.5.0], changelog_merge[2.6.0],
colo[0.4.0], email[unknown], explorer[1.3.0], fastimport[0.14.0dev],
git[0.6.11], grep[2.6.0], keychain[0.1.0], launchpad[2.6.0], loom[2.2.0],
netrc_credential_store[2.6.0], news_merge[2.6.0], pipeline[1.4.0],
po_merge[2.6.0], qbzr[0.23.1], rewrite[0.6.3], svn[1.2.2], upload[1.1.0],
weave_fmt[2.6.0], xmloutput[0.8.8]
encoding: 'utf-8', fsenc: 'utf-8', lang: 'en_US'
*** Bazaar has encountered an internal error. This probably indicates a
bug in Bazaar. You can help us fix it by filing a bug report at
https://bugs.launchpad.net/bzr/+filebug
including this traceback and a description of the problem.
Any ideas? Another way?
Homebrew provides Emacs 24.4 as well, with
$ brew install emacs --with-cocoa --with-gnutls
I'm using GNU Emacs 24.4.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) on OS X 10.9.5 currently, this version is the one from Emacs for Mac OS X and used with It's All Text! for Firefox to write this answer. ;)
Obviously most people generally opt for homebrew (as the top answer indicates), but since homebrew has a tendency to screw with /usr/local to such an extent that it won't cope with alternative (e.g. custom compiled or original) installations of Python, I can't/won't run it (so I compile from source or use MacPorts). For those in a similar position to me regarding homebrew (and I know it's not everyone), then give the Emacs for Mac OS X version a shot, failing that try MacPorts and if it's still not ideal this question has many good responses, depending on your circumstances, particularly this answer.
I've struggled with various emacs installs on OSX, so eventually I switched to MacPorts. It has emacs 24.3 available.
The current "bzr" release doesn't work out of the box on Mavericks. You can either install another prebuilt variant (from MacPorts, homebrew, or fink), or try to manually upgrade the library subvertpy.
I use MacPorts when I use bzr and when I run autogen.sh. However, it must be disabled when you run ./configure --with-ns and make install. (I use two separate terminal windows with different PATH environment variables for this.)