From 4b99d216b8b514ec25bf5c9676059725d54cc0c3 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Tue, 1 Apr 2025 20:34:13 -0400 Subject: [PATCH 01/12] Load translations after logging environment during launch. --- adapters/standalone.cpp | 3 ++- src/string.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/adapters/standalone.cpp b/adapters/standalone.cpp index de612958..d0e922f4 100644 --- a/adapters/standalone.cpp +++ b/adapters/standalone.cpp @@ -136,7 +136,6 @@ int main(int argc, char* argv[]) { } logger::init(); random::init(); - string::init(); // Test code // exit(0); @@ -168,6 +167,8 @@ int main(int argc, char* argv[]) { #endif INFO("System time: %s", string::formatTimeISO(system::getUnixTime()).c_str()); + string::init(); + // Load settings settings::init(); try { diff --git a/src/string.cpp b/src/string.cpp index d0c1712f..18a2e4aa 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -577,6 +577,7 @@ static std::map> translations; static void loadTranslations() { + INFO("Loading translations"); translations.clear(); std::string translationsDir = asset::system("translations"); From 51f20bc28683d81ca73291a49b8ffa05ca31c5ba Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Tue, 1 Apr 2025 21:50:57 -0400 Subject: [PATCH 02/12] Fix libarchive static library name in dep Makefile --- dep/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dep/Makefile b/dep/Makefile index f016299e..01d9f77f 100755 --- a/dep/Makefile +++ b/dep/Makefile @@ -41,7 +41,7 @@ ifdef ARCH_WIN openssl = lib/libcrypto.a libcurl = lib/libcurl.a zstd = lib/libzstd.a - libarchive = lib/libarchive_static.a + libarchive = lib/libarchive.a libspeexdsp = lib/libspeexdsp.a libsamplerate = lib/libsamplerate.a rtmidi = lib/librtmidi.a From 75666e25ec93681c3ce5bdf5b528c18c54bbb3cb Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Wed, 2 Apr 2025 22:44:47 -0400 Subject: [PATCH 03/12] Update to GLEW 2.2.0. Set Cmake minimum version 3.5 when building deps with Cmake. --- dep.mk | 2 ++ dep/Makefile | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/dep.mk b/dep.mk index 292b18a1..e7ccc3b7 100644 --- a/dep.mk +++ b/dep.mk @@ -40,6 +40,8 @@ UNZIP := unzip -o CONFIGURE := ./configure --prefix="$(DEP_PATH)" CMAKE := cmake +# Cmake 4 no longer emulates behavior from Cmake <3.5. But most libraries are fine if we use policies from a higher Cmake version. +CMAKE += -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ifdef ARCH_WIN CMAKE += -DCMAKE_SYSTEM_NAME=Windows endif diff --git a/dep/Makefile b/dep/Makefile index 01d9f77f..87ef8192 100755 --- a/dep/Makefile +++ b/dep/Makefile @@ -85,17 +85,17 @@ include $(RACK_DIR)/dep.mk # Targets # These targets are all order-only "|" because we usually don't care if a library was built before or after other libraries. -glew-2.1.0: - $(WGET) "https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0.tgz" - $(SHA256) glew-2.1.0.tgz 04de91e7e6763039bc11940095cd9c7f880baba82196a7765f727ac05a993c95 - $(UNTAR) glew-2.1.0.tgz - rm glew-2.1.0.tgz - -$(glew): | glew-2.1.0 - cd glew-2.1.0 && mkdir -p build - cd glew-2.1.0/build && $(CMAKE) ./cmake - $(MAKE) -C glew-2.1.0/build - $(MAKE) -C glew-2.1.0/build install +glew-2.2.0: + $(WGET) "https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0.tgz" + $(SHA256) glew-2.2.0.tgz d4fc82893cfb00109578d0a1a2337fb8ca335b3ceccf97b97e5cc7f08e4353e1 + $(UNTAR) glew-2.2.0.tgz + rm glew-2.2.0.tgz + +$(glew): | glew-2.2.0 + cd glew-2.2.0 && mkdir -p build + cd glew-2.2.0/build && $(CMAKE) ./cmake + $(MAKE) -C glew-2.2.0/build + $(MAKE) -C glew-2.2.0/build install $(glfw): | glfw cd glfw && mkdir -p build @@ -269,7 +269,7 @@ $(simde): simde/simde # Helpers -src: glew-2.1.0 glfw jansson-2.12 libsamplerate-0.1.9 openssl-3.3.2 curl-8.10.0 zstd-1.5.6 libarchive-3.7.7 rtaudio nanovg nanosvg oui-blendish osdialog +src: glew-2.2.0 glfw jansson-2.12 libsamplerate-0.1.9 openssl-3.3.2 curl-8.10.0 zstd-1.5.6 libarchive-3.7.7 rtaudio nanovg nanosvg oui-blendish osdialog clean: git clean -fdx From e3699b53efba3a7e4280b37a4303e1926da0b262 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Thu, 3 Apr 2025 00:14:01 -0400 Subject: [PATCH 04/12] Don't statically link libstdc++ into plugins. Make plugins dynamically link to Rack's libstdc++. --- plugin.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugin.mk b/plugin.mk index e2630f67..f98728b7 100644 --- a/plugin.mk +++ b/plugin.mk @@ -32,7 +32,7 @@ ifdef ARCH_LIN # When Rack loads a plugin, it symlinks /tmp/Rack2 to its system dir, so the plugin can link to libRack. LDFLAGS += -Wl,-rpath=/tmp/Rack2 # Since the plugin's compiler could be a different version than Rack's compiler, link libstdc++ and libgcc statically to avoid ABI issues. - LDFLAGS += -static-libstdc++ -static-libgcc + LDFLAGS += -static-libgcc XDG_DATA_HOME ?= $(HOME)/.local/share RACK_USER_DIR ?= $(XDG_DATA_HOME)/Rack2 endif @@ -46,7 +46,6 @@ endif ifdef ARCH_WIN TARGET := $(TARGET).dll - LDFLAGS += -static-libstdc++ RACK_USER_DIR ?= $(LOCALAPPDATA)/Rack2 endif From 5d24fefb69738a8ca1deb5adb7b86a94e4347bd7 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Thu, 10 Apr 2025 20:08:13 -0400 Subject: [PATCH 05/12] Update valgrind suppressions for Linux. --- Makefile | 9 ++++++--- valgrind.supp | 52 +++++++++------------------------------------------ 2 files changed, 15 insertions(+), 46 deletions(-) diff --git a/Makefile b/Makefile index 2699aee2..79b87dbd 100644 --- a/Makefile +++ b/Makefile @@ -138,10 +138,13 @@ perf: $(STANDALONE_TARGET) hotspot perf.data rm perf.data +# VALGRIND_FLAGS += --gen-suppressions=all +VALGRIND_FLAGS += --suppressions=valgrind.supp +# VALGRIND_FLAGS += --leak-check=full +VALGRIND_FLAGS += --track-origins=yes +VALGRIND_FLAGS += --exit-on-first-error=yes valgrind: $(STANDALONE_TARGET) - # --gen-suppressions=yes - # --leak-check=full - valgrind --suppressions=valgrind.supp ./$< -d + valgrind $(VALGRIND_FLAGS) ./$< -d clean: rm -rfv build dist $(TARGET) $(STANDALONE_TARGET) *.a diff --git a/valgrind.supp b/valgrind.supp index 116f1a0b..3147bfb5 100644 --- a/valgrind.supp +++ b/valgrind.supp @@ -1,54 +1,20 @@ { - - Memcheck:Addr8 - ... - obj:/usr/lib/dri/i965_dri.so - ... -} -{ - - Memcheck:Addr4 - ... - obj:/usr/lib/dri/i965_dri.so - ... -} -{ - - Memcheck:Addr2 - ... - obj:/usr/lib/dri/i965_dri.so - ... -} -{ - - Memcheck:Addr1 - ... - obj:/usr/lib/dri/i965_dri.so - ... -} - - -{ - - Memcheck:Leak - match-leak-kinds: possible - ... - obj:/usr/lib/libasound.so.2.0.0 + + Memcheck:Cond ... + fun:pa_mainloop_run } { - - Memcheck:Leak - match-leak-kinds: definite + + Memcheck:Cond ... - obj:/usr/lib/libgtk-x11-2.0.so.0.2400.32 + obj:/usr/lib/libgallium* ... } { - - Memcheck:Leak - match-leak-kinds: possible + + Memcheck:Cond ... - obj:/usr/lib/libgobject-2.0.so.0.5800.3 + obj:/usr/lib/libGLX_mesa* ... } \ No newline at end of file From 5fba8d0c50a3bd78703363cca63545f2bbb9057a Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Fri, 11 Apr 2025 23:38:22 -0400 Subject: [PATCH 06/12] Add graphics/audio driver memory leaks to valgrind suppressions. --- Makefile | 4 ++-- valgrind.supp | 41 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 79b87dbd..282dd249 100644 --- a/Makefile +++ b/Makefile @@ -138,9 +138,9 @@ perf: $(STANDALONE_TARGET) hotspot perf.data rm perf.data -# VALGRIND_FLAGS += --gen-suppressions=all +VALGRIND_FLAGS += --gen-suppressions=all VALGRIND_FLAGS += --suppressions=valgrind.supp -# VALGRIND_FLAGS += --leak-check=full +VALGRIND_FLAGS += --leak-check=full VALGRIND_FLAGS += --track-origins=yes VALGRIND_FLAGS += --exit-on-first-error=yes valgrind: $(STANDALONE_TARGET) diff --git a/valgrind.supp b/valgrind.supp index 3147bfb5..dfdaf7fe 100644 --- a/valgrind.supp +++ b/valgrind.supp @@ -1,20 +1,55 @@ { - + <> Memcheck:Cond ... fun:pa_mainloop_run } { - + <> Memcheck:Cond ... obj:/usr/lib/libgallium* ... } { - + <> Memcheck:Cond ... obj:/usr/lib/libGLX_mesa* ... +} +{ + <> + Memcheck:Leak + ... + obj:/usr/lib/libgallium* + ... +} +{ + <> + Memcheck:Leak + ... + fun:snd_seq_open + ... +} +{ + <> + Memcheck:Leak + ... + fun:snd_config_update_r + ... +} +{ + <> + Memcheck:Leak + ... + fun:_snd_config_load_with_include + ... +} +{ + + Memcheck:Leak + ... + fun:pa_pdispatch_run + ... } \ No newline at end of file From 40e529f39385a4d202eb5869caa916d2e4858e49 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Tue, 15 Apr 2025 21:17:06 -0400 Subject: [PATCH 07/12] Use a different workaround (time-based) for GLFW Mac bug where setting GLFW_CURSOR_DISABLED creates a large mouse delta in a few frames. --- src/window/Window.cpp | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/src/window/Window.cpp b/src/window/Window.cpp index d4eeca06..59497645 100644 --- a/src/window/Window.cpp +++ b/src/window/Window.cpp @@ -98,7 +98,7 @@ struct Window::Internal { int lastWindowHeight = 0; int frame = 0; - bool ignoreNextMouseDelta = false; + double ignoreMouseDeltaUntil = -INFINITY; double monitorRefreshRate = 0.0; double frameTime = NAN; double lastFrameDuration = NAN; @@ -167,28 +167,15 @@ static void cursorPosCallback(GLFWwindow* win, double xpos, double ypos) { math::Vec mousePos = math::Vec(xpos, ypos).div(APP->window->pixelRatio / APP->window->windowRatio).round(); math::Vec mouseDelta = mousePos.minus(APP->window->internal->lastMousePos); + // if (glfwGetInputMode(win, GLFW_CURSOR) != GLFW_CURSOR_NORMAL && std::fabs(mouseDelta.y) > 20.0) { + // DEBUG("%d (%f, %f) (%f, %f)", APP->window->internal->frame, VEC_ARGS(mousePos), VEC_ARGS(mouseDelta)); + // } + // Workaround for GLFW warping mouse to a different position when the cursor is locked or unlocked. - if (APP->window->internal->ignoreNextMouseDelta) { - APP->window->internal->ignoreNextMouseDelta = false; + if (APP->window->internal->ignoreMouseDeltaUntil > APP->window->internal->frameTime) { mouseDelta = math::Vec(); } - int cursorMode = glfwGetInputMode(win, GLFW_CURSOR); - (void) cursorMode; - -#if defined ARCH_MAC - // Workaround for Mac. We can't use GLFW_CURSOR_DISABLED because it's buggy, so implement it on our own. - // This is not an ideal implementation. For example, if the user drags off the screen, the new mouse position will be clamped. - if (cursorMode == GLFW_CURSOR_HIDDEN) { - // CGSetLocalEventsSuppressionInterval(0.0); - glfwSetCursorPos(win, APP->window->internal->lastMousePos.x, APP->window->internal->lastMousePos.y); - CGAssociateMouseAndMouseCursorPosition(true); - mousePos = APP->window->internal->lastMousePos; - } - // Because sometimes the cursor turns into an arrow when its position is on the boundary of the window - glfwSetCursor(win, NULL); -#endif - APP->window->internal->lastMousePos = mousePos; APP->event->handleHover(mousePos, mouseDelta); @@ -647,12 +634,14 @@ void Window::cursorLock() { if (!settings::allowCursorLock) return; -#if defined ARCH_MAC - glfwSetInputMode(win, GLFW_CURSOR, GLFW_CURSOR_HIDDEN); -#else glfwSetInputMode(win, GLFW_CURSOR, GLFW_CURSOR_DISABLED); + + // Due to a bug in GLFW, setting GLFW_CURSOR_DISABLED causes a spurious mouse position delta after a few frames. + // https://github.com/glfw/glfw/issues/2523 + // Emperically, this seems to be up to 3-6 frames at 60 Hz but in fewer frames at lower framerates. +#if defined ARCH_MAC + internal->ignoreMouseDeltaUntil = internal->frameTime + 0.09; #endif - internal->ignoreNextMouseDelta = true; } @@ -661,7 +650,6 @@ void Window::cursorUnlock() { return; glfwSetInputMode(win, GLFW_CURSOR, GLFW_CURSOR_NORMAL); - internal->ignoreNextMouseDelta = true; } From 03608af6457aaeabfa012660a19d99bbd8b278b7 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Tue, 15 Apr 2025 23:47:20 -0400 Subject: [PATCH 08/12] Update bundled Fundamental to 2.6.2. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 282dd249..c8276b5e 100644 --- a/Makefile +++ b/Makefile @@ -178,7 +178,7 @@ DIST_HTML := $(patsubst %.md, build/%.html, $(DIST_MD)) DIST_RES := res cacert.pem Core.json template.vcv LICENSE-GPLv3.txt $(DIST_HTML) translations DIST_SDK_DIR := Rack-SDK DIST_SDK = Rack-SDK-$(RACK_VERSION)-$(ARCH_NAME).zip -FUNDAMENTAL_VERSION ?= 2.6.1 +FUNDAMENTAL_VERSION ?= 2.6.2 FUNDAMENTAL_FILENAME := Fundamental-$(FUNDAMENTAL_VERSION)-$(ARCH_NAME).vcvplugin From bfd530b722a9fae18dd10e9909e66d5e5a60a4ef Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Wed, 16 Apr 2025 00:09:42 -0400 Subject: [PATCH 09/12] Update changelog. --- CHANGELOG.md | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98c3face..737441a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ In this document, Ctrl means Command (⌘) on Mac. +### 2.6.4 (2025-04-16) +- Fix dragging knobs on Mac when UI scale is set to non-Auto. +- SDK + - Make plugins on Windows and Linux dynamically link to libRack's libstdc++ instead of statically. + - Fix dep build failure when CMake 4 is installed. + - Update to GLEW 2.2.0. + ### 2.6.3 (2025-03-26) - Fix failure to launch on Windows 7. - Rack Pro @@ -36,7 +43,7 @@ In this document, Ctrl means Command (⌘) on Mac. - Core - Fix DC filter accuracy of Right input when normalled to Left input in VCV Audio 2. - Change default MIDI CC numbers of *VCV MIDI CC to CV* and *VCV CV to MIDI CC* modules to 1-16 instead of 0-15. -- API +- SDK - Add `Widget::KeyBaseEvent::isKeyCommand()` for checking key commands on all keyboard layouts. - Add `settings::language` global variable. - Add `string::UTF32toUTF8()`, `UTF8toUTF32()`, and `UTF8*()` functions. @@ -57,7 +64,7 @@ In this document, Ctrl means Command (⌘) on Mac. - Allow VST3 plugin to receive MIDI CC, pitch bend, and channel aftertouch. - Core - MIDI to CV: When sustain pedal is released in monophonic mode, turn off gate if no notes are held. -- API +- SDK - Don't combine SDK packages for Mac-x64 and Mac-arm64. - Update to libcurl 8.10.0 and OpenSSL 3.3.2. - Add `dsp::MidiParser` class. @@ -68,7 +75,7 @@ In this document, Ctrl means Command (⌘) on Mac. - Allow building multi-arch x64+arm64 "Universal" Mac binary. - Optimize engine's cable stepping algorithm to be as CPU-efficient as non-stackable inputs. - Limit log file size to 10 MB. -- API +- SDK - Define `ARCH_*` macros in `arch.hpp` header (included in `rack.hpp`) instead of in compiler flags. ### 2.5.1 (2024-04-16) @@ -91,7 +98,7 @@ In this document, Ctrl means Command (⌘) on Mac. - Add `"verifyHttpsCerts"` setting to disable verifying HTTPS certificates. - Rack Pro - Fix MIDI note velocity scale in CLAP adapter. -- API +- SDK - Don't zero output port voltages when disconnecting cables. - Fix `ExpanderChangeEvent` not being dispatched when removing an adjacent module. @@ -100,7 +107,7 @@ In this document, Ctrl means Command (⌘) on Mac. - Fix Library menu plugin update items not being re-enabled when downloading is completed. - Rack Pro - Fix discarded MIDI input messages for all plugin adapters. -- API +- SDK - Add `LightButton` to component library. - Use SSE4.1 intrinsics in `simd::trunc`, `floor`, `ceil`, `round`, and `fmod` to improve performance. @@ -117,7 +124,7 @@ In this document, Ctrl means Command (⌘) on Mac. - Fix crash when using Mac VST3 and AU plugins simultaneously in a DAW. - Fix crash when removing one of multiple running plugin instances in Studio One. - Fix CLAP plugin discarding output MIDI messages. -- API +- SDK - Add `ThemedSvgPanel` and `ThemedSvgScrew` classes which automatically switch SVGs when dark panels are toggled. - Add `"minRackVersion"` property to plugin manifest, which prevents Rack from downloading plugin if version is not compatible. - Fix `ContextCreateEvent` and `ContextDestroyEvent` not defining `vg` NanoVG context. @@ -131,7 +138,7 @@ In this document, Ctrl means Command (⌘) on Mac. - Rack Pro - Don't force MIDI output message channel to 1 in VST3 adapter. Offer all 16 channels. - Fix aftertouch and polyphonic pressure on all MIDI channels in VST3 and CLAP adapters. -- API +- SDK - Make `ParamQuantity::set/getValue()` set/get the Param's target value of the Engine's per-sample smoothing algorithm instead of the Param's immediate value. Add `ParamQuantity::set/getImmediateValue()`. Deprecate `ParamQuantity::set/getSmoothValue()`. - Add `dsp::polyDirect()`, `dsp::polyHorner()`, and `dsp::polyEstrin()`. - Rename `dsp::approxExp2_taylor5()` to `dsp::exp2_taylor5()` and improve polynomial coefficients. @@ -151,7 +158,7 @@ In this document, Ctrl means Command (⌘) on Mac. - Store and recall window size of VST3. - Fix MIDI clock input in CLAP adapter. - Make CLAP adapter a Note Effect and Audio Effect as well as an Instrument. -- API +- SDK - Make unarchiver handle zero-byte files as a special case by deleting destination files instead of overwriting them. This allows plugin packages to remove old presets by including a zero-byte file with its filename. - Add `ModuleWidget::getModule()` convenience method. @@ -161,7 +168,7 @@ In this document, Ctrl means Command (⌘) on Mac. - Zero audio output of all channels in `audio::Device::processBuffer()` before writing, to avoid sending uninitialized values to audio device. - Rack Pro - Fix blank plugin window on certain Linux Nvidia graphics drivers. -- API +- SDK - Don't include SIMDE headers on x64, fixing symbol conflicts when plugins include x64 intrinsic headers. - Don't export symbols from libarchive, zstd, rtaudio, and rtmidi to avoid conflicts with hosts that use these libraries. Rack plugins can no longer link to these libraries. - Rename plugin binary to `plugin-arm64.dylib` on Mac ARM64 so multiple plugin architectures can coexist in the same Rack user folder. @@ -185,7 +192,7 @@ In this document, Ctrl means Command (⌘) on Mac. - Rack Pro - Add VST3, Audio Unit, and CLAP plugin adapters. - Add framerate setting to plugins. -- API +- SDK - Add `system::sleep()`. - Make `random::get()`, `uniform()`, etc use global random state instead of thread-local. @@ -203,7 +210,7 @@ In this document, Ctrl means Command (⌘) on Mac. - Fix probabilistic crash when undoing a module paste action. - Rack Pro - Fix VST2 window size not being remembered on Mac. -- API +- SDK - Make `SvgButton` dispatch `ActionEvent` only on left mouse down, instead of left/right mouse down and drag drop. ### 2.1.0 (2022-02-26) @@ -349,7 +356,7 @@ In this document, Ctrl means Command (⌘) on Mac. - Allow disabling smoothing for MIDI-CV (pitch and mod wheel), MIDI-CC, and MIDI-Map. - Add several module presets for many Core modules. -- API +- SDK - Add setters/getters for nearly every instance variable in Rack's API. Use these for higher likelihood of stability. - Compile Rack and plugins with `-march=nehalem`, enabling (and requiring) up to SSE4.2 and POPCNT instruction sets. - Add `Module::configInput()` and `Module::configOutput()` for adding names to ports. From fbf4d91b050efe3ad62c313d73e22bf2a937361e Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Wed, 16 Apr 2025 16:59:54 -0400 Subject: [PATCH 10/12] Force `CMAKE_POLICY_VERSION_MINIMUM=3.5` for only GLEW and libarchive, not all Rack/plugin deps. Updating the Cmake policy version to support Cmake 4 should be the responsibility of each dep. --- dep.mk | 2 -- dep/Makefile | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dep.mk b/dep.mk index e7ccc3b7..292b18a1 100644 --- a/dep.mk +++ b/dep.mk @@ -40,8 +40,6 @@ UNZIP := unzip -o CONFIGURE := ./configure --prefix="$(DEP_PATH)" CMAKE := cmake -# Cmake 4 no longer emulates behavior from Cmake <3.5. But most libraries are fine if we use policies from a higher Cmake version. -CMAKE += -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ifdef ARCH_WIN CMAKE += -DCMAKE_SYSTEM_NAME=Windows endif diff --git a/dep/Makefile b/dep/Makefile index 87ef8192..f519fa8d 100755 --- a/dep/Makefile +++ b/dep/Makefile @@ -93,7 +93,8 @@ glew-2.2.0: $(glew): | glew-2.2.0 cd glew-2.2.0 && mkdir -p build - cd glew-2.2.0/build && $(CMAKE) ./cmake + # Increase policy version to support building with Cmake 4 + cd glew-2.2.0/build && $(CMAKE) -DCMAKE_POLICY_VERSION_MINIMUM=3.5 cmake $(MAKE) -C glew-2.2.0/build $(MAKE) -C glew-2.2.0/build install @@ -167,7 +168,8 @@ libarchive-3.7.7: $(libarchive): | $(zstd) libarchive-3.7.7 #cd libarchive-3.7.7 && $(CONFIGURE) --enable-shared=no --enable-static=yes --disable-bsdtar --disable-bsdcat --disable-bsdcpio --disable-posix-regex-lib --disable-xattr --disable-acl --without-zlib --without-bz2lib --without-libb2 --without-iconv --without-lz4 --without-lzma --without-cng --without-openssl --without-xml2 --without-expat cd libarchive-3.7.7 && mkdir -p build - cd libarchive-3.7.7/build && $(CMAKE) -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DENABLE_ACL=OFF -DENABLE_BZip2=OFF -DENABLE_CAT=OFF -DENABLE_CNG=OFF -DENABLE_COVERAGE=OFF -DENABLE_CPIO=OFF -DENABLE_EXPAT=OFF -DENABLE_ICONV=OFF -DENABLE_LIBB2=OFF -DENABLE_LIBXML2=OFF -DENABLE_LZ4=OFF -DENABLE_LZMA=OFF -DENABLE_LZO=OFF -DENABLE_MBEDTLS=OFF -DENABLE_NETTLE=OFF -DENABLE_OPENSSL=OFF -DENABLE_TAR=OFF -DENABLE_TEST=OFF -DENABLE_UNZIP=OFF -DENABLE_WERROR=OFF -DENABLE_XATTR=OFF -DENABLE_ZLIB=OFF -DENABLE_ZSTD=ON -DWINDOWS_VERSION="WIN7" -DZSTD_INCLUDE_DIR:PATH=$(DEP_PATH)/include -DZSTD_LIBRARY=$(DEP_PATH)/lib/libzstd.a .. + # Increase policy version to support building with Cmake 4 + cd libarchive-3.7.7/build && $(CMAKE) -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DENABLE_ACL=OFF -DENABLE_BZip2=OFF -DENABLE_CAT=OFF -DENABLE_CNG=OFF -DENABLE_COVERAGE=OFF -DENABLE_CPIO=OFF -DENABLE_EXPAT=OFF -DENABLE_ICONV=OFF -DENABLE_LIBB2=OFF -DENABLE_LIBXML2=OFF -DENABLE_LZ4=OFF -DENABLE_LZMA=OFF -DENABLE_LZO=OFF -DENABLE_MBEDTLS=OFF -DENABLE_NETTLE=OFF -DENABLE_OPENSSL=OFF -DENABLE_TAR=OFF -DENABLE_TEST=OFF -DENABLE_UNZIP=OFF -DENABLE_WERROR=OFF -DENABLE_XATTR=OFF -DENABLE_ZLIB=OFF -DENABLE_ZSTD=ON -DWINDOWS_VERSION="WIN7" -DZSTD_INCLUDE_DIR:PATH=$(DEP_PATH)/include -DZSTD_LIBRARY=$(DEP_PATH)/lib/libzstd.a .. $(MAKE) -C libarchive-3.7.7/build $(MAKE) -C libarchive-3.7.7/build install From 8ea470f343058ade6f75f16d503a1eb330e1700c Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Thu, 17 Apr 2025 04:28:28 -0400 Subject: [PATCH 11/12] Revert "Don't statically link libstdc++ into plugins. Make plugins dynamically link to Rack's libstdc++." This reverts commit e3699b53efba3a7e4280b37a4303e1926da0b262. --- plugin.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin.mk b/plugin.mk index f98728b7..e2630f67 100644 --- a/plugin.mk +++ b/plugin.mk @@ -32,7 +32,7 @@ ifdef ARCH_LIN # When Rack loads a plugin, it symlinks /tmp/Rack2 to its system dir, so the plugin can link to libRack. LDFLAGS += -Wl,-rpath=/tmp/Rack2 # Since the plugin's compiler could be a different version than Rack's compiler, link libstdc++ and libgcc statically to avoid ABI issues. - LDFLAGS += -static-libgcc + LDFLAGS += -static-libstdc++ -static-libgcc XDG_DATA_HOME ?= $(HOME)/.local/share RACK_USER_DIR ?= $(XDG_DATA_HOME)/Rack2 endif @@ -46,6 +46,7 @@ endif ifdef ARCH_WIN TARGET := $(TARGET).dll + LDFLAGS += -static-libstdc++ RACK_USER_DIR ?= $(LOCALAPPDATA)/Rack2 endif From 768d859187d64aed4d3d3db1f9c3aef596676116 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Fri, 18 Apr 2025 14:09:18 -0400 Subject: [PATCH 12/12] Update changelog. --- CHANGELOG.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 737441a6..942a0c3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,10 @@ In this document, Ctrl means Command (⌘) on Mac. -### 2.6.4 (2025-04-16) +### 2.6.4 (2025-04-18) - Fix dragging knobs on Mac when UI scale is set to non-Auto. - SDK - - Make plugins on Windows and Linux dynamically link to libRack's libstdc++ instead of statically. - - Fix dep build failure when CMake 4 is installed. + - Fix GLEW and libarchive build failure when CMake 4 is installed. - Update to GLEW 2.2.0. ### 2.6.3 (2025-03-26)