Bug 2416316 - expected unqualified-id before ‘inline’ on s390x
Summary: expected unqualified-id before ‘inline’ on s390x
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: onednn
Version: rawhide
Hardware: s390x
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nicolas Chauvet (kwizart)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-11-21 12:08 UTC by Nicolas Chauvet (kwizart)
Modified: 2025-11-21 16:37 UTC (History)
15 users (show)

Fixed In Version: onednn-3.10.1-2.fc44
Clone Of:
Environment:
Last Closed: 2025-11-21 16:37:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Nicolas Chauvet (kwizart) 2025-11-21 12:08:10 UTC
With the last onednn release, I have a compilation failure on s390xx (only) with:

---
[  7%] Building CXX object src/cpu/s390x/CMakeFiles/dnnl_cpu_zarch.dir/gemmu16.cpp.o
cd /builddir/build/BUILD/onednn-3.10.1-build/oneDNN-3.10.1/redhat-linux-build/src/cpu/s390x && /usr/bin/g++ -DCL_TARGET_OPENCL_VERSION=120 -DDNNL_DLL -DDNNL_DLL_EXPORTS -DDNNL_ENABLE_CPU_ISA_HINTS -DDNNL_ENABLE_MAX_CPU_ISA -DDNNL_S390X=1 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/builddir/build/BUILD/onednn-3.10.1-build/oneDNN-3.10.1/redhat-linux-build/include -I/builddir/build/BUILD/onednn-3.10.1-build/oneDNN-3.10.1/include -I/builddir/build/BUILD/onednn-3.10.1-build/oneDNN-3.10.1/third_party -I/builddir/build/BUILD/onednn-3.10.1-build/oneDNN-3.10.1/src -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection -fopenmp -fvisibility-inlines-hidden  -Wall -Wno-unknown-pragmas -Wundef -fvisibility=internal -Wno-ignored-attributes   -fPIC -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong  -Wmissing-field-initializers  -Wno-strict-overflow -Wno-maybe-uninitialized -Wno-stringop-overflow -Wno-array-bounds  -DNDEBUG -std=c++11 -O3 -funroll-loops -MD -MT src/cpu/s390x/CMakeFiles/dnnl_cpu_zarch.dir/gemmu16.cpp.o -MF CMakeFiles/dnnl_cpu_zarch.dir/gemmu16.cpp.o.d -o CMakeFiles/dnnl_cpu_zarch.dir/gemmu16.cpp.o -c /builddir/build/BUILD/onednn-3.10.1-build/oneDNN-3.10.1/src/cpu/s390x/gemmu16.cpp
In file included from /builddir/build/BUILD/onednn-3.10.1-build/oneDNN-3.10.1/src/common/dnnl_thread.hpp:24,
                 from /builddir/build/BUILD/onednn-3.10.1-build/oneDNN-3.10.1/src/cpu/s390x/gemmu16.cpp:20:
/builddir/build/BUILD/onednn-3.10.1-build/oneDNN-3.10.1/src/common/utils.hpp:101:23: error: expected unqualified-id before ‘inline’ [-Wtemplate-body]
  101 | #define ALWAYS_INLINE inline __attribute__((always_inline))
      |                       ^~~~~~
/builddir/build/BUILD/onednn-3.10.1-build/oneDNN-3.10.1/src/cpu/s390x/helpers.h:79:20: note: in expansion of macro ‘ALWAYS_INLINE’
   79 |     vec_type_t<T> &ALWAYS_INLINE operator+=(const vec_type_t<T> &other) {
      |                    ^~~~~~~~~~~~~
In file included from /builddir/build/BUILD/onednn-3.10.1-build/oneDNN-3.10.1/src/cpu/s390x/gemmu16.cpp:21:
---

I don't see any obvious code change related to this s390xx part that could explain the failure

Reproducible: Always

Steps to Reproduce:
1. fedpkg clone onednn
2. fedpkg build
3.
Actual Results:
Build failure at
https://koji.fedoraproject.org/koji/taskinfo?taskID=139127659

Expected Results:
build should succeed.

Comment 1 Jonathan Wakely 2025-11-21 12:20:23 UTC
(In reply to Nicolas Chauvet (kwizart) from comment #0)
> /builddir/build/BUILD/onednn-3.10.1-build/oneDNN-3.10.1/src/cpu/s390x/
> helpers.h:79:20: note: in expansion of macro ‘ALWAYS_INLINE’
>    79 |     vec_type_t<T> &ALWAYS_INLINE operator+=(const vec_type_t<T>
> &other) {
>       |                    ^~~~~~~~~~~~~
> In file included from
> /builddir/build/BUILD/onednn-3.10.1-build/oneDNN-3.10.1/src/cpu/s390x/
> gemmu16.cpp:21:
> ---
> 
> I don't see any obvious code change related to this s390xx part that could
> explain the failure

It's coming from a header called "cpu/s390x/helpers.h" which seems pretty obviouslu specific to s390x.

The position of the ALWAYS_INLINE macro is very strange, could you try changing it to:

ALWAYS_INLINE vec_type_t<T> & operator+=(const vec_type_t<T> &other) {

Comment 2 Jonathan Wakely 2025-11-21 12:23:49 UTC
https://github.com/uxlfoundation/oneDNN/commit/e5542695163c36a09daa5aa77ce3ba86d21f29b4 changed ALWAYS_INLINE

Comment 4 Jonathan Wakely 2025-11-21 14:09:36 UTC
This upstream PR should fix it:
https://github.com/uxlfoundation/oneDNN/pull/4364

Comment 5 Nicolas Chauvet (kwizart) 2025-11-21 14:44:58 UTC
Thanks, applied

Rawhide build in progress https://koji.fedoraproject.org/koji/taskinfo?taskID=139131863

Comment 6 Nicolas Chauvet (kwizart) 2025-11-21 14:46:52 UTC
Re-assigned to onednn component

Comment 7 Fedora Update System 2025-11-21 16:35:18 UTC
FEDORA-2025-97f3085995 (onednn-3.10.1-2.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-97f3085995

Comment 8 Fedora Update System 2025-11-21 16:37:14 UTC
FEDORA-2025-97f3085995 (onednn-3.10.1-2.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.