linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, compound_head) == offsetof(struct folio, lru)"
@ 2022-02-13 11:00 kernel test robot
  2022-02-13 12:19 ` Matthew Wilcox
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2022-02-13 11:00 UTC (permalink / raw)
  To: Matthew Wilcox (Oracle)
  Cc: kbuild-all, linux-kernel, William Kucharski, Christoph Hellwig,
	David Howells

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b81b1829e7e39f6cebdf6e4d5484eacbceda8554
commit: 7b230db3b8d373219f88a3d25c8fbbf12cc7f233 mm: Introduce struct folio
date:   5 months ago
config: parisc-randconfig-r004-20220213 (https://download.01.org/0day-ci/archive/20220213/202202131828.VxAopBqR-lkp@intel.com/config)
compiler: hppa64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7b230db3b8d373219f88a3d25c8fbbf12cc7f233
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 7b230db3b8d373219f88a3d25c8fbbf12cc7f233
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc prepare

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/parisc/include/asm/bitops.h:203,
                    from include/linux/bitops.h:33,
                    from include/linux/kernel.h:12,
                    from arch/parisc/include/asm/bug.h:5,
                    from include/linux/bug.h:5,
                    from include/linux/page-flags.h:10,
                    from kernel/bounds.c:10:
   include/asm-generic/bitops/__fls.h: In function '__fls':
   include/asm-generic/bitops/__fls.h:18:28: warning: left shift count >= width of type [-Wshift-count-overflow]
      18 |         if (!(word & (~0ul << 32))) {
         |                            ^~
   include/asm-generic/bitops/__fls.h:20:22: warning: left shift count >= width of type [-Wshift-count-overflow]
      20 |                 word <<= 32;
         |                      ^~~
   include/asm-generic/bitops/__fls.h:23:28: warning: left shift count >= width of type [-Wshift-count-overflow]
      23 |         if (!(word & (~0ul << (BITS_PER_LONG-16)))) {
         |                            ^~
   include/asm-generic/bitops/__fls.h:27:28: warning: left shift count >= width of type [-Wshift-count-overflow]
      27 |         if (!(word & (~0ul << (BITS_PER_LONG-8)))) {
         |                            ^~
   include/asm-generic/bitops/__fls.h:31:28: warning: left shift count >= width of type [-Wshift-count-overflow]
      31 |         if (!(word & (~0ul << (BITS_PER_LONG-4)))) {
         |                            ^~
   include/asm-generic/bitops/__fls.h:35:28: warning: left shift count >= width of type [-Wshift-count-overflow]
      35 |         if (!(word & (~0ul << (BITS_PER_LONG-2)))) {
         |                            ^~
   include/asm-generic/bitops/__fls.h:39:28: warning: left shift count >= width of type [-Wshift-count-overflow]
      39 |         if (!(word & (~0ul << (BITS_PER_LONG-1))))
         |                            ^~
   In file included from arch/parisc/include/asm/bitops.h:203,
                    from include/linux/bitops.h:33,
                    from include/linux/kernel.h:12,
                    from arch/parisc/include/asm/bug.h:5,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/parisc/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from arch/parisc/kernel/asm-offsets.c:18:
   include/asm-generic/bitops/__fls.h: In function '__fls':
   include/asm-generic/bitops/__fls.h:18:28: warning: left shift count >= width of type [-Wshift-count-overflow]
      18 |         if (!(word & (~0ul << 32))) {
         |                            ^~
   include/asm-generic/bitops/__fls.h:20:22: warning: left shift count >= width of type [-Wshift-count-overflow]
      20 |                 word <<= 32;
         |                      ^~~
   include/asm-generic/bitops/__fls.h:23:28: warning: left shift count >= width of type [-Wshift-count-overflow]
      23 |         if (!(word & (~0ul << (BITS_PER_LONG-16)))) {
         |                            ^~
   include/asm-generic/bitops/__fls.h:27:28: warning: left shift count >= width of type [-Wshift-count-overflow]
      27 |         if (!(word & (~0ul << (BITS_PER_LONG-8)))) {
         |                            ^~
   include/asm-generic/bitops/__fls.h:31:28: warning: left shift count >= width of type [-Wshift-count-overflow]
      31 |         if (!(word & (~0ul << (BITS_PER_LONG-4)))) {
         |                            ^~
   include/asm-generic/bitops/__fls.h:35:28: warning: left shift count >= width of type [-Wshift-count-overflow]
      35 |         if (!(word & (~0ul << (BITS_PER_LONG-2)))) {
         |                            ^~
   include/asm-generic/bitops/__fls.h:39:28: warning: left shift count >= width of type [-Wshift-count-overflow]
      39 |         if (!(word & (~0ul << (BITS_PER_LONG-1))))
         |                            ^~
   In file included from arch/parisc/include/asm/processor.h:17,
                    from arch/parisc/include/asm/thread_info.h:8,
                    from include/linux/thread_info.h:60,
                    from include/asm-generic/current.h:5,
                    from ./arch/parisc/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from arch/parisc/kernel/asm-offsets.c:18:
   arch/parisc/include/asm/pdc.h: At top level:
   arch/parisc/include/asm/pdc.h:75:24: warning: 'struct pdc_memory_table' declared inside parameter list will not be visible outside of this definition or declaration
      75 |                 struct pdc_memory_table *tbl, unsigned long entries);
         |                        ^~~~~~~~~~~~~~~~
   arch/parisc/include/asm/pdc.h:74:30: warning: 'struct pdc_memory_table_raddr' declared inside parameter list will not be visible outside of this definition or declaration
      74 | int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr,
         |                              ^~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/compiler_types.h:65,
                    from <command-line>:
   include/linux/smp.h:34:33: error: requested alignment '20' is not a positive power of 2
      34 |         __aligned(sizeof(struct __call_single_data));
         |                                 ^~~~~~~~~~~~~~~~~~
   include/linux/compiler_attributes.h:33:68: note: in definition of macro '__aligned'
      33 | #define __aligned(x)                    __attribute__((__aligned__(x)))
         |                                                                    ^
   In file included from include/linux/bits.h:22,
                    from include/linux/bitops.h:6,
                    from include/linux/kernel.h:12,
                    from arch/parisc/include/asm/bug.h:5,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/parisc/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from arch/parisc/kernel/asm-offsets.c:18:
>> include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, lru) == offsetof(struct folio, lru)"
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
      77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                  ^~~~~~~~~~~~~~~
   include/linux/mm_types.h:289:9: note: in expansion of macro 'static_assert'
     289 |         static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
         |         ^~~~~~~~~~~~~
   include/linux/mm_types.h:291:1: note: in expansion of macro 'FOLIO_MATCH'
     291 | FOLIO_MATCH(lru, lru);
         | ^~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, compound_head) == offsetof(struct folio, lru)"
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
      77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                  ^~~~~~~~~~~~~~~
   include/linux/mm_types.h:289:9: note: in expansion of macro 'static_assert'
     289 |         static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
         |         ^~~~~~~~~~~~~
   include/linux/mm_types.h:292:1: note: in expansion of macro 'FOLIO_MATCH'
     292 | FOLIO_MATCH(compound_head, lru);
         | ^~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, index) == offsetof(struct folio, index)"
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
      77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                  ^~~~~~~~~~~~~~~
   include/linux/mm_types.h:289:9: note: in expansion of macro 'static_assert'
     289 |         static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
         |         ^~~~~~~~~~~~~
   include/linux/mm_types.h:293:1: note: in expansion of macro 'FOLIO_MATCH'
     293 | FOLIO_MATCH(index, index);
         | ^~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, private) == offsetof(struct folio, private)"
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
      77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                  ^~~~~~~~~~~~~~~
   include/linux/mm_types.h:289:9: note: in expansion of macro 'static_assert'
     289 |         static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
         |         ^~~~~~~~~~~~~
   include/linux/mm_types.h:294:1: note: in expansion of macro 'FOLIO_MATCH'
     294 | FOLIO_MATCH(private, private);
         | ^~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, _mapcount) == offsetof(struct folio, _mapcount)"
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
      77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                  ^~~~~~~~~~~~~~~
   include/linux/mm_types.h:289:9: note: in expansion of macro 'static_assert'
     289 |         static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
         |         ^~~~~~~~~~~~~
   include/linux/mm_types.h:295:1: note: in expansion of macro 'FOLIO_MATCH'
     295 | FOLIO_MATCH(_mapcount, _mapcount);
         | ^~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, _refcount) == offsetof(struct folio, _refcount)"
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
      77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                  ^~~~~~~~~~~~~~~
   include/linux/mm_types.h:289:9: note: in expansion of macro 'static_assert'
     289 |         static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
         |         ^~~~~~~~~~~~~
   include/linux/mm_types.h:296:1: note: in expansion of macro 'FOLIO_MATCH'
     296 | FOLIO_MATCH(_refcount, _refcount);
         | ^~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, memcg_data) == offsetof(struct folio, memcg_data)"
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
      77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                  ^~~~~~~~~~~~~~~
   include/linux/mm_types.h:289:9: note: in expansion of macro 'static_assert'
     289 |         static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
         |         ^~~~~~~~~~~~~
   include/linux/mm_types.h:298:1: note: in expansion of macro 'FOLIO_MATCH'
     298 | FOLIO_MATCH(memcg_data, memcg_data);
         | ^~~~~~~~~~~
   In file included from include/linux/mm.h:33,
                    from include/linux/pid_namespace.h:7,
                    from include/linux/ptrace.h:10,
                    from arch/parisc/kernel/asm-offsets.c:20:
   include/linux/pgtable.h: In function 'pud_index':
   include/linux/pgtable.h:77:25: warning: right shift count >= width of type [-Wshift-count-overflow]
      77 |         return (address >> PUD_SHIFT) & (PTRS_PER_PUD - 1);
         |                         ^~
   include/linux/pgtable.h: In function 'pgd_offset_pgd':
   include/linux/pgtable.h:84:29: warning: right shift count >= width of type [-Wshift-count-overflow]
      84 | #define pgd_index(a)  (((a) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1))
         |                             ^~
   include/linux/pgtable.h:124:23: note: in expansion of macro 'pgd_index'
     124 |         return (pgd + pgd_index(address));
         |                       ^~~~~~~~~
   In file included from include/linux/stringhash.h:7,
                    from include/linux/dcache.h:15,
                    from include/linux/fs.h:8,
                    from include/linux/huge_mm.h:8,
                    from include/linux/mm.h:727,
                    from include/linux/pid_namespace.h:7,
                    from include/linux/ptrace.h:10,
                    from arch/parisc/kernel/asm-offsets.c:20:
   include/linux/hash.h: In function 'hash32_ptr':
   include/linux/hash.h:99:21: warning: right shift count >= width of type [-Wshift-count-overflow]
      99 |         val ^= (val >> 32);
         |                     ^~
   In file included from arch/parisc/kernel/asm-offsets.c:22:
   arch/parisc/kernel/asm-offsets.c: In function 'main':
   arch/parisc/kernel/asm-offsets.c:270:43: warning: right shift count >= width of type [-Wshift-count-overflow]
     270 |         DEFINE(ASM_PGD_ENTRY, PAGE_OFFSET >> PGDIR_SHIFT);
         |                                           ^~
   include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
       6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
         |                                                                     ^~~
   make[2]: *** [scripts/Makefile.build:121: arch/parisc/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1219: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:219: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +78 include/linux/build_bug.h

bc6245e5efd70c Ian Abbott       2017-07-10  60  
6bab69c65013be Rasmus Villemoes 2019-03-07  61  /**
6bab69c65013be Rasmus Villemoes 2019-03-07  62   * static_assert - check integer constant expression at build time
6bab69c65013be Rasmus Villemoes 2019-03-07  63   *
6bab69c65013be Rasmus Villemoes 2019-03-07  64   * static_assert() is a wrapper for the C11 _Static_assert, with a
6bab69c65013be Rasmus Villemoes 2019-03-07  65   * little macro magic to make the message optional (defaulting to the
6bab69c65013be Rasmus Villemoes 2019-03-07  66   * stringification of the tested expression).
6bab69c65013be Rasmus Villemoes 2019-03-07  67   *
6bab69c65013be Rasmus Villemoes 2019-03-07  68   * Contrary to BUILD_BUG_ON(), static_assert() can be used at global
6bab69c65013be Rasmus Villemoes 2019-03-07  69   * scope, but requires the expression to be an integer constant
6bab69c65013be Rasmus Villemoes 2019-03-07  70   * expression (i.e., it is not enough that __builtin_constant_p() is
6bab69c65013be Rasmus Villemoes 2019-03-07  71   * true for expr).
6bab69c65013be Rasmus Villemoes 2019-03-07  72   *
6bab69c65013be Rasmus Villemoes 2019-03-07  73   * Also note that BUILD_BUG_ON() fails the build if the condition is
6bab69c65013be Rasmus Villemoes 2019-03-07  74   * true, while static_assert() fails the build if the expression is
6bab69c65013be Rasmus Villemoes 2019-03-07  75   * false.
6bab69c65013be Rasmus Villemoes 2019-03-07  76   */
6bab69c65013be Rasmus Villemoes 2019-03-07  77  #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
6bab69c65013be Rasmus Villemoes 2019-03-07 @78  #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
6bab69c65013be Rasmus Villemoes 2019-03-07  79  

:::::: The code at line 78 was first introduced by commit
:::::: 6bab69c65013bed5fce9f101a64a84d0385b3946 build_bug.h: add wrapper for _Static_assert

:::::: TO: Rasmus Villemoes <linux@rasmusvillemoes.dk>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, compound_head) == offsetof(struct folio, lru)"
  2022-02-13 11:00 include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, compound_head) == offsetof(struct folio, lru)" kernel test robot
@ 2022-02-13 12:19 ` Matthew Wilcox
  2022-02-13 13:21   ` [kbuild-all] " Philip Li
  2022-02-14  6:28   ` Chen, Rong A
  0 siblings, 2 replies; 4+ messages in thread
