用於交叉編譯的核心 xconfig 失敗,並顯示“未找到套件 'qt-mt' 錯誤”

用於交叉編譯的核心 xconfig 失敗,並顯示“未找到套件 'qt-mt' 錯誤”

我正在為嵌入式 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。

相關內容