Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917407 - dev-qt/qtquick3d-6.6.0 fails to build with gcc:14 (scene.cpp:(.text+<snip>): undefined reference to embree::BVH8Factory::BVH8QuantizedTriangle4(embree::Scene ))
Summary: dev-qt/qtquick3d-6.6.0 fails to build with gcc:14 (scene.cpp:(.text+<snip>): ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-14
  Show dependency tree
 
Reported: 2023-11-16 09:10 UTC by Toralf Förster
Modified: 2024-02-14 12:24 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,17.81 KB, text/plain)
2023-11-16 09:10 UTC, Toralf Förster
Details
dev-qt:qtquick3d-6.6.0:20231116-030107.log.xz (dev-qt:qtquick3d-6.6.0:20231116-030107.log.xz,14.84 KB, application/x-xz)
2023-11-16 09:10 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,35.84 KB, text/plain)
2023-11-16 09:10 UTC, Toralf Förster
Details
environment (environment,100.72 KB, text/plain)
2023-11-16 09:10 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.04 KB, application/x-xz)
2023-11-16 09:10 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,11.94 KB, application/x-xz)
2023-11-16 09:10 UTC, Toralf Förster
Details
qlist-info.txt (qlist-info.txt,91.17 KB, text/plain)
2023-11-16 09:10 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,37.74 KB, application/x-xz)
2023-11-16 09:10 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2023-11-16 09:10:17 UTC
too long lines were shrinked:

[356/789] cd /var/tmp/portage/dev-qt/qtquick3d-6.6.0/work/qtquick3d-everywhere-src-6.6.0_build/src/helpers && /usr/bin/cmake -E cmake_autogen /var/tmp/portage/dev-qt/qtquick3d-6.6.0/work/qtquick3d-everywhere-src-6.6.0_build/src/helpers/CMakeFiles/qtquick3dhelpersplugin_autogen.dir/AutogenInfo.json R
[357/789] /usr/bin/x86_64-pc-linux-gnu-g++ -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_QUICK3DRUNTIMERENDER_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_UP_TO=0x050000 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_GUI_LIB -DQT_MOC_COMPAT -DQT_NETW
[358/789] : && /usr/bin/x86_64-pc-linux-gnu-g++ -fPIC -O3 -pipe -march=native -fno-diagnostics-color  -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0   -Wl,-Bsymbolic-functions -Wl,--no-undefined -Wl,--version-script,/var/tmp/portage/dev-qt/qtquick3d-6.6.0/work/qtquick3d-everywhere-s
FAILED: lib64/libQt6Quick3DRuntimeRender.so.6.6.0 
: && /usr/bin/x86_64-pc-linux-gnu-g++ -fPIC -O3 -pipe -march=native -fno-diagnostics-color  -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0   -Wl,-Bsymbolic-functions -Wl,--no-undefined -Wl,--version-script,/var/tmp/portage/dev-qt/qtquick3d-6.6.0/work/qtquick3d-everywhere-src-6.6.0_b
/usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld: lib64/libQt6BundledEmbree.a(scene.cpp.o): in function `embree::Scene::createTriangleAccel()':
scene.cpp:(.text+0x30e7): undefined reference to `embree::BVH8Factory::BVH8QuantizedTriangle4(embree::Scene*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld: scene.cpp:(.text+0x31ad): undefined reference to `embree::BVH8Factory::BVH8Triangle4(embree::Scene*, embree::BVHFactory::BuildVariant, embree::BVHFactory::IntersectVariant)'
/usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld: scene.cpp:(.text+0x325f): undefined reference to `embree::BVH8Factory::BVH8Triangle4v(embree::Scene*, embree::BVHFactory::BuildVariant, embree::BVHFactory::IntersectVariant)'

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_plasma_systemd-20231114-175506

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-14 *
clang/llvm (if any):
clang version 17.0.5
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/17/bin
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
/usr/lib/llvm/17
17.0.5
Python 3.11.6
Available Ruby profiles:
  [1]   ruby31 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.73.0 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 21.0.1_p12 [openjdk-bin-21]
2)	Eclipse Temurin JDK 8.382_p05 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-21 

The Glorious Glasgow Haskell Compilation System, version 9.2.8
php cli (if any):

  HEAD of ::gentoo
commit 3a667bc73f8b2ee542c03bf607fde2e4fb822031
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Thu Nov 16 02:03:50 2023 +0000

    2023-11-16 02:03:49 UTC

emerge -qpvO dev-qt/qtquick3d
[ebuild  N    ] dev-qt/qtquick3d-6.6.0  USE="opengl vulkan -test"
Comment 1 Toralf Förster gentoo-dev 2023-11-16 09:10:18 UTC
Created attachment 874852 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-11-16 09:10:19 UTC
Created attachment 874853 [details]
dev-qt:qtquick3d-6.6.0:20231116-030107.log.xz
Comment 3 Toralf Förster gentoo-dev 2023-11-16 09:10:20 UTC
Created attachment 874854 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2023-11-16 09:10:21 UTC
Created attachment 874855 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2023-11-16 09:10:22 UTC
Created attachment 874856 [details]
etc.clang.tar.xz
Comment 6 Toralf Förster gentoo-dev 2023-11-16 09:10:23 UTC
Created attachment 874857 [details]
etc.portage.tar.xz
Comment 7 Toralf Förster gentoo-dev 2023-11-16 09:10:24 UTC
Created attachment 874858 [details]
qlist-info.txt
Comment 8 Toralf Förster gentoo-dev 2023-11-16 09:10:25 UTC
Created attachment 874859 [details]
temp.tar.xz
Comment 9 Ionen Wolkens gentoo-dev 2023-11-16 15:16:26 UTC
Can only reproduce with gcc:14, albeit no idea what's going on here.

