Skip to contentSkip to conversation

linux-next: build failure after merge of the drm-xe tree

DISCUSSION Mark Brown 3 participants 7 messages Jun 3 – Jun 5 Linux-next tree

lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

Hi all,

After merging the drm-xe tree, today's linux-next build (x86_64 allmodconfig) failed. Unfortunately I fat fingered things and deleted the logs, assuming the issue remains I'll report proprely tomorrow. I'm fairly sure the issue was due to:

5ff004fdc7377 (drm/xe/rtp: Add struct types for RTP tables)

with some of the fields in rtp_to_sr_cases[] haiving non-const values. Sorry about the lack of clarity here.

I have merged the version from next-20260602 instead.

author maintainer
#1 lore raw
Quoted 7 lines · Mark Brown

Hi all,

After merging the drm-xe tree, today's linux-next build (x86_64 allmodconfig) failed. Unfortunately I fat fingered things and deleted the logs, assuming the issue remains I'll report proprely tomorrow. I'm fairly sure the issue was due to:

Quoted 6 lines

5ff004fdc7377 (drm/xe/rtp: Add struct types for RTP tables)

with some of the fields in rtp_to_sr_cases[] haiving non-const values. Sorry about the lack of clarity here.

I have merged the version from next-20260602 instead.

The error message is:

/tmp/next/build/drivers/gpu/drm/xe/xe_hw_engine.c:361:6: error: initializer element is not a compile-time constant

  361 |                                  blit_cctl_val,
      |                                  ^~~~~~~~~~~~~

/tmp/next/build/drivers/gpu/drm/xe/xe_rtp.h:461:41: note: expanded from macro 'XE_RTP_ACTIONS'
461 | XE_RTP_PASTE_FOREACH(ACTION_, COMMA, (__VA_ARGS__)) \
| ^~~~~~~~~~~
/tmp/next/build/drivers/gpu/drm/xe/xe_rtp_helpers.h:56:108: note: expanded from macro 'XE_RTP_PASTE_FOREACH'
56 | #define XE_RTP_PASTE_FOREACH(prefix_, sep_, args_) _XE_RTP_CONCAT(PASTE_, COUNT_ARGS args_)(prefix_, sep_, args_)
| ^~~~~
/tmp/next/build/drivers/gpu/drm/xe/xe_rtp_helpers.h:57:80: note: expanded from macro 'XE_RTP_PASTE_1'
57 | #define XE_RTP_PASTE_1(prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, FIRST_ARG args_)
| ^~~~~
note: (skipping 11 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) /tmp/next/build/include/linux/compiler.h:204:39: note: expanded from macro '__is_array'
204 | #define __is_array(a) (!__same_type((a), &(a)[0]))
| ^
/tmp/next/build/include/linux/compiler_types.h:610:63: note: expanded from macro '__same_type'
610 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^
/tmp/next/build/include/linux/compiler.h:200:84: note: expanded from macro '__BUILD_BUG_ON_ZERO_MSG'
200 | #define __BUILD_BUG_ON_ZERO_MSG(e, msg, ...) ((int)sizeof(struct {_Static_assert(!(e), msg);}))
| ^
/tmp/next/build/drivers/gpu/drm/xe/xe_hw_engine.c:416:9: error: initializer element is not a compile-time constant

  416 |                                            ring_cmd_cctl_val,
      |                                            ^~~~~~~~~~~~~~~~~

/tmp/next/build/drivers/gpu/drm/xe/xe_rtp.h:461:41: note: expanded from macro 'XE_RTP_ACTIONS'
461 | XE_RTP_PASTE_FOREACH(ACTION_, COMMA, (__VA_ARGS__)) \
| ^~~~~~~~~~~
/tmp/next/build/drivers/gpu/drm/xe/xe_rtp_helpers.h:56:108: note: expanded from macro 'XE_RTP_PASTE_FOREACH'
56 | #define XE_RTP_PASTE_FOREACH(prefix_, sep_, args_) _XE_RTP_CONCAT(PASTE_, COUNT_ARGS args_)(prefix_, sep_, args_)
| ^~~~~
/tmp/next/build/drivers/gpu/drm/xe/xe_rtp_helpers.h:57:80: note: expanded from macro 'XE_RTP_PASTE_1'
57 | #define XE_RTP_PASTE_1(prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, FIRST_ARG args_)
| ^~~~~
note: (skipping 11 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) /tmp/next/build/include/linux/compiler.h:204:39: note: expanded from macro '__is_array'
204 | #define __is_array(a) (!__same_type((a), &(a)[0]))
| ^
/tmp/next/build/include/linux/compiler_types.h:610:63: note: expanded from macro '__same_type'
610 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^
/tmp/next/build/include/linux/compiler.h:200:84: note: expanded from macro '__BUILD_BUG_ON_ZERO_MSG'
200 | #define __BUILD_BUG_ON_ZERO_MSG(e, msg, ...) ((int)sizeof(struct {_Static_assert(!(e), msg);}))
| ^
2 errors generated.

