BUG: Compile Fail 5.4 x64 version.

From: David F.
Date: Sun Feb 23 2020 - 20:38:09 EST


Hi,

Tried to build updates for the x86 and x64 versions of kernel. The
x86 built, the x64 didn't. But x64 includes more devices and items.
Here is the screen output of the failure:

CC [M] drivers/net/wireless/mediatek/mt76/mt76x0/pci.o
CC [M] drivers/net/wireless/mediatek/mt76/mt7615/mac.o
CC [M] drivers/net/wireless/mediatek/mt76/mt76x0/pci_mcu.o
In file included from ./include/linux/export.h:42:0,
from ./include/linux/linkage.h:7,
from ./include/linux/kernel.h:8,
from ./include/linux/skbuff.h:13,
from ./include/linux/if_ether.h:19,
from ./include/linux/etherdevice.h:20,
from drivers/net/wireless/mediatek/mt76/mt7615/mac.c:10:
drivers/net/wireless/mediatek/mt76/mt7615/mac.c: In function âto_rssiâ:
./include/linux/compiler.h:350:38: error: call to
â__compiletime_assert_18â declared with attribute error: BUILD_BUG_ON
failed: (((field) + (1ULL << (__builtin_ffsll(field) - 1))) &
(((field) + (1ULL << (__builtin_ffsll(field) - 1))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
./include/linux/compiler.h:331:4: note: in definition of macro
â__compiletime_assertâ
prefix ## suffix(); \
^
./include/linux/compiler.h:350:2: note: in expansion of macro
â_compiletime_assertâ
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
./include/linux/build_bug.h:39:37: note: in expansion of macro
âcompiletime_assertâ
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^
./include/linux/bitfield.h:46:3: note: in expansion of macro âBUILD_BUG_ON_MSGâ
BUILD_BUG_ON_MSG(!__builtin_constant_p(_mask), \
^
./include/linux/bitfield.h:95:3: note: in expansion of macro â__BF_FIELD_CHECKâ
__BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
^
drivers/net/wireless/mediatek/mt76/mt7615/mac.c:18:10: note: in
expansion of macro âFIELD_GETâ
return (FIELD_GET(field, rxv) - 220) / 2;
^
./include/linux/compiler.h:350:38: error: call to
â__compiletime_assert_18â declared with attribute error: BUILD_BUG_ON
failed: (((field) + (1ULL << (__builtin_ffsll(field) - 1))) &
(((field) + (1ULL << (__builtin_ffsll(field) - 1))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
./include/linux/compiler.h:331:4: note: in definition of macro
â__compiletime_assertâ
prefix ## suffix(); \
^
./include/linux/compiler.h:350:2: note: in expansion of macro
â_compiletime_assertâ
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
./include/linux/build_bug.h:39:37: note: in expansion of macro
âcompiletime_assertâ
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^
./include/linux/bitfield.h:48:3: note: in expansion of macro âBUILD_BUG_ON_MSGâ
BUILD_BUG_ON_MSG((_mask) == 0, _pfx "mask is zero"); \
^
./include/linux/bitfield.h:95:3: note: in expansion of macro â__BF_FIELD_CHECKâ
__BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
^
drivers/net/wireless/mediatek/mt76/mt7615/mac.c:18:10: note: in
expansion of macro âFIELD_GETâ
return (FIELD_GET(field, rxv) - 220) / 2;
^
./include/linux/compiler.h:350:38: error: call to
â__compiletime_assert_18â declared with attribute error: BUILD_BUG_ON
failed: (((field) + (1ULL << (__builtin_ffsll(field) - 1))) &
(((field) + (1ULL << (__builtin_ffsll(field) - 1))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
./include/linux/compiler.h:331:4: note: in definition of macro
â__compiletime_assertâ
prefix ## suffix(); \
^
./include/linux/compiler.h:350:2: note: in expansion of macro
â_compiletime_assertâ
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
./include/linux/build_bug.h:39:37: note: in expansion of macro
âcompiletime_assertâ
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^
./include/linux/build_bug.h:50:2: note: in expansion of macro âBUILD_BUG_ON_MSGâ
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^
./include/linux/build_bug.h:21:2: note: in expansion of macro âBUILD_BUG_ONâ
BUILD_BUG_ON(((n) & ((n) - 1)) != 0)
^
./include/linux/bitfield.h:54:3: note: in expansion of macro
â__BUILD_BUG_ON_NOT_POWER_OF_2â
__BUILD_BUG_ON_NOT_POWER_OF_2((_mask) + \
^
./include/linux/bitfield.h:95:3: note: in expansion of macro â__BF_FIELD_CHECKâ
__BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
^
drivers/net/wireless/mediatek/mt76/mt7615/mac.c:18:10: note: in
expansion of macro âFIELD_GETâ
return (FIELD_GET(field, rxv) - 220) / 2;
^
CC [M] drivers/net/wireless/mediatek/mt76/mt76x0/init.o
scripts/Makefile.build:265: recipe for target
'drivers/net/wireless/mediatek/mt76/mt7615/mac.o' failed
make[9]: *** [drivers/net/wireless/mediatek/mt76/mt7615/mac.o] Error 1
scripts/Makefile.build:509: recipe for target
'drivers/net/wireless/mediatek/mt76/mt7615' failed
make[8]: *** [drivers/net/wireless/mediatek/mt76/mt7615] Error 2
make[8]: *** Waiting for unfinished jobs....
AR drivers/net/wireless/mediatek/built-in.a
CC [M] drivers/net/wireless/mediatek/mt76/mt76x0/main.o
CC [M] drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.o
CC [M] drivers/net/wireless/mediatek/mt76/mt76x0/phy.o
LD [M] drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0u.o
LD [M] drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0e.o
CC drivers/ptp/ptp_clock.o
CC drivers/ptp/ptp_chardev.o
LD [M] drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0-common.o
scripts/Makefile.build:509: recipe for target
'drivers/net/wireless/mediatek/mt76' failed
make[7]: *** [drivers/net/wireless/mediatek/mt76] Error 2
scripts/Makefile.build:509: recipe for target
'drivers/net/wireless/mediatek' failed
make[6]: *** [drivers/net/wireless/mediatek] Error 2
scripts/Makefile.build:509: recipe for target 'drivers/net/wireless' failed
make[5]: *** [drivers/net/wireless] Error 2
scripts/Makefile.build:509: recipe for target 'drivers/net' failed
make[4]: *** [drivers/net] Error 2
make[4]: *** Waiting for unfinished jobs....
CC drivers/ptp/ptp_sysfs.o
CC [M] drivers/ptp/ptp_kvm.o
AR drivers/ptp/built-in.a
Makefile:1652: recipe for target 'drivers' failed
make[3]: *** [drivers] Error 2
debian/rules:6: recipe for target 'build' failed
make[2]: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
scripts/Makefile.package:82: recipe for target 'bindeb-pkg' failed
make[1]: *** [bindeb-pkg] Error 2
Makefile:1430: recipe for target 'bindeb-pkg' failed
make: *** [bindeb-pkg] Error 2