Qt5 raspbian - errors, errors and more errors :(


35 posts   Page 1 of 2   1, 2
by unnamed7 » Tue Aug 28, 2012 11:07 am
Hi, i'am struggling to install qt5 on raspbian, i'am following this tutorial

http://qt-project.org/wiki/RaspberryPi_Beginners_guide and i’am stuck at ./configure step with following errors:

Code: Select all
    <srcbase> = /home/pi/opt/qt5/qtbase
    <outbase> = /home/pi/opt/qt5/qtbase
    Creating qmake. Please wait...
    make: Nothing to be done for `first'.
    Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set.
    Note: PKG_CONFIG_SYSROOT_DIR automatically set to /mnt/rasp-pi-rootfs
    Determining architecture... ()
    /home/pi/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/mnt/rasp-pi-rootfs -g -Wall -W -fPIE  -I../../mkspecs/devices/linux-rasp-pi-g++ -I. -o arch.o arch.cpp
    /home/pi/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++: 1: /home/pi/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++: Syntax error: "(" unexpected
    make: *** [arch.o] Error 2
    Unable to determine architecture!
     
    Could not determine the target architecture!
    Turn on verbose messaging (-v) to see the final report.
    Determining architecture... ()
    g++ -c -pipe -g -Wall -W -fPIE  -I../../mkspecs/linux-g++ -I. -o arch.o arch.cpp
    g++  -o arch arch.o   
    { test -n "" && DESTDIR="" || DESTDIR=.; } && test $(gdb --version | sed -e 's,[^0-9]\+\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $DESTDIR" -ex quit 'arch' && test -f arch.gdb-index && objcopy --add-section '.gdb_index=arch.gdb-index' --set-section-flags '.gdb_index=readonly' 'arch' 'arch' && rm -f arch.gdb-index || true
       Found architecture in binary
    CFG_HOST_ARCH="arm"
    CFG_HOST_CPUFEATURES=""
    System architecture: 'unknown'
    Host architecture: 'arm'
    C++11 auto-detection... ()
    /home/pi/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/mnt/rasp-pi-rootfs -O2 -std=c++0x -Wall -W -fPIE  -I../../../mkspecs/devices/linux-rasp-pi-g++ -I. -o c++11.o c++11.cpp
    /home/pi/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++: 1: /home/pi/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++: Syntax error: "(" unexpected
    make: *** [c++11.o] Error 2
    C++11 disabled.
    ...
    a lot of errors about disabled libs
    ...
    OpenGL ES 2.x auto-detection... ()
    /home/pi/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/mnt/rasp-pi-rootfs -O2 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-rasp-pi-g++ -I. -I/mnt/rasp-pi-rootfs/opt/vc/include -I/mnt/rasp-pi-rootfs/opt/vc/include/interface/vcos/pthreads -o opengles2.o opengles2.cpp
    /home/pi/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++: 1: /home/pi/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++: Syntax error: "(" unexpected
    make: *** [opengles2.o] Error 2
    OpenGL ES 2.x disabled.
    The OpenGL ES 2.0 functionality test failed!
    You might need to modify the include and library search paths by editing
    QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in
    /home/pi/opt/qt5/qtbase/mkspecs/devices/linux-rasp-pi-g++.


i'am trying on fresh raspbian installation, tried everything from troubleshooting section. i don't get that syntax error in arm-linux-gnueabihf-g++

please help :)
Posts: 32
Joined: Mon Jun 18, 2012 8:44 pm
by mpthompson » Tue Aug 28, 2012 3:18 pm
unnamed7 wrote:Hi, i'am struggling to install qt5 on raspbian, i'am following this tutorial

http://qt-project.org/wiki/RaspberryPi_Beginners_guide and i’am stuck at ./configure step with following errors:


Building qt5 looks to require a good amount of special knowledge of the qt build environment. You may find help in this forum, but the fastest place to get answers may to be ask the same question in the qt forums, if you haven't done so already.

http://qt-project.org/forums/

Also, there appears to be information on getting qt5 running under Raspbian in this forum thread:

viewtopic.php?f=66&t=15434
User avatar
Forum Moderator
Forum Moderator
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA
by unnamed7 » Tue Aug 28, 2012 3:51 pm
i asked in qt forum but no response.
and from thread You found i have tried everything already, nothing works for me.

it's wierd that "official" tutorial on building qt is so confusing and not working on fresh raspbian install...

anyway thanks for help, going to fight with this some more :)
Posts: 32
Joined: Mon Jun 18, 2012 8:44 pm
by twolife » Wed Aug 29, 2012 7:23 am
unnamed7 wrote:Hi, i'am struggling to install qt5 on raspbian, i'am following this tutorial

http://qt-project.org/wiki/RaspberryPi_Beginners_guide and i’am stuck at ./configure step with following errors:


Hi,

I have been playing with qt5 for the last few days, it's not easy to have a clean build but i finaly got it working.

You can find binaries & sources here : http://twolife.be/raspbian/qt5/
There is everything you want to perform a rebuild yourself

Have fun
Posts: 8
Joined: Tue Jul 31, 2012 8:03 am
by unnamed7 » Wed Aug 29, 2012 8:37 am
i'am a bit closer to get it done, if i fail i'am gonna try your files, thanks

but seriously, someone have to write better tutorial about this, on clean raspbian image it should be quite easy if someone do it clean once :)
Posts: 32
Joined: Mon Jun 18, 2012 8:44 pm
by aussiedwarf » Thu Aug 30, 2012 1:26 pm
Hi. I had a similar problem too. ./configure complained that it could not determine architecture and it was complaining that OpenGL ES 2.0 functionality test failed! My solution may not apply to you though as I was also getting a error saying that "...arm-linux-gnueabihf-g++: Command not found".

I did some googling and found that sometimes this error appears when attempting to run a 32 bit application on 64 bit linux. Running the command "readelf -a arm-linux-gnueabihf-g++" confirmed that this was a 32 bit biniary. A bit more googling and I found that it has to do with the file, and that it cannot find the loader. By getting the 32 bit files needed, I no longer got any errors.

Specifically, I downloaded ia32-libs from my repository but libc6-i386 may just do the trick fine.

I found this thread in my googling and have yet to try making Qt5. I hope this info helps you.
Posts: 1
Joined: Sat Jul 28, 2012 2:14 pm
by unnamed7 » Thu Aug 30, 2012 6:57 pm
ehh i'am to stupid for this... time to change aproach.

what do i need to use qtcreator directly on raspberry, i'am gonna write my app on mac, and just later move project to raspberry and compile it there.

what should i have to build qt5 on raspberry ?
Posts: 32
Joined: Mon Jun 18, 2012 8:44 pm
by Tiger54 » Thu Sep 20, 2012 8:21 am
I am also too stupid for this.

I lost 1 week trying to executing a simple Qt program. It is impossible for a normal user.

I work since 2 years with Qt, and developed many apps for my Nokia. I was thinking it whould be easy, reading the Qt-for-beginners manual. No way.

After 1 day, compiling everything for raspberry I got only warnings and errors. So I got QtonPi image, but it seem to be a dead project. So I got wheezy and downloaded the binaries of Qt.

1 - why is there not an image with all the binaries already installed and ready to use?

After creating a virtual machine with Ubuntu, I had many troubles with Qt. There are many information missing in the 2-3 tutorials I found. Like LD_LIBRARY.
And every tutorial has different paths:
/usr/local/qtonpi5/lib/
/opt/qt5/lib/
/opt/qt5-snapshot/lib/
Once I understood why my application never run, I found that I missed this path (Error on Qt: unable to find QtQuick library).

After I set the right path, I got the next error: unable to find QtXmlPattern. So if you try to download the snapshot, you can't execute any Qt-application with QML.

So I downloaded an image with Qt5 and then I got this error: unable to find a symbol file for QtQuickView.

After this week, I can say that raspberry is a pre alpha project and only linux-gurus can create something on this board.

There are 100 OS-projects for this board, and 95 projects are "deprecated".

I live in the windows-world, with a Qtcreator.exe. After executing QtCreator in windows, everything works. Why is this so difficult in the Linux world? I have to compile QtCreator, I have to compile the libraries with 10000000 parameters and if you miss only 1 of them, you will not be able to run the application on raspberry.

I don't know what to do now, there are 2 possibilities:
- get a better board, where I can show up some images on a display without loose 1 month to get a working and configured linux
- wait, until someone will publish 2 images: wheezy image for raspberry with Qt and a virtual machine with Qt creator - hoping that Qt on both systems have the same version.
Posts: 1
Joined: Thu Sep 20, 2012 8:02 am
by hermanhermitage » Thu Sep 20, 2012 9:18 am
Tiger54 wrote:I am also too stupid for this.

Count me in the too stupid basket as well! I'm not touching Qt5 until all the binaries are there in the raspbian image.
I wasted 2-3 hours on reading horrendous documentation online. The only thing that kept me going was two of the youtube videos looked pretty sweet.
I have no interest in long complicated build processes when the evangelists for Qt5 could have simply provided a binary for RPi users.
Trust me - it was far easier reverse engineering the Scalar, Vector and QPU instruction sets in the VideoCore processor in the RPi than it was fathoming how to get anywhere with Qt5!

(EDIT: Just to be clear, I utterly failed to get anywhere building Qt5 binaries - all i wanted was the scene viewer!).
Posts: 65
Joined: Sat Jul 07, 2012 11:21 pm
Location: Zero Page
by jamesh » Thu Sep 20, 2012 10:12 am
The QT stuff is very much a work in progress. No one has promised it will work, or it will be easy! The Foundation are not actively endeavouring to get QT5 working - that will have to be done by a community effort, so the arrival of anything in a Raspbian image will be quite some time.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11500
Joined: Sat Jul 30, 2011 7:41 pm
by asb » Thu Sep 20, 2012 10:18 am
I'm hopeful that now the future of Qt is sorted (i.e. many Qt devs have gone over to Digia) we'll be able to improve the situation for pre-built Qt5 binaries.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 788
Joined: Fri Sep 16, 2011 7:16 pm
by DuncanKennedy » Thu Sep 20, 2012 1:58 pm
I've had a lot of success cross compiling the Qt5 packages including web kit using the instructions at http://qt-project.org/wiki/RaspberryPi_Beginners_guide. At the top of the pages is a script bakeqtpi.bash which will essentially do everything you need including installing a working cross compiler. Once this is done, you simply transfer the packages to your Pi and you're ready to go. I've been running this script in a virtual Debian 32 bit machine with no problems.

So far I've been able to build and run the examples from Qt5, as well as a somewhat working version of the Qt Snowshoe project web browser (which runs very quickly)
Duncan
The mind is an infinite resource, provided you don't waste it!
Posts: 44
Joined: Sun Apr 22, 2012 3:35 am
by cede » Mon Sep 24, 2012 3:41 am
I also had trouble getting a Qt5 dev environment up and running.

I also followed http://qt-project.org/wiki/RaspberryPi_Beginners_guide.
Compiling by hand throw me errors, unknown architecture and so on....
The bash script finally crashed my virtual debian ;(

On top of that, each and every qmake I compiled on the debian machine is not recognized by QtCreator. Ans Qt Creator keeps on asking me to make install when I try to load qmake...

I'd really like to use the Pi board for bluetooth experiments in industrial environment where I have to display data from machines.
I managed to build qtconnectivity on raspberry board using the libraries from http://twolife.be/raspbian/qt5/ packages.
Trouble is when I compile the btchat program on the pi, the display is upside down and right to left!
I did not had time to check that this weekend, but might come from fb.
Posts: 1
Joined: Mon Sep 24, 2012 3:32 am
by Heater » Mon Sep 24, 2012 9:39 am
Tiger54,

After this week, I can say that raspberry is a pre alpha project and only linux-gurus can create something on this board....


...get a better board, where I can show up some images...


I think you being unnecessarily harsh on the Pi.

Qt5 is still under development. It is not an official stable release. That would be 4.8.3.

Given that Qt5 is in dev status and the Pi is a very new platform, Raspian for example has not been around very long, I think expecting to "just work" with out some skillfull input is a bit optimistc.

The good news is that Qt4 works out of the box on the Pi. Just use apt-get. I have compiled soem quite Qt large apps for the Pi on the Pi.

Why is this so difficult in the Linux world?


It isn't.

I have to compile QtCreator,


You don't.
Posts: 1232
Joined: Tue Jul 17, 2012 3:02 pm
by unnamed7 » Sat Nov 03, 2012 3:08 pm
hi, after a while i'am back on this, and i got it working somehow, but not the part i'am most interested in. My approach is like:
1. write my app on mac
2. copy files to pi
3. compile using qtcreator on pi

and it works for me.

Still can't crosscompile on my snow leopard for pi, but above is fine for me so i don't really wont to waste my time on cross compilation...

Now i'am trying to run my app using framebuffer, right now it's to hard for me but i think i will get it done sometime :)
Posts: 32
Joined: Mon Jun 18, 2012 8:44 pm
by mutrised » Thu Nov 08, 2012 12:55 am
Hi,

I get my RPi on june. I'm just starting to try to do something with the board, and i'm also looking for a way to get QT working on it. I tried to install QtCreator with apt-get, but I get an error when I build an example, an issue with qmake.

I'm student in electronic, but I'm not really familiar with huge app compiling. I tried to use the script:
https://gist.github.com/raw/3488286/d1d301946297be999d96df632a0ad0095a4d77e7/bakeqtpi.bash
on the page:
http://qt-project.org/wiki/RaspberryPi_Beginners_guide#21b6106cff66445848b215687fe4a9b4

Do I really need to rebuild QT to get it working on PI ?

unnamed7 wrote:hi, after a while i'am back on this, and i got it working somehow, but not the part i'am most interested in. My approach is like:
1. write my app on mac
2. copy files to pi
3. compile using qtcreator on pi

and it works for me.

Still can't crosscompile on my snow leopard for pi, but above is fine for me so i don't really wont to waste my time on cross compilation...

Now i'am trying to run my app using framebuffer, right now it's to hard for me but i think i will get it done sometime :)


I think your solution could be great, but you need QT on the board, don't you ? To compile the code you wrote on your computer...

Thanks for help, I would love to be able to do something with this little thing, even something simple...
Posts: 2
Joined: Thu Nov 08, 2012 12:41 am
by dobova86 » Sat Dec 08, 2012 6:28 pm
After 20 years of c++ development, really I found myself too stupid to even try a development approach on Linux.
I also need qt5 c++ & gui development, but I need to develop on a desktop (ubuntu or whatever) and deploy compiled code to raspberry pi.

After tons of pages, million of incomplete tutorials and strange downloads, I still not understand what I need to do to create a cross-compile environment ! Some tutorials help a bit, but you can't arrive at any end. Libs fight against libs, compilers need always some more env variable than you know ... :shock:
Why I need to mount a raspberry file system on the desktop ? It's not enough to have qt arm libs on the desktop with a arm compiler ?
Amazing and frustrating!

Is there anybody so clever to help me ?

Thanks in advance
Dom
Posts: 11
Joined: Wed Dec 05, 2012 5:32 pm
by raster23 » Thu Dec 13, 2012 4:53 am
I had the same questions when I started a Qt project on PI. I hope my answers below will help you and others. Rest assured, the results are worth the struggle! The ability to create the kind of rich interactive environments (C++/QML) on a $35 computer is awesome!

After 20 years of c++ development, really I found myself too stupid to even try a development approach on Linux.

-- Don't be so hard on yourself. It's just software!

I also need qt5 c++ & gui development, but I need to develop on a desktop (ubuntu or whatever) and deploy compiled code to raspberry pi.

-- Yep. There are probably other ways, but I found cross compiling on a standard environment the simplest. If you follow this approach, you'll design, code and compile your project outside of raspberry pi, then deploy the final binary and QML files to your raspberry pi itself. The cross compiler does most of the work for you.

After tons of pages, million of incomplete tutorials and strange downloads, I still not understand what I need to do to create a cross-compile environment ! Some tutorials help a bit, but you can't arrive at any end. Libs fight against libs, compilers need always some more env variable than you know ...

-- C'mon, it's not that bad!

Why I need to mount a raspberry file system on the desktop ?
-- Because you're cross compiling the qt5 arm libraries that you're raspberry pi will reference to run Qt5 code.
It's not enough to have qt arm libs on the desktop with a arm compiler ?
-- No. If you follow the process, the arm libs are compiled and saved to the image that you'll boot raspberry pi from. You can cross-compile if you have just the qt arm libs on the desktop, but your raspberry pi won't have those libs. The outlined process mounts an image that contains the linux kernel and typical linux files, as well as the qt5 compiled libraries and utilities. Mount that image and you can run Qt5 binaries.

Amazing and frustrating!
-- Yep, otherwise you wouldn't spend your free time doing it, would you?

Is there anybody so clever to help me ?

-- I'm not so clever, but hopefully I point you in the right direction. My approach was to rule out all other variables, by creating an isolated environment.
1. Download VirtualBox, latest version
2. Download a debian vbox image
3. download and run bakeqtpi
- the script does everything for you.
4. In addition to doing everything for you, the script also creates a raspbian image, and copies the Qt5 libraries to it.
5. Write that image to an SD card following the tutorial instructions
6. download qt creator
7. Setup your build, run and deploy according to the FAQ. Read and execute each step carefully.
8. Download and build the hello world example. Deploy to Pi. Deploying actually copies the cross compiled binaries and qml files to your raspberry pi.
9. Execute hello world on raspberry pi.
10. -- google and resolve any issues that come up along the way.

Good Luck!
-Anthony

Thanks in advance
Dom
Posts: 3
Joined: Thu Dec 13, 2012 4:18 am
by dobova86 » Thu Dec 13, 2012 12:14 pm
Antony, thank you for your helping post.

After 3-4 days of try&error, I've got QT5 (libs) for Raspberry compiled and I've deployed on Raspbian wheezy last release. So I have now libraries and some bin utils working on the board. I've not compiled QtCreator IDE becouse needs some more knowledge and time to fix code for Raspberry.

Now finally I've done some test project and cross-compiled on Ubuntu and I found that it works "almost", but the mainwindow is created full screen also when window has correct paramaters (in Ubuntu QT5 runtime it works fine) and I can't resize at all.

I also test Qt4 distribution from repository and it is working fine.
Anyway it is just something better ...

Thanks
Dom
Posts: 11
Joined: Wed Dec 05, 2012 5:32 pm
by raster23 » Thu Dec 13, 2012 1:33 pm
Unless you really want to use pi as your development environment, there's no benefit in spending the time to get Qt Creator to work. Just run it on your pc or mac, code and debug there, then cross compile and deploy to the pi when you're happy with your code. Just create tool chains for your pc/mac and one for Pi.

I've never tried to get it to output to a window, the app I was working on is fullscreen anyway. Are you running X with a window manager?
Posts: 3
Joined: Thu Dec 13, 2012 4:18 am
by dobova86 » Thu Dec 13, 2012 3:02 pm
Hi raster23,
I agree ... QT5 Creator is not good idea to run on Raspy. I've tried Qt4 creator version but it's very slow ide and it takes very long compiling time compared to a desktop.
I don't know exactly what's the window full screen issue, but may be I'm forgetting something. I'm using normal Raspbian wheezy distribution, but may be I need some libs on the raspberry that I don't know.
Posts: 11
Joined: Wed Dec 05, 2012 5:32 pm
by Timmmm » Thu Dec 27, 2012 1:41 am
Complete guide to getting Qt5 on the Pi here:

http://creeder.com/?page=RaspberryPi

It's based on the wiki one, but I can't stand their wiki syntax so I put it on my site instead. You end up with a working Qt build on the Pi, OpenGL accelerated using the linux frame buffer (not X11) so Qt Quick apps run fullscreen.

Unfortunately QtMultimedia doesn't work (I was hoping to get OpenMAX-accelerated video but it seems that is nearly impossible).
Posts: 14
Joined: Sun Jul 15, 2012 3:13 pm
by dobova86 » Thu Dec 27, 2012 9:43 am
Hi Timmmm,
thank for your accurate tutorial.
When all compiled, this set up will create "qmake" for PI or just the libs and tools ?
(Edit: I mean "qmake" native for PI, so you can compile, if needed, on the RaspPI)

Thanks
Dome
Posts: 11
Joined: Wed Dec 05, 2012 5:32 pm
by Timmmm » Thu Dec 27, 2012 3:05 pm
No, sorry. It only makes an amd64 qmake. It doesn't look like the Qt make system lets you do that easily, but I agree it should be an option.

I can't think of a good way to do that really, sorry. The "proper" way would be to modify the Qt build system so it has an option to also build the "host binaries" for both the host and target. But nobody likes working out someone else's build system...
Posts: 14
Joined: Sun Jul 15, 2012 3:13 pm
by dobova86 » Thu Dec 27, 2012 3:25 pm
I've compiled qt5 a couple of time now, the last one to update to 5.0 release. I can confirm that arm qmake wasn't created.
It will be useful to have for compiling code directly on raspi when using particular libs or code (for example i2c, spi, gpio and so on). I see that the repository version qt4 has working qmake included.

Just one question: libcec fails to make on file RPiCeCAdapterCommunication.cpp due to a problem on bool type. Is just my case or someone else get the same problem ?

Thank you again.
Dome
Posts: 11
Joined: Wed Dec 05, 2012 5:32 pm