Rebuild Rack after an update

I’ve done git pull for the latest 2.6.2 Rack, but I always have trouble getting Rack builds to work after there are updates. I’m on Windows.

There must be something wrong I’m doing, or some missing manual step that needs to be run when syncing up to a new release, or some “common knowledge” that I’m missing.

Some dependencies have changed so I did these steps:

git pull
git submodule update --init --recursive
make dep
make

But the rack build gives me:

src/rtaudio.cpp: In member function 'virtual std::vector<int> rack::RtAudioDriver::getDeviceIds()':
src/rtaudio.cpp:56:57: error: 'class RtAudio' has no member named 'getDeviceIds'; did you mean 'getDeviceInfo'?
   56 |                         for (unsigned int id : rtAudio->getDeviceIds()) {
      |                                                         ^~~~~~~~~~~~
      |                                                         getDeviceInfo
src/rtaudio.cpp: In member function 'virtual std::string rack::RtAudioDriver::getDeviceName(int)':
src/rtaudio.cpp:66:40: error: 'struct RtAudio::DeviceInfo' has no member named 'ID'
   66 |                         if (deviceInfo.ID > 0)
      |                                        ^~
src/rtaudio.cpp: In member function 'virtual int rack::RtAudioDriver::getDeviceNumInputs(int)':
src/rtaudio.cpp:75:40: error: 'struct RtAudio::DeviceInfo' has no member named 'ID'
   75 |                         if (deviceInfo.ID > 0)
      |                                        ^~
src/rtaudio.cpp: In member function 'virtual int rack::RtAudioDriver::getDeviceNumOutputs(int)':
src/rtaudio.cpp:84:40: error: 'struct RtAudio::DeviceInfo' has no member named 'ID'
   84 |                         if (deviceInfo.ID > 0)
      |                                        ^~
src/rtaudio.cpp: In constructor 'rack::RtAudioDevice::RtAudioDevice(rack::RtAudioDriver*, int)':
src/rtaudio.cpp:121:40: error: 'struct RtAudio::DeviceInfo' has no member named 'ID'
  121 |                         if (deviceInfo.ID == 0)
      |                                        ^~
make: *** [compile.mk:80: build/src/rtaudio.cpp.o] Error 1

What secret sauce did I miss? There is no “update” scenario covered in the manual under Building. The manual only tells how to do setup from scratch.

I had the same error, and I just decided to nuke the Rack folder, and re-clone the whole thing and do a fresh build, then it worked. I’ll be curious to see if you find a solution to your update scenario question.

Run make cleandep before make dep to force all dependencies to be rebuilt. There’s probably a way to automatically update just the dependencies that have changed, but this would rely on the behavior of each build system so we don’t yet support that feature.

3 Likes

Thank you. It would be worth documenting the steps required to build Rack after a new release in the manual.

For plugins, it appears the parallel gesture is:

$ make plugins CMD="make clean"

Which also has the issue of each plugin not necessarily supporting a clean target, but it works for all the ones I’ve currently cloned. For the case of Rack plugins, documented standards for plugin builds would help with that. No chance of that working for external deps without vendoring them and maintaining the modifications.

After make cleandep, make dep is showing me this at the end:

-- Installing: G:/repos/Rack/dep/share/man/man5/libarchive-formats.5
-- Installing: G:/repos/Rack/dep/share/man/man5/mtree.5
-- Installing: G:/repos/Rack/dep/share/man/man5/tar.5
-- Installing: G:/repos/Rack/dep/include/archive.h
-- Installing: G:/repos/Rack/dep/include/archive_entry.h
make[2]: Leaving directory '/g/repos/Rack/dep/libarchive-3.7.7/build'
cd speexdsp && ./autogen.sh
Updating build configuration files, please wait....
' is already registered with AC_CONFIG_FILES.
../autoconf-2.71/lib/autoconf/status.m4:289: AC_CONFIG_FILES is expanded from...
configure.ac:317: the top level
autom4te-2.71: error: /usr/bin/m4 failed with exit status: 1
aclocal-1.16: error: /usr/bin/autom4te-2.71 failed with exit status: 1
autoreconf-2.71: error: aclocal failed with exit status: 1
make[1]: *** [Makefile:175: lib/libspeexdsp.a] Error 1
make[1]: Leaving directory '/g/repos/Rack/dep'
make: *** [Makefile:112: dep] Error 2

I guess my env is just broken.

I’m nuking it from orbit and starting over. I can fix oui-blendish and the Rack makefiles to build for debugging, and fix the crash in the Rack rtmidi wrapper from holding a reference across the release of a lock from memory, I’ve remade them enough times now. Nevermind, just grousing to myself now. :-/

I get a different error

make dep errors out when building openssl-3.3.2

Summary
wget -c "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz"
--2025-03-17 21:20:55--  https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz
Loaded CA certificate '/usr/ssl/certs/ca-bundle.crt'
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/7634677/c1714487-6cf3-4572-a1ac-fe3d9f59b467?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20250317%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250317T202056Z&X-Amz-Expires=300&X-Amz-Signature=8455c146cc8b278ade215b49508a54e37693e243cce755a38a6cea0bb9fadd5a&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dopenssl-3.3.2.tar.gz&response-content-type=application%2Foctet-stream [following]
--2025-03-17 21:20:56--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/7634677/c1714487-6cf3-4572-a1ac-fe3d9f59b467?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20250317%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250317T202056Z&X-Amz-Expires=300&X-Amz-Signature=8455c146cc8b278ade215b49508a54e37693e243cce755a38a6cea0bb9fadd5a&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dopenssl-3.3.2.tar.gz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.110.133, 185.199.111.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 18076531 (17M) [application/octet-stream]
Saving to: ‘openssl-3.3.2.tar.gz’

openssl-3.3.2.tar.gz                      100%[====================================================================================>]  17.24M  61.5MB/s    in 0.3s

2025-03-17 21:20:56 (61.5 MB/s) - ‘openssl-3.3.2.tar.gz’ saved [18076531/18076531]

sha256check() { echo "$2  $1" | sha256sum -c; }; sha256check openssl-3.3.2.tar.gz 2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281
openssl-3.3.2.tar.gz: OK
tar xf openssl-3.3.2.tar.gz
rm openssl-3.3.2.tar.gz
# Set no-pinshared so OpenSSL doesn't call GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_PIN, ...) on initialization on Windows. This prevents libRack from being unloaded on Windows with FreeLibrary().
# Don't use no-shared because libcurl's configure uses the shared library to find OpenSSL.
cd openssl-3.3.2 && ./Configure --prefix="/home/jpn99/github/Rack/dep" --libdir=lib no-zlib no-capieng no-pinshared no-apps no-tests no-docs no-ui-console
The system cannot find the path specified.
Configuring OpenSSL version 3.3.2 for target VC-WIN64A
Using os-specific seed configuration
Created configdata.pm
Running configdata.pm
Created makefile.in
Created makefile
Created include\openssl\configuration.h

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL.md file first)      ***
***                                                                ***
**********************************************************************
make -C openssl-3.3.2
make[2]: Entering directory '/home/jpn99/github/Rack/dep/openssl-3.3.2'
makefile:78: *** missing separator.  Stop.
make[2]: Leaving directory '/home/jpn99/github/Rack/dep/openssl-3.3.2'
make[1]: *** [Makefile:128: lib/libcrypto.a] Error 2
make[1]: Leaving directory '/home/jpn99/github/Rack/dep'
make: *** [Makefile:112: dep] Error 2