From: Matthew Wilcox @ 2022-02-13 12:19 UTC (permalink / raw)
  To: kernel test robot
  Cc: kbuild-all, linux-kernel, William Kucharski, Christoph Hellwig,
	David Howells

On Sun, Feb 13, 2022 at 07:00:16PM +0800, kernel test robot wrote:
> config: parisc-randconfig-r004-20220213 (https://download.01.org/0day-ci/archive/20220213/202202131828.VxAopBqR-lkp@intel.com/config)
> compiler: hppa64-linux-gcc (GCC) 11.2.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7b230db3b8d373219f88a3d25c8fbbf12cc7f233
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout 7b230db3b8d373219f88a3d25c8fbbf12cc7f233
>         # save the config file to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc prepare

There's something weird going on here.

If I just download & install gcc-11-hppa64-linux-gnu from Debian, this
config file builds just fine.

If I invoke make.cross as you have it here, I see the same error you
report.

Adding 'V=1' to this, shows:
  sh ../scripts/atomic/check-atomics.sh
  /home/willy/0day/gcc-9.3.0-nolibc/hppa-linux/bin/hppa-linux-gcc [...]

which is weird, right?  It's not hppa64, and it's not gcc-11.2.  So my
suspicion here is that there's some bug in your tooling which is reporting
a bogus error.  You're probably better situated to debug this further
than I am.

Oh, and I checked, in case the filename was confusing me:
$ /home/willy/0day/gcc-9.3.0-nolibc/hppa-linux/bin/hppa-linux-gcc -v
Using built-in specs.
COLLECT_GCC=/home/willy/0day/gcc-9.3.0-nolibc/hppa-linux/bin/hppa-linux-gcc
COLLECT_LTO_WRAPPER=/home/willy/0day/gcc-9.3.0-nolibc/hppa-linux/bin/../libexec/gcc/hppa-linux/9.3.0/lto-wrapper
Target: hppa-linux
Configured with: /tmp/build-crosstools-xh/gcc/gcc-9.3.0/configure --target=hppa-linux --enable-targets=all --prefix=/tmp/build-crosstools-xh/cross --enable-languages=c --without-headers --disable-bootstrap --disable-nls --disable-threads --disable-shared --disable-libmudflap --disable-libssp --disable-libgomp --disable-decimal-float --disable-libquadmath --disable-libatomic --disable-libcc1 --disable-libmpx --enable-checking=release
Thread model: single
gcc version 9.3.0 (GCC)

So it really is a 32-bit hppa build, and it really is gcc 9.3, not 11.2.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [kbuild-all] Re: include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, compound_head) == offsetof(struct folio, lru)"
  2022-02-13 12:19 ` Matthew Wilcox
@ 2022-02-13 13:21   ` Philip Li
  2022-02-14  6:28   ` Chen, Rong A
  1 sibling, 0 replies; 4+ messages in thread
From: Philip Li @ 2022-02-13 13:21 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: kernel test robot, kbuild-all, linux-kernel, William Kucharski,
	Christoph Hellwig, David Howells

On Sun, Feb 13, 2022 at 12:19:38PM +0000, Matthew Wilcox wrote:
> On Sun, Feb 13, 2022 at 07:00:16PM +0800, kernel test robot wrote:
> > config: parisc-randconfig-r004-20220213 (https://download.01.org/0day-ci/archive/20220213/202202131828.VxAopBqR-lkp@intel.com/config)
> > compiler: hppa64-linux-gcc (GCC) 11.2.0
> > reproduce (this is a W=1 build):
> >         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> >         chmod +x ~/bin/make.cross
> >         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7b230db3b8d373219f88a3d25c8fbbf12cc7f233
> >         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> >         git fetch --no-tags linus master
> >         git checkout 7b230db3b8d373219f88a3d25c8fbbf12cc7f233
> >         # save the config file to linux build tree
> >         mkdir build_dir
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc prepare
> 
> There's something weird going on here.
> 
> If I just download & install gcc-11-hppa64-linux-gnu from Debian, this
> config file builds just fine.
> 
> If I invoke make.cross as you have it here, I see the same error you
> report.

Sorry for the confusion here, we recently updated the way to build parisc
64 bit in the right way. But the change to make.cross (for reproducer) is
still under review.

We will double check this report and update make.cross to provide update
to you.

> 
> Adding 'V=1' to this, shows:
>   sh ../scripts/atomic/check-atomics.sh
>   /home/willy/0day/gcc-9.3.0-nolibc/hppa-linux/bin/hppa-linux-gcc [...]
> 
> which is weird, right?  It's not hppa64, and it's not gcc-11.2.  So my
> suspicion here is that there's some bug in your tooling which is reporting
> a bogus error.  You're probably better situated to debug this further
> than I am.
> 
> Oh, and I checked, in case the filename was confusing me:
> $ /home/willy/0day/gcc-9.3.0-nolibc/hppa-linux/bin/hppa-linux-gcc -v
> Using built-in specs.
> COLLECT_GCC=/home/willy/0day/gcc-9.3.0-nolibc/hppa-linux/bin/hppa-linux-gcc
> COLLECT_LTO_WRAPPER=/home/willy/0day/gcc-9.3.0-nolibc/hppa-linux/bin/../libexec/gcc/hppa-linux/9.3.0/lto-wrapper
> Target: hppa-linux
> Configured with: /tmp/build-crosstools-xh/gcc/gcc-9.3.0/configure --target=hppa-linux --enable-targets=all --prefix=/tmp/build-crosstools-xh/cross --enable-languages=c --without-headers --disable-bootstrap --disable-nls --disable-threads --disable-shared --disable-libmudflap --disable-libssp --disable-libgomp --disable-decimal-float --disable-libquadmath --disable-libatomic --disable-libcc1 --disable-libmpx --enable-checking=release
> Thread model: single
> gcc version 9.3.0 (GCC)
> 
> So it really is a 32-bit hppa build, and it really is gcc 9.3, not 11.2.
> _______________________________________________
> kbuild-all mailing list -- kbuild-all@lists.01.org
> To unsubscribe send an email to kbuild-all-leave@lists.01.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [kbuild-all] Re: include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, compound_head) == offsetof(struct folio, lru)"
  2022-02-13 12:19 ` Matthew Wilcox
  2022-02-13 13:21   ` [kbuild-all] " Philip Li
@ 2022-02-14  6:28   ` Chen, Rong A
  1 sibling, 0 replies; 4+ messages in thread
From: Chen, Rong A @ 2022-02-14  6:28 UTC (permalink / raw)
  To: Matthew Wilcox, kernel test robot
  Cc: kbuild-all, linux-kernel, William Kucharski, Christoph Hellwig,
	David Howells



On 2/13/2022 8:19 PM, Matthew Wilcox wrote:
> On Sun, Feb 13, 2022 at 07:00:16PM +0800, kernel test robot wrote:
>> config: parisc-randconfig-r004-20220213 (https://download.01.org/0day-ci/archive/20220213/202202131828.VxAopBqR-lkp@intel.com/config)
>> compiler: hppa64-linux-gcc (GCC) 11.2.0
>> reproduce (this is a W=1 build):
>>          wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>          chmod +x ~/bin/make.cross
>>          # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7b230db3b8d373219f88a3d25c8fbbf12cc7f233
>>          git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>          git fetch --no-tags linus master
>>          git checkout 7b230db3b8d373219f88a3d25c8fbbf12cc7f233
>>          # save the config file to linux build tree
>>          mkdir build_dir
>>          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc prepare
> 
> There's something weird going on here.

Hi Matthew,

Sorry for the inconvenience, it's a false positive, the problem is
ARCH=parisc was used to build the 64 bit kernel.

the actual command should be:
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross 
O=build_dir ARCH=parisc64 prepare

Best Regards,
Rong Chen

> 
> If I just download & install gcc-11-hppa64-linux-gnu from Debian, this
> config file builds just fine.
> 
> If I invoke make.cross as you have it here, I see the same error you
> report.
> 
> Adding 'V=1' to this, shows:
>    sh ../scripts/atomic/check-atomics.sh
>    /home/willy/0day/gcc-9.3.0-nolibc/hppa-linux/bin/hppa-linux-gcc [...]
> 
> which is weird, right?  It's not hppa64, and it's not gcc-11.2.  So my
> suspicion here is that there's some bug in your tooling which is reporting
> a bogus error.  You're probably better situated to debug this further
> than I am.
> 
> Oh, and I checked, in case the filename was confusing me:
> $ /home/willy/0day/gcc-9.3.0-nolibc/hppa-linux/bin/hppa-linux-gcc -v
> Using built-in specs.
> COLLECT_GCC=/home/willy/0day/gcc-9.3.0-nolibc/hppa-linux/bin/hppa-linux-gcc
> COLLECT_LTO_WRAPPER=/home/willy/0day/gcc-9.3.0-nolibc/hppa-linux/bin/../libexec/gcc/hppa-linux/9.3.0/lto-wrapper
> Target: hppa-linux
> Configured with: /tmp/build-crosstools-xh/gcc/gcc-9.3.0/configure --target=hppa-linux --enable-targets=all --prefix=/tmp/build-crosstools-xh/cross --enable-languages=c --without-headers --disable-bootstrap --disable-nls --disable-threads --disable-shared --disable-libmudflap --disable-libssp --disable-libgomp --disable-decimal-float --disable-libquadmath --disable-libatomic --disable-libcc1 --disable-libmpx --enable-checking=release
> Thread model: single
> gcc version 9.3.0 (GCC)
> 
> So it really is a 32-bit hppa build, and it really is gcc 9.3, not 11.2.
> _______________________________________________
> kbuild-all mailing list -- kbuild-all@lists.01.org
> To unsubscribe send an email to kbuild-all-leave@lists.01.org
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-14  6:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-13 11:00 include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, compound_head) == offsetof(struct folio, lru)" kernel test robot
2022-02-13 12:19 ` Matthew Wilcox
2022-02-13 13:21   ` [kbuild-all] " Philip Li
2022-02-14  6:28   ` Chen, Rong A

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).