OSX 10.15.4 fail to compile with QT 5.14.2

checking for Qt library version >= 5.1... no; Qt 5.1 or greater is required
check config.log for clues
Here is the error :
conftest.c:16:10: fatal error: 'ac_nonexistent.h' file not found #include <ac_nonexistent.h> ^~~~~~~~~~~~~~~~~~ 1 error generated.
And further down :
error Qt requires a C++11 compiler and yours does not seem to be that.
I will try to switch FLAGS.
Ok solved by switching to gcc-9 instead of the currrent clang Apple compiler.
=>
brew install gcc@9
cd /usr/local/bin
ln -s c++-9 c++ ln -s cpp-9 cpp ln -s g++-9 g++ ln -s gcc-9 gcc ln -s gcc-ar-9 gcc-ar ln -s gcc-nm-9 gcc-nm ln -s gcc-ranlib-9 gcc-ranlib ln -s gcov-9 gcov ln -s gcov-dump-9 gcov-dump ln -s gcov-tool-9 gcov-tool ln -s x86_64-apple-darwin19-c++-9 x86_64-apple-darwin19-c++ ln -s x86_64-apple-darwin19-g++-9 x86_64-apple-darwin19-g++ ln -s x86_64-apple-darwin19-gcc-9 x86_64-apple-darwin19-gcc ln -s x86_64-apple-darwin19-gcc-ar-9 x86_64-apple-darwin19-gcc-ar ln -s x86_64-apple-darwin19-gcc-nm-9 x86_64-apple-darwin19-gcc-nm ln -s x86_64-apple-darwin19-gcc-ranlib-9 x86_64-apple-darwin19-gcc-ranlib ln -s x86_64-apple-darwin19-gfortran-9 x86_64-apple-darwin19-gfortran
export PKG_CONFIG_PATH="/usr/local/lib:/usr/local/lib/pkgconfig" export PATH="/usr/local/bin:$PATH"
Good luck
I ran into this issue as well while compiling qjackctl on a standard installation of macOS Catalina. I'm posting my work below in case it's helpful to anyone else. Since Homebrew has qjackctl I would definitely recommend just running brew install qjackctl on macOS instead of compiling from source if possible. It took me over an hour of troubleshooting to compile from source.
First error: checking for Qt library version >= 5.1... no; Qt 5.1 or greater is required
brew install qt, brew upgrade qt, brew link --force qt55 etc. did not solve this.
Eventually I got past this with ./configure CXXFLAGS='-std=c++11' after discovering issue #20.
Next error: checking for JACK... no
configure: error: *** JACK library not found.
I did all kinds of work to try to solve this. There was the following message directly preceding this error,
checking for main in -lX11... no
checking for main in -lXext... no
and I solved that by running ./configure CXXFLAGS='-std=c++11' LDFLAGS=-L/opt/X11/lib, but that still did not solve the JACK issue. brew install jack succeeded but did not help. Per this askubuntu.com question, I tried installing libjack-dev and libjack-jackd2-dev, but that didn't help. I tried variants on ./configure CXXFLAGS='-std=c++11' --with-jack=/usr/local/include/jack without success. Eventually, combing through every configure & make file, in CMakeLists.txt I discovered a reference to pkg-config. I ran brew install pkg-config. Voila!!! It worked!
Summary for compiling from source on macOS Catalina, according to my experience:
- Open Terminal and install Command Line Tools if you need to:
xcode-select --install - Download and install Homebrew
- Run
brew install pkg-config - Navigate to where you downloaded the source code, and run
./configure CXXFLAGS='-std=c++11' LDFLAGS=-L/opt/X11/lib
It would be really nice if the configure script could account for these two needs (pkg-config and fixing the Qt error with the right GCC version) with suggested fixes, instead of leaving macOS users wondering what to do.
please propose a PR instead...
or you could try the cmake build system, while not official, it's there lurking as an alternative to autoconf (configure) for the ones that feel it's one better option, specially for non-GNU/Linux platforms...
byee
ps. personally, I have no plans to test something on anything that comes from the bitten-fruit corp. ever ;)