sent a message to vcv support.

adding that this was on a freshly updated msys2-mingw64 on windows 11 - and a fresh git clone of Rack

I managed to build for both Windows and Linux; but I nuked the deps beforehand.

Completely nuked all Rack and dep source and built artifacts from my machine, updated the MSYS2 package manager and packages using the commands copied from the Build documentation, restarting the MINGW64 shell, re-cloned Rack, did the submodules update thing, and make dep fails exactly the same way as it did before for me:

...
-- Installing: G:/repos/Rack/dep/share/man/man5/libarchive-formats.5
-- Installing: G:/repos/Rack/dep/share/man/man5/mtree.5
-- Installing: G:/repos/Rack/dep/share/man/man5/tar.5
-- Installing: G:/repos/Rack/dep/include/archive.h
-- Installing: G:/repos/Rack/dep/include/archive_entry.h
make[2]: Leaving directory '/g/repos/Rack/dep/libarchive-3.7.7/build'
cd speexdsp && ./autogen.sh
Updating build configuration files, please wait....
' is already registered with AC_CONFIG_FILES.
../autoconf-2.72/lib/autoconf/status.m4:289: AC_CONFIG_FILES is expanded from...
configure.ac:317: the top level
autom4te-2.72: error: /usr/bin/m4 failed with exit status: 1
aclocal-1.17: error: /usr/bin/autom4te-2.72 failed with exit status: 1
autoreconf-2.72: error: aclocal failed with exit status: 1
make[1]: *** [Makefile:175: lib/libspeexdsp.a] Error 1
make[1]: Leaving directory '/g/repos/Rack/dep'
make: *** [Makefile:112: dep] Error 2

