Docker and OSX 12.4-12.6

I am not sure why, but been having tons of problems getting the docker cross compile environment setup, so I am adding this topic for anyone else that hits the same problem.

  1. The latest version of docker from the website hangs when I run it. No suggestions I have found have helped to get past that (I tried everything). I tried version 2.5 and that didn’t work either. Version 4.5 seems to get past the problem of starting up and NOT crashing during the docker build.

  2. The default settings of docker at 2GB size. You need to up that, especially if you set JOBS to a higher value. It was killing the Mac toolchain build because of this. I upped to 10GB and ran with just default jobs (removed JOBS from my command line) and it has made it past that point finally.

I will update this post as I continue, but wanted to get this started in case anyone else hits this and is searching for help.

1 Like

After it finished the osx build it did die on the ng build, I just restarted the build and it picked up where it left off and completed. Now time to try and cross compile

Not sure why, but when I issue “make -j8 docker-plugin-build” it’s trying to call the wrong make. So I need to go fix that. If I just hook to the docker and run “make plugin-build” it built all four and they work (yay).

1 Like

So it appears the Makefile on the OSX side is passing in the MAKE to run, which it’s getting it locally.

/Library/Developer/CommandLineTools/usr/bin/make

Which is wrong in the docker. My assumption here is that most people built the docker in linux and then ran in linux where make was installed in the same location.

I am going to change my makefile to just call “make” like I do when I attach to the docker and run by hand.

Ah, great to see someone else ran into this issue. By any chance, do you remember which parts of the Makefile you edited to get this working?

Also, it’s very exciting seeing your modules start to appear in the VCV Library. GateStorm was such an awesome module.

For other people that run into this, open up the Makefile and replace one of the ${MAKE} variables with make.

In my case, on line 286:

docker-plugin-build:
	mkdir -p $(PLUGIN_BUILD_DIR)
	$(DOCKER_RUN) -c "make plugin-build $(MFLAGS)"

I also changed these lines just to be sure. Didn’t test without them in place:

docker-plugin-build-mac-x64:
	mkdir -p $(PLUGIN_BUILD_DIR)
	$(DOCKER_RUN) -c "make plugin-build-mac-x64 $(MFLAGS)"

docker-plugin-build-mac-arm64:
	mkdir -p $(PLUGIN_BUILD_DIR)
	$(DOCKER_RUN) -c "make plugin-build-mac-arm64 $(MFLAGS)"

I would also recommend checking for any system resource limits, such as disc space, RAM, and CPU consumption since these might have an influence on the docker build performance. Also, it’s a good idea to review the docker logs and error messages for any particular difficulties or errors that might aid in locating the issue.

Please feel free to add any other suggestions or insights you may have, and best of luck with your Docker cross-compile setup!