intel / luv-yocto

Linux UEFI Validation Distribution
Other
113 stars 75 forks source link

OVMF build fails on Ubuntu 16.04 with GCC 5.3 #85

Closed theopolis closed 6 years ago

theopolis commented 8 years ago

It seems the EDK2 build toolchain defines may not include definitions for GCC 5.3?

$ bitbake luv-live-image
[...]
| ----------------------------------------------------------------------
| Ran 260 tests in 1.680s
| 
| OK
| make[1]: Leaving directory '/home/teddy/git/luv-yocto/build/tmp/work/x86_64-linux/ovmf-native/git-r0/git/BaseTools/Tests'
| make: Leaving directory '/home/teddy/git/luv-yocto/build/tmp/work/x86_64-linux/ovmf-native/git-r0/git/BaseTools'
| Running edk2 build for OvmfPkgX64
| Build environment: Linux-4.6.0-4-generic-x86_64-with-Ubuntu-16.04-xenial
| Build start time: 00:08:26, Jul.05 2016
| 
| WORKSPACE        = /home/teddy/git/luv-yocto/build/tmp/work/x86_64-linux/ovmf-native/git-r0/git
| ECP_SOURCE       = /home/teddy/git/luv-yocto/build/tmp/work/x86_64-linux/ovmf-native/git-r0/git/EdkCompatibilityPkg
| EDK_SOURCE       = /home/teddy/git/luv-yocto/build/tmp/work/x86_64-linux/ovmf-native/git-r0/git/EdkCompatibilityPkg
| EFI_SOURCE       = /home/teddy/git/luv-yocto/build/tmp/work/x86_64-linux/ovmf-native/git-r0/git/EdkCompatibilityPkg
| EDK_TOOLS_PATH   = /home/teddy/git/luv-yocto/build/tmp/work/x86_64-linux/ovmf-native/git-r0/git/BaseTools
| build: : warning: Tool chain [GCC53] is not defined
| 
| 
| build.py...
|  : error 4000: Not available
|   [GCC53] not defined. No toolchain available for build!
| 
| 
| - Failed -
| Build end time: 00:08:27, Jul.05 2016
| Build total time: 00:00:00
| 
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/teddy/git/luv-yocto/build/tmp/work/x86_64-linux/ovmf-native/git-r0/temp/log.do_compile.8110)
ERROR: Task 1895 (virtual:native:/home/teddy/git/luv-yocto/meta-luv/recipes-core/ovmf/ovmf_git.bb, do_compile) failed with exit code '1'

And like it says:

$ gcc --version
gcc (Ubuntu 5.3.1-14ubuntu2.1) 5.3.1 20160413

I'm not sure if this is something LUV can solve for. I can do some more searching tomorrow to see if this toolchain define can be patched in, or if the SRCREV can be bumped to a newer EDK with 5.3 support. But I at least wanted to document / triage this in an issue in case it helps others. :dancer:

ricardon commented 8 years ago

Hi theopolis,

Thanks for the report. Since the last time I checked, EDK defines ad gcc 4.9 anything beyond gcc 5.3. We have updated the OVMF recipe accordingly, This patch should resolve this issue:

https://github.com/01org/luv-yocto/commit/ef3314d7c57c759161046fbd06a82614dbe4b55b

This patch is on the next branch but not on master. Would you mind trying to build from the next branch? If you still face the issue we can look further.

Thanks and BR, Ricardo

ricardon commented 8 years ago

I just checked, EDK2 sets gcc versions greater than 4.9 to 4.9:

https://github.com/tianocore/edk2/blob/master/OvmfPkg/build.sh#L98

theopolis commented 8 years ago

Thanks @ricardon! Will check and test tonight.

ricardon commented 7 years ago

This should work with commit ef3314d7c57c759161046fbd06a82614dbe4b55b. If not, please reopen the issue.

d100972 commented 7 years ago

hi, It seems the EDK2 build toolchain defines may not include definitions for GCC 5.4? On ubuntu 16.04 gcc 5.4

meghadey commented 6 years ago

The recipe already takes care while building with GCC5.4. Also this recipe has been moved to poky.