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:
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.
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…
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:
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
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.
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).
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.
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.
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…