Results 1 to 6 of 6

Thread: Compiling qt 5.4 for raspberry

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2014
    Posts
    16
    Qt products
    Qt5
    Platforms
    Windows

    Default Compiling qt 5.4 for raspberry

    Hello.

    I'm trying to compile QT 5.4 to use cross-compile on rasp (512 mb)

    My configure command:

    ./configure -opengl es2 -qpa eglfs -device rasp-pi -device-option CROSS_COMPILE=$BDIR/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot /mnt/rpi-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -nomake tests -prefix /opt/qt5-rpi -no-pch -skip qttools


    Configure finish ok:

    Qt Code:
    1. Running configuration tests...
    2. Note: PKG_CONFIG_LIBDIR automatically set to /mnt/rpi-rootfs/usr/lib/pkgconfig:/mnt/rpi-rootfs/usr/share/pkgconfig:/mnt/rpi-rootfs/usr/lib/arm-linux-gnueabihf/pkgconfig
    3. Note: PKG_CONFIG_SYSROOT_DIR automatically set to /mnt/rpi-rootfs
    4. Warning: Disabling Linux Accessibility Bridge: DBus is missing.
    5.  
    6. Configure summary
    7.  
    8. Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
    9. Building for: devices/linux-rasp-pi-g++ (arm, CPU features: none detected)
    10. Platform notes:
    11.  
    12. - Also available for Linux: linux-kcc linux-icc linux-cxx
    13.  
    14. Build options:
    15. Configuration .......... accessibility alsa audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile egl eglfs evdev eventfd freetype full-config getaddrinfo getifaddrs glib harfbuzz iconv inotify ipv6ifname large-config largefile linuxfb medium-config minimal-config mremap nis opengl opengles2 pcre png posix_fallocate qpa qpa reduce_exports release rpath shared small-config system-zlib use_gold_linker xcb xcb-glx xcb-plugin xcb-render xcb-xlib xkbcommon-qt
    16. Build parts ............ libs examples
    17. Mode ................... release
    18. Using C++11 ............ yes
    19. Using gold linker....... yes
    20. Using PCH .............. no
    21. Target compiler supports:
    22. Neon ................. auto
    23.  
    24. Qt modules and options:
    25. Qt D-Bus ............... no
    26. Qt Concurrent .......... yes
    27. Qt GUI ................. yes
    28. Qt Widgets ............. yes
    29. Large File ............. yes
    30. QML debugging .......... yes
    31. Use system proxies ..... no
    32.  
    33. Support enabled for:
    34. Accessibility .......... yes
    35. ALSA ................... yes
    36. CUPS ................... no
    37. Evdev .................. yes
    38. FontConfig ............. no
    39. FreeType ............... yes (bundled copy)
    40. Glib ................... yes
    41. GTK theme .............. no
    42. HarfBuzz ............... yes (bundled copy)
    43. Iconv .................. yes
    44. ICU .................... no
    45. Image formats:
    46. GIF .................. yes (plugin, using bundled copy)
    47. JPEG ................. yes (plugin, using bundled copy)
    48. PNG .................. yes (in QtGui, using bundled copy)
    49. journald ............... no
    50. mtdev .................. no
    51. Networking:
    52. getaddrinfo .......... yes
    53. getifaddrs ........... yes
    54. IPv6 ifname .......... yes
    55. OpenSSL .............. no
    56. NIS .................... yes
    57. OpenGL / OpenVG:
    58. EGL .................. yes
    59. OpenGL ............... yes (OpenGL ES 2.0+)
    60. OpenVG ............... no
    61. PCRE ................... yes (bundled copy)
    62. pkg-config ............. yes
    63. PulseAudio ............. no
    64. QPA backends:
    65. DirectFB ............. no
    66. EGLFS ................ yes
    67. KMS .................. no
    68. LinuxFB .............. yes
    69. XCB .................. yes (system library)
    70. EGL on X ........... no
    71. GLX ................ yes
    72. MIT-SHM ............ yes
    73. Xcb-Xlib ........... yes
    74. Xcursor ............ yes (loaded at runtime)
    75. Xfixes ............. yes (loaded at runtime)
    76. Xi ................. yes (loaded at runtime)
    77. Xi2 ................ no
    78. Xinerama ........... yes (loaded at runtime)
    79. Xrandr ............. yes (loaded at runtime)
    80. Xrender ............ no
    81. XKB ................ no
    82. XShape ............. yes
    83. XSync .............. yes
    84. XVideo ............. yes
    85. Session management ..... yes
    86. SQL drivers:
    87. DB2 .................. no
    88. InterBase ............ no
    89. MySQL ................ no
    90. OCI .................. no
    91. ODBC ................. no
    92. PostgreSQL ........... no
    93. SQLite 2 ............. no
    94. SQLite ............... yes (plugin, using bundled copy)
    95. TDS .................. no
    96. udev ................... no
    97. xkbcommon .............. yes (bundled copy, XKB config root: /usr/share/X11/xkb)
    98. zlib ................... yes (system library)
    To copy to clipboard, switch view to plain text mode 

    After this i make "make -j4 finish"

    While compiling the result is error:


    Qt Code:
    1. /home/dram/src/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot find -lqtharfbuzzng
    2. .obj/qfontengine.o:qfontengine.cpp:function QFontEngine::supportsScript(QChar::Script) const: error: undefined reference to 'hb_ot_tags_from_script'
    3. .obj/qfontengine.o:qfontengine.cpp:function QFontEngine::supportsScript(QChar::Script) const: error: undefined reference to 'hb_ot_layout_table_find_script'
    4. .obj/qfontengine.o:qfontengine.cpp:function QFontEngine::supportsScript(QChar::Script) const: error: undefined reference to 'hb_ot_layout_table_find_script'
    5. .obj/qfontengine.o:qfontengine.cpp:function QFontEngine::supportsScript(QChar::Script) const: error: undefined reference to 'hb_ot_layout_table_find_script'
    6. .obj/qtextengine.o:qtextengine.cpp:function QTextEngine::shapeTextWithHarfbuzzNG(QScriptItem const&, unsigned short const*, int, QFontEngine*, QVector<unsigned int> const&, bool) const: error: undefined reference to 'hb_buffer_create'
    7. .obj/qtextengine.o:qtextengine.cpp:function QTextEngine::shapeTextWithHarfbuzzNG(QScriptItem const&, unsigned short const*, int, QFontEngine*, QVector<unsigned int> const&, bool) const: error: undefined reference to 'hb_buffer_set_unicode_funcs'
    8. .obj/qtextengine.o:qtextengine.cpp:function QTextEngine::shapeTextWithHarfbuzzNG(QScriptItem const&, unsigned short const*, int, QFontEngine*, QVector<unsigned int> const&, bool) const: error: undefined reference to 'hb_buffer_pre_allocate'
    9. .obj/qtextengine.o:qtextengine.cpp:function QTextEngine::shapeTextWithHarfbuzzNG(QScriptItem const&, unsigned short const*, int, QFontEngine*, QVector<unsigned int> const&, bool) const: error: undefined reference to 'hb_buffer_allocation_successful'
    10. .obj/qtextengine.o:qtextengine.cpp:function QTextEngine::shapeTextWithHarfbuzzNG(QScriptItem const&, unsigned short const*, int, QFontEngine*, QVector<unsigned int> const&, bool) const: error: undefined reference to 'hb_buffer_clear_contents'
    11. .obj/qtextengine.o:qtextengine.cpp:function QTextEngine::shapeTextWithHarfbuzzNG(QScriptItem const&, unsigned short const*, int, QFontEngine*, QVector<unsigned int> const&, bool) const: error: undefined reference to 'hb_buffer_add_utf16'
    12. .obj/qtextengine.o:qtextengine.cpp:function QTextEngine::shapeTextWithHarfbuzzNG(QScriptItem const&, unsigned short const*, int, QFontEngine*, QVector<unsigned int> const&, bool) const: error: undefined reference to 'hb_buffer_set_segment_properties'
    To copy to clipboard, switch view to plain text mode 

    I have tried install a lot of packages contains harfbuzz but still the same error.

    Any idea?

  2. #2
    Join Date
    Feb 2015
    Posts
    3
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Compiling qt 5.4 for raspberry

    I have the same issue. As you can see in your 'config.log', qt will use the bundled copy of harfbuzz (actually harfbuzz-ng). Yet, it seems that for some reason it doesn't compile harfbuzz-ng when one runs 'make'.
    I went to qt-everywhere-opensource-src-5.4.0/qtbase/src/3rdparty/harfbuzz-ng and manually ran 'make' and harfbuzz-ng compiled. Afterwards I went back to qt-everywhere-opensource-src-5.4.0 and ran 'make' again. It got past the errors with 'harfbuzz', but my build now fails with the error:
    Makefile:57: recipe for target 'sub-src-install_subtargets' failed
    make[1]: *** [sub-src-install_subtargets] Error 2

  3. #3
    Join Date
    Feb 2015
    Posts
    3
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Compiling qt 5.4 for raspberry

    It looks like you have to compile using the following sequence of commands:
    $ make
    $ make install

    When trying directly with 'make install' my compile failed with the above mentioned 'harfbuzz' errors. Probably your 'make finish' did the same.

    You also have to make sure you have correctly configured pkg-config. The error I was seeing previously was due to qt not finding dbus headers because I didn't correctly configure pkg-config.
    To correctly configure pkg-config I did the following before running ./configure:
    SYSROOT=/mnt/rpi-rootfs
    export PKG_CONFIG_DIR=
    export PKG_CONFIG_SYSROOT_DIR=$SYSROOT
    export PKG_CONFIG_LIBDIR=$SYSROOT/usr/lib/arm-linux-gnueabihf/pkgconfig/:$SYSROOT/usr/share/pkgconfig:$SYSROOT/usr/lib/pkgconfig
    export PKG_CONFIG_PATH=$SYSROOT/usr/lib/arm-linux-gnueabihf/pkgconfig/:$SYSROOT/usr/share/pkgconfig:$SYSROOT/usr/lib/pkgconfig

    With these settings I was able to successfully build and install Qt 5.4. Hope this helps.

  4. #4
    Join Date
    Jul 2014
    Posts
    16
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Compiling qt 5.4 for raspberry

    Oh of course, i didn't make 'make -j4 finish' , but 'make -j4 install'


    After you advices, i mean:

    'make
    make install'

    QT compiled fine.

    But i have second problem with qt creator and cross compile

    I add a kit, my device (raspberry), but after compile i have got a error

    'Can not found a command' ( if i want to run my program on rasp)

  5. #5
    Join Date
    Jul 2014
    Posts
    16
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Compiling qt 5.4 for raspberry

    ~refresh

  6. #6
    Join Date
    Jul 2014
    Posts
    16
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Compiling qt 5.4 for raspberry

    ~refresh +

    FULL command : "Can not run : you have not entered a command"

Similar Threads

  1. compiling qtwebkit for raspberry - error
    By ben80 in forum Qt Programming
    Replies: 2
    Last Post: 13th February 2015, 09:16
  2. QML application slow on raspberry pi
    By ironexmaiden in forum Qt Quick
    Replies: 1
    Last Post: 14th October 2014, 14:33
  3. Raspberry Pi + touchscreen
    By robal in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 24th March 2014, 13:08
  4. Raspberry Pi toolchain problem
    By dellboy in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 21st November 2012, 15:43
  5. Localization - shortDayName - Raspberry Pi
    By scls19fr in forum Qt Programming
    Replies: 0
    Last Post: 25th October 2012, 18:18

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.