Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: LambdaCalculus on January 23, 2022, 12:07:36 PM

Title: Compiling RButil on armhf failed with error at talkfile.cpp
Post by: LambdaCalculus on January 23, 2022, 12:07:36 PM
A few days ago, I decided to try and see if perhaps I could compile Rockbox Utility on a non-x86_64 platform for Linux, and chose my Raspberry Pi 4B, which is an ARM64 device and running an appropriate Linux version (Raspberry Pi OS 64-bit; aarch64) as the test candidate. That build was successful and now the aarch64 binary is being offered as a download.

I then decided to see if I can do the same with my Raspberry Pi 3B+ and build an armhf binary, as the 3B+ I have has the 32-bit version of Raspberry Pi OS on it. I set up all the Qt5 dev packages I needed and got to compiling, but with no luck. The following error occurs when talkfile.cpp was reached:

talkfile.cpp:181:49: error: 'wildcardToRegularExpression' is not a member of 'QRegularExpession'

I had been trying to figure out what this error means and why it occurred for a couple of days but with no luck. I'm not sure if perhaps I might be missing a needed library for Qt5, but as Raspberry Pi OS is just Debian with a different shell and naming, any Debian packages for armhf are available for download from their repos. But I do digress; would anyone have an idea of perhaps any packages I should install for Qt5 to get past this error?
Title: Re: Compiling RButil on armhf failed with error at talkfile.cpp
Post by: 7o9 on January 23, 2022, 12:41:11 PM
wildcardToRegularExpression is only available from Qt 5.12 in QRegularExpression.

Could it be 32bit Raspberry Pi OS has an older (too old) version of Qt compared to the 64bit version on your 4B?

Title: Re: Compiling RButil on armhf failed with error at talkfile.cpp
Post by: bluebrother on January 23, 2022, 12:44:42 PM
talkfile.cpp:181:49: error: 'wildcardToRegularExpression' is not a member of 'QRegularExpession'

Your version of Qt is too old. It's because of this: https://doc.qt.io/qt-5/qregularexpression.html#wildcardToRegularExpression-1 Note the "This function was introduced in Qt 5.12.". I started using this function recently, pushed the changes, and only figured later about the fact it's only been available since 5.12. Not exactly sure how to continue with this, but given that 5.12 had standard support run out last month I'm not sure if it makes sense supporting older versions.

Feel free to ping me on IRC on this.
Title: Re: Compiling RButil on armhf failed with error at talkfile.cpp
Post by: LambdaCalculus on January 23, 2022, 11:20:07 PM
That probably is it. My Raspberry Pi 3B+ still has an older Raspberry Pi OS, which is based on Debian 10 "Buster". And sure enough, the version of Qt5 available in the buster repos is 5.11.

Meanwhile, my Raspberry Pi 4B is using the 64-bit beta of Raspberry Pi OS, which currently is built against Debian 11 "Bullseye". The Qt5 version available in the bullseye repos is 5.15.

I'll do a full version upgrade and give it a go again. Thanks, everyone!