This is without any of the changes I usually make. As far as I can tell, OpenSSL built fine for me.

Linux build in WSL is fine.

I’m at a loss how to proceed. I’m not hopeful that a from-scratch install of MSYS2 will solve anything.

I wonder if this is some brain-dead git crlf thing mucking things up.

Sounds like a CRLF issue…

Is git configure to checkout UNIX style?

Rack repo doesn’t include a .gitattributes file, and neither do the deps.

I’m trying to do just that, but it’s not straightforward how best to do that. I normally do all git ops from a normal windows powershell shell, but builds in MINGW64. I’m not sure exactly what setting to make where, and what incantation is required to update the files.

And, if a specifc git configuration is a requirement, then it should be documented in the Rack manual.

Rack 2.6.2 built fine for me earlier today on a Windows 11 machine, starting from a freshly cloned Github repo.

It isn’t clear from your otherwise complete description of what you did, but I needed to rerun the ‘pacman -Suy’ command after restarting the MINGW64 shell in order to update the ‘non-core’ packages. The first time, which necessitated the shell restart, only updated the ‘core’ packages. Details at:

On the other hand, maybe you’re right, it might be ‘some brain-dead git crlf thing’. (Great description.)

I did restart the MINGW64 shell between updating pacman and the packages.

Must be the braindead crlf thing. I cargo-culted myself and applied voodoo.

In all my shells:

git config --global core.autocrlf=false

Nuke deps folder and do the submodules thing per the Rack Build docs.

I also did similar re-forcing of some in my plugin enlistments to get them cleaned up.

Rack itself builds fine whatever the git crlf settings are – it’s some dependency that uses some tool that’s broken with respect to line endings, and lacking the git configuration to guarantee the correct line endings.

After this I was able to successfully make dep, make rack, and make plugins.

Ignore all online advice to configure git to use CRLF on Windows. In this day and age, anything significant for development (ignore SQL server tools, ahem) handles bare LF just fine.

1 Like

MSYS2 automatically converts Windows CR LF line endings to POSIX LF line endings, so there is no reason to worry about CR LF line endings breaking VCV Rack. If this is not the case, report a bug to VCV - Support.

I develop in VSCode, and it’s git operations are not running inside MSYS2. I use both the integrated git ops and git ops in a non-MSYS2 shell (usually powershell). The git inside MSYS wasn’t reporting results consistent with git from Windows, so I avoided any git ops in the MSYS2 shell. Now I realize that the differences I was seeing were probably due to differing git crlf settings in the two environments. Now that I think I’ve got them synced up, I can probably safely do git ops in both.