#2 lore raw
Quoted 99 lines · Mark Brown
Quoted 9 lines · Mark Brown

Hi all,

After merging the drm-xe tree, today's linux-next build (x86_64 allmodconfig) failed.  Unfortunately I fat fingered things and deleted
the logs, assuming the issue remains I'll report proprely tomorrow.  I'm
fairly sure the issue was due to:

Quoted 7 lines

  5ff004fdc7377 (drm/xe/rtp: Add struct types for RTP tables)

with some of the fields in rtp_to_sr_cases[] haiving non-const values.
Sorry about the lack of clarity here.

I have merged the version from next-20260602 instead.

The error message is:

/tmp/next/build/drivers/gpu/drm/xe/xe_hw_engine.c:361:6: error:
initializer element is not a compile-time constant
  361 |                                  blit_cctl_val,
      |                                  ^~~~~~~~~~~~~ /tmp/next/build/drivers/gpu/drm/xe/xe_rtp.h:461:41: note: expanded from macro 'XE_RTP_ACTIONS'
  461 |                 XE_RTP_PASTE_FOREACH(ACTION_, COMMA, (__VA_ARGS__))     \
      |
^~~~~~~~~~~ /tmp/next/build/drivers/gpu/drm/xe/xe_rtp_helpers.h:56:108: note:
expanded from macro 'XE_RTP_PASTE_FOREACH'
   56 | #define XE_RTP_PASTE_FOREACH(prefix_, sep_, args_) _XE_RTP_CONCAT(PASTE_, COUNT_ARGS args_)(prefix_, sep_, args_)
|
                                        ^~~~~ /tmp/next/build/drivers/gpu/drm/xe/xe_rtp_helpers.h:57:80: note:
expanded from macro 'XE_RTP_PASTE_1'
   57 | #define XE_RTP_PASTE_1(prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, FIRST_ARG args_)

|
            ^~~~~
note: (skipping 11 expansions in backtrace; use -fmacro-backtrace- limit=0 to see all) /tmp/next/build/include/linux/compiler.h:204:39: note: expanded from macro '__is_array'
  204 | #define __is_array(a)           (!__same_type((a), &(a)[0])) |                                                ^ /tmp/next/build/include/linux/compiler_types.h:610:63: note: expanded from macro '__same_type'
  610 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
      |
^
/tmp/next/build/include/linux/compiler.h:200:84: note: expanded from macro '__BUILD_BUG_ON_ZERO_MSG'
  200 | #define __BUILD_BUG_ON_ZERO_MSG(e, msg, ...) ((int)sizeof(struct {_Static_assert(!(e), msg);}))

|
                ^ /tmp/next/build/drivers/gpu/drm/xe/xe_hw_engine.c:416:9: error:
initializer element is not a compile-time constant
  416 |                                            ring_cmd_cctl_val, |                                            ^~~~~~~~~~~~~~~~~ /tmp/next/build/drivers/gpu/drm/xe/xe_rtp.h:461:41: note: expanded from macro 'XE_RTP_ACTIONS'
  461 |                 XE_RTP_PASTE_FOREACH(ACTION_, COMMA, (__VA_ARGS__))     \
      |
^~~~~~~~~~~ /tmp/next/build/drivers/gpu/drm/xe/xe_rtp_helpers.h:56:108: note:
expanded from macro 'XE_RTP_PASTE_FOREACH'
   56 | #define XE_RTP_PASTE_FOREACH(prefix_, sep_, args_) _XE_RTP_CONCAT(PASTE_, COUNT_ARGS args_)(prefix_, sep_, args_)
|
                                        ^~~~~ /tmp/next/build/drivers/gpu/drm/xe/xe_rtp_helpers.h:57:80: note:
expanded from macro 'XE_RTP_PASTE_1'
   57 | #define XE_RTP_PASTE_1(prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, FIRST_ARG args_)

|
            ^~~~~
note: (skipping 11 expansions in backtrace; use -fmacro-backtrace- limit=0 to see all) /tmp/next/build/include/linux/compiler.h:204:39: note: expanded from macro '__is_array'
  204 | #define __is_array(a)           (!__same_type((a), &(a)[0])) |                                                ^ /tmp/next/build/include/linux/compiler_types.h:610:63: note: expanded from macro '__same_type'
  610 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
      |
^

Quoted 8 lines

/tmp/next/build/include/linux/compiler.h:200:84: note: expanded from macro '__BUILD_BUG_ON_ZERO_MSG'
  200 | #define __BUILD_BUG_ON_ZERO_MSG(e, msg, ...) ((int)sizeof(struct {_Static_assert(!(e), msg);}))

