Rack dep build fails when using CMake 4

I’m trying to set up Rack builds on my brand new Mac Mini M2 Latest Mac OS. It’s been decades since I owned a Mac, so all new to me (prev career was all Windows except doing testing on a 512K Mac in the late 80’s). There appears to be an issue with CMAKE trying to build GLEW.

Followed the manual to the letter, but make dep is failing:

cd glew-2.1.0 && mkdir -p build
cd glew-2.1.0/build && cmake -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 -DCMAKE_INSTALL_PREFIX="/Users/pachde/Documents/repos/Rack/dep" -DCMAKE_INSTALL_LIBDIR=lib ./cmake
CMake Warning (dev) at CMakeLists.txt:5 (project):
  cmake_minimum_required() should be called prior to this top-level project()
  call.  Please see the cmake-commands(7) manual for usage documentation of
  both commands.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at CMakeLists.txt:7 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


-- Configuring incomplete, errors occurred!
make[1]: *** [lib/libGLEW.a] Error 1
make: *** [dep] Error 2

I know nothing of CMAKE. I’ve set RACK_DIR appropriately:

RACK_DIR=/Users/pachde/Documents/repos/Rack

It could be a case of:

  • The official toolchain builds against (the macOS SDK supporting) macOS 10.9, since this is the oldest supported macOS version.
  • Andrew/the team might not routinely build all of Rack’s dependencies against the latest macOS, and so would not catch if the newest macOS cmake can no longer build the Glew dependency without setting some flag.

I would definately send it to: support@vcvrack.com

1 Like

Submitted.

VCV Says this is fixed for the next version.

Looks like I was unlucky enough to start Mac dev just after Homebrew updated CMAKE after the release of Rack 2.62. So now I’m stalled on any Mac dev for Rack until the next Rack update.

Ah well, I have working Windows and Linux, and the Github actions all working, so it’s not that big an issue for me…

1 Like

Just downgrade cmake to a 3.x rather than 4 with home brew or with a direct download from kitware

Cmake 4 is one of those mini dev apocalypses for folks with old deps. If you grabbed it in win and lin you would hit the same fail class alas.

1 Like

Absolutely no clue how to downgrade cmake on this context. Honestly cargo-culting anyting linuxy here (laugh).

How did you install cmake? If you used home brew try something like

brew install cmake@3.27

If you didn’t use home brew uhhh undo what you did and use home brew. It’s the working equivalent of Pac-Man or apt or winger for many things on macOS

Like I said, I followed the instructions in the manual literally, which says to use Homebrew, so that’s what I did. I’ll give this a try and see if Homebrew will downgrade CMAKE for me. Otherwise it seems it should be straightforward to uninstall, then reinstall with version specifier.

Eric from VCV is suggesting to install the CMake app, brew uninstall cmake then create a symbolic link, but I’ll try the simpler route first, and come back to the thread.

For anyone else following the Rack instructions, it seems like a very small addition with the @3.27 should get the right things in place:

brew install git wget cmake@3.27 autoconf automake libtool jq python zstd pkg-config

I’ll follow up soon once I get it up and running.

1 Like

I have not personally read the vcv rack how to set up a Mac box for development - glad they suggest brew!

Cmake 4 is going to break lots of stuff this way. GitHub upgraded their Ubuntu runners and I think had hundreds of issues raised within the day. It broke surge proper (but I got surge fixed).

Painful path they have chosen with the version field. Probably sensible but painful

Good luck!

The variable name CMAKE_POLICY_VERSION_MINIMUM is misleading. What it really means is “set CMake policy version to” which is completely different than setting a minimum policy (i.e. behavior) version.

This build error is unrelated to the original post in this thread. I am moving to a new thread.

1 Like

brew install cmake@3.27 doesn’t work:

Warning: No available formula with the name "cmake@3.27". Did you mean cmake?

Yeah, damn. From reading the following two articles, downgrading cmake in brew seems… unnecessarily gnarly.

Maybe try, just for the hell of it: brew install cmake@3.27.9

Or according to this you might be able to do:

Disclaimer: Haven’t tried any of this :slight_smile:

What worked was download and install the CMAKE Mac app, then apply this voodoo I found on the web:

sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install=/usr/local/bin

Why your shell can’t see an installed app on a Mac is Mac OS stupidity. (Sorry, have not been working on a Mac long enough yet to be fully gaslighted).

Deps, Rack, and plugins happily fully built while I was typing this. (damn, that was fast! This part of running on an M2 CPU is awesome).

Thanks everyone for the help!

2 Likes

What many people don’t know is that something.app is simply a directory. So if you see a cmake binary when you do ls /Applications/CMake.app/Contents/bin/ or ls /Applications/CMake.app/Contents/MacOS/ then you can just put that directory at the front of your PATH in your relevant shell startup file for instance, and now you have cmake in your PATH.

1 Like

sorry for the bad steer. that home-brew doesn’t keep versioned cmake formulae around is quite annoying in this case, indeed.

the real problem of course is that cmake 4 is blowing up everyones builds and infrastructure providers are updating to it assuming it wont. It will cause pain everywhere (including I think in rack land since it looks like andrew is updating the toolchain to cmake 4 so i can’t get surge updates out any more without some work…). Sigh. All computers are bad.

1 Like

Yeah, it’s a PITA.

How do you reckon? The dockerfile is based on Ubuntu 24.04 which has cmake v3.x.

Because he told me that it is stopping my surge update here SurgeXTRack · Issue #745 · VCVRack/library · GitHub

Interesting issue. Sounds like everyone will be forced to cmake 4 in an upcoming SDK and toolchain. Maybe it’s better to bite that bullet now since it’s forcing its way through to people, dunno…

Hi,

I’m on Windows (no mac) and I still get:

-- Configuring incomplete, errors occurred!
make[1]: *** [Makefile:96: lib/libglew32.a] Error 1
make[1]: Leaving directory '/c/repos/Rack/dep'
make: *** [Makefile:112: dep] Error 2

Not sure I got it: should I wait the release of the next version to build correctly?