Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. raspberry pi 3
    Log in to post

    • UNSOLVED Cross-compile QT (w/ QTWebEngine) for Pi 3: EGLSetBlobFuncANDROID/EGLDeviceEXT not declared
      QtonPi • qtwebengine raspberry pi 3 cross-compile • • vpetersson  

      1
      0
      Votes
      1
      Posts
      83
      Views

      No one has replied

    • UNSOLVED Raspberry Pi GPIO with C/C++ using 3rd party library pigpio
      General and Desktop • raspberry pi raspberry pi 3 rpi raspbian gpio • • Dewiren  

      2
      0
      Votes
      2
      Posts
      347
      Views

      Hi and welcome to devnet, That's because you try to access a standard member variable from a static function. Take a look at the ir_receiver example of the pigpio project. It shows how to use a class with the callback with gpioSetAlertFuncEx.
    • SOLVED QMYSQL driver not loaded - cross compiling for Raspberry PI 3
      Installation and Deployment • cross compile raspberry pi 3 qmysql • • JarekT  

      26
      0
      Votes
      26
      Posts
      368
      Views

      Finally (!...) I was able to fix the problems. I'm showing the whole procedure, not only what relates to the main subject of this thread so that to contribute to the community.. I was using the following sites as a source information to work out the following solution: LINK1 (for other Qt/Raspberry PI configuration check: link), LINK2, LINK3, LINK4, LINK5, LINK6. My hardware/software: Host: Ubuntu 18.04 (also I’ve check it on Ubuntu 20.04 and it also works) Qt ver. 5.12.3 (I also tried 5.12.9, but it didn’t work, probably there was something wrong with the fix that needs to be done on the sources) - you can install the “sources” and all the modules you need from Qt Online Installer (link) because later on you can add/remove modules/versions easily by lauching ~/Qt/MaintenanceTool QtCreator will be installed automatically (the newest version) when you use Qt Online Installer Target: Raspberry PI 3, with Raspbian Stretch Procedure: [on RPi] Edit sources list in /etc/apt/sources.list and uncomment the deb-src line: sudo nano /etc/apt/sources.list [on RPi] Update your system and install required libraries: sudo apt-get update sudo apt-get build-dep qt4-x11 sudo apt-get build-dep libqt5gui5 sudo apt-get install libudev-dev libinput-dev libts-dev libxcb-xinerama0-dev libxcb-xinerama0 After installing MySQL itself on RPi install also MySQL libraries/packages to be used by Qt: sudo apt install mariadb-client libmariadb-dev-compat libqt5sql5-mysql [on RPi] Prepare our target directory sudo mkdir /usr/local/qt5pi sudo chown pi:pi /usr/local/qt5pi [on RPi] Correct links to EGL and GLES Drivers sudo rm /usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0 sudo rm /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0 sudo ln -s /opt/vc/lib/libbrcmEGL.so /usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0 sudo ln -s /opt/vc/lib/libbrcmGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0 [on host] Create our working directory and get a toolchain: mkdir ~/raspi cd ~/raspi git clone https://github.com/raspberrypi/tools [on host] Create a sysroot. mkdir sysroot sysroot/usr sysroot/opt rsync -avz pi@yourpi:/lib sysroot rsync -avz pi@yourpi:/usr/include sysroot/usr rsync -avz pi@yourpi:/usr/lib sysroot/usr rsync -avz pi@yourpi:/opt/vc sysroot/opt [on host] Adjust symlinks to be relative: wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py chmod +x sysroot-relativelinks.py ./sysroot-relativelinks.py sysroot [on host] Modify the qmake.conf –> mkspecs/devices/linux-rasp-pi3-g++/qmake.conf nano ~/raspi/qtbase/mkspecs/devices/linux-rasp-pi3-g++/qmake.conf VC_LIBRARY_PATH = $$[QT_SYSROOT]/opt/vc/lib VC_INCLUDE_PATH = $$[QT_SYSROOT]/opt/vc/include VC_LINK_LINE = -L$${VC_LIBRARY_PATH} QMAKE_LIBDIR_OPENGL_ES2 = $${VC_LIBRARY_PATH} QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2 QMAKE_LIBDIR_OPENVG = $$QMAKE_LIBDIR_OPENGL_ES2 [on host] Protect your “sources” by creating working folder: cd ~/Qt/5.12.3 tar jcvf qt-5.12.3-src.tar.bz2 Src cd ~/raspi tar xvf ~/Qt/5.12.3/qt-5.12.3-src.tar.bz2 mv Src qt-5.12.3-src You can remove from qt-5.12.3-src the modules that you don’t want (at least for now) leaving qtbase folder - this will shorten the building process. Create also working folder for the building (if building would be unsuccessful all you need to do is to delete the content of this folder and start again): mkdir ~/raspi/build_raspi cd ~/raspi/build_raspi [on host] Configure From ~/raspi/build_raspi ../qt-5.12.3-src/configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -no-use-gold-linker -v -no-gbm -sql-mysql MYSQL_INCDIR=~/raspi/sysroot/usr/include/mysql MYSQL_LIBDIR=~/raspi/sysroot/usr/lib/arm-linux-gnueabihf Notice the above contains also building MySQL driver. Notice that the Config summary should contain (if it doesn't, you need to correct something... and do the configure again): EGLFS Raspberry Pi ................... yes MySql .................................. yes Regarding “-release” parameter read here (in other words you don’t need “-debug-and-release” and the warnings you can ignore… at least this is what I can read at the forum). [on host] Make From ~/raspi/build_raspi make You can use make -j 8 instead (much faster), but if there will be problems the all the “jobs” would need to finish and consequently it could be more difficult to find the error messages. [on host] Make install From ~/raspi/build_raspi: make install [on host] Deploy Qt to the device. We simply sync everything from ~/raspi/qt5pi to the prefix we configured above From ~/raspi: rsync -avz qt5pi pi@192.168.1.100:/usr/local [on host] Configuration of QtCreator: Tools > Options > Devices > Add > Generic Linux Device > Start Wizard Write: “Raspberry” (your custom name), “192.168.X.X” (your Raspberry PI address), “pi” (your Raspberry PI user) Don’t write anything at “private key”, click “Next” There will be error window with: “Device test failed” > Cancel Authentication type → choose: “Default” Now test connection (“Test” button) and after you give the password to the RPi it should be successful Kits > Compilers > Add > GCC > C Write: “GCC (Raspberry Pi)” as your custom name and: “~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gcc” as the path to the compiler Kits > Compilers > Add > GCC > C++ Write: “G++ (Raspberry Pi)” as your custom name and: “~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++” as your path to the compiler Regarding the debugger, you should install: [On Host]: sudo apt-get install gdb-multiarch I’m not sure if this is needed but you can also install on RPi: sudo apt-get install gdbserver Kits > Debuggers > Add Write: “GDB (Raspberry Pi)” as your custom name and “/usr/bin/gdb-multiarch” as the path to the debugger Apply Kits > Qt Version > Add Write path: ~/raspi/qt5/bin/qmake Write name: Qt %{Qt:Version} (qt5) Raspberry PI Apply Kits > Kits > Add Name: Raspi Device Type: Generic Linux Device The Device is the one created in the previous step We set the Sysroot to where we have the sysroot image: ~/raspi/sysroot Set compilers: "GCC (Raspberry PI)" and "G++ (Raspberry PI)" Set the Debugger to the one created previously Use the Qt version we created previously We don't need to set mkspec, so leave it empty. OK To enable your running application to have regular window do the following: Projects > Raspberry PI > Run > Environment > Batch Edit: DISPLAY=:0.0 QT_QPA_PLATFORMTHEME=qt5ct XAUTHORITY=/home/pi/.Xauthority XDG_SESSION_TYPE=x11 If you don’t do this your application after starting up will be shown full screen but you will see it only when directly connect a screen to Raspberry PI (VNC desktop sharing will show nothing) 14) [on host] In your Raspberry PI project, in .pro file, you need to show where the executable file should be placed: (LINK): target.path = /home/pi INSTALLS += target So comment the previous settings, eg.: # qnx: target.path = /tmp/$${TARGET}/bin # else: unix:!android: target.path = /opt/$${TARGET}/bin # !isEmpty(target.path): INSTALLS += target [on host] If you get: “WARNING: The code model could not parse a included file, which might lead to incorrect code completion and highlighting”: You need to deselect “ClangCodeModel” in HELP > ABOUT PLUGINS and restart QtCreator (LINK). You should be able to build/run/debug your project on RPi and connect to the MySQL database without "QMYSQL driver not loaded" error. If the above was useful for you please upvote this solution so that other people could find it easier.
    • UNSOLVED Connecting to wifi in raspberry pi
      Mobile and Embedded • linux network raspberry pi 3 raspbian wifi connection • • payman  

      1
      0
      Votes
      1
      Posts
      231
      Views

      No one has replied

    • UNSOLVED Installing new module
      Mobile and Embedded • cross compile raspberry pi 3 serial port ubuntu 16.04 new module • • vishbynature  

      26
      0
      Votes
      26
      Posts
      652
      Views

      @vishbynature It's config.log file located in the same directory from which you called configure. It is a text file, nothing special. Look for compile errors in that file related to to what you need.
    • installing Qbluetooth module
      Mobile and Embedded • raspberry pi 3 ubuntu 16.04 qbluetooth qtmodule • • vishbynature  

      7
      0
      Votes
      7
      Posts
      445
      Views

      @SGaist yes. at that time i did not know about Qtconnectivity module.
    • UNSOLVED Wi-Fi Manager on RaspberryPi Qt
      Mobile and Embedded • cross compile raspberry pi 3 ubuntu 16.04 wifi connection qtwifimanger • • Andrex_Qt  

      5
      0
      Votes
      5
      Posts
      339
      Views

      @Pablo-J-Rogina I will look into it.
    • UNSOLVED Qt configure could not find MySQL installation when cross compiling for raspi3?
      Mobile and Embedded • qt5 mysql cross compile raspberry pi 3 qmysql • • IMAN4K  

      6
      0
      Votes
      6
      Posts
      387
      Views

      Seems to be a bug reported here QTBUG-50244 Nobody tried to integrate MySQL for a Raspberry Pi project already ?! no workaround?! Seems strange :(
    • UNSOLVED Can't get QtWebEngine to work on Raspberry Pi 3B
      QtWebEngine • qtwebengine raspberry pi 3 yocto • • Yury Lunev  

      1
      0
      Votes
      1
      Posts
      268
      Views

      No one has replied

    • SOLVED Qt Creator builds and start running my cross compiled app (raspberry), but the app never shows up
      Mobile and Embedded • cross compile ubuntu raspberry pi 3 qt5.12.x remote debuggin • • alizadeh91  

      7
      0
      Votes
      7
      Posts
      326
      Views

      @sneubert Thanks :)
    • SOLVED Responsive QtMainWindow on Startup.
      Mobile and Embedded • gui raspberry pi 3 sensor readings qt qmainwindow • • Andrex_Qt  

      7
      0
      Votes
      7
      Posts
      383
      Views

      @Andrex_Qt said in Responsive QtMainWindow on Startup.: i access them through C Api Could it be possible you share a link to such API for the benefit of other users just in case?
    • UNSOLVED Qt Raspberry Pi Cross Compile
      Mobile and Embedded • raspberry pi 3 cross-compile qt 5.12 source • • Kanni1303  

      5
      0
      Votes
      5
      Posts
      1466
      Views

      Hi, I described the steps I followed in a post over here, https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/ Some people found some issues and posted comments there, the “qendian” issue seems to be related to this bug, there is also a patch there. https://bugreports.qt.io/browse/QTBUG-71945
    • UNSOLVED Install/develop on MacBook, run on Raspberry Pi?
      Installation and Deployment • python raspberry pi 3 macos cross-compile touchscreen • • OutsourcedGuru  

      12
      0
      Votes
      12
      Posts
      1479
      Views

      May I suggest to change for Python 3 ? Python 2.7 will reached end of life next year so it's not a good idea to start a new project with it.
    • UNSOLVED Nixie a vintage digital and virtual 3D clock
      Showcase • linux opengl windows raspberry pi 3 clocks • • ptstream  

      1
      0
      Votes
      1
      Posts
      562
      Views

      No one has replied

    • UNSOLVED Adafruit BLE UART problem
      Mobile and Embedded • raspberry pi 3 bluetooth low e • • Kutyus  

      2
      0
      Votes
      2
      Posts
      398
      Views

      I tested it with Qt 5.11.0, but more deficiency detected. The General Attribute also undetected and characteristic write is not working :(
    • UNSOLVED Bluetooth Raspberry pi 3 and Android
      Mobile and Embedded • android raspberry pi 3 qbluetooth pairing qbluetoothlocal • • Crindu  

      3
      0
      Votes
      3
      Posts
      869
      Views

      No, because they were neved emitted. I just found this: https://bugreports.qt.io/browse/QTBUG-38401, it seems that they are not implemented yet for Bluez 5. However, I would like to set the pin in only one-way, the raspberry shouldn't accept any pairing if the pin code (probably hardcoded in the raspberry) is different from the one entered by the user. Anyway, I'm not sure if this is possible.
    • UNSOLVED Qt5.11 eglfs xcb on raspberry pi 3
      Mobile and Embedded • qt5 eglfs raspberry pi 3 xcb backend • • Saman19  

      4
      0
      Votes
      4
      Posts
      2634
      Views

      Topic locked for duplication
    • SOLVED Qt5 cross-compilation to raspberry pi3 - sh: tools/...../arm-linux-gnueabihf-g++: not found
      Installation and Deployment • cross compile configure raspberry pi 3 • • Worly  

      6
      0
      Votes
      6
      Posts
      1623
      Views

      I have found a solution here. Looks like Ubuntu couldn't run 32bit binary, but it's working now.
    • UNSOLVED Qt on Raspberry pi3
      Mobile and Embedded • raspberry pi 3 xcb qt5.11 xcb opengl • • Saman19  

      20
      0
      Votes
      20
      Posts
      7159
      Views

      @ronpetit said in Qt on Raspberry pi3: @sierdzio I'm running it without X server, as I should Now, I'm curious about this, what libs are you using for glesv2 and egl?, I'm using the ones in /opt/vc/lib folder, and I also cross compiled the Qt with those Oh I don't remember to be honest. I think I didn't change anything from stock settings. I also didn't specify the OpenGL libs manually anywhere when building Qt or apps.
    • UNSOLVED Qt cross platform compilation with QtRpi to rpi3 - could not find "eglfs"
      Installation and Deployment • linux eglfs raspberry pi 3 • • Worly  

      5
      0
      Votes
      5
      Posts
      1268
      Views

      @Worly said in Qt cross platform compilation with QtRpi to rpi3 - could not find "eglfs": QtRpi has only up to 5.7.0 version of Qt, does that mean that I have to use v5.7.0 plugins or I can use the latest? Would you consider going through the steps from this guide? It allows you to cross compile Qt for RPi and it's been used with newer Qt versions and several RPi models.
    • SOLVED QWidget with mplayer slave mode
      Mobile and Embedded • qt5 widget raspberry pi 3 mplayer • • Kutyus  

      5
      0
      Votes
      5
      Posts
      1203
      Views

      @SGaist I found the solution in the mplayer's docs, the -wid not working in linuxfb environment. The qprocess started the mplayer who writes the framebuffer directly, it's working.
    • UNSOLVED Raspberry Touch input issue
      Mobile and Embedded • raspberry pi 3 touchscreen touch monitor egfls • • DanSC04  

      1
      0
      Votes
      1
      Posts
      434
      Views

      No one has replied

    • UNSOLVED Qt Bluetooth With Non-Qt Raspberry Pi
      General and Desktop • raspberry pi 3 serial port rfcomm qt bluetooth • • zeinab  

      1
      0
      Votes
      1
      Posts
      336
      Views

      No one has replied

    • SOLVED Normal c++ to qt c++
      Mobile and Embedded • c++ raspberry pi 3 qt c++ encoder main loop • • A Former User  

      9
      0
      Votes
      9
      Posts
      2193
      Views

      @Jerwinprabu Thank You. It is working fine now.
    • UNSOLVED Qt on raspberry pi
      Mobile and Embedded • arm raspberry pi 3 qt 5.10 hello. i want • • Saman19  

      2
      0
      Votes
      2
      Posts
      988
      Views

      Not sure, but it sounds like a broken toolchain. Make sure your cross compilation toolchain and sysroot are valid.
    • UNSOLVED Qt5 wont open on Raspberry Pi3 with Raspbian
      General and Desktop • raspberry pi 3 qt5 raspberry p • • Xenoshell  

      7
      0
      Votes
      7
      Posts
      2863
      Views

      @Xenoshell If a command/tool needs root rights it is better to set http://linuxg.net/how-to-set-the-setuid-and-setgid-bit-for-files-in-linux-and-unix/ instead of running whole IDE as root! I never saw a need to run an IDE as root and I'm software developer for quite some time.
    • UNSOLVED Cannot find StackView.qml
      General and Desktop • qml raspberry pi 3 stackview runtime error controls 1.4 • • diredko  

      1
      0
      Votes
      1
      Posts
      726
      Views

      No one has replied

    • UNSOLVED Builing on Pi3 @ Raspbian Stretch fails
      Installation and Deployment • raspberry pi 3 raspberry raspbian • • Vitalic66  

      4
      0
      Votes
      4
      Posts
      1628
      Views

      Ok, I've missed that article. From the looks of it, you seem to be currently essentially interested in building qtbase, so you could call configure directly in it to shorten the list of options. Intuitively, I'd avoid the reduce-exports and sysroot parameters.
    • UNSOLVED How to use raspberry pi3 and use QT to complete VOIP (SIP) ?
      General and Desktop • raspberry pi 3 voip sip • • kerwin  

      3
      0
      Votes
      3
      Posts
      667
      Views

      Thank you a lot , i will looking for it.
    • UNSOLVED Qt 5.9 error eglfs with raspberry pi 3
      Mobile and Embedded • raspberry pi 3 qt5.9 raspberry eglfs opengl es2.0 raspbian • • requinham  

      12
      0
      Votes
      12
      Posts
      7739
      Views

      @moldovan.catalin You can create symbolic link in /opt/vc/lib pointing to these libraries but having old names.
    • SOLVED Set up Qt Creator for Raspberry Pi 3
      Installation and Deployment • raspberry pi 3 • • nuke  

      5
      0
      Votes
      5
      Posts
      2407
      Views

      thanks a lot for help i already solved it. I just deleted the old compiler added new set same path and restart QT finally it works :)
    • SOLVED Windows Cross compile for Raspberry Pi 3 make && install error
      Installation and Deployment • windows raspberry pi 3 • • CrazyCreepy  

      9
      0
      Votes
      9
      Posts
      4429
      Views

      Just for the sake of completeness, this simple patch enables building qt5script v5.12.7 on Raspberry Pi 3: diff –git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h index a4695a2..897c90c 100644 — a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h @@ -306,6 +306,9 @@ || defined(ARM_ARCH_7R) #define WTF_ARM_ARCH_VERSION 7 +#elif defined(ARM_ARCH_8A) +#define WTF_ARM_ARCH_VERSION 8 + /* RVCT sets _TARGET_ARCH_ARM */ #elif defined(__TARGET_ARCH_ARM) #define WTF_ARM_ARCH_VERSION __TARGET_ARCH_ARM Similar patches should work on other Qt versions. Credits go to http://lists.buildroot.org/pipermail/buildroot/2017-August/200515.html, http://lists.buildroot.org/pipermail/buildroot/2017-August/200520.html
    • UNSOLVED Cross Compile Qt 5.7 with -qt-xcb
      Mobile and Embedded • raspberry pi 3 • • iiiwww  

      1
      0
      Votes
      1
      Posts
      1624
      Views

      No one has replied

    • UNSOLVED Memory consumption during launching
      QML and Qt Quick • eglfs raspberry pi 3 memory hang • • Mark81  

      1
      0
      Votes
      1
      Posts
      392
      Views

      No one has replied

    • UNSOLVED Qt5.7 QtWebEngine and ARMv8 (RPi3)
      Mobile and Embedded • qtwebengine raspberry pi 3 armv8 neon • • Dr.V  

      2
      0
      Votes
      2
      Posts
      2861
      Views

      Hi, I'd recommend posting that question to the the QtWebEngine mailing list. You'll find there QtWebEngine's developers/maintainers. This forum is more user oriented.
    • UNSOLVED Qt5.7 & Raspberry Pi 3 mkspecs equal signs
      Mobile and Embedded • raspberry pi 3 • • Dr.V  

      3
      0
      Votes
      3
      Posts
      1643
      Views

      @micland I thought of that but discarded the idea because Raspbian seems to be the de facto standard distribution for RPi, and IMHO the mkspec should work out-of-the-box with the Rasbian library paths. Or at least there should be a mkspec for Raspbian. Also, if I understand it right, the symlinks won't fix the run time error. (But I have to admit I am not at all sure I understand it right.) One thing that puzzles me is the big difference between RPi3 and RPi2 mkspecs. Wouldn't it be enough to change the processor optimization flags?
    • SOLVED RaspberryPi2EGLFS compiling error
      Mobile and Embedded • raspberry pi 3 • • defs  

      3
      1
      Votes
      3
      Posts
      1565
      Views

      hi, i has same problem, i refresh raspberry, but issue also happen. please help me to solved issue. thanks u.
    • UNSOLVED Cross compile Qt (Windows) to Raspberry 3
      Installation and Deployment • raspberry pi 3 toolchain cross compile t • • etiennedm  

      31
      4
      Votes
      31
      Posts
      45464
      Views

      Hello. Could you please help, I call a command in MSYS2 ../qt-everywhere-src-5.15.2/configure -platform win32-g++ -xplatform linux-arm-gnueabi-g++ -release -opengl es2 -device linux-rasp-pi3-g++ -sysroot C:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot -prefix /usr/local/qt5 and after some time get an error: Creating qmake... make: g++: No such file or directory make: *** [Makefile:258: main.o] Error 127 But I am sure the PATH variable contains the correct path to the gcc/g++. In windows CMD console I call g++ -v and get correct data. If I call "which g++" in MSYS2, I get following: # which g++ which: no g++ in (/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl) Why MSYS2 does not see the gcc/g++ ?? I have restarted PC already, no change. From where these path addresses like /usr/local/bin:/usr/bin are coming?? I stuck on step 9 and 10, and have no idea. Thank you!