[Development] Updating x86 SIMD support in Qt

Volker Hilsheimer volker.hilsheimer at qt.io
Thu Mar 24 08:14:38 CET 2022



> On 24 Mar 2022, at 02:59, Thiago Macieira <thiago.macieira at intel.com> wrote:
> 
> On Wednesday, 23 March 2022 20:34:07 -03 Volker Hilsheimer wrote:
>> I have a possibly wrong hunch that building Qt Multimedia fails because of
>> this. This is in a Ubuntu 20.04 VM in the VMware Fusion 12 provider, and
>> the hardware version is maxed out (it wasn’t earlier, but didn’t help to
>> put it to level 18). So there’s not a whole lot I can do on the VM
>> provisioning side, I think.
> 
>> /home/vagrant/dev-build/qtbase/include/QtCore/6.4.0/QtCore/private/../../../
>> ../../../../qt/dev/qtbase/src/corelib/global/qsimd_p.h:256:8: error: #error
>> "Please enable all x86-64-v3 extensions; you probably want to use
>> -march=haswell or -march=x86-64-v3 instead of -mavx2"
> 
>> /home/vagrant/dev-build/qtbase/include/QtCore/6.4.0/QtCore/private/../../../
>> ../../../../qt/dev/qtbase/src/corelib/global/qsimd_p.h:253:81: error:
>> ‘__FMA__’ was not declared in this scope> 
> 
> By the way, please note that VirtualBox enables AVX2 but not FMA and some of 
> the other required functionality for x86-64-v3. So a VirtualBox environment is 
> *not* x86-64-v3 and therefore you cannot run such binaries and you cannot 
> compile Qt with -march=native in it.
> 
> As far as I know, this is a problem exclusive to VirtualBox. It wouldn't 
> affect VMWare or qemu KVM-accelerated virtualisation. I also haven't noticed 
> it on Parallels on my Mac. It's been reported but hasn't been fixed.


Interesting, I have no problems building Qt in VMs running on VirtualBox. I build qtbase on several VMs every day, and just checked that Qt Multimedia builds on https://app.vagrantup.com/generic/boxes/opensuse15 without problems (or at least without that particular problem).

Volker



More information about the Development mailing list