z3ntu / RazerGenie

Qt application for configuring your Razer devices under GNU/Linux.
GNU General Public License v3.0
376 stars 35 forks source link

Cannot be built on macOS11.0.1 (20B29), prompting 'Dependency" qt5 "not found, tried pkgconfig, qmake-qt5 and qmake' #102

Closed TreviD closed 3 years ago

TreviD commented 3 years ago

I did a meson-- prefix=/tmp/RazerGenie.app-- bindir=Contents/MacOS builddir compilation on macOS 11.0.1, but the prompt was as follows

The Meson build system
Version: 0.56.0
Source dir: /Users/xxx/Downloads/RazerGenie-0.9.0
Build dir: /Users/xxx/Downloads/RazerGenie-0.9.0/builddir
Build type: native build
Project name: razergenie
Project version: undefined
C++ compiler for the host machine: c++ (clang 12.0.0 "Apple clang version 12.0.0 (clang-1200.0.32.27)")
C++ linker for the host machine: c++ ld64 609.7
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/local/bin/pkg-config (0.29.2)
Run-time dependency qt5 (modules: Widgets, DBus, Network, Xml) found: NO (tried pkgconfig, qmake-qt5 and qmake)

meson.build:8:0: ERROR: Dependency "qt5" not found, tried pkgconfig, qmake-qt5 and qmake

A full log can be found at /Users/xxx/Downloads/RazerGenie-0.9.0/builddir/meson-logs/meson-log.txt

AND /Users/xxx/Downloads/RazerGenie-0.9.0/builddir/meson-logs/meson-log.txt


Build started at 2020-12-09T09:05:24.362373
Main binary: /usr/local/opt/python@3.9/bin/python3.9
Build Options: -Dprefix=/tmp/RazerGenie.app -Dbindir=Contents/MacOS
Python system: Darwin
The Meson build system
Version: 0.56.0
Source dir: /Users/xxx/Downloads/RazerGenie-0.9.0
Build dir: /Users/xxx/Downloads/RazerGenie-0.9.0/builddir
Build type: native build
Project name: razergenie
Project version: undefined
None of 'CXX' are defined in the environment, not changing global flags.
None of 'CXXFLAGS' are defined in the environment, not changing global flags.
None of 'LDFLAGS' are defined in the environment, not changing global flags.
None of 'CPPFLAGS' are defined in the environment, not changing global flags.
None of 'CXX_LD' are defined in the environment, not changing global flags.
Sanity testing C++ compiler: c++
Is cross compiler: False.
None of 'CXX_LD' are defined in the environment, not changing global flags.
Sanity check compiler command line: c++ /Users/xxx/Downloads/RazerGenie-0.9.0/builddir/meson-private/sanitycheckcpp.cc -o /Users/xxx/Downloads/RazerGenie-0.9.0/builddir/meson-private/sanitycheckcpp.exe -pipe
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command: /Users/xxx/Downloads/RazerGenie-0.9.0/builddir/meson-private/sanitycheckcpp.exe
C++ compiler for the host machine: c++ (clang 12.0.0 "Apple clang version 12.0.0 (clang-1200.0.32.27)")
C++ linker for the host machine: c++ ld64 609.7
None of 'AR' are defined in the environment, not changing global flags.
None of 'CXX' are defined in the environment, not changing global flags.
None of 'CXXFLAGS' are defined in the environment, not changing global flags.
None of 'LDFLAGS' are defined in the environment, not changing global flags.
None of 'CPPFLAGS' are defined in the environment, not changing global flags.
None of 'CXX_LD' are defined in the environment, not changing global flags.
Sanity testing C++ compiler: c++
Is cross compiler: False.
None of 'CXX_LD' are defined in the environment, not changing global flags.
Sanity check compiler command line: c++ /Users/xxx/Downloads/RazerGenie-0.9.0/builddir/meson-private/sanitycheckcpp.cc -o /Users/xxx/Downloads/RazerGenie-0.9.0/builddir/meson-private/sanitycheckcpp.exe -pipe
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command: /Users/xxx/Downloads/RazerGenie-0.9.0/builddir/meson-private/sanitycheckcpp.exe
C++ compiler for the build machine: c++ (clang 12.0.0 "Apple clang version 12.0.0 (clang-1200.0.32.27)")
C++ linker for the build machine: c++ ld64 609.7
None of 'AR' are defined in the environment, not changing global flags.
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Trying to find qt with pkg-config
Pkg-config binary for MachineChoice.HOST is not cached.
None of 'PKG_CONFIG' are defined in the environment, not changing global flags.
Pkg-config binary missing from cross or native file, or env var undefined.
Trying a default Pkg-config fallback at pkg-config
Found pkg-config: /usr/local/bin/pkg-config (0.29.2)
Determining dependency 'Qt5Widgets' with pkg-config executable '/usr/local/bin/pkg-config'
PKG_CONFIG_PATH:
Called `/usr/local/bin/pkg-config --modversion Qt5Widgets` -> 1

Pkg-config binary for MachineChoice.HOST is cached.
Determining dependency 'Qt5DBus' with pkg-config executable '/usr/local/bin/pkg-config'
PKG_CONFIG_PATH:
Called `/usr/local/bin/pkg-config --modversion Qt5DBus` -> 1

Pkg-config binary for MachineChoice.HOST is cached.
Determining dependency 'Qt5Network' with pkg-config executable '/usr/local/bin/pkg-config'
PKG_CONFIG_PATH:
Called `/usr/local/bin/pkg-config --modversion Qt5Network` -> 1

Pkg-config binary for MachineChoice.HOST is cached.
Determining dependency 'Qt5Xml' with pkg-config executable '/usr/local/bin/pkg-config'
PKG_CONFIG_PATH:
Called `/usr/local/bin/pkg-config --modversion Qt5Xml` -> 1

Trying to find qt with qmake
QMake binary missing from cross or native file, or env var undefined.
Trying a default QMake fallback at qmake-qt5
None of 'QMAKE' are defined in the environment, not changing global flags.
QMake binary missing from cross or native file, or env var undefined.
Trying a default QMake fallback at qmake
Run-time dependency qt5 (modules: Widgets, DBus, Network, Xml) found: NO (tried pkgconfig, qmake-qt5 and qmake)

meson.build:8:0: ERROR: Dependency "qt5" not found, tried pkgconfig, qmake-qt5 and qmake

I have installed qt5 using brew.

Snipaste_2020-12-09_09-25-04

So is this a question? Or how I can solve this problem.

z3ntu commented 3 years ago

Sorry, I can't help you much with homebrew. I guess you missed putting the qt bin directory into your PATH variable?

TreviD commented 3 years ago

Sorry, I can't help you much with homebrew. I guess you missed putting the qt bin directory into your PATH variable?

Yes, I executed export PATH="/usr/local/Cellar/qt/5.15.2/bin":$PATH, and it's worked.

Path / usr/local/cella/qt/5.15.2/ bin is the path where brew installed qt.

It can find by brew list qt.