Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. QtonPi
  4. [SOLVED] Compiling QT5 on Raspberry Pi 2

[SOLVED] Compiling QT5 on Raspberry Pi 2

Scheduled Pinned Locked Moved QtonPi
raspberry pi 2
3 Posts 2 Posters 3.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Iredan
    wrote on last edited by Iredan
    #1

    Hi there

    I'm following the wiki article Native Build of QT 5.4.1 on a Raspberry Pi 2 and I seem to have run into problems while configuring. I get an error at the end saying that the QT folder is not a file and cannot be read. I also seem to get some other symlink related errors in the config.out file, but as I'm a bit of a noob, I'm not really sure what to do about it. I've followed the wiki exactly as written and I'm working a clean updated version of Raspbian. I've included the contents of config.out below. I'd be really grateful for any help!! Note: I had to add the flag -qreal float due to some error about doubles and QT5.

    Edit: the file is too long to post so I've posted the start and the end. If you need more, just say!

    • cd qtbase
    • /home/pi/opt/qt-everywhere-opensource-src-5.4.1/qtbase/configure -top-level -v -opengl es2 -tslib -force-pkg-config -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/usr/bin/ -opensource -confirm-license -optimized-qmake -reduce-exports -release -qt-pcre -make libs -qreal float -prefix /usr/local/qt5

    This is the Qt Open Source Edition.

    You are licensed to use this software under the terms of
    the Lesser GNU General Public License (LGPL) versions 2.1.
    You are also licensed to use this software under the terms of
    the GNU Lesser General Public License (LGPL) versions 3.

    You have already accepted the terms of the Open Source license.

    Precompiled-headers support enabled.
    /usr/bin/g++ -c -fvisibility=hidden fvisibility.c
    Symbol visibility control enabled.
    /usr/bin/g++ -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
    bsymbolic_functions.c:2:2: error: #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
    Symbolic function binding disabled.
    DEFAULT_INCDIRS="/usr/include/c++/4.6
    /usr/include/c++/4.6/arm-linux-gnueabihf
    /usr/include/c++/4.6/backward
    /usr/lib/gcc/arm-linux-gnueabihf/4.6/include
    /usr/local/include
    /usr/lib/gcc/arm-linux-gnueabihf/4.6/include-fixed
    /usr/include/arm-linux-gnueabihf
    /usr/include
    "
    DEFAULT_LIBDIRS="/usr/lib/gcc/arm-linux-gnueabihf/4.6
    /usr/lib/arm-linux-gnueabihf
    /usr/lib
    /lib/arm-linux-gnueabihf
    /lib
    "
    Creating qmake...
    make: Nothing to be done for 'first'.
    Running configuration tests...
    Found pkg-config from $PATH: /usr/bin/pkg-config

    You have asked to use pkg-config. Please make sure you have
    a correctly setup pkg-config environment!

    Determining architecture... ()
    /usr/bin/g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard -g -Wall -W -fPIE -I. -I../../mkspecs/devices/linux-rasp-pi-g++ -o arch.o arch.cpp
    /usr/bin/g++ -Wl,-rpath-link,/opt/vc/lib -Wl,-rpath-link,/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/lib/arm-linux-gnueabihf -o arch arch.o
    Found architecture in binary
    CFG_ARCH="arm"
    CFG_CPUFEATURES=""
    Determining architecture... ()
    g++ -c -pipe -g -Wall -W -fPIE -I. -I../../mkspecs/linux-g++ -o arch.o arch.cpp
    g++ -o arch arch.o
    Found architecture in binary
    CFG_HOST_ARCH="arm"
    CFG_HOST_CPUFEATURES=""
    System architecture: 'arm'
    Host architecture: 'arm'
    C++11 auto-detection... ()
    /usr/bin/g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard -O2 -std=c++0x -Wall -W -fPIE -I. -I../../../mkspecs/devices/linux-rasp-pi-g++ -o c++11.o c++11.cpp
    /usr/bin/g++ -Wl,-rpath-link,/opt/vc/lib -Wl,-rpath-link,/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/lib/arm-linux-gnueabihf -Wl,-O1 -o c++11 c++11.o
    C++11 enabled.
    floatmath auto-detection... ()
    /usr/bin/g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard -O2 -Wall -W -fPIE -I. -I../../../mkspecs/devices/linux-rasp-pi-g++ -o floatmath.o floatmath.cpp
    floatmath.cpp:36:5: warning: unused parameter ‘argc’ [-Wunused-parameter]
    floatmath.cpp:36:5: warning: unused parameter ‘argv’ [-Wunused-parameter]
    /usr/bin/g++ -Wl,-rpath-link,/opt/vc/lib -Wl,-rpath-link,/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/lib/arm-linux-gnueabihf -Wl,-O1 -o floatmath floatmath.o
    floatmath enabled.
    sse2 auto-detection... ()
    /usr/bin/g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard -msse2 -g -Wall -W -fPIE -I. -I../../../mkspecs/devices/linux-rasp-pi-g++ -o sse2.o sse2.cpp
    cc1plus: error: unrecognized command line option ‘-msse2’
    Makefile:209: recipe for target 'sse2.o' failed
    make: *** [sse2.o] Error 1
    sse2 disabled.
    zlib auto-detection... ()
    /usr/bin/g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard -O2 -Wall -W -fPIE -I. -I../../../mkspecs/devices/linux-rasp-pi-g++ -o zlib.o zlib.cpp
    zlib.cpp: In function ‘int main(int, char**)’:
    zlib.cpp:38:15: warning: variable ‘stream’ set but not used [-Wunused-but-set-variable]
    zlib.cpp:40:17: warning: variable ‘ver’ set but not used [-Wunused-but-set-variable]
    zlib.cpp:43:9: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
    /usr/bin/g++ -Wl,-rpath-link,/opt/vc/lib -Wl,-rpath-link,/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/lib/arm-linux-gnueabihf -Wl,-O1 -o zlib zlib.o -lz
    zlib enabled.
    mtdev auto-detection... ()
    Project ERROR: mtdev development package not found
    mtdev disabled.
    libjpeg auto-detection... ()
    /usr/bin/g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard -O2 -Wall -W -fPIE -I. -I../../../mkspecs/devices/linux-rasp-pi-g++ -o libjpeg.o libjpeg.cpp
    libjpeg.cpp: In function ‘int main(int, char**)’:
    libjpeg.cpp:43:32: warning: ‘cinfo’ is used uninitialized in this function [-Wuninitialized]
    /usr/bin/g++ -Wl,-rpath-link,/opt/vc/lib -Wl,-rpath-link,/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/lib/arm-linux-gnueabihf -Wl,-O1 -o libjpeg libjpeg.o -ljpeg
    libjpeg enabled.
    libpng auto-detection... ()
    /usr/bin/g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard -O2 -Wall -W -fPIE -I. -I../../../mkspecs/devices/linux-rasp-pi-g++ -o libpng.o libpng.cpp
    libpng.cpp: In function ‘int main(int, char**)’:
    libpng.cpp:42:17: warning: variable ‘png_ptr’ set but not used [-Wunused-but-set-variable]
    /usr/bin/g++ -Wl,-rpath-link,/opt/vc/lib -Wl,-rpath-link,/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/lib/arm-linux-gnueabihf -Wl,-O1 -o libpng libpng.o -lpng
    libpng enabled.
    DB2 auto-detection... ()
    /usr/bin/g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard -O2 -Wall -W -fPIE -I. -I../../../mkspecs/devices/linux-rasp-pi-g++ -o db2.o db2.cpp
    db2.cpp:34:20: fatal error: sqlcli.h: No such file or directory
    compilation terminated.
    Makefile:209: recipe for target 'db2.o' failed
    make: *** [db2.o] Error 1
    DB2 disabled.

    ...

    Build options:
    Configuration .......... accessibility accessibility-atspi-bridge alsa audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile cups dbus egl eglfs evdev eventfd fontconfig full-config getaddrinfo getifaddrs glib gtk2 gtkstyle harfbuzz iconv icu inotify ipv6ifname large-config largefile libudev linuxfb medium-config minimal-config mremap nis opengl opengles2 openssl pcre png posix_fallocate precompile_header pulseaudio qpa qpa reduce_exports release rpath shared small-config system-freetype system-jpeg system-png system-zlib tslib use_gold_linker xcb xcb-glx xcb-plugin xcb-render xcb-sm xcb-xlib xinput2 xkbcommon-qt xlib xrender
    Build parts ............ libs
    Mode ................... release
    Using C++11 ............ yes
    Using gold linker....... yes
    Using PCH .............. yes
    Target compiler supports:
    Neon ................. no

    Qt modules and options:
    Qt D-Bus ............... yes (loading dbus-1 at runtime)
    Qt Concurrent .......... yes
    Qt GUI ................. yes
    Qt Widgets ............. yes
    Large File ............. yes
    QML debugging .......... yes
    Use system proxies ..... no

    Support enabled for:
    Accessibility .......... yes
    ALSA ................... yes
    CUPS ................... yes
    Evdev .................. yes
    FontConfig ............. yes
    FreeType ............... yes (system library)
    Glib ................... yes
    GTK theme .............. yes
    HarfBuzz ............... yes (bundled copy)
    Iconv .................. yes
    ICU .................... yes
    Image formats:
    GIF .................. yes (plugin, using bundled copy)
    JPEG ................. yes (plugin, using system library)
    PNG .................. yes (in QtGui, using system library)
    journald ............... no
    mtdev .................. no
    Networking:
    getaddrinfo .......... yes
    getifaddrs ........... yes
    IPv6 ifname .......... yes
    OpenSSL .............. yes (loading libraries at run-time)
    NIS .................... yes
    OpenGL / OpenVG:
    EGL .................. yes
    OpenGL ............... yes (OpenGL ES 2.0+)
    OpenVG ............... no
    PCRE ................... yes (bundled copy)
    pkg-config ............. yes
    PulseAudio ............. yes
    QPA backends:
    DirectFB ............. no
    EGLFS ................ yes
    KMS .................. no
    LinuxFB .............. yes
    XCB .................. yes (system library)
    EGL on X ........... no
    GLX ................ yes
    MIT-SHM ............ yes
    Xcb-Xlib ........... yes
    Xcursor ............ yes (loaded at runtime)
    Xfixes ............. yes (loaded at runtime)
    Xi ................. no
    Xi2 ................ yes
    Xinerama ........... yes (loaded at runtime)
    Xrandr ............. yes (loaded at runtime)
    Xrender ............ yes
    XKB ................ no
    XShape ............. yes
    XSync .............. yes
    XVideo ............. yes
    Session management ..... yes
    SQL drivers:
    DB2 .................. no
    InterBase ............ no
    MySQL ................ yes (plugin)
    OCI .................. no
    ODBC ................. yes (plugin)
    PostgreSQL ........... yes (plugin)
    SQLite 2 ............. yes (plugin)
    SQLite ............... yes (plugin, using bundled copy)
    TDS .................. yes (plugin)
    udev ................... yes
    xkbcommon .............. yes (bundled copy, XKB config root: /usr/share/X11/xkb)
    zlib ................... yes (system library)

    Cannot read /home/pi/opt/qt-everywhere-opensource-src-5.4.1: file to open is a directory
    Error processing project file: /home/pi/opt/qt-everywhere-opensource-src-5.4.1

    1 Reply Last reply
    0
    • I Offline
      I Offline
      Iredan
      wrote on last edited by
      #2

      Actually I fixed it. Turns out it was a corrupted tarball. I compared the downloaded file's size to the online version and it was smaller by quite a bit. So I started all over again with a clean install of Raspbian and now it's compiling away. Sorry for the silly question!

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        Glad you found out and thanks for sharing your findings.

        Since you have it working now, please update the thread title prepending [solved] so that other forum users may know a solution has been found :)

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved