Note: The command is “dot space env.sh”. Execute the above command for shell where you are
trying to start compilation of Qt.
Check whether the toolchain path is set or not by issuing
$ echo $PATH
Above command displays the entire paths that are added to Shell PATH variable separated by
colon ‘:’. See if your path is printed on the terminal. If you are not able to see your toolchain path
repeat the steps from the beginning of this section.
2.3. Building qmake using QT:
Method:1
Download QT version from the following link
http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-everywhere-opensource-src-
4.8.5.tar.gz
Compile the qt-everywhere-opensource-src-4.8.5 source file
$ cp qt-everywhere-opensource-src-4.8.5.tar.gz ~/work
$ cd ~/work
$ tar -xvf qt-everywhere-opensource-src-4.8.5.tar.gz
$ cd qt-everywhere-opensource-src-4.8.5
$ vim mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf
change
arm-none-linux-gnueabi
to
arm-cortexa8-linux-gnueabihf
save and exit
Execute the following configuration command
$./configure -opensource -confirm-license -release -rpath -no-fast -no-sql-ibase -no-sql-mysql -no-
sql-odbc -no-sql-psql -no-sql-sqlite2 -no-qt3support -no-mmx -no-3dnow -no-sse -no-sse2 -no-
sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-optimized-qmake -no-nis -no-cups -no-pch-
reduce-relocations -force-pkg-config -prefix /opt/qt-cross -no-armfpa -make libs -nomake docs-ittle-
endian -embedded arm -qt-decoration-styled -depths all -xplatform qws/linux-arm-gnueabi-g++
$ make
$ sudo make install
check the binary file in /opt/qt-cross
$ ls /opt/qt-cross/bin
Method-2:
use prebuilt qt-cross provided by Phytec
$ sudo cp qt-cross-hf.tar.bz2 /opt
$ cp /opt
$ sudo tar -xvf qt-cross-hf.tar.bz2
$ ls /opt/qt-cross/bin
Completed , Now use the qmake path for cross-compiling you application in QT-Creator.
© PHYTEC Embedded Pvt. Ltd 2014
17
Revision no. 1.0