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$
Hey Mike,
mturney@codeaurora.org schrieb am Fr., 14. Juni 2019, 22:12:
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
These are because we use relative paths for the submodules. The idea is that mirrors also mirror the submodules and everything is then loaded from the same location.
Chrome EC should be no problem, but coreboot relies on the vboot submodule these days which is imported the same way.
And here is tail-end of coreboot build that fails:
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);
This is built with your host compiler. Probably an old compiler?
Patrick
On 2019-06-14 13:47, Patrick Georgi wrote:
Hey Mike,
/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);
This is built with your host compiler. Probably an old compiler?
As I am currently stuck on using 14.04 Ubuntu which has an old version of GCC, I am curious what gcc versions are in use that folks are using to build coreboot in standalone tree?
gcc is already the newest version. gcc set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded. mturney@mturney-linux:~$ gcc --version gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
mturney@mturney-linux:~$
Patrick
Links:
[1] http://review-android.quicinc.com:29418/coreboot/chrome-ec.git
https://doc.coreboot.org/lessons/lesson1.html got followed?
mturney@codeaurora.org 于2019年6月19日周三 下午10:12写道:
On 2019-06-14 13:47, Patrick Georgi wrote:
Hey Mike,
/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);
This is built with your host compiler. Probably an old compiler?
As I am currently stuck on using 14.04 Ubuntu which has an old version of GCC, I am curious what gcc versions are in use that folks are using to build coreboot in standalone tree?
gcc is already the newest version. gcc set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded. mturney@mturney-linux:~$ gcc --version gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
mturney@mturney-linux:~$
Patrick
Links:
[1] http://review-android.quicinc.com:29418/coreboot/chrome-ec.git
coreboot mailing list -- coreboot@coreboot.org To unsubscribe send an email to coreboot-leave@coreboot.org
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.
No, the code it's choking on was actually added in April: https://review.coreboot.org/32027
I think I cherry-picked and modified a very old CL from 2015 (where I had already tried doing that once and gave up at some point) as a starting point to develop that patch, and it seems like the authoring date from that stuck around in Git, so it looks like it's from 2015 in blame. Somewhat unfortunate but can't fix it now. (Really, I'm surprised that git-blame it uses that date at all, rather than the commit date, but that's on Git.)
Someone already reported the GCC incompatibility on that patch, it requires at least GCC 6.3.0 (possibly works with 5.0 as well, don't think anybody tested that). Since the last Ubuntu LTS that comes with an older version is already out-of-support and other distros have presumably likewise been at a newer version for a while, we decided that it doesn't need fixing.
Can you deal with it locally (e.g. manually install the GCC package from 17.04)?
Hi Mike,
I probably started skipping past this thread as soon as I saw the the initial response. It failed my 0.25-second test -- sorry.
Julius is right, though. cbfstool is built with your host compiler and the older versions of gcc don't like that patch.
As I am currently stuck on using 14.04 Ubuntu which has an old version
of GCC, I am curious what gcc versions are in use that folks are using to build coreboot in standalone tree?
Although I wasn't "stuck", I didn't want to risk or take time switching away from 14.04 in the middle of an important project. I moved gcc forward only to 6.5.0 and no longer had the problem. The exact steps I used are long gone out of my history, but I probably used something like described here: https://gist.github.com/application2000/73fd6f4bf1be6600a2cf9f56315a2d91
Thanks, Marshall
On Tue, Jun 25, 2019 at 3:03 PM Julius Werner jwerner@chromium.org wrote:
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.
No, the code it's choking on was actually added in April: https://review.coreboot.org/32027
I think I cherry-picked and modified a very old CL from 2015 (where I had already tried doing that once and gave up at some point) as a starting point to develop that patch, and it seems like the authoring date from that stuck around in Git, so it looks like it's from 2015 in blame. Somewhat unfortunate but can't fix it now. (Really, I'm surprised that git-blame it uses that date at all, rather than the commit date, but that's on Git.)
Someone already reported the GCC incompatibility on that patch, it requires at least GCC 6.3.0 (possibly works with 5.0 as well, don't think anybody tested that). Since the last Ubuntu LTS that comes with an older version is already out-of-support and other distros have presumably likewise been at a newer version for a while, we decided that it doesn't need fixing.
Can you deal with it locally (e.g. manually install the GCC package from 17.04)? _______________________________________________ coreboot mailing list -- coreboot@coreboot.org To unsubscribe send an email to coreboot-leave@coreboot.org