Bug 248155 - graphics/qt5-3d: fails to build with CPUTYPE>=haswell (anything with AVX2 I guess)
Summary: graphics/qt5-3d: fails to build with CPUTYPE>=haswell (anything with AVX2 I g...
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (Team)
Depends on:
Reported: 2020-07-21 22:16 UTC by Greg V
Modified: 2020-11-24 05:24 UTC (History)
3 users (show)

See Also:
tcberner: maintainer-feedback+


Note You need to log in before you can comment on or make changes to this bug.
Description Greg V 2020-07-21 22:16:08 UTC
With errors like:

jobs/abstractpickingjob.cpp:110:33: error: no viable conversion from 'const Matrix4x4' (aka 'const Qt3DCore::Matrix4x4_SSE') to incomplete type 'const Qt3DCore::Matrix4x4_AVX2'
    nearPos = nearPos.unproject(viewMatrix, projectionMatrix, viewport);
../../include/Qt3DCore/5.15.0/Qt3DCore/private/../../../../../src/core/transforms/vector3d_sse_p.h:68:7: note: forward declaration of 'Qt3DCore::Matrix4x4_AVX2'
class Matrix4x4_AVX2;
../../include/Qt3DCore/5.15.0/Qt3DCore/private/../../../../../src/core/transforms/vector3d_sse_p.h:182:74: note: passing argument to parameter 'modelView' here
    Q_3DCORE_PRIVATE_EXPORT Vector3D_SSE unproject(const Matrix4x4_AVX2 &modelView, const Matrix4x4_AVX2 &projection, const QRect &viewport) const;
Comment 1 Tobias C. Berner freebsd_committer 2020-07-25 08:39:09 UTC
Moin moin 

Indeed, it also fails when I set it to znver1 here.

mfg Tobias
Comment 2 Tobias C. Berner freebsd_committer 2020-07-25 09:16:32 UTC
Could you verify that you also get 

  Use SSE2 instructions .................. yes
  Use AVX2 instructions .................. no

in the configure output?
Comment 3 Greg V 2020-07-29 13:29:56 UTC
(In reply to Tobias C. Berner from comment #2)
Comment 4 break19 2020-10-14 10:26:21 UTC
also hitting this bug on -current with cputype=znver1:

# uname -a
FreeBSD zenstation 13.0-CURRENT FreeBSD 13.0-CURRENT #1 494ba3d79-c119(master): Fri Oct  9 16:11:27 CDT 2020     root@zenstation:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG  amd64
Comment 5 eborisch+FreeBSD 2020-11-23 21:39:07 UTC

CPUTYPE= ivybridge   # (Select the most recent CPU without AVX2 support)

lets it build, but it would be nice to enable avx2 on local builds where it the instructions are supported.
Comment 6 Tobias C. Berner freebsd_committer 2020-11-24 05:24:56 UTC
(In reply to eborisch+FreeBSD from comment #5)

Yeah, someone should invest some time in why the AVX2 detection fails.
Patches, welcome :)

mfg Tobias