Dewb / monome-rack

VCV Rack plugin for monome Eurorack modules
GNU General Public License v2.0
222 stars 12 forks source link

[BUILD ISSUE] Failure to build with Rack Plugin Toolchain #158

Closed cschol closed 1 year ago

cschol commented 1 year ago

The latest revision fails to build with the Rack Plugin Toolchain. The build process builds all 4 platforms consecutively.

The issue is that the firmware/build directory does not get cleaned out between builds and the GNU/Linux build chokes on artifacts that were build for previous platforms.

Simple fix to add a firmwares-clean target, which gets executed as part of Rack's make clean before each build.

diff --git a/Makefile b/Makefile
index 131d271..83fd992 100644
--- a/Makefile
+++ b/Makefile
@@ -56,6 +56,9 @@ $(ragel):
        cd dep/ragel-6.10 && CC=gcc CXX=g++ STRIP=strip FLAGS= CFLAGS= CXXFLAGS= LDFLAGS= ./configure --prefix="$(DEP_PATH)"
        cd dep/ragel-6.10 && $(MAKE) && $(MAKE) install

+firmwares-clean:
+       rm -rf firmware/build/
+
 firmwares: export PATH := $(PWD)/dep/bin:$(PATH)
 firmwares: export RACK_DIR := $(realpath $(RACK_DIR))
 firmwares: firmware/*.mk firmware/**/*.c firmware/**/*.h firmware/**/**/*.rl
@@ -72,3 +75,5 @@ DISTRIBUTABLES += $(wildcard LICENSE*)
 DISTRIBUTABLES += $(wildcard presets)

 include $(RACK_DIR)/plugin.mk
+
+clean: firmwares-clean
Dewb commented 1 year ago

Ah, thanks! The clean target should have been cleaning up the firmware build folder, must have lost it somewhere along the way and not noticed because Actions builds the platforms on separate runners. Will fix ASAP when I’m back at a computer.

Dewb commented 1 year ago

Fix was not successful on Linux, looks like GNU make gets confused by the target and the directory having the same nane (which is probably why I made them different in the first place.) Thanks @cschol for the diagnosis.