(it does bundle embree at src/3rdparty/embree)
Comment 10 Kacper Słomiński 2024-02-02 19:13:34 UTC
I've tried some combinations of C{,XX}FLAGS flags and this seems to be caused by -march=native (or in my case, -march=znver2)?

make.conf fragment:

# COMMON_FLAGS="-O3 -march=znver2 -pipe -ggdb3" # original, bad
# COMMON_FLAGS="" # 1. good
# COMMON_FLAGS="-O3" # 2. good
# COMMON_FLAGS="-O3 -march=znver2" # 3. bad
# COMMON_FLAGS="-O3 -pipe" # 4. good
COMMON_FLAGS="-O3 -pipe -ggdb3" # 5. good
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS} -D_GLIBCXX_ASSERTIONS"


gcc version:

gcc version 14.0.1 20240124 (experimental) 3de031c96f28f19a68ea2080260d8fd2c78828ee (Gentoo 14.0.1 p, commit ddeac849ac4c3fecdf591ab6fb075cc6c5afdbff)
Comment 11 Kostadin Shishmanov 2024-02-02 19:26:57 UTC
(In reply to Kacper Słomiński from comment #10)
> I've tried some combinations of C{,XX}FLAGS flags and this seems to be
> caused by -march=native (or in my case, -march=znver2)?
> 
> make.conf fragment:
> 
> # COMMON_FLAGS="-O3 -march=znver2 -pipe -ggdb3" # original, bad
> # COMMON_FLAGS="" # 1. good
> # COMMON_FLAGS="-O3" # 2. good
> # COMMON_FLAGS="-O3 -march=znver2" # 3. bad
> # COMMON_FLAGS="-O3 -pipe" # 4. good
> COMMON_FLAGS="-O3 -pipe -ggdb3" # 5. good
> CFLAGS="${COMMON_FLAGS}"
> CXXFLAGS="${COMMON_FLAGS} -D_GLIBCXX_ASSERTIONS"
> 
> 
> gcc version:
> 
> gcc version 14.0.1 20240124 (experimental)
> 3de031c96f28f19a68ea2080260d8fd2c78828ee (Gentoo 14.0.1 p, commit
> ddeac849ac4c3fecdf591ab6fb075cc6c5afdbff)

just `-mavx -O2` seems to be enough for me to reproduce it.
Comment 12 Ionen Wolkens gentoo-dev 2024-02-03 03:04:51 UTC
Just a guess given haven't really looked at this yet, but if it's related to -mavx then I'd suspect [1] and [2] being related. [1] is probably missing something with gcc:14 or something like that.

[1] https://github.com/qt/qtquick3d/commit/7980cfd0
[2] https://github.com/qt/qtquick3d/blob/6b990522/src/3rdparty/embree/CMakeLists.txt#L64
Comment 13 Ionen Wolkens gentoo-dev 2024-02-03 03:15:07 UTC
Suppose that a lame workaround without disabling avx for the entire package or trying to figure out what needs disabling could be to just:

qt_internal_extend_target(BundledEmbree COMPILE_OPTIONS -mno-avx)
Comment 14 Ionen Wolkens gentoo-dev 2024-02-09 17:23:27 UTC
ftr this will be worked around alongside the 6.6.2 bump soon'ish, not planning to fix this in 6.6.1
Comment 15 Larry the Git Cow gentoo-dev 2024-02-14 12:24:55 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a12ca228ddf576fece46b4c133ea311cf3c7e6be

commit a12ca228ddf576fece46b4c133ea311cf3c7e6be
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2024-02-14 11:06:58 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2024-02-14 12:20:56 +0000

    dev-qt/qtquick3d: add 6.6.2
    
    Closes: https://bugs.gentoo.org/917407
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 dev-qt/qtquick3d/Manifest               |  1 +
 dev-qt/qtquick3d/qtquick3d-6.6.2.ebuild | 47 +++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37bd373cd33c36f8dd44e71be25fa6ea24cf4588

commit 37bd373cd33c36f8dd44e71be25fa6ea24cf4588
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2024-02-07 05:22:11 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2024-02-14 12:20:52 +0000

    dev-qt/qtquick3d: fix build with gcc14
    
    Bug: https://bugs.gentoo.org/917407
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 dev-qt/qtquick3d/files/qtquick3d-6.6.2-gcc14.patch | 23 ++++++++++++++++++++++
 dev-qt/qtquick3d/qtquick3d-6.6.9999.ebuild         |  4 ++++
 dev-qt/qtquick3d/qtquick3d-6.7.9999.ebuild         |  4 ++++
 dev-qt/qtquick3d/qtquick3d-6.9999.ebuild           |  4 ++++
 4 files changed, 35 insertions(+)