FireMarshal icon indicating copy to clipboard operation
FireMarshal copied to clipboard

Failed to build workload br-base.json when reaching “buildBusybox”.

Open zbw444 opened this issue 5 years ago • 4 comments

I follow the steps in the documentation. When I execute this command ./marshal build br-base.json I encountered this error and the following information is displayed on the terminal:

-- BuildBusybox . /home/riscv/chipyard/software/firemarshal/images/br-base-bin TaskError - taskid:/home/riscv/chipyard/software/firemarshal/images/br-base-bin PythonAction Error Traceback (most recent call last): File "/home/riscv/.local/lib/python3.6/site-packages/doit/action.py", line 437, in execute returned_value = self.py_callable(*self.args, **kwargs) File "/home/riscv/chipyard/software/firemarshal/wlutil/build.py", line 376, in makeBin run(['make'] + getOpt('linux-make-args') + ['vmlinux', getOpt('jlevel')], cwd=config['linux-src']) File "/home/riscv/chipyard/software/firemarshal/wlutil/wlutil.py", line 439, in run raise sp.CalledProcessError(p.returncode, prettyCmd) subprocess.CalledProcessError: Command 'make ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-gnu- vmlinux -j' returned non-zero exit status 2. Failed to build workload br-base.json

The following errors were found when viewing the detailed log file:

[run ] [DEBUG] Running: "make ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-gnu- vmlinux -j" in /home/riscv/chipyard/software/firemarshal/riscv-linux [run ] [DEBUG] scripts/kconfig/conf --syncconfig Kconfig [run ] [DEBUG] CALL scripts/atomic/check-atomics.sh [run ] [DEBUG] CALL scripts/checksyscalls.sh [run ] [DEBUG] LZO usr/initramfs_inc_data [run ] [DEBUG] CHK include/generated/compile.h [run ] [DEBUG] mm/.page_vma_mapped.o.cmd:5: *** unterminated call to function 'wildcard': missing ')'. Stop. [run ] [DEBUG] Makefile:1722: recipe for target 'mm' failed [run ] [DEBUG] make: *** [mm] Error 2 [run ] [DEBUG] make: *** Waiting for unfinished jobs.... [run ] [DEBUG] GZIP kernel/config_data.gz [run ] [DEBUG] CC kernel/configs.o [run ] [DEBUG] AR kernel/built-in.a [run ] [DEBUG] AS usr/initramfs_data.o [run ] [DEBUG] AR usr/built-in.a [run ] [DEBUG] make: *** wait: No child processes. Stop. [main ] [ERROR] Failed to build workload br-base.json

I didn't modify any files and followed the tutorial completely. Is it a compiler problem or a file problem? How should I solve it?

zbw444 avatar Oct 18 '21 06:10 zbw444

hmm, that's pretty strange. We can try some generic fixes first. Try these:

  1. Make sure all submodules are checked out correctly (there should be no + or - and no errors/warnings when you do 'git submodule status'
  2. Clean linux, maybe it corrupted a file somehow. Go to boards/default/linux and run "make mrproper". Delete '.config'
  3. If that doesn't work, try a fresh clone of FireMarshal.

If this doesn't work, we can start digging a bit more. Toolchain is one possibility. I have a vague memory of this happening before, but I'm not sure. I'm gonna leave this issue open so that if it happens again we can keep track.

NathanTP avatar Oct 18 '21 16:10 NathanTP

Another question: what OS is your host?

NathanTP avatar Oct 28 '21 18:10 NathanTP

Very similar issue while executing marshal build br-base.json on both the master and dev, except the file(:line) with the wildcard error is kernel/.ucount.o.cmd:5.

[UPDATE: Error encountered on Ubuntu 18.04 LTS]

Log files:

  1. master -> br-base-build-2021-10-28--18-30-55-HQRYJKX8GMWKEN37.log
  2. dev -> br-base-build-2021-10-28--18-50-49-BW84L8G3CS4IHFE5.log

raghav-g13 avatar Oct 28 '21 19:10 raghav-g13

Another question: what OS is your host?

Ubuntu 16.04

zbw444 avatar Oct 29 '21 05:10 zbw444