为什么 ./configure 找不到 Qt5?需要从源代码构建手机卡

为什么 ./configure 找不到 Qt5?需要从源代码构建手机卡

背景:我正在尝试构建和安装 ofono-phonesim来源,在 Ubuntu 20.04 aarch64 上,这样我就可以得到HFP 与 Pulseaudio 13.99 配合使用。我这样做的原因如下:这个答案说去这里,但是那里的包对我来说仍然不可用,我猜测是因为它是 amd64。

然而,当在 repo 目录上运行 ./configure 时,我收到通知说找不到 Qt,尽管我已经安装了 Qt5:

检查 QT...没有

配置:错误:需要 Qt

configure.ac 中的行: PKG_CHECK_MODULES(QT, Qt5Core Qt5Gui Qt5Xml Qt5Network Qt5Qml Qt5DBus [Qt5Widgets >= 5.10], dummy=yes, AC_MSG_ERROR(Qt is required))

完整控制台输出:

user@machine:~/directory/phonesim$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for QT... no
configure: error: Qt is required

但是,我已经安装了 Qt5:

user@machine:~/directory/phonesim$ dpkg -l | grep libqt5
ii  libqt5concurrent5:arm64                       5.12.8+dfsg-0ubuntu1                   arm64        Qt 5 concurrent module
ii  libqt5core5a:arm64                            5.12.8+dfsg-0ubuntu1                   arm64        Qt 5 core module
ii  libqt5dbus5:arm64                             5.12.8+dfsg-0ubuntu1                   arm64        Qt 5 D-Bus module
ii  libqt5designer5:arm64                         5.12.8-0ubuntu1                        arm64        Qt 5 designer module
ii  libqt5gui5:arm64                              5.12.8+dfsg-0ubuntu1                   arm64        Qt 5 GUI module
ii  libqt5help5:arm64                             5.12.8-0ubuntu1                        arm64        Qt 5 help module
ii  libqt5network5:arm64                          5.12.8+dfsg-0ubuntu1                   arm64        Qt 5 network module
ii  libqt5opengl5:arm64                           5.12.8+dfsg-0ubuntu1                   arm64        Qt 5 OpenGL module
ii  libqt5opengl5-dev:arm64                       5.12.8+dfsg-0ubuntu1                   arm64        Qt 5 OpenGL library development files
ii  libqt5printsupport5:arm64                     5.12.8+dfsg-0ubuntu1                   arm64        Qt 5 print support module
ii  libqt5qml5:arm64                              5.12.8-0ubuntu1                        arm64        Qt 5 QML module
ii  libqt5quick5:arm64                            5.12.8-0ubuntu1                        arm64        Qt 5 Quick library
ii  libqt5quickcontrols2-5:arm64                  5.12.8+dfsg-0ubuntu1                   arm64        Qt 5 Quick Controls 2 library
ii  libqt5quicktemplates2-5:arm64                 5.12.8+dfsg-0ubuntu1                   arm64        Qt 5 Quick Templates 2 library
ii  libqt5sql5:arm64                              5.12.8+dfsg-0ubuntu1                   arm64        Qt 5 SQL module
ii  libqt5svg5:arm64                              5.12.8-0ubuntu1                        arm64        Qt 5 SVG module
ii  libqt5test5:arm64                             5.12.8+dfsg-0ubuntu1                   arm64        Qt 5 test module
ii  libqt5texttospeech5:arm64                     5.12.8-0ubuntu1                        arm64        Speech library for Qt - libraries
ii  libqt5waylandclient5:arm64                    5.12.8-0ubuntu1                        arm64        QtWayland client library
ii  libqt5waylandcompositor5:arm64                5.12.8-0ubuntu1                        arm64        QtWayland compositor library
ii  libqt5widgets5:arm64                          5.12.8+dfsg-0ubuntu1                   arm64        Qt 5 widgets module
ii  libqt5x11extras5:arm64                        5.12.8-0ubuntu1                        arm64        Qt 5 X11 extras
ii  libqt5xdg3:arm64                              3.4.0-1build2                          arm64        Implementation of the XDG Specifications for Qt (shared lib)
ii  libqt5xdgiconloader3:arm64                    3.4.0-1build2                          arm64        Implementation of the XDG Iconloader for Qt (shared lib)
ii  libqt5xml5:arm64                              5.12.8+dfsg-0ubuntu1                   arm64        Qt 5 XML module

我怎样才能使 Qt5 在此上下文中可见?对 Linux 和 Autotools 有点陌生,所以请帮忙,谢谢。

答案1

可重复的方法将是对已经已知答案- 你使用 deb-src 编译软件PPA 存储库

sudo add-apt-repository -s ppa:smoser/bluetooth
sudo apt-get update
sudo apt-get build-dep ofono-phonesim # will install all dependencies

cd ~/Downloads
apt-get source -b ofono-phonesim
sudo apt-get install ../ofono-phonesim_1.21-16-gadf231a8-0smoser0_arm64.deb

笔记:

  1. 你可以用你计划的命令(如./configuremake -j$(nproc)和 )替换最后两个命令sudo checkinstall。但我建议使用上面两个命令的原样。
  2. 我写了一封请求信臂丛arm64为 PPA 所有者建造。

相关内容