Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Compiling Qt Embedded for Mips

    Mobile and Embedded
    3
    4
    7577
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      fralik last edited by

      Hi all! I am trying to compile Qt Embedded for Mips (mipsel) architecture. I want to use my software on my router, which has DD-WRT. So, I downloaded the toolchain for DD-WRT, made simple Helloworld program and test it on my router. It works. Then I downloaded latest Qt Embedded archive and run:
      @
      ./configure -no-cups -release -shared -no-qt3support -no-phonon -no-audio-backend -no-webkit -qt-sql-lite -no-script -no-scripttools -opensource -no-gui -nomake examples -nomake demos

      ./configure -no-cups -release -shared -no-qt3support -no-phonon -no-audio-backend -no-webkit -qt-sql-sqlite -no-script -no-scripttools -platform linux-g++-64 -xplatform qws/linux-mipsel-g++ -opensource -no-gui -embedded mips -little-endian -nomake examples -nomake demos
      @ Configuration is successful. Then I execute make and get this error:
      @.obj/release-shared-emb-mips/qrect.o: In function QRectF::toAlignedRect() const': qrect.cpp:(.text+0x1468): undefined reference to ceilf'@
      There are two things:

      Toolchain from DD-WRT uses uclibc library, which does not contain ceilf function.

      Qt uses ceilf function if QT_USE_MATH_H_FLOATS is defined, otherwise it should use ceil function.

      Since recompilation of uclibc is not really suitable, I tried to work with Qt. I do not define QT_USE_MATH_H_FLOATS and I removed everything what has QT_USE_MATH_H_FLOATS from qmath.h. Of course, I did a lot of make confclean and make clean. Still, the error is there. Maybe someone has a clue on this? It is not clear for me how ceilf can appear in object file, and how
      @
      int xmax = int( int(ceil(xp + w)) );
      @ results in a call of ceilf.

      My linux-mipsel-g++/qmake.conf file is:
      @
      include(../../common/g++.conf)
      include(../../common/linux.conf)
      include(../../common/qws.conf)

      modifications to g++.conf

      QMAKE_CC = mipsel-linux-gcc
      QMAKE_CXX = mipsel-linux-g++
      QMAKE_CFLAGS += -mips32
      QMAKE_CXXFLAGS += -mips32
      QMAKE_LINK = mipsel-linux-g++
      QMAKE_LINK_SHLIB = mipsel-linux-g++
      QMAKE_INCDIR = /home/fralik/toolchain-mipsel_gcc4.1.2/include
      QMAKE_LIDDIR = /home/fralik/toolchain-mipsel_gcc4.1.2/lib

      modifications to linux.conf

      QMAKE_AR = mipsel-linux-ar cqs
      QMAKE_OBJCOPY = mipsel-linux-objcopy
      QMAKE_STRIP = mipsel-linux-strip

      load(qt_config)
      @

      1 Reply Last reply Reply Quote 0
      • T
        tobias.hunger last edited by

        fralik: This has nothing to do with your question, but could you please send me the libQtCore.so file as well as the output you get when running your mips compiler with the option -dumpmachine? Once you made sure everything works that is...

        I would love to improve mips support in Qt Creator, but so far have not found the time to actually set up and test a toolchain:-) The information I requested would greatly help me with that goal. You should be able to contact me via the "send mail" button in my profile. Thanks!

        1 Reply Last reply Reply Quote 0
        • F
          fralik last edited by

          I ended up replacing calls of

          @qCeil(xp+y)@

          by

          @(float)((int)xp + y)@

          [EDIT: code formatting, Volker]

          1 Reply Last reply Reply Quote 0
          • R
            robert.berger last edited by

            Hi Tobias,

            You might want to have a look at http://www.yoctoproject.org/
            This will build a boot loader, toolchain, kernel, rootfs for you and it also contains qt4-x11-free and qt4-embedded.

            If you don't want to build the stuff yourself, you can download pre compiled stuff.

            Regards,

            Robert

            1 Reply Last reply Reply Quote 0
            • First post
              Last post