Author Topic: Building Qt-creator  (Read 34127 times)

Matom

  • Newbie
  • *
  • Posts: 29
    • View Profile
Building Qt-creator
« on: November 09, 2018, 02:48:24 AM »
Dear Krontech,

I am trying to build Qt 4.8.7  on an Ubuntu 16.04 OS.
But the configuration fails and I cant make && make install . The error message I get when running the qtconfig.sh script is the following:

"Creating qmake. Please wait...
make: Nothing to be done for 'first'.

You have not explicitly asked to use pkg-config and are cross-compiling.
pkg-config will not be used to automatically query cflag/lib parameters for
dependencies

The QtDBus module cannot be enabled because libdbus-1 version 0.93 was not found."


I followed the steps from the github rep. Do have any experience with this error?

I have tried google, but many different solutions come up.

Cheers,
Maja
« Last Edit: November 09, 2018, 05:25:56 AM by Matom »

foobar

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Building Qt-creator
« Reply #1 on: November 09, 2018, 12:41:19 PM »
The Qt build instructions have been going through a bit of churn lately as we've been preparing for the v0.3.1 release (which introduced the D-Bus video control API), and as we are preparing to migrate to Debian for future releases. In order for Qt to build successfully with D-Bus support, you will need to use a targetfs that includes the v0.3.1-beta update, this was due to some missing D-Bus libraries and headers that weren't present in the original Arago release.

Suggested resolutions (pick one):
  • Apply the v0.3.1-beta update to your camera, power down the camera and remove the uSD card from the bottom of the camera, then copy the contents of the ROOTFS partition to your targetfs
  • Download the v0.3.1-beta update package, and locate the update.tgz file from the camUpdate folder. Extract the contents of update.tgz onto your targetfs (eg: tar -C <path to targetfs> -xzf <path to update.tgz>)

After that, your targetfs should now  have a bunch of header files in <path to targetfs>/usr/include/dbus-1.0/dbus and <path to targetfs>/usr/lib/dbus-1.0/include/dbus/

Matom

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Building Qt-creator
« Reply #2 on: November 12, 2018, 02:13:37 AM »
Dear Foobar,

Thank  you very much for the answer. I am really keen on starting to play around with the new software, so I appreciate the help with getting Qt up and running.

I tried the second resolution but I get almost the same error message after I run the qtconfig.sh script.

You have not explicitly asked to use pkg-config and are cross-compiling.
pkg-config will not be used to automatically query cflag/lib parameters for
dependencies

The QtDBus module cannot be enabled because libdbus-1 version 0.93 was not found.

 Turn on verbose messaging (-v) to /home/majtom/Work/chronos-sdk/qt-everywhere-opensource-src-4.8.7/configure to see the final report.
 If you believe this message is in error you may use the continue
 switch (-continue) to /home/majtom/Work/chronos-sdk/qt-everywhere-opensource-src-4.8.7/configure to continue.


And when I try to make from ~/Work/chronos-sdk/qt4-install/qmake I get the following error message:
make: Nothing to be done for 'first'.

I do get a bunch of dbus header files in my targetfs after extracting the update.tgz.

In <path to targetfs>/usr/include/dbus-1.0/dbus I have 22 different header files and in <path to targetfs>/usr/lib/dbus-1.0/include/dbus I only get one: dbus-arch-deps.h. The folder that is referred to in the end of the qtconfig.sh script ( <path to targetfs>/usr/lib/arm-linux-gnueabi/dbus-1.0/include) does not exist. Could this have something to do with it? Or something about the pkg-config?

Otherwise, is there a way to deploy the camApp V0.2.5 on a camera with FPGA version 3.6?


« Last Edit: November 12, 2018, 05:26:16 AM by Matom »

foobar

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Building Qt-creator
« Reply #3 on: November 12, 2018, 05:29:15 PM »
You have not explicitly asked to use pkg-config and are cross-compiling.
pkg-config will not be used to automatically query cflag/lib parameters for
dependencies
You can safely ignore this warning, since Qt creator is just letting us know that our target operating system is too simple to make use of the pkg-config tool, and we need to figure out the compiler and linker flags ourselves.

The QtDBus module cannot be enabled because libdbus-1 version 0.93 was not found.

 Turn on verbose messaging (-v) to /home/majtom/Work/chronos-sdk/qt-everywhere-opensource-src-4.8.7/configure to see the final report.
 If you believe this message is in error you may use the continue
 switch (-continue) to /home/majtom/Work/chronos-sdk/qt-everywhere-opensource-src-4.8.7/configure to continue.
