Compile qt5-3d for ES2 too, bug in qt5-3d

I installed Manjaro 20.4 with XFCE on a Raspberry Pi4 (4GB RAM). I'm developing a software for GPS-guidance on farm equipment (https://github.com/eringerli/QtOpenGuidance) which uses qt3d. As I want to support this style of installation inside of a tractor (RPI+touch display) instead of a more traditional x86-tablet, I came to Manjaro Linux. I develop on Arch Linux on my main desktop, so using Raspbian or Ubuntu isn't really an option, as they differ too much in their policy about "-dev" and "-dbg"-packages and most of all the used LTS-versions. On the Dell 7139 with the x86_64 Manjaro Linux, everything works perfectly (not counting my own bugs...) using Qt version 5.14.1-1, also on Arch with 5.14.1-2.

I wrote down the exact instructions to follow to get a running system in the README of the repository above.

Now to the problem:
If I use ES2-versions of Qt5, I get linker errors like this.

g++ -Wl,-O1 -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -Wl,-rpath-link,/usr/lib -o QtOpenGuidance BufferMesh.o BufferMeshGeometry.o FieldManager.o GlobalPlannerLines.o LocalPlanner.o SliderDockBlock.o SprayerModel.o ValueDockBlockBase.o ValueTransmissionBase.o XteDockBlock.o FieldsOptimitionToolbar.o FieldsToolbar.o MyFrameworkWidgetFactory.o SectionControlToolbar.o SliderBlockModel.o SliderDock.o ThreeValuesDock.o TransmissionBlockModel.o ValueBlockModel.o ValueDock.o XteDock.o CgalWorker.o PathPrimitive.o Plan.o main.o PoseSimulation.o TractorModel.o TrailerModel.o CameraToolbar.o GuidanceToolbar.o GuidanceTurning.o ImplementBlockModel.o ImplementSectionModel.o NumberBlockModel.o PassToolbar.o SettingsDialog.o StringBlockModel.o VectorBlockModel.o qneblock.o qneport.o qneconnection.o qnodeseditor.o qnodeseditor-moc.o Accumulator.o AlbersEqualArea.o AzimuthalEquidistant.o CassiniSoldner.o CircularEngine.o DMS.o Ellipsoid.o EllipticFunction.o GARS.o Geocentric.o GeoCoords.o Geodesic.o GeodesicExactC4.o GeodesicExact.o GeodesicLine.o GeodesicLineExact.o Geohash.o Geoid.o Georef.o Gnomonic.o GravityCircle.o GravityModel.o LambertConformalConic.o LocalCartesian.o MagneticCircle.o MagneticModel.o Math.o MGRS.o NormalGravity.o OSGB.o PolarStereographic.o PolygonArea.o Rhumb.o SphericalEngine.o TransverseMercator.o TransverseMercatorExact.o Utility.o UTMUPS.o dubins.o 3d-moc.o block-moc.o gui-moc.o kinematic-moc.o qrc_ressources.o moc_AngularVelocityLimiter.o moc_XteGuidance.o   -lgmp -lmpfr -L/opt/KDAB/lib -lkddockwidgets /usr/lib/libQt53DExtras.so /usr/lib/libQt53DRender.so /usr/lib/libQt53DInput.so /usr/lib/libQt53DLogic.so /usr/lib/libQt53DCore.so /usr/lib/libQt5Widgets.so /usr/lib/libQt5Gui.so /usr/lib/libQt5Network.so /usr/lib/libQt5Concurrent.so /usr/lib/libQt5Core.so -lGLESv2 -lpthread -lmd4c   
/usr/bin/ld: /usr/lib/libQt53DRender.so: undefined reference to `QOpenGLFunctions_3_3_Core::versionProfile()@Qt_5'
/usr/bin/ld: /usr/lib/libQt53DRender.so: undefined reference to `QOpenGLFunctions_3_1::versionProfile()@Qt_5'
/usr/bin/ld: /usr/lib/libQt53DRender.so: undefined reference to `QOpenGLFunctions_3_2_Core::versionProfile()@Qt_5'
/usr/bin/ld: /usr/lib/libQt53DRender.so: undefined reference to `QOpenGLFunctions_2_0::versionProfile()@Qt_5'
/usr/bin/ld: /usr/lib/libQt53DRender.so: undefined reference to `QOpenGLFunctions_4_3_Core::versionProfile()@Qt_5'
/usr/bin/ld: /usr/lib/libQt53DRender.so: undefined reference to `QOpenGLFunctions_4_5_Core::versionProfile()@Qt_5'
collect2: Fehler: ld gab 1 als Ende-Status zurück
make: *** [Makefile:1708: QtOpenGuidance] Fehler 1

I suspect, that qt3d isn't compiled against ES2, as there is no qt5-es2-3d-package, analog to qt5-es2-base, so these functions are not found by the linker.

If I use the "normal" versions of Qt (not compiled against ES2), I hit this bug: https://bugs.archlinux.org/task/65449, which is fixed by compiling it with a fixed version of GCC and packaging it anew, as qt3d hits a bug in GCC itself.

I installed Qt with the version 5.14.1-1, both as vanilla and ES2.

We can't keep rebuilding all qt based packages/applications with es2.

So I would much rather wait for the fix in gcc for this issue. Even Arch x64 is waiting for it to come out of testing.

it works with 5.14.1-2 on arch or 5.14.1-1 on x86_64 manjaro, so something was already fixed.

Well, Manjaro runs gcc 9.3.0, as far as I know, but we don't on Manjaro ARM yet, because our upstream (Arch Linux ARM) only uses 9.2.0 still.

So that might explain the differences there.

I don't want to stress you, but do you have a rough timeframe, when a change can be expected? Because I guess, even if qt3d is linked against ES2, without the fixed bug in GCC the result will be the same

Not really. Arch Linux ARM controls how fast that moves. We have no say in that.

I tried updating our GCC before Arch at some point and it was really a mess to maintain, so I will rather wait for Arch to update theirs.

GCC is part of a toolchain, so if you update one part of it, you have to update the rest. Not to mention most things depending on it.

1 Like

Yeah, toolchain changes are hard.

Should I file a bug report in Arch too, to raise the issue to attention?

You could. Not sure how active the developers are on the Arch ARM forums though.

Let's hope they are :grin:

Done: https://archlinuxarm.org/forum/viewtopic.php?f=15&t=14396#p63387

Prepare for the thread to be closed. You mentioned Manjaro. :stuck_out_tongue:
Maybe they will just say: "If Manjaro needs it, they can just rebuild it" or something of that sort.

We'll see :sweat_smile:

It's not that it doesn't affect them: if they use 9.2.0, this applies to their packages too. There was just no one to report it yet.

The recent update to Qt 5.14.2-1 didn't help :sob:

GCC 9.3 went into arm-unstable today. :slight_smile:

I tested it and it works! Thanks a lot! :grin:

1 Like

Forum kindly sponsored by