How to fix `Qt qmake not found!` errors when installing a MacPorts package.
I’ve run into this or similar errors before when trying to install a new package via MacPorts on OS X, and I wasn’t sure how to approach it: there are many MacPorts bug reports on individual packages, which, after finding a fix, I think are probably inappropriate for those packages.
:info:configure CMake Error at /opt/local/share/cmake-2.8/Modules/FindQt4.cmake:1150 (MESSAGE): :info:configure Qt qmake not found! :info:configure Call Stack (most recent call first): :info:configure CMakeLists.txt:90 (FIND_PACKAGE) :info:configure :info:configure :info:configure -- Configuring incomplete, errors occurred! :info:configure shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org _release_ports_multimedia_lmms/work/lmms-0.4.8" && cmake -DCMAKE_INSTALL_PREFIX=/opt/local -DCMAKE_VERBOSE_MAKEFILE= ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_INSTALL_NAME_DIR =/opt/local/lib -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_MODULE_PATH=/opt/local/share/cmake/modules -Wno -dev -DWANT_SYSTEM_SR=OFF -DWANT_VST=OFF -DWANT_ALSA=OFF -DWANT_PULSEAUDIO=OFF -DWANT_FFTW3F=ON -DWANT_SDL=ON -DWANT _OGGVORBIS=ON -DWANT_STK=OFF -DWANT_JACK=ON -DCMAKE_OSX_ARCHITECTURES="x86_64" " returned error 1 :error:configure Target org.macports.configure returned: configure failure: shell command failed (see log for detail s)
The solution is surprisingly simple (given that you already have Apple’s Xcode installed), and it’s to first install another port called Qt Assistant, which fixes backwards compatability problems with some ports and newer versions of Qt:
sudo port install qt-assistant
Once I did this, and then cleaned my target lmms port directory of any possible problems:
sudo port clean lmms
… I was able to install the lmms port successfully.
sudo port install lmms