This issue seems a lot more serious, and suggests that the Qt configuration tool isn't able to find our libdbus-1 libraries, and that we are likely to fail when running make. I  am also able to get this message from qtconfig.sh whenever the targetfs is lacking the v0.3.1 update.

And when I try to make from ~/Work/chronos-sdk/qt4-install/qmake I get the following error message:
make: Nothing to be done for 'first'.
If qtconfig.sh succeeded, there should be a Makefile in the qt4-build directory, and that is where you should be running "make && make install" from. The qmake subdirectory is internal to Qt and you shouldn't need to do anything from there.

I do get a bunch of dbus header files in my targetfs after extracting the update.tgz.

In <path to targetfs>/usr/include/dbus-1.0/dbus I have 22 different header files and in <path to targetfs>/usr/lib/dbus-1.0/include/dbus I only get one: dbus-arch-deps.h. The folder that is referred to in the end of the qtconfig.sh script ( <path to targetfs>/usr/lib/arm-linux-gnueabi/dbus-1.0/include) does not exist. Could this have something to do with it? Or something about the pkg-config?
Wonderful, that sounds like you have successfully applied the v0.3.1 update to your targetfs. You will probably need to run qtconfig.sh again after that to make sure that Qt is setup correctly.
The <path to targetfs>/usr/lib/arm-linux-gnueabi/dbus-1.0/include path was added to build on Debian targets, since they structure their include paths a little differently, Qt should simply ignore include paths that don't exist.

Otherwise, is there a way to deploy the camApp V0.2.5 on a camera with FPGA version 3.6?
If you want build software for FPGA version 3.6, then you will just need to check out an earlier version of the chronos-cam-app repository (I would suggest creating a branch starting from the v0.3.0 release tag as v0.2.5 is relatively old and there are some known bugs). The Qt configuration and build process should be very similar, but you won't need the extra tweaks added in v0.3.1 for libdbus. You can find the Qt setup instructions for v0.3.0 here, however, once Qt has been configured for the v0.3.1 it can also build older release of the software too.
« Last Edit: November 12, 2018, 05:32:09 PM by foobar »

Matom

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Building Qt-creator
« Reply #4 on: November 13, 2018, 06:04:26 AM »
Thank you for all the info.

Quote
Wonderful, that sounds like you have successfully applied the v0.3.1 update to your targetfs. You will probably need to run qtconfig.sh again after that to make sure that Qt is setup correctly.

I did do that, several times, but the error keeps popping up. Therefore I tried to configure the earlier Qt version following the instructions in your link, but here I get the “good old” :

The tslib functionality test failed!
 You might need to modify the include and library search paths by editing
 QMAKE_INCDIR and QMAKE_LIBDIR in
 /home/majtom/Work/qt-everywhere-opensource-src-4.8.7/mkspecs/qws/linux-omap2-g++.


BUT, I do have the tslib.h file in  ~/Work/chronos-sdk/targetfs/usr/include directory and I did add the paths to the qmake file in ~/Work/qt-everywhere-opensource-src-4.8.7/mkspecs/qws/linux-omap2-g++. The last four lines of the qmake.conf now look like this:

#defines for tslib
QMAKE_INCDIR += ~/Work/chronos-sdk/targetfs/usr/include
QMAKE_LIBDIR += ~/Work/chronos-sdk/targetfs/usr/lib

load(qt_config)

I am not completely sure about the QMAKE_LIBDIR += ~/Work/chronos-sdk/targetfs/usr/lib. Because there are actually no tslib files in this folder. They are in some of the sub-directories like opkg/info. Should I link directly to that one?
Maybe it is some kind of conflict between the tslib.h from the camera microUSB (I have camApp version 0.3.0) and the qt version?

I hope you are able to help me again.

foobar

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Building Qt-creator
« Reply #5 on: November 14, 2018, 06:22:44 PM »
You might be able to find out a little more info by navigating into the "~/Work/chronos-sdk/qt4-install/config.tests/unix/tslib" folder and running "make", this should attempt to compile a test program to verify the CFLAGS and LDFLAGS necessary for building the tslib components. For example, on my Ubuntu 16.04 virtual machine, and following the v0.3.0 build instructions, I get the following output by running make:

