chschnell / build-qt5-rpi

Bash script to fully cross-compile Qt 5 using a pure Debian host targeting a Raspberry Pi 2/3 without X11.
MIT License
24 stars 6 forks source link

invalid conversion from ‘xcb_window_t {aka unsigned int}’ to ‘EGLNativeWindowType {aka void*}’ #4

Closed tntclaus closed 6 years ago

tntclaus commented 6 years ago

Hi,

can you share any thoughts on why is it failing? Looks like the problem with sysroot/opt/vc/include/EGL/egl.h, but the funny thing is that I managed to build Qt5.9.4 using same sysroot and following this manual: https://wiki.qt.io/RaspberryPi2EGLFS

Reason I try your recipe is that I failed to build qtwebengine with the official one :)

compiling /home/gleb/raspi2/qt-everywhere-opensource-src-5.9.3/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.cpp
compiling .moc/moc_qgtk3dialoghelpers.cpp
compiling /home/gleb/raspi2/qt-everywhere-opensource-src-5.9.3/qtbase/src/plugins/imageformats/ico/qicohandler.cpp
compiling .moc/moc_qgtk3menu.cpp
compiling .moc/moc_qofonoservice_linux_p.cpp
/home/gleb/raspi2/qt-everywhere-opensource-src-5.9.3/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.cpp: In member function ‘virtual void QXcbEglWindow::create()’:
/home/gleb/raspi2/qt-everywhere-opensource-src-5.9.3/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.cpp:96:81: error: invalid conversion from ‘xcb_window_t {aka unsigned int}’ to ‘EGLNativeWindowType {aka void*}’ [-fpermissive]
     m_surface = eglCreateWindowSurface(m_glIntegration->eglDisplay(), m_config, m_window, 0);
                                                                                 ^
In file included from /home/gleb/raspi2/qt-everywhere-opensource-src-5.9.3/qtbase/include/QtEglSupport/5.9.3/QtEglSupport/private/../../../../../src/platformsupport/eglconvenience/qt_egl_p.h:65:0,
                 from /home/gleb/raspi2/qt-everywhere-opensource-src-5.9.3/qtbase/include/QtEglSupport/5.9.3/QtEglSupport/private/qt_egl_p.h:1,
                 from /home/gleb/raspi2/qt-everywhere-opensource-src-5.9.3/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglinclude.h:49,
                 from /home/gleb/raspi2/qt-everywhere-opensource-src-5.9.3/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.h:45,
                 from /home/gleb/raspi2/qt-everywhere-opensource-src-5.9.3/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.cpp:40:
/home/gleb/raspi2/qt5.9.3/sysroot/opt/vc/include/EGL/egl.h:265:31: note:   initializing argument 3 of ‘void* eglCreateWindowSurface(EGLDisplay, EGLConfig, EGLNativeWindowType, const EGLint*)’
 EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
                               ^
Makefile:1901: ошибка выполнения рецепта для цели «.obj/qxcbeglwindow.o»
chschnell commented 6 years ago

I just did a full build using a clean 64-Bit virtual machine, a clean Pi SD card and:

All three packages are the latest releases and newer than the ones I used when I wrote this build script.

The only difference I noticed was on the Raspberry. After sudo rpi-update I had to run sudo apt-get update once more, otherwise the local apt package index was missing lots of packages.

The build took 2 1/2 hours and completed without errors.

Which setup are you using, did you do anything more or different than what is in the instructions?

Please compare this section with yours in your build/config.summary:

QPA backends:
  DirectFB ............................... no
  EGLFS .................................. yes
  EGLFS details:
    EGLFS OpenWFD ........................ no
    EGLFS i.Mx6 .......................... no
    EGLFS i.Mx6 Wayland .................. no
    EGLFS RCAR ........................... no
    EGLFS EGLDevice ...................... no
    EGLFS GBM ............................ no
    EGLFS Mali ........................... no
    EGLFS Raspberry Pi ................... yes
    EGL on X11 ........................... no
  LinuxFB ................................ yes
  VNC .................................... yes
  Mir client ............................. no
  X11:
    Using system-provided XCB libraries .. no
    EGL on X11 ........................... no
    Xinput2 .............................. no
    XCB XKB .............................. yes
    XLib ................................. yes
    XCB render ........................... yes
    XCB GLX .............................. no
    XCB Xlib ............................. no
    Using system-provided xkbcommon ...... no

Is it identical or do you see something different?

tntclaus commented 6 years ago

Which setup are you using

I think this should be a problem. The host system contains various packages and definetely is not fresh.

did you do anything more or different than what is in the instructions?

No, Sir!

Here is build/config.summary which is way tooo different. As I had said I succeeded to compile Qt 5.9.4 except qtwebengine. This config basically says Qt is going to compile against something else but RPi.

Fresh install is what I need I guess.

QPA backends:
  DirectFB ............................... no
  EGLFS .................................. yes
  EGLFS details:
    EGLFS i.Mx6 .......................... no
    EGLFS i.Mx6 Wayland .................. no
    EGLFS EGLDevice ...................... yes
    EGLFS GBM ............................ yes
    EGLFS Mali ........................... no
    EGLFS Raspberry Pi ................... no
    EGL on X11 ........................... yes
  LinuxFB ................................ yes
  VNC .................................... yes
  Mir client ............................. no
  X11:
    Using system-provided XCB libraries .. yes
    EGL on X11 ........................... yes
    Xinput2 .............................. yes
    XCB XKB .............................. yes
    XLib ................................. yes
    XCB render ........................... yes
    XCB GLX .............................. yes
    XCB Xlib ............................. yes
    Using system-provided xkbcommon ...... yes
chschnell commented 6 years ago

Also for this issue please see the new release I just committed.

You should not have these problems any longer. This issue came from a misconfigured Pi.