我正在尝试为DaVinci DM365(ARM 9)构建Qt 4.8.5。
我复制了mkspecs/qws/linux-arm-gnueabi-g++
并将其命名为dm365
所以这就是我的qmake.conf的样子:
include(../../common/linux.conf)
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
QMAKE_CFLAGS_RELEASE = -03 -march=armv5te
QMAKE_CXXFLAGS_RELEASE = -03 -march=armv5te
QMAKE_CC = arm-none-linux-gnueabi-gcc
QMAKE_CXX = arm-none-linux-gnueabi-g++
QMAKE_LINK = arm-none-linux-gnueabi-g++
QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++
# modifications to linux.conf
QMAKE_AR = arm-none-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy
QMAKE_STRIP = arm-none-linux-gnueabi-strip
load(qt_config)
以下是我用于configure
脚本的选项列表:
./configure -embedded arm -platform qws/linux-x86-g++ -xplatform qws/dm365 -depths 16,24,32 -no-mmx -no-3dnow -no-sse -no-sse2 -no-cups -no-largefile -no-accessibility -no-openssl -no-gtkstyle -qt-mouse-pc -qt-mouse-linuxtp -qt-mouse-linuxinput -plugin-mouse-linuxtp -plugin-mouse-pc -fast -no-qt3support -opensource -no-webkit -no-openssl -nomake demos -nomake examples
创建Makefile后我尝试make
实际构建Qt,我收到此错误:
release-shared/parser.o: In function `Parser::note(char const*)':
parser.cpp:(.text+0x23c): undefined reference to `qt_assert_x(char const*, char const*, char const*, int)'
parser.cpp:(.text+0x276): undefined reference to `qt_assert(char const*, char const*, int)'
release-shared/parser.o: In function `QVector<Symbol>::at(int) const':
parser.cpp:(.text._ZNK7QVectorI6SymbolE2atEi[_ZNK7QVectorI6SymbolE2atEi]+0x2d): undefined reference to `qt_assert_x(char const*, char const*, char const*, int)'
release-shared/parser.o: In function `QStack<QByteArray>::top()':
parser.cpp:(.text._ZN6QStackI10QByteArrayE3topEv[_ZN6QStackI10QByteArrayE3topEv]+0x1f): undefined reference to `qt_assert(char const*, char const*, int)'
collect2: error: ld returned 1 exit status
make[1]: *** [../../../bin/moc] Error 1
make[1]: Leaving directory `/home/dmitry/Downloads/qt-everywhere-opensource-src-4.8.5/src/tools/moc'
make: *** [sub-moc-make_default-ordered] Error 2
无法弄清楚我的配置有什么问题。
答案 0 :(得分:0)
问题是我使用bash脚本$DVSDK/linux-devkit/environment-setup.sh
来设置DVSDK提供的一些环境变量。当我停止使用它时,Qt建好了。