Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build issue on Centos, Ubuntu & Fedora #43

Open
cristiandgal opened this issue Jul 23, 2020 · 2 comments
Open

Build issue on Centos, Ubuntu & Fedora #43

cristiandgal opened this issue Jul 23, 2020 · 2 comments

Comments

@cristiandgal
Copy link

cristiandgal commented Jul 23, 2020

Using the HowTo instructions from the front page:

mkdir -p dev
cd dev
mkdir -p linuxboot-result
test -d linuxboot || git clone https://github.com/linuxboot/linuxboot
cd linuxboot
make \
	     BOARD=qemu \
	     KERNEL=~/dev/linuxboot-result/bzImage \
	     INITRD=~/dev/linuxboot-result/initrd.cpio.xz \
	     config
make

Is there a recommended build OS?
I'm getting errors building on several versions:

Centos6.10

Build stops at:

$ make
( cd edk2/OvmfPkg ; ./build.sh )
Initializing workspace
linuxboot/edk2/BaseTools
Loading previous configuration from linuxboot/edk2/Conf/BuildEnv.sh
WORKSPACE: linuxboot/edk2
EDK_TOOLS_PATH: linuxboot/edk2/BaseTools
CONF_PATH: linuxboot/edk2/Conf
using prebuilt tools
Running edk2 build for OvmfPkgX64
Traceback (most recent call last):
  File "linuxboot/edk2/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 34, in <module>
    from Common import Misc as Utils
  File "linuxboot/edk2/BaseTools/Source/Python/Common/Misc.py", line 2183
    storeidset = {storeid for storeid, storename in self.DefaultStores.values() if storename in DefaultSIdList}
                            ^
SyntaxError: invalid syntax
make: *** [boards/qemu/qemu.rom] Error 1

Centos7.8.2003

First I got:

cp edk2/Build/OvmfX64/DEBUG_GCC5/FV/OVMF.fd boards/qemu/qemu.rom
cp: cannot stat ‘edk2/Build/OvmfX64/DEBUG_GCC5/FV/OVMF.fd’: No such file or directory
make: *** [boards/qemu/qemu.rom] Error 1 

Fixed with a symlink:
edk2/Build/OvmfX64/DEBUG_GCC5 -> DEBUG_GCC48/

now I get:

$ make
make: *** No rule to make target `~/dev/linuxboot-result/bzImage', needed by `build/qemu/Linux.ffs'.  Stop.

Centos8.2.2004 & Ubuntu 20.04 & Fedora28

make[3]: Entering directory 'linuxboot/edk2/BaseTools/Source/C/Common'
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-unused-result -nostdlib -c -g  -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/  -O2 EfiUtilityMsgs.c -o EfiUtilityMsgs.o
EfiUtilityMsgs.c: In function ‘PrintMessage’:
EfiUtilityMsgs.c:484:9: error: ‘strncat’ output may be truncated copying between 0 and 511 bytes from a string of length 511 [-Werror=stringop-truncation]
         strncat (Line, Line2, MAX_LINE_LEN - strlen (Line) - 1);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EfiUtilityMsgs.c:469:9: error: ‘strncat’ output may be truncated copying between 0 and 511 bytes from a string of length 511 [-Werror=stringop-truncation]
         strncat (Line, Line2, MAX_LINE_LEN - strlen (Line) - 1);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EfiUtilityMsgs.c:511:5: error: ‘strncat’ output may be truncated copying between 0 and 511 bytes from a string of length 511 [-Werror=stringop-truncation]
     strncat (Line, Line2, MAX_LINE_LEN - strlen (Line) - 1);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [../Makefiles/footer.makefile:27: EfiUtilityMsgs.o] Error 1
make[3]: Leaving directory 'linuxboot/edk2/BaseTools/Source/C/Common'
make[2]: *** [GNUmakefile:85: Common] Error 2
make[2]: Leaving directory 'linuxboot/edk2/BaseTools/Source/C'
make[1]: *** [GNUmakefile:25: Source/C] Error 2
make[1]: Leaving directory 'linuxboot/edk2/BaseTools'
make: *** [boards/qemu/Makefile.board:62: boards/qemu/qemu.rom] Error 2

Ubuntu18.04

GNUmakefile:314: recipe for target '~/dev/linuxboot/edk2/Build/OvmfX64/DEBUG_GCC5/X64/OvmfPkg/ResetVector/ResetVector/OUTPUT/ResetVector.bin' failed
make[1]: Leaving directory '~/dev/linuxboot/edk2/Build/OvmfX64/DEBUG_GCC5/X64/OvmfPkg/ResetVector/ResetVector'
make[1]: *** [~/dev/linuxboot/edk2/Build/OvmfX64/DEBUG_GCC5/X64/OvmfPkg/ResetVector/ResetVector/OUTPUT/ResetVector.bin] Error 127


build.py...
 : error 7000: Failed to execute command
        make tbuild [~/dev/linuxboot/edk2/Build/OvmfX64/DEBUG_GCC5/X64/OvmfPkg/ResetVector/ResetVector]


build.py...
 : error F002: Failed to build module
        ~/dev/linuxboot/edk2/OvmfPkg/ResetVector/ResetVector.inf [X64, GCC5, DEBUG]

- Failed -
Build end time: 19:50:24, Jul.23 2020
Build total time: 00:00:06

boards/qemu/Makefile.board:62: recipe for target 'boards/qemu/qemu.rom' failed
make: *** [boards/qemu/qemu.rom] Error 1

Thanks.

@cristiandgal cristiandgal changed the title Build issue: No rule to make target ../path/to/bzImage', needed by build/qemu/Linux.ffs' Build issue on Centos, Ubuntu & Fedora Jul 23, 2020
@cristiandgal
Copy link
Author

Is this project still active?

@NHellFire
Copy link

For the gcc errors (Centos8.2.2004 & Ubuntu 20.04 & Fedora28), tianocore/edk2@1d212a8 needs to be merged. A workaround is to build with gcc 7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants