[Interest] Linking issues with Angle and Qt 5.12.x
Oliver Wolff
Oliver.Wolff at qt.io
Tue May 28 15:50:00 CEST 2019
Hi Frederico,
This indeed looks like a problem. I will create a patch for Qt tomorrow.
(new functions that were introduced by the ANGLE update have to be added
to the def file from 5.9).
Thanks for pointing that out and for the time spent on investigating the
problem.
Olli
On 28/05/2019 15:24, Federico Buti wrote:
> Hi all.
>
> Maybe I'm wrong - that's not exactly my cup of tea here - but I've
> noticed something that feels off to me.
> The def file
> <https://code.qt.io/cgit/qt/qtbase.git/tree/src/3rdparty/angle/src/libGLESv2/libGLESv2_mingw32.def?h=5.9.8>
> included in Qt 5.9.x for the exported functions seems to correctly match
> the undefined references that I reported in the original email. Things
> like "glBindTexture at 8" or "glDeleteTextures at 8" are indeed there and
> there is no undefined reference. Instead, the corresponding file
> <https://code.qt.io/cgit/qt/qtbase.git/tree/src/3rdparty/angle/src/libGLESv2/libGLESv2d_mingw32.def?h=5.12.3>
> in Qt 5.12.x seems to export different names and it matches exactly the
> non ming32
> <https://code.qt.io/cgit/qt/qtbase.git/tree/src/3rdparty/angle/src/libGLESv2/libGLESv2d.def?h=5.12.3> one.
>
> Is that correct?
>
> Thanks,
> F.
>
>
> On Mon, 27 May 2019 at 17:12, Federico Buti <fed.buti at gmail.com
> <mailto:fed.buti at gmail.com>> wrote:
>
> An update.
>
> We used chroot from Archlinux and repos which provides a patched
> ANGLE, as seen here
> <https://github.com/edubart/archlibs/blob/master/mingw-w64/mingw-w64-angleproject/angleproject-fix-mingw-compatibility.patch#L51>, and
> it worked like a charm. We were able to compile qnanopainter and
> deploy it via qtwindeploy to a Windows host. Not sure if this rings
> some bells but just thought it was worth mentioning.
>
> Regards,
> F.
>
>
> On Mon, 27 May 2019 at 14:08, Federico Buti <fed.buti at gmail.com
> <mailto:fed.buti at gmail.com>> wrote:
>
> Hi Vadim,
>
> Thanks for the reply.
> No, quite sure we are not mixing packages in MXE. Compilation is
> forced for 32 bit target only. On native Windows we are using
> plain Qt 5.12.x from qt.io <http://qt.io> so there everything
> should be correctly aligned too.
> F.
>
>
> On Mon, 27 May 2019 at 13:11, Vadim Peretokin
> <vperetokin at gmail.com <mailto:vperetokin at gmail.com>> wrote:
>
> Are you mixing 64bit and 32bit libraries by accident during
> linking? I had similar messages in that scenario.
>
> On Mon, May 27, 2019 at 12:57 PM Oliver Wolff
> <Oliver.Wolff at qt.io <mailto:Oliver.Wolff at qt.io>> wrote:
>
> Hi Frederico,
>
> I am not aware of an issue with ANGLE when using MinGW.
> Can you create a
> bug report on http://bugreports.qt.io/ ,attach a minimal
> example, and
> assign it to me so that it does not get lost?
>
> Olli
>
> On 25/05/2019 17:47, Federico Buti wrote:
> > Hi all.
> >
> > We are facing a quite strange behaviour with
> qnanopainter
> > <https://github.com/QUItCoding/qnanopainter>.
> > Building/running the library and the examples works
> smoothly on Qt 5.9.8
> > and no issue is found. I guess everything was fixed
> there, see for
> > instance here
> >
> <https://github.com/QUItCoding/qnanopainter/issues/16#issue-235192684>.
> >
> > Building the code on 5.12.x results in a similar
> linker issue as
> > depicted in the last link. In particular we have a
> series of undefined
> > references as shown below:
> >
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x12b):
>
> > undefined reference to `_imp__glDeleteTextures at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1b4):
>
> > undefined reference to `glDeleteShader at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1d5):
>
> > undefined reference to `glDeleteBuffers at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1e5):
>
> > undefined reference to `glDeleteShader at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1f5):
>
> > undefined reference to `glDeleteProgram at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x988):
>
> > undefined reference to `_imp__glBindTexture at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x9a0):
>
> > undefined reference to `_imp__glPixelStorei at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x9fc):
>
> > undefined reference to `_imp__glTexSubImage2D at 36'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0xa43):
>
> > undefined reference to `_imp__glBindTexture at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1361):
>
> > undefined reference to `_imp__glDeleteTextures at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1388):
>
> > undefined reference to `_imp__glGetError at 0'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1407):
>
> > undefined reference to `_imp__glGenTextures at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x143a):
>
> > undefined reference to `_imp__glBindTexture at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1442):
>
> > undefined reference to `_imp__glPixelStorei at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x14ae):
>
> > undefined reference to `_imp__glTexImage2D at 36'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x14d7):
>
> > undefined reference to `_imp__glTexParameteri at 12'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1638):
>
> > undefined reference to `_imp__glBindTexture at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x16b9):
>
> > undefined reference to `glGenerateMipmap at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x16fa):
>
> > undefined reference to `_imp__glTexImage2D at 36'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x171a):
>
> > undefined reference to `_imp__glTexParameteri at 12'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x17e0):
>
> > undefined reference to `glUniform4fv at 12'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1828):
>
> > undefined reference to `_imp__glBindTexture at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x185f):
>
> > undefined reference to `_imp__glBindTexture at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x18bb):
>
> > undefined reference to `glGetProgramInfoLog at 16'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x192e):
>
> > undefined reference to `glGetShaderInfoLog at 16'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x19c9):
>
> > undefined reference to `glCreateProgram at 0'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x19d7):
>
> > undefined reference to `glCreateShader at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x19e8):
>
> > undefined reference to `glCreateShader at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1a19):
>
> > undefined reference to `glShaderSource at 16'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1a44):
>
> > undefined reference to `glShaderSource at 16'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1a4f):
>
> > undefined reference to `glCompileShader at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1a6a):
>
> > undefined reference to `glGetShaderiv at 12'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1a94):
>
> > undefined reference to `glCompileShader at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1aaf):
>
> > undefined reference to `glGetShaderiv at 12'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1adb):
>
> > undefined reference to `glAttachShader at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1aea):
>
> > undefined reference to `glAttachShader at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1b05):
>
> > undefined reference to `glBindAttribLocation at 12'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1b20):
>
> > undefined reference to `glBindAttribLocation at 12'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1b2b):
>
> > undefined reference to `glLinkProgram at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1b46):
>
> > undefined reference to `glGetProgramiv at 12'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1bd9):
>
> > undefined reference to `glGetUniformLocation at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1bf1):
>
> > undefined reference to `glGetUniformLocation at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1c09):
>
> > undefined reference to `glGetUniformLocation at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1c22):
>
> > undefined reference to `glGenBuffers at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1c38):
>
> > undefined reference to `_imp__glFinish at 0'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1d14):
>
> > undefined reference to `_imp__glStencilFunc at 12'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1d5f):
>
> > undefined reference to `glUseProgram at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1d64):
>
> > undefined reference to `_imp__glEnable at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1d86):
>
> > undefined reference to `_imp__glCullFace at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1d96):
>
> > undefined reference to `_imp__glFrontFace at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1da7):
>
> > undefined reference to `_imp__glDisable at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1dca):
>
> > undefined reference to `_imp__glColorMask at 16'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1df7):
>
> > undefined reference to `_imp__glStencilMask at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1e0c):
>
> > undefined reference to `_imp__glStencilOp at 12'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1e4c):
>
> > undefined reference to `_imp__glStencilFunc at 12'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1e5b):
>
> > undefined reference to `glActiveTexture at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1e60):
>
> > undefined reference to `_imp__glBindTexture at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1edf):
>
> > undefined reference to `glBindBuffer at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1f07):
>
> > undefined reference to `glBufferData at 16'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1f16):
>
> > undefined reference to `glEnableVertexAttribArray at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1f25):
>
> > undefined reference to `glEnableVertexAttribArray at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1f5c):
>
> > undefined reference to `glVertexAttribPointer at 24'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1f93):
>
> > undefined reference to `glVertexAttribPointer at 24'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1fa9):
>
> > undefined reference to `glUniform1i at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1fc6):
>
> > undefined reference to `glUniform4fv at 12'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x1fce):
>
> > undefined reference to `_imp__glDrawArrays at 12'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x2085):
>
> > undefined reference to `glBlendFuncSeparate at 16'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x2141):
>
> > undefined reference to `glStencilOpSeparate at 16'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x2168):
>
> > undefined reference to `glStencilOpSeparate at 16'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x217f):
>
> > undefined reference to `_imp__glDrawArrays at 12'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x2289):
>
> > undefined reference to `glDisableVertexAttribArray at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x2298):
>
> > undefined reference to `glDisableVertexAttribArray at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x22bd):
>
> > undefined reference to `glBindBuffer at 8'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x22cc):
>
> > undefined reference to `glUseProgram at 4'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x2374):
>
> > undefined reference to `_imp__glDrawArrays at 12'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x249e):
>
> > undefined reference to `_imp__glDrawArrays at 12'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x2532):
>
> > undefined reference to `_imp__glDrawArrays at 12'
> >
> libqnanopainter.a(qnanobackendgles2.cpp.o):qnanobackendgles2.cpp:(.text+0x2843):
>
> > undefined reference to `_imp__glDrawArrays at 12'
> >
> > When we substituted the "liblibGLESv2.a" from Qt 5.12
> with the one from
> > 5.9 - just to do a wild test - compilation succeeded
> but then we had a
> > runtime failure which was totally expected.
> >
> > The very same series of undefined references are also
> spotted while
> > cross-compiling with MXE and a patched Qt version to
> have dynamic
> > selection of the GL backend.
> >
> > What is exactly happening here? How can we proceed?
> What's the best way
> > to use angle when cross-compiling Qt, e.g. with MXE?
> >
> > Thanks in advance,
> > F.
> >
> >
> > _______________________________________________
> > Interest mailing list
> > Interest at qt-project.org <mailto:Interest at qt-project.org>
> > https://lists.qt-project.org/listinfo/interest
> >
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org <mailto:Interest at qt-project.org>
> https://lists.qt-project.org/listinfo/interest
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org <mailto:Interest at qt-project.org>
> https://lists.qt-project.org/listinfo/interest
>
More information about the Interest
mailing list