c++qtqt4embeddeddavinci

Error when building Qt for embedded system


I'm trying to build Qt 4.8.5 for DaVinci DM365 (ARM 9).

I copied mkspecs/qws/linux-arm-gnueabi-g++ and named it dm365 so here's how my qmake.conf looks like:

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)

Here's list of options I use for configure script:

./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

After Makefile is created and I try to make to actually build Qt, I get this error:

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

Can't figure out what's wrong with my configuration.


Solution

  • The problem is that I was using bash script $DVSDK/linux-devkit/environment-setup.sh to set up some environment variables provided with DVSDK. When I stopped using it, Qt built fine.