|
                ^
2 errors generated.

Funny, I see no build errors with drm-xe-next allmodconfig. What compiler is being used? Any sha1 of the drm-xe-next top commit you're testing?

Thanks,
Thomas

author maintainer
#3 lore raw
Quoted 10 lines · Thomas Hellström
Quoted 4 lines · Mark Brown

/tmp/next/build/include/linux/compiler.h:200:84: note: expanded from macro '__BUILD_BUG_ON_ZERO_MSG'
  200 | #define __BUILD_BUG_ON_ZERO_MSG(e, msg, ...) ((int)sizeof(struct {_Static_assert(!(e), msg);}))

Funny, I see no build errors with drm-xe-next allmodconfig. What compiler is being used? Any sha1 of the drm-xe-next top commit you're testing?

This is after merging the tree into -next, that'd be on top of 09b893db4d9e68c2679e76624d420f438f8d3e98 for today (not published yet). It's possible it's some interaction with other trees (like the main drm tree) and works as a standalone thing, it wasn't obviously that from a quick investigation. The toolchain is gcc from Debian stable.

#4 lore raw
Quoted 14 lines · Mark Brown
Quoted 8 lines · Thomas Hellström
Quoted 5 lines · Mark Brown

/tmp/next/build/include/linux/compiler.h:200:84: note: expanded from
macro '__BUILD_BUG_ON_ZERO_MSG'
  200 | #define __BUILD_BUG_ON_ZERO_MSG(e, msg, ...) ((int)sizeof(struct {_Static_assert(!(e), msg);}))

Quoted 4 lines

Funny, I see no build errors with drm-xe-next allmodconfig. What compiler is being used? Any sha1 of the drm-xe-next top commit you're
testing?

Quoted 8 lines

This is after merging the tree into -next, that'd be on top of 09b893db4d9e68c2679e76624d420f438f8d3e98 for today (not published yet).
It's possible it's some interaction with other trees (like the main drm
tree) and works as a standalone thing, it wasn't obviously that from a
quick investigation.  The toolchain is gcc from Debian stable.

So I merged drm-xe-next into next-20260603, and no build errors neither with gcc nor clang.

AI says it's confident that the error report is from clang, based on -fmacro-backtrace-limit suggestion and the "2 errors generated." summary, and suggests this might be an older clang version limitation?

Thanks,
Thomas

#5 lore raw
Quoted 24 lines · Thomas Hellström
Quoted 14 lines · Mark Brown
Quoted 8 lines · Thomas Hellström
Quoted 5 lines · Mark Brown

/tmp/next/build/include/linux/compiler.h:200:84: note: expanded from
macro '__BUILD_BUG_ON_ZERO_MSG'
  200 | #define __BUILD_BUG_ON_ZERO_MSG(e, msg, ...) ((int)sizeof(struct {_Static_assert(!(e), msg);}))

Quoted 4 lines

Funny, I see no build errors with drm-xe-next allmodconfig. What compiler is being used? Any sha1 of the drm-xe-next top commit you're
testing?

Quoted 8 lines

This is after merging the tree into -next, that'd be on top of 09b893db4d9e68c2679e76624d420f438f8d3e98 for today (not published yet).
It's possible it's some interaction with other trees (like the main drm
tree) and works as a standalone thing, it wasn't obviously that from a
quick investigation.  The toolchain is gcc from Debian stable.

Quoted 6 lines

So I merged drm-xe-next into next-20260603, and no build errors neither with gcc nor clang.

AI says it's confident that the error report is from clang, based on -fmacro-backtrace-limit suggestion and the "2 errors generated." summary, and suggests this might be an older clang version limitation?

Yeah, this is certainly clang. The kernel test robot also reported this:

https://lore.kernel.org/[email protected]/

It looks like this was only fixed in clang-21 with:

https://github.com/llvm/llvm-project/commit/977d8a4bcd83797217433709201922b9deb97ae2

according to my reverse bisect of clang. I am not really sure how to work around this at the moment, trying to read the preprocessed source is nearly impossible because of what REG_FIELD_PREP() expands to.

Signature · 2 lines
Cheers,
Nathan
author maintainer
#6 lore raw
In reply to Thomas Hellström
Quoted 6 lines · Thomas Hellström

So I merged drm-xe-next into next-20260603, and no build errors neither with gcc nor clang.

AI says it's confident that the error report is from clang, based on -fmacro-backtrace-limit suggestion and the "2 errors generated." summary, and suggests this might be an older clang version limitation?

Bah, sorry - it is actually clang, I changed it to that to avoid some issues with Rust getting disable due to interactions with sanitisers when building GCC. Apologies, I should have double checked or just remembered. This is clang 19 from Debian stable, our current minimum supported clang is clang 17. CCing in the clang people.