Code: [Select]
osk@virtualbox:~/Work/chronos-sdk/qt4-build/config.tests/unix/tslib$ make
arm-linux-gnueabi-g++ -c -pipe --sysroot=/home/osk/Work/chronos-sdk/targetfs -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
-Wall -W  -I../../../../qt-everywhere-opensource-src-4.8.7/mkspecs/qws/linux-omap2-g++ -I../../../../qt-everywhere-opensource-src-4.8.7/config.tests/unix/tslib
-I../../../../qt-everywhere-opensource-src-4.8.7/config.tests/unix/tslib -I. -o tslib.o ../../../../qt-everywhere-opensource-src-4.8.7/config.tests/unix/tslib/tslib.cpp
arm-linux-gnueabi-g++ -Wl,-O1 -o tslib tslib.o     --sysroot=/home/osk/Work/chronos-sdk/targetfs -lts

And my targetfs was created from a v0.3.0 camera, and extracting the update.tgz from the beta-9 update ontop of it. Searching for tslib in the targetfs should give the following hits:
Code: [Select]
osk@virtualbox:~/Work/chronos-sdk/qt4-build/config.tests/unix/tslib$ find /home/osk/Work/chronos-sdk/targetfs/usr | grep tslib
/home/osk/Work/chronos-sdk/targetfs/usr/include/tslib.h
/home/osk/Work/chronos-sdk/targetfs/usr/lib/opkg/info/tslib-conf.list
/home/osk/Work/chronos-sdk/targetfs/usr/lib/opkg/info/qt4-embedded-plugin-mousedriver-tslib.list
/home/osk/Work/chronos-sdk/targetfs/usr/lib/opkg/info/tslib-calibrate.control
/home/osk/Work/chronos-sdk/targetfs/usr/lib/opkg/info/qt4-embedded-plugin-mousedriver-tslib.control
/home/osk/Work/chronos-sdk/targetfs/usr/lib/opkg/info/tslib-conf.control
/home/osk/Work/chronos-sdk/targetfs/usr/lib/opkg/info/tslib-tests.list
/home/osk/Work/chronos-sdk/targetfs/usr/lib/opkg/info/tslib-calibrate.list
/home/osk/Work/chronos-sdk/targetfs/usr/lib/opkg/info/tslib-tests.control
/home/osk/Work/chronos-sdk/targetfs/usr/lib/directfb-1.4-5/inputdrivers/libdirectfb_tslib.so
/home/osk/Work/chronos-sdk/targetfs/usr/lib/pkgconfig/tslib.pc
/home/osk/Work/chronos-sdk/targetfs/usr/lib/pkgconfig/tslib-1.0.pc
/home/osk/Work/chronos-sdk/targetfs/usr/lib/qtopia/plugins/mousedrivers/libqtslibmousedriver.so

In order to pass the tslib functionality test, Qt needs to be able to be able to find <path to sysroot>/usr/include/tslib.h and <path to sysroot>/usr/lib/libts.so

Matom

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Building Qt-creator
« Reply #6 on: November 15, 2018, 08:03:01 AM »
Thank you very much. This helped a lot. And I am so sorry to keep bothering you.

I found out that my libts.so was a different version, so I made a symbolic link from <path to sysroot>/usr/lib/libts.so to the version in my <path to sysroot>/usr/lib folder.
 
After doing that I got a new error message when making the tslib config fest

