Quantcast
Channel: Qt DevNet forums: QtonPi
Viewing all articles
Browse latest Browse all 92

QT 5.4 cross compilation

$
0
0
Hello, I have been trying to cross compile qt 5.4 from the git repo following this link http://qt-project.org/wiki/RaspberryPi_Beginners_guide That went fairly well for qtbase assuming you have to patch the following files (which i found somewhere else on this forums) with the following : sudo nano /mnt/rasp-pi-rootfs/opt/vc/include/interface/vmcs_host/vc_dispmanx.h First edit prototype of function in vc_dispmanx.h from: VCHPRE_ int VCHPOST_ vc_dispmanx_element_change_attributes( DISPMANX_UPDATE_HANDLE_T update, DISPMANX_ELEMENT_HANDLE_T element, uint32_t change_flags, int32_t layer, uint8_t opacity, const VC_RECT_T *dest_rect, const VC_RECT_T *src_rect, DISPMANX_RESOURCE_HANDLE_T mask, VC_IMAGE_TRANSFORM_T transform ); To: VCHPRE_ int VCHPOST_ vc_dispmanx_element_change_attributes( DISPMANX_UPDATE_HANDLE_T update, DISPMANX_ELEMENT_HANDLE_T element, uint32_t change_flags, int32_t layer, uint8_t opacity, const VC_RECT_T *dest_rect, const VC_RECT_T *src_rect, DISPMANX_RESOURCE_HANDLE_T mask, DISPMANX_TRANSFORM_T transform ); then : sudo nano ~/opt/qt5/qtbase/mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp Then go to function moveDispmanxLayer and make sure it looks like this: static void moveDispmanxLayer(EGLNativeWindowType window, const QPoint &pos) {    EGL_DISPMANX_WINDOW_T *eglWindow = static_cast<EGL_DISPMANX_WINDOW_T *>(window);    QSize size(eglWindow->width, eglWindow->height);    VC_RECT_T dst_rect;    dst_rect.x = pos.x();    dst_rect.y = pos.y();    dst_rect.width = size.width();    dst_rect.height = size.height();      VC_RECT_T src_rect;    src_rect.x = 0;    src_rect.y = 0;    src_rect.width = size.width() << 16;    src_rect.height = size.height() << 16;      DISPMANX_UPDATE_HANDLE_T dispman_update = vc_dispmanx_update_start(0);    vc_dispmanx_element_change_attributes(dispman_update, eglWindow->element, ELEMENT_CHANGE_DEST_RECT /*change_flags*/, 0, 0, &dst_r$    vc_dispmanx_update_submit_sync(dispman_update); } With that i have been able to cross compile qtbase on 5.4 branch. Then i wanted to build qtwebkit on the same principle. I am using : cd ~/opt/qt5/qtwebkit ./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi make -j 8 But the make operation will fail. Before going further into explanations, i would like to know if Qt 5.4 is supposed to build on RPi and if all submodules are supposed to build especially qtwebkit ? Thanks.

Viewing all articles
Browse latest Browse all 92

Trending Articles