![用於交叉編譯的核心 xconfig 失敗,並顯示“未找到套件 'qt-mt' 錯誤”](https://rvso.com/image/1036643/%E7%94%A8%E6%96%BC%E4%BA%A4%E5%8F%89%E7%B7%A8%E8%AD%AF%E7%9A%84%E6%A0%B8%E5%BF%83%20xconfig%20%E5%A4%B1%E6%95%97%EF%BC%8C%E4%B8%A6%E9%A1%AF%E7%A4%BA%E2%80%9C%E6%9C%AA%E6%89%BE%E5%88%B0%E5%A5%97%E4%BB%B6%20'qt-mt'%20%E9%8C%AF%E8%AA%A4%E2%80%9D.png)
我正在為嵌入式 ARM 系統交叉編譯 Kernel.org Linux 核心 (linux-3.0.4)。幾天前,我能夠使用 gcc 和交叉編譯器在 Ubuntu 11.04 Natty(64 位元)主機桌面上成功建立核心 xconfig。我還在 Ubuntu 11.10(64 位元)桌面上嘗試了相同的編譯過程。但是,我現在收到與套件“qt-mt”相關的以下錯誤:
$ make ARCH=arm xconfig
Package qt-mt was not found in the pkg-config search path.
Perhaps you should add the directory containing `qt-mt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'qt-mt' found
Package qt-mt was not found in the pkg-config search path.
Perhaps you should add the directory containing `qt-mt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'qt-mt' found
Package qt-mt was not found in the pkg-config search path.
Perhaps you should add the directory containing `qt-mt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'qt-mt' found
Package qt-mt was not found in the pkg-config search path.
Perhaps you should add the directory containing `qt-mt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'qt-mt' found
HOSTCXX scripts/kconfig/qconf.o
scripts/kconfig/qconf.cc:6:21: fatal error: qglobal.h: No such file or directory
compilation terminated.
make[1]: *** [scripts/kconfig/qconf.o] Error 1
make: *** [xconfig] Error 2
xconfig 正在主機 Ubuntu 桌面上運行,為交叉編譯的核心映像準備核心選項。由於 xconfig 是在主機上運行的,因此它不是使用交叉編譯器建構的。我不知道這裡發生了什麼,但我認為這可能與 Ubuntu 上安裝 qt 庫的位置有關。
我在 Fedora 論壇上找到了以下帖子,但我不知道它是否適用於我在 Ubuntu 上的情況。
http://forums.fedoraforum.org/showthread.php?t=139653
我還嘗試使用 apt 工具卸載並重新安裝 QT3 和 QT4,但上面給出的錯誤仍然存在。關於如何成功編譯 xconfig 有什麼建議嗎?
答案1
OP回答了這個問題
透過更多的實驗,
make distclean
似乎解決了問題。我現在可以成功建構核心 xconfig。