Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 838241 - dev-libs/intel-compute-runtime-22-*-*: fails to build with LTO (i915_drm.h:2951: error: type ‘struct drm_i915_gem_create_ext’ violates the C++ One Definition Rule [-Werror=odr])
Summary: dev-libs/intel-compute-runtime-22-*-*: fails to build with LTO (i915_drm.h:29...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jan Henke
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2022-04-13 19:05 UTC by Randall
Modified: 2022-12-10 01:04 UTC (History)
2 users (show)

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


Attachments
[dev-libs/intel-compute-runtime-22.14.22890] build.log (file_838241.txt,453.25 KB, text/plain)
2022-04-13 19:06 UTC, Randall
Details
[dev-libs/intel-compute-runtime-22.13.22789] build.log (file_838241.txt,500.64 KB, text/plain)
2022-04-13 19:07 UTC, Randall
Details
[dev-libs/intel-compute-runtime-22.12.22749] build.log (file_838241.txt,443.74 KB, text/plain)
2022-04-13 19:08 UTC, Randall
Details
[dev-libs/intel-compute-runtime-21.46.21636-r1] build.log (file_838241.txt,307.68 KB, text/plain)
2022-04-13 19:09 UTC, Randall
Details
intel-compute-runtime-22.43.24558-r0 build log with lto filter canceled (dev-libs:intel-compute-runtime-22.43.24558-r0:20221208-223311.log.gz,81.65 KB, application/gzip)
2022-12-08 22:31 UTC, CaptainBlood
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Randall 2022-04-13 19:05:34 UTC
Compiling any of the 'dev-libs/intel-compute-runtime-22.*.*' ebuilds with LTO *FLAGS produces fail with `error: lto-wrapper failed`.

Tested with version: 22.14.22890, 22.13.22789, 22.12.22749

This may also be a good addition for `21.*.*` but currently (on my system) the ebuild fails for a different reason before getting to the point to even give `lto-wrapper` to fail. Regardless, I attached still attached my build.log for `21.46.21636-r1`, but I did not modify `21.46.21636-r1` in the PR.

Reproducible: Always
Comment 1 Randall 2022-04-13 19:06:28 UTC
Created attachment 770663 [details]
[dev-libs/intel-compute-runtime-22.14.22890] build.log
Comment 2 Randall 2022-04-13 19:07:26 UTC
Created attachment 770666 [details]
[dev-libs/intel-compute-runtime-22.13.22789] build.log
Comment 3 Randall 2022-04-13 19:08:32 UTC
Created attachment 770669 [details]
[dev-libs/intel-compute-runtime-22.12.22749] build.log
Comment 4 Randall 2022-04-13 19:09:36 UTC
Created attachment 770672 [details]
[dev-libs/intel-compute-runtime-21.46.21636-r1] build.log
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-13 21:21:12 UTC
FWIW, the real error is:
>../compute-runtime-22.14.22890/third_party/uapi/drm/i915_drm.h:2951: error: >type ‘struct drm_i915_gem_create_ext’ violates the C++ One Definition Rule >[-Werror=odr]
> 2951 | struct drm_i915_gem_create_ext {

which is a serious upstream bug and should be reported there.
Comment 6 Randall 2022-04-13 21:37:45 UTC
(In reply to Sam James from comment #5)

> which is a serious upstream bug and should be reported there.
Comment 7 Larry the Git Cow gentoo-dev 2022-04-14 20:53:24 UTC
The bug has been closed via the following commit(s):

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

commit 0277f8d599a2f3834668430ca63f2d87c3c1d6dc
Author:     Randall Vasquez <ran.dall@icloud.com>
AuthorDate: 2022-04-13 19:18:21 +0000
Commit:     Conrad Kostecki <conikost@gentoo.org>
CommitDate: 2022-04-14 20:52:10 +0000

    dev-libs/intel-compute-runtime-22.*.*: Filter LTO flags
    
    Closes: https://bugs.gentoo.org/838241
    Signed-off-by: Randall Vasquez <ran.dall@icloud.com>
    Closes: https://github.com/gentoo/gentoo/pull/25018
    Signed-off-by: Conrad Kostecki <conikost@gentoo.org>

 .../intel-compute-runtime/intel-compute-runtime-22.12.22749.ebuild   | 5 ++++-
 .../intel-compute-runtime/intel-compute-runtime-22.13.22789.ebuild   | 5 ++++-
 .../intel-compute-runtime/intel-compute-runtime-22.14.22890.ebuild   | 5 ++++-
 3 files changed, 12 insertions(+), 3 deletions(-)
Comment 8 CaptainBlood 2022-12-08 22:31:52 UTC
Created attachment 841025 [details]
intel-compute-runtime-22.43.24558-r0 build log with lto filter canceled

lto-filter cancelation has been building fine here for a little while:

As a side note:

pckllbin intel-compute-runtime #lto filtered
-rwxr-xr-x 1 root root 14392 déc.   9 02:18 /usr/bin/ocloc
-rwxr-xr-x 1 root root 10705936 déc.   9 02:18 /usr/lib64/intel-opencl/libigdrcl.so
-rwxr-xr-x 1 root root 1162576 déc.   9 02:18 /usr/lib64/libocloc.so
-rwxr-xr-x 1 root root 9525752 déc.   9 02:18 /usr/lib64/libze_intel_gpu.so.1.3.0
 * dev-libs/intel-compute-runtime-22.43.24558-r0
         Total files : 20
         Total size  : 21 MiB

pckllbin intel-compute-runtime #lto filtering cancelled
-rwxr-xr-x 1 root root 14392 déc.   9 01:54 /usr/bin/ocloc
-rwxr-xr-x 1 root root 9005968 déc.   9 01:54 /usr/lib64/intel-opencl/libigdrcl.so
-rwxr-xr-x 1 root root 908952 déc.   9 01:54 /usr/lib64/libocloc.so
-rwxr-xr-x 1 root root 8102984 déc.   9 01:54 /usr/lib64/libze_intel_gpu.so.1.3.0
 * dev-libs/intel-compute-runtime-22.43.24558-r0
         Total files : 20
         Total size  : 17.78 MiB
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-09 06:50:16 UTC
It doesn't matter if it builds fine unless you use the same -Werror flags which cause failure when there's likely runtime problems.
Comment 10 CaptainBlood 2022-12-10 00:54:34 UTC
Right.
rebuild fine twice here,
1) -Wall
2) -Werror

Maybe this is incorrect testing though.
build log files available upon request

Intel has acknowledged the issue a while ago...

I have a feeling build log reported here have heavily tweaked build flags.
I may be mistaken, though.

And I have no time to spend trying to accurately match them, sorry.
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-10 01:04:07 UTC
(In reply to CaptainBlood from comment #10)
> Right.
> rebuild fine twice here,
> 1) -Wall
> 2) -Werror
> 
> Maybe this is incorrect testing though.
> build log files available upon request

You have to specifically pass -Werror=odr and the other flags on https://wiki.gentoo.org/wiki/Project:Toolchain/LTO.

> 
> Intel has acknowledged the issue a while ago...
> 
> I have a feeling build log reported here have heavily tweaked build flags.
> I may be mistaken, though.
> 
> And I have no time to spend trying to accurately match them, sorry.

OK, please leave your comments out then?
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-10 01:04:39 UTC
(In reply to CaptainBlood from comment #10)
> Intel has acknowledged the issue a while ago...
> 

You can see at https://github.com/intel/compute-runtime/issues/528 that it's not fixed.