Closed skycaptain closed 3 years ago
Sorry, I've no experience with docker on Mac, specifically around traps and pitfalls of using unix sockets (which is apparently where bitbake stumbles). I could imagine that your host-side filesystem which we pass through via kas-container is not compatible with unix sockets. Maybe search the web around that first and/or try running
import socket
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
sock.bind('test-socket-file')
natively in python on the Mac fs you use as workdir.
If that works, the issue is likely around how docker on Mac passes the fs through. But, again, no idea where that could come from (no one I know is doing Mac-hosted embedded Linux development...).
If you post this issue also to the kas mailing list, chances are higher that someone else reads it and has an idea.
I think I was having a slightly similar issue.
I wanted to use docker inside a Debian docker and was unable to connect to my docker engine. I solved it by forwarding /var/usr/docker.sock (path might be wrong) via -v directly into my docker. So I used the sock from the Mac host.
Maybe this could help you as well? I'm also trying to use kas on my Mac to build the meta-iot2050 image natively..
But I had the limitation that MacOS is just not a Debian lacking some basic tools like apt that are used in scripts here. So it seems I need to go down the full Debian docker road. Or try the Parallels Desktop Preview and work on a Debian VM..
Hope that helped a bit..! 😊 Let me know if you solved your problem. I'm eager to see if and how the M1 Chip boosts the build time (especially for the kernel headers for arm boards that take a lot of time on x86 platforms due to other reasons)
I think we cannot help with Macs from a kas perspective here. If you think otherwise, please reopen.
@jan-kiszka I found the issue to be the accient character limit on socket paths and the way Docker constructs it's paths. So on Mac the path to sockets is limited to 104 characters (107 characters on Linux). When Bitbake starts, it opens a socket at ${TOPDIR}/bitbake.sock
. Now, the issue is that even when you are working under /work/build/...
inside the container with the Docker volume mount, the actual path to the socket has your local machine path prepended. So it's more like <your-local-path>/work/build/...
; which could easily exceed the character limit. This paths also seems to be hardcoded; so it's an issue on the Bitbake side, not allowing to create the socket in e.g. /tmp
or /var/run
inside the container. As a workaround, use a shorter path on the host machine. BTW the same issue exists with VSCode devcontainer.
I can confirm that I encountered this issue on WSL, on a sshfs mounted remoted folder, using Xilinx Petalinux. My path was:
/mnt/z/Myuser/programming/ebaz4205/petalinux/projects/wsltest
I resolved this issue by moving the path to
/home/jak/petalinux/petalinux/projects/wsltest
Hi,
I'm trying to build
core-image-minimal
on a Mac usingkas-container
with docker and docker-machine. However, when running a very minimal example, I'm getting the following error message:Contents of kas.yml: