A quick look on the mailing list doesn't show this issue for anybody
else so I have to assume something with my setup.
For past year + I have been working with coreboot in Chromium chroot
environment.
Yesterday I had to go back to the standalone build environment. This is
happening from tip of upstream master.
It is consistent with i386, arm and aarch64 toolchain. This output is
following Lesson 1 so it is from i386 with QEMU configuration.
Using git blame, all of the code (cbfstool & commonlib headers) was last
modified 2015 and 2017, so figure it is toolchain and/or my host, which
is Ubuntu 16.04.
I will add that there is an issue with chrome-ec repo access, but doubt
that is contributory to this build error, but here are the messages from
chrome-ec first:
Cloning into '3rdparty/chromeec'...
X11 forwarding request failed on channel 0
fatal: Project not found: coreboot/chrome-ec
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Clone of
'ssh://review-android.quicinc.com:29418/coreboot/chrome-ec.git' into
submodule path '3rdparty/chromeec' failed
And here is tail-end of coreboot build that fails:
CC postcar/southbridge/intel/common/reset.o
CC postcar/southbridge/intel/common/rtc.o
LINK cbfs/fallback/postcar.debug
IASL build/dsdt.aml
Intel ACPI Component Architecture
ASL+ Optimizing Compiler/Disassembler version 20190509
Copyright (c) 2000 - 2019 Intel Corporation
coreboot toolchain vc15e600 2019-05-10
ASL Input: dsdt.asl - 15113 bytes 245 keywords 399 source
lines
AML Output: dsdt.aml - 4021 bytes 99 opcodes 146 named
objects
Compilation successful. 0 Errors, 0 Warnings, 0 Remarks, 234
Optimizations
IASL build/dsdt.aml disassembled correctly.
HOSTCC cbfstool/cbfstool.o
In file included from <command-line>:0:0:
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/util/cbfstool/cbfstool.c:
In function 'cbfs_add_component':
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/src/commonlib/include/commonlib/compiler.h:59:2:
error: first argument to '__builtin_choose_expr' not a constant
__builtin_choose_expr(__builtin_constant_p(expr), fallback_expr,
expr))
^
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/src/commonlib/include/commonlib/helpers.h:39:2:
note: in expansion of macro '__TYPEOF_UNLESS_CONST'
__TYPEOF_UNLESS_CONST(a, b) var_a = (a); \
^
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/src/commonlib/include/commonlib/helpers.h:49:26:
note: in expansion of macro '__CMP_SAFE'
__CMP_UNSAFE(a, b, op), __CMP_SAFE(a, b, op, __TMPNAME, __TMPNAME))
^
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/src/commonlib/include/commonlib/helpers.h:56:19:
note: in expansion of macro '__CMP'
#define MAX(a, b) __CMP(a, b, >)
^
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/util/cbfstool/cbfstool.c:546:19:
note: in expansion of macro 'MAX'
uint32_t size = MAX(hs, param.padding);
^
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/src/commonlib/include/commonlib/compiler.h:59:2:
error: first argument to '__builtin_choose_expr' not a constant
__builtin_choose_expr(__builtin_constant_p(expr), fallback_expr,
expr))
^
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/src/commonlib/include/commonlib/helpers.h:40:2:
note: in expansion of macro '__TYPEOF_UNLESS_CONST'
__TYPEOF_UNLESS_CONST(b, a) var_b = (b); \
^
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/src/commonlib/include/commonlib/helpers.h:49:26:
note: in expansion of macro '__CMP_SAFE'
__CMP_UNSAFE(a, b, op), __CMP_SAFE(a, b, op, __TMPNAME, __TMPNAME))
^
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/src/commonlib/include/commonlib/helpers.h:56:19:
note: in expansion of macro '__CMP'
#define MAX(a, b) __CMP(a, b, >)
^
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/util/cbfstool/cbfstool.c:546:19:
note: in expansion of macro 'MAX'
uint32_t size = MAX(hs, param.padding);
^
In file included from
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/util/cbfstool/common.h:25:0,
from
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/util/cbfstool/cbfstool.c:26:
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/src/commonlib/include/commonlib/helpers.h:47:25:
error: first argument to '__builtin_choose_expr' not a constant
#define __CMP(a, b, op) __builtin_choose_expr( \
^
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/src/commonlib/include/commonlib/helpers.h:56:19:
note: in expansion of macro '__CMP'
#define MAX(a, b) __CMP(a, b, >)
^
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/util/cbfstool/cbfstool.c:546:19:
note: in expansion of macro 'MAX'
uint32_t size = MAX(hs, param.padding);
^
In file included from <command-line>:0:0:
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/util/cbfstool/cbfstool.c:
In function 'cbfs_create':
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/src/commonlib/include/commonlib/compiler.h:59:2:
error: first argument to '__builtin_choose_expr' not a constant
__builtin_choose_expr(__builtin_constant_p(expr), fallback_expr,
expr))
^
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/src/commonlib/include/commonlib/helpers.h:39:2:
note: in expansion of macro '__TYPEOF_UNLESS_CONST'
__TYPEOF_UNLESS_CONST(a, b) var_a = (a); \
^
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/src/commonlib/include/commonlib/helpers.h:49:26:
note: in expansion of macro '__CMP_SAFE'
__CMP_UNSAFE(a, b, op), __CMP_SAFE(a, b, op, __TMPNAME, __TMPNAME))
^
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/src/commonlib/include/commonlib/helpers.h:56:19:
note: in expansion of macro '__CMP'
#define MAX(a, b) __CMP(a, b, >)
^
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/util/cbfstool/cbfstool.c:957:6:
note: in expansion of macro 'MAX'
MAX(bootblock.size, sizeof(int32_t));
^
In file included from
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/util/cbfstool/common.h:25:0,
from
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/util/cbfstool/cbfstool.c:26:
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/src/commonlib/include/commonlib/helpers.h:47:25:
error: first argument to '__builtin_choose_expr' not a constant
#define __CMP(a, b, op) __builtin_choose_expr( \
^
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/src/commonlib/include/commonlib/helpers.h:56:19:
note: in expansion of macro '__CMP'
#define MAX(a, b) __CMP(a, b, >)
^
/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot/util/cbfstool/cbfstool.c:957:6:
note: in expansion of macro 'MAX'
MAX(bootblock.size, sizeof(int32_t));
^
make: *** [build/util/cbfstool/cbfstool.o] Error 1
mturney@mturney-linux:/local/mnt/workspace/mturney/gitrepos/qualcomm/chromebook/cbdc-meta/standalone/coreboot$