How do I build and run qt/qt creator on Odroid XU3? - linux

I want to run QT-Creator on my Odroid XU3 (ARM Architecture with Lubuntu 14.4) and build an application with it. I've read a lot of on the internet to figure out how to do this but haven't been successful yet. I tried to follow these instructions https://wiki.qt.io/ODROID-XU3 but didn't understand few things.
It states that I need to install some dependencies. I followed the given hyperlink on this site and installed the dependencies using following commands:
sudo apt-get build-dep qt5-default
sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev
libxrender-dev libxi-dev
When I searched for my qt5 folder, I could only find qt4 in user/share. What did I do wrong?
It states that I have to setup a toolchain and a sysroot. Do I have to do this only if I want to cross-compile, so compile on a different machine for my Odroid XU3, or also if I just want to compile on Odroid itself?
Let's say I want to setup the toolchain. According to this site I should copy the raspberry pi toolchain (or a different one) into the folder ~/Code/Odroid/toolchain. Problem is I don't see such a folder in my home directory on my Odroid. Should I mkdir one?
Let's also say I want to setup the sysroot, I don't get the part "One is to mount the ODROID-XU3's SD Card or eMMC on your development machine and either make a copy or a link to ~/Code/Odroid/sysroot". Am I right in assuming that I should copy the content of my SD-card to this folder on my developing machine?
Where should I build my QT now - on my development machine or Odroid? (sorry for that stupid question)
What If I want to make it simple and build everything on Adroid XU3 assuming that I have plenty of time and resources. I tried to first install qt and qt creator afterwards but as I started qtcreator, there was no compiler preconfigured and also the QuickView was missing. The terminal was also mentioning that the toolchain is missing. I struggled a lot in order to add these missing components but failed.
Thanks in advance!

to your second point: you can compile it on the Odroid or on your PC. But you should take a look at this: https://wiki.qt.io/Category:QtonPi it should be pretty the same on the Odroid.

Related

Using KDE frameworks and Qt Creator installed without apt

A similar question has already been asked here Starting with KDE Frameworks 5 and Qt Creator. However, the answer still hasn't clarified my doubts. So here is the problem: on Linux (Ubuntu) there are two ways to install Qt, first is to use apt (sudo apt install qt5-default) and the other one is to download Qt from the official website. Now when you install using the first way Qt is installed by defualt /usr/lib and the second way in the home folder (or in /opt if you ran the installed with administrator privileges).
Now I would like to integrate KDE Frameworks 5 in my project so on the official website it is suggested to use:
sudo apt install framework
And then you can just include that in your project by QT += framework. The problem is I installed Qt using the second way (downloading from the website) and as a result Qt Creator always return Project ERROR: Unknown module(s) in QT: framework. This I believe is because Qt doesn't seem to be aware of the fact that the modules are in /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/ instead it probably looks for them somewhere else.
How do I solve this problem with a permanent solution? I cannot install Qt using apt because I would like to use the latest version which usually in not immediately available in the default repositories.
Ok so after a looking a lot, a solution has been suggested here https://forum.qt.io/topic/104861/how-to-use-kde-frameworks-with-qt-creator/8
Essentially Qt, if not installed through the system's repositories, is unable to find the KF5 modules. In order to fix this you can add a QMAKEPATH environment build variable to your project that tells Qt where it should look for the module, in my case this was in
/usr/lib/x86_64-linux-gnu/qt5

Clone compiled cmake build to identical hardware

I have successfully compiled opencv 3.1 on a raspberry pi. Developing with the library works perfectly fine. Now I wanted to set up another, identical raspberry with opencv and to save the compilation time, my idea was to copy the binaries to the second raspberry.
So I copied the opencv directories including the build folder and tried to run sudo make install. Instead of using the already compiled files, compilation using cmake starts over again.
How can I convince the second raspberry's build environent that there is no need to recompile everything? On my original raspberry, I can run sudo make install on the exactly same files without recompilation. Installed dev-libraries are the same on both systems. Is this a cmake, make or a opencv specific problem?
I also tried to copy all .so and .h files from /usr/... directories, but then I run into further problems when other cmake projects try to locate the opencv package.
Build directory is not intended to be copied into other place or on another machine.
For deliver program to other machine you should use installed files, or, more generally, a package.
CMake is shipped with CPack, which can build the program from sources and create package contained all its deliverables.
You may create .deb package on the first Raspberry PI machine:
cpack -G DEB <source-dir>
and install it on the second machine using dpkg.
There are also "archive" packages like .tgz or .zip. Full list of CPack generators is described in wiki.

Advice regarding installing ARM toolchain on Ubuntu VM (64bit)

Trying to compile Linux kernel for arm platform on a Ubuntu virtual machine
$make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
It fails as follows
arm-none-linux-gnueabi-gcc: not found
Tried to install
$sudo apt-get install arm-none-linux-gnueabi-gcc
E: unable to locate package arm-none-linux-gnueabi-gcc
Where to find the correct package? how to include it in the system? (I found a couple of links on line that didn't work for me). It would be great if you could provide a correct solution or reference.
The Ubuntu package names are gcc-arm-linux-gnueabi/gcc-arm-linux-gnueabihf.
For building the kernel, which one you use does not make much difference. For building anything else, "gnueabihf" is the hard-float version. For any modern ARM processor (this statement excludes the Raspberry PI), this is the one you would want.
Download arm-2013.05-24-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 from https://sourcery.mentor.com/GNUToolchain/
or https://sourcery.mentor.com/sgpp/lite/arm/portal/subscription?#template=lite
Get correct version of the arm-none-linux-gnueabi toolchain (i.e. targetting GNU/Linux rather than EABI).
untar it
tar xvf arm-2013.05-24-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
open bashrc
vi .bashrc
at the end add below comand
export PATH=$PATH:{path to toolchain}arm-2013.05/bin
e.g export PATH=$PATH:/home/vinay/under_linux/arm-2013.05/bin
save it and quit the terminal.
then you can cross-compile without everytime export.
Also take of correct toolchain there are two toolchain available choose according to your requirement.
Cross compile error "arm-none-eabi-g++ cannot find entry symbol"

How to get started with Bluetooth for Ubuntu

I really need help getting started. I want to make a basic program (in C) that can read a bluetooth socket and print whatever it is sent. I tried to get Bluez (followed this:http://hackgnar.com/article/installing-the-latest-bluez-software-in-ubuntu-12/ it went great until the "make" at the end and then no luck, would not make and example program could not find bluetooth/bluetooth.h).
I guess my hopeful options are:
some one can tell me what I'm missing with Bluez's install and possibly how to get started with it (compiling etc)
Alternative to bluez? Laptop could do bluetooth file transfers before I installed bluez so do I even need it for this application?
Any sort of comprehensive hello world (download, install, example, compile and run)
I have a strong programming background, just not in Linux (you can gloss over the C stuff but please not the Linux/Ubuntu stuff).
Thanks!
I can only guess that you have an old version of the kernel, or one of the required libraries. Try updating your linux installation (e.g. to a 3.5.x kernel or thereabouts).
I had no problem completing the steps you took.
If you are looking for example programs, you can always look at the simpler tools.
On my ubuntu box I'd do e.g.
sudo apt-get build-dep bluez-tools
apt-get source --compile bluez-tools
which gets all build dependencies, sources and builds the bluez-tools package on your system.

Boost installation in Linux

According to Boost download instructions for Linux http://www.boost.org/doc/libs/1_42_0/more/getting_started/unix-variants.html I should extract the Boost library to some directory on my computer. I am working with Ubuntu, Eclipse and CDT.
What is right directory to install Boost? Somewhere in /usr or in my home directory?
Boost is also available in the Ubuntu repositories -- for example,
sudo apt-get install libboost1.40-dev will install the development files for boost. This is probably the best option if you don't need the absolute most recent version (looks like the latest available on Ubuntu 9.10 is 1.40).
You should extract it to your home directory so you can build those libraries that need building (if you want to do a full install). IIRC bjam install defaults to somewhere in /usr or /usr/local (sorry, can't remember) but I'm pretty sure you can override the exact location on the command line.
I'd put it somewhere where it's unlikely to clash with a system-wide install of boost. If you're the only developer on this machine, I'd leave it in your home directory as there really isn't much point in moving it somewhere else. Just make sure you adjust the include and library paths accordingly.
For future reference:
Trying to install Boost 1.40 using apt-get and Synaptic, I encountered many problems: some files could not be downloaded, verified etc. Also, this installation doesn't seem to build the Boost libraries.
Finally, I installed the Boost manually following this manual:
http://ubuntuforums.org/showthread.php?t=1180792
I accepted all default directories, it is installed in /usr/local. I tested both inline functions and libraries, for now it looks OK.

Resources