undefined reference to `dlsym@GLIBC_2.4'
 undefined reference to `dlopen@GLIBC_2.4'
 undefined reference to `dlclose@GLIBC_2.4'


I avoided this error by adding -ldl to the qmake file (QMAKE_LIBS += '-lts -ldl').

Now, I could configure and install Qt. Wuhuu! However, after following all the steps on github about the settings of Qt, I tried to build the camApp but got these errors about missing libraries:

  /usr/lib/gcc-cross/arm-linux-gnueabi/5/../../../../arm-linux-gnueabi/bin/ld: cannot find -lOMX_Core
/usr/lib/gcc-cross/arm-linux-gnueabi/5/../../../../arm-linux-gnueabi/bin/ld: cannot find -lgmodule-2.0
/usr/lib/gcc-cross/arm-linux-gnueabi/5/../../../../arm-linux-gnueabi/bin/ld: cannot find -lgobject-2.0
/usr/lib/gcc-cross/arm-linux-gnueabi/5/../../../../arm-linux-gnueabi/bin/ld: cannot find -l:libxml2.so.2
/usr/lib/gcc-cross/arm-linux-gnueabi/5/../../../../arm-linux-gnueabi/bin/ld: cannot find -lgthread-2.0
/usr/lib/gcc-cross/arm-linux-gnueabi/5/../../../../arm-linux-gnueabi/bin/ld: cannot find -lglib-2.0
/usr/lib/gcc-cross/arm-linux-gnueabi/5/../../../../arm-linux-gnueabi/bin/ld: cannot find -lgstapp-0.10


I am wondering if this is a sign that there is something completely wrong with my libraries or if there is an easy way to get all of them?

I really appreciate the help!

foobar

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Building Qt-creator
« Reply #7 on: November 19, 2018, 12:59:03 PM »
Hey Matom,
  /usr/lib/gcc-cross/arm-linux-gnueabi/5/../../../../arm-linux-gnueabi/bin/ld: cannot find -lOMX_Core
/usr/lib/gcc-cross/arm-linux-gnueabi/5/../../../../arm-linux-gnueabi/bin/ld: cannot find -lgmodule-2.0
/usr/lib/gcc-cross/arm-linux-gnueabi/5/../../../../arm-linux-gnueabi/bin/ld: cannot find -lgobject-2.0
/usr/lib/gcc-cross/arm-linux-gnueabi/5/../../../../arm-linux-gnueabi/bin/ld: cannot find -l:libxml2.so.2
/usr/lib/gcc-cross/arm-linux-gnueabi/5/../../../../arm-linux-gnueabi/bin/ld: cannot find -lgthread-2.0
/usr/lib/gcc-cross/arm-linux-gnueabi/5/../../../../arm-linux-gnueabi/bin/ld: cannot find -lglib-2.0
/usr/lib/gcc-cross/arm-linux-gnueabi/5/../../../../arm-linux-gnueabi/bin/ld: cannot find -lgstapp-0.10


I am wondering if this is a sign that there is something completely wrong with my libraries or if there is an easy way to get all of them?

I agree, it looks like there is something wrong with your configuration of Qt creator and it's unable to find the libraries from the targetfs. They should all be present in the <path to targetfs>/usr/lib directory. Did you set the Sysroot when configuring the Kit in Qt Creator?

Matom

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Building Qt-creator
« Reply #8 on: November 21, 2018, 06:46:59 AM »
I did set the Sysroot path..


When I look in /home/majtom/Work/chronos-sdk/targetfs/usr/lib I can see that the versions of the libraries are different. For example the libxml2.so.2 in my folder is libxml2.so.2.7.8. I will try to link the versions.

But, there is no OMX_Core library at all.

Matom

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Building Qt-creator
« Reply #9 on: November 22, 2018, 08:27:31 AM »
It worked with linking the libraries :) (at least the error messages are gone).

Can you send me the OMX_Core library? I cannot seem to find it online.

Thank you in advance.

foobar

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Building Qt-creator
« Reply #10 on: November 22, 2018, 11:41:40 AM »
usr/lib/libOMX_Core.so should actually just be a symlink to usr/lib/libtiomx.so.5.2

I am beginning to think that the problem we might have been experiencing all along is that your copy of the targetfs is missing all of its symlinks. It is traditional for a Linux system to name a shared library with its full version in the filename (eg: libfoo.so.1.2.3), and create a symlink from the unversioned library to the versioned one (eg libfoo.so is linked to libfoo.so.1.2.3). If your targetfs was missing all its symlinks, then Qt would have a very difficult time trying to find any of its dependencies.


Matom

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Building Qt-creator
« Reply #11 on: November 22, 2018, 11:23:50 PM »
Dear Foobar,

Thank you! That sounds probable. And even when I manually add the few ones that are missing to begin with, I get a bunch of new error messages about undefined references and missing files.

I will try to re-copy everything from the sd-card. The manual way might become very tedious.

Hopefully it works. Have a great weekend.

abellay

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Building Qt-creator
« Reply #12 on: February 25, 2021, 07:22:26 PM »
I have never had this type of issue, but it's great to know that I can find the answer here if needed! In order to build Qt using the default options, just call configure from the command line. If you would like to customize your build you can use one of the options you have. For example, if you'll use the option buildkey you can build the Qt library and plugins. Also, when you use the key option, when the library loads plugins, it will only load those that have a matching. You can use debug and release option to compile and link two Qt libraries, with and without debugging turned on. I wonder how do they build the plugin for mathematical calculations, but I have to say it works wonderful and it is really valuable.
« Last Edit: February 28, 2021, 03:54:01 AM by abellay »