New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 776174 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit 26 days ago
Closed: Oct 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug



Sign in to add a comment

coreboot doesn't build anymore

Project Member Reported by shchen@google.com, Oct 18 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Steps to reproduce the problem:
1. cros_workon-fizz coreboot
2. emerge-fizz coreboot
3. 

What is the expected behavior?
build should succeed

What went wrong?
make -j40 objutil=objutil DOTCONFIG=.config-fizz obj=build-fizz 
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
    CC         bootblock/arch/x86/boot.o
    CC         bootblock/arch/x86/bootblock_crt0.o
    CC         bootblock/arch/x86/cpu_common.o
    GEN        build.h
    CC         bootblock/arch/x86/memcpy.o
    CP         bootblock/arch/x86/memlayout.ld
    CC         bootblock/arch/x86/memset.o
    CC         bootblock/arch/x86/mmap_boot.o
    CC         bootblock/arch/x86/timestamp.o
    CC         bootblock/commonlib/cbfs.o
    CC         bootblock/commonlib/iobuf.o
    CC         bootblock/commonlib/lz4_wrapper.o
    CC         bootblock/commonlib/mem_pool.o
fatal: Not a git repository (or any of the parent directories): .git
    CC         bootblock/commonlib/region.o
    CC         bootblock/console/console.o
    CC         bootblock/console/die.o
fatal: Not a git repository (or any of the parent directories): .git
    CC         bootblock/console/init.o
    CC         bootblock/console/post.o
    CC         bootblock/console/printk.o
date: invalid date '@'
    CC         bootblock/console/vsprintf.o
    CC         bootblock/console/vtxprintf.o
    CC         bootblock/cpu/intel/fit/fit.o
    CC         bootblock/cpu/x86/lapic/boot_cpu.o
    CC         bootblock/cpu/x86/mtrr/earlymtrr.o
date: invalid date '@'
    CC         bootblock/cpu/x86/tsc/delay_tsc.o
    CC         bootblock/device/i2c.o
    CC         bootblock/device/device_simple.o
    CC         bootblock/drivers/pc80/rtc/mc146818rtc.o
    CC         bootblock/drivers/pc80/rtc/mc146818rtc_boot.o
    CC         bootblock/drivers/spi/boot_device_rw_nommap.o
    CC         bootblock/drivers/spi/spi-generic.o
    CC         bootblock/drivers/spi/spi_flash.o
    CC         bootblock/ec/google/chromeec/ec.o
    CC         bootblock/ec/google/chromeec/ec_lpc.o
    CC         bootblock/lib/boot_device.o
    CC         bootblock/lib/bootblock.o
    CC         bootblock/lib/bootmode.o
date: invalid date '@'
    HOSTCC     cbfstool/cbfs_sections.o
    HOSTCC     cbfstool/fmaptool.o
    HOSTCC     cbfstool/fmap_from_fmd.o
date: invalid date '@'
date: invalid date '@'
    HOSTCC     cbfstool/fmap.o
    HOSTCC     cbfstool/kv_pair.o
    CC         bootblock/lib/cbmem_console.o
    HOSTCC     cbfstool/valstr.o
    CC         bootblock/lib/delay.o
    CC         bootblock/lib/gcc.o
date: invalid date '@'
    CC         bootblock/lib/gpio.o
    CC         bootblock/lib/halt.o
    CC         bootblock/lib/hexdump.o
    CC         bootblock/lib/libgcc.o
date: invalid date '@'
    CC         bootblock/lib/memchr.o
    CC         bootblock/lib/prog_loaders.o
    CC         bootblock/lib/memcmp.o
    CC         bootblock/lib/prog_ops.o
    CP         bootblock/lib/program.ld
    CC         bootblock/lib/reset.o
    CC         bootblock/lib/timestamp.o
    CC         bootblock/lib/reg_script.o
    CC         bootblock/lib/version.o
    CC         bootblock/mainboard/google/fizz/chromeos.o
    CC         bootblock/mainboard/google/fizz/bootblock.o
    CC         bootblock/soc/intel/common/block/*/car/cache_as_ram.o
    CC         bootblock/soc/intel/common/block/*/cpulib.o
    CC         bootblock/soc/intel/common/block/*/fast_spi_flash.o
    CC         bootblock/soc/intel/common/block/*/fast_spi.o
    CC         bootblock/soc/intel/common/block/*/gpio.o
    CC         bootblock/soc/intel/common/block/*/gspi.o
    CC         bootblock/soc/intel/common/block/*/i2c_early.o
    CC         bootblock/soc/intel/common/block/*/itss.o
    CC         bootblock/soc/intel/common/block/*/lpc_lib.o
    CC         bootblock/soc/intel/common/block/*/lpss.o
    CC         bootblock/soc/intel/common/block/*/lpss_i2c.o
    CC         bootblock/soc/intel/common/block/*/pcr.o
    CC         bootblock/soc/intel/common/block/*/pmclib.o
    CC         bootblock/soc/intel/common/block/*/smbus_early.o
    CC         bootblock/soc/intel/common/block/*/rtc.o
    CC         bootblock/soc/intel/common/block/*/smbuslib.o
    CC         bootblock/soc/intel/common/block/*/systemagent_early.o
    CC         bootblock/soc/intel/common/block/*/timer.o
    CC         bootblock/soc/intel/common/block/*/uart.o
    CC         bootblock/soc/intel/common/reset.o
    CC         bootblock/soc/intel/common/tpm_tis.o
    CC         bootblock/soc/intel/common/util.o
src/lib/version.c:32:49: error: expected expression before ';' token
 const unsigned int coreboot_version_timestamp = COREBOOT_VERSION_TIMESTAMP;
                                                 ^
src/lib/version.c:39:10: error: invalid suffix "x" on integer constant
  .year = COREBOOT_BUILD_YEAR_BCD,
          ^
src/lib/version.c:40:11: error: invalid suffix "x" on integer constant
  .month = COREBOOT_BUILD_MONTH_BCD,
           ^
src/lib/version.c:41:9: error: invalid suffix "x" on integer constant
  .day = COREBOOT_BUILD_DAY_BCD,
         ^
src/lib/version.c:42:13: error: invalid suffix "x" on integer constant
  .weekday = COREBOOT_BUILD_WEEKDAY_BCD,
             ^
    CC         bootblock/soc/intel/skylake/bootblock/bootblock.o
    CC         bootblock/soc/intel/skylake/bootblock/cpu.o
    CC         bootblock/soc/intel/skylake/bootblock/pch.o
make: *** [Makefile:337: build-fizz/bootblock/lib/version.o] Error 1
make: *** Waiting for unfinished jobs....
    CC         bootblock/soc/intel/skylake/bootblock/report_platform.o
 * ERROR: sys-boot/coreboot-9999::chromiumos failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sys-boot/coreboot-9999::chromiumos'`,
 * the complete build log and the output of `emerge -pqv '=sys-boot/coreboot-9999::chromiumos'`.
 * The complete build log is located at '/build/fizz/tmp/portage/logs/sys-boot:coreboot-9999:20171018-215143.log'.
 * For convenience, a symlink to the build log is located at '/build/fizz/tmp/portage/sys-boot/coreboot-9999/temp/build.log'.
 * The ebuild environment file is located at '/build/fizz/tmp/portage/sys-boot/coreboot-9999/temp/environment'.
 * Working directory: '/build/fizz/tmp/portage/sys-boot/coreboot-9999/work/coreboot-9999'
 * S: '/build/fizz/tmp/portage/sys-boot/coreboot-9999/work/coreboot-9999'

>>> Failed to emerge sys-boot/coreboot-9999 for /build/fizz/, Log file:

>>>  '/build/fizz/tmp/portage/logs/sys-boot:coreboot-9999:20171018-215143.log'

 * Messages for package sys-boot/coreboot-9999 merged to /build/fizz/:

 * ERROR: sys-boot/coreboot-9999::chromiumos failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sys-boot/coreboot-9999::chromiumos'`,
 * the complete build log and the output of `emerge -pqv '=sys-boot/coreboot-9999::chromiumos'`.
 * The complete build log is located at '/build/fizz/tmp/portage/logs/sys-boot:coreboot-9999:20171018-215143.log'.
 * For convenience, a symlink to the build log is located at '/build/fizz/tmp/portage/sys-boot/coreboot-9999/temp/build.log'.
 * The ebuild environment file is located at '/build/fizz/tmp/portage/sys-boot/coreboot-9999/temp/environment'.
 * Working directory: '/build/fizz/tmp/portage/sys-boot/coreboot-9999/work/coreboot-9999'
 * S: '/build/fizz/tmp/portage/sys-boot/coreboot-9999/work/coreboot-9999'

Did this work before? Yes

 

Comment 1 by shchen@chromium.org, Oct 18 2017

Description: Show this description

Comment 2 by shchen@chromium.org, Oct 18 2017

Description: Show this description

Comment 4 by shchen@chromium.org, Oct 18 2017

Cc: furquan@chromium.org caveh@chromium.org pgeorgi@chromium.org jwer...@chromium.org
Owner: vapier@chromium.org

Comment 5 by shchen@chromium.org, Oct 18 2017

I spend many hours tying to figure out what I had done because this bug doesn't exhibit itself unless you cros_workon coreboot, so I kept thinking that it was something that I had done wrong.
The issue is that our source trees have sparse .git directories: only index and HEAD are real, everything else points to a central repository at $HOME/trunk/.repo/project-objects/… using symlinks. These don't make it (or would be broken in any case since they're relative paths) and so the .git repo is corrupt.

https://review.coreboot.org/22107 fixes coreboot's build system by making it more robust against such situations, which is a good idea no matter what we decide should be the right action on the cros side.
Status: Started (was: Unconfirmed)
Owner: pgeorgi@chromium.org
Project Member

Comment 9 by bugdroid1@chromium.org, Oct 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/3089d3d5a426c8d1078b33f651613b8224b4150a

commit 3089d3d5a426c8d1078b33f651613b8224b4150a
Author: Mike Frysinger <vapier@chromium.org>
Date: Thu Oct 19 19:56:51 2017

cros-workon: skip copying of .git dirs

The use of --safe-links when rsyncing the repos over breaks the .git
dir usage, so skip the .git repos themselves.  This is also what we
used to do before CL:700724 (by skipping all dot files), so nothing
should be relying on this path already.

BUG= chromium:776174 
TEST=precq passes
TEST=emerging cros-workon packages no longer include .git/

Change-Id: I7bdfb246a53297df2abc251a3cf2980958d62539
Reviewed-on: https://chromium-review.googlesource.com/727542
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Shelley Chen <shchen@chromium.org>

[modify] https://crrev.com/3089d3d5a426c8d1078b33f651613b8224b4150a/eclass/cros-workon.eclass

cros-workon side should be fixed now.  i'll leave the bug open until the coreboot side is made more resilient.
Project Member

Comment 11 by bugdroid1@chromium.org, Oct 20 2017

Labels: merge-merged-chromeos-2016.05
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/e7f82732cfcd45b091a13187e9fca530520c20a3

commit e7f82732cfcd45b091a13187e9fca530520c20a3
Author: Patrick Georgi <pgeorgi@google.com>
Date: Fri Oct 20 15:22:09 2017

UPSTREAM: util/genbuild_h: improve robustness against corrupt .git directories

The new test lets git check if $top is actually a git repo, instead of
just looking for clues.

BUG= chromium:776174 
BRANCH=none
TEST=`mv .git .foo; mkdir .git; util/genbuild_h/genbuild_h.sh` provides
a valid build.h instead of failing because git is unhappy about the
.git directory.

Change-Id: I79ac68e2d2f50683f6ee2467b159724a6564c8e0
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 44aaf6137d0e000d6a83ca036aad5722b485d716
Original-Change-Id: I7fcc64d66e0b59fca1479b4c142fd0559aa984f4
Original-Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Reviewed-on: https://review.coreboot.org/22107
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/730466
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>

[modify] https://crrev.com/e7f82732cfcd45b091a13187e9fca530520c20a3/util/genbuild_h/genbuild_h.sh

Status: Fixed (was: Started)

Sign in to add a comment