From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Laszlo Ersek <lersek@redhat.com>
Cc: apianti@aol.com, "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: Trying to build OVMF fails
Date: Sun, 10 Jun 2018 13:48:34 +0200 [thread overview]
Message-ID: <CAKv+Gu-vw=tLTFi+VvNkf__LkoYDNCbTbb3SPNB0ZUk6OhXyvQ@mail.gmail.com> (raw)
In-Reply-To: <463855a2-2b5b-a636-fab7-59e82bae80a5@redhat.com>
On 10 May 2018 at 16:42, Laszlo Ersek <lersek@redhat.com> wrote:
> On 05/10/18 15:37, apianti@aol.com wrote:
>> I am having a problem building OVMF to use as firmware for QEMU to test EFI binaries. I can only build the X64 arch of OVMF in linux. In windows both IA32, IA32/X64, and X64 all fail with some variation of this error:
>>
>>
>>
>>
>>
>> "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Vc\bin\x86_amd64\cl.exe" /Fod:\development\edk2\Build\OvmfX64\RELEASE_VS2013x86\X64\MdeModulePkg\Bus\Pci\EhciDxe\EhciDxe\OUTPUT\.\EhciUrb.obj /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Gw /D MDEPKG_NDEBUG /D DISABLE_NEW_DEPRECATED_INTERFACES /Id:\development\edk2\MdeModulePkg\Bus\Pci\EhciDxe /Id:\development\edk2\Build\OvmfX64\RELEASE_VS2013x86\X64\MdeModulePkg\Bus\Pci\EhciDxe\EhciDxe\DEBUG /Id:\development\edk2\MdePkg /Id:\development\edk2\MdePkg\Include /Id:\development\edk2\MdePkg\Include\X64 /Id:\development\edk2\MdeModulePkg /Id:\development\edk2\MdeModulePkg\Include d:\development\edk2\MdeModulePkg\Bus\Pci\EhciDxe\EhciUrb.c
>> 'c:\Program' is not recognized as an internal or external command,
>> operable program or batch file.
>> NMAKE : fatal error U1077: '"c:\Program Files (x86)\Windows Kits\8.0\bin\x64\rc.exe' : return code '0x1'
>> Stop.
>
> Sorry, I can't comment on the VS toolchains (I don't use them).
>
>> And in linux IA32 and IA32/X64 fail with some varation of this error:
>>
>>
>>
>> "GenFw" -e DXE_DRIVER -o /home/development/Desktop/edk2/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe/DEBUG/FaultTolerantWriteDxe.efi /home/development/Desktop/edk2/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe/DEBUG/FaultTolerantWriteDxe.dll
>> GenFw: ERROR 3000: Invalid
>> /home/development/Desktop/edk2/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe/DEBUG/FaultTolerantWriteDxe.dll unsupported ELF EM_386 relocation 0xa.
>> GenFw: ERROR 3000: Invalid
>> /home/development/Desktop/edk2/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe/DEBUG/FaultTolerantWriteDxe.dll unsupported ELF EM_386 relocation 0x9.
>
> Interesting; what gcc version are you using with the GCC5 toolchain?
> I've just built OVMF like this:
>
> $ build \
> -a IA32 \
> -p OvmfPkg/OvmfPkgIa32.dsc \
> -D SMM_REQUIRE \
> -D SECURE_BOOT_ENABLE \
> -t GCC5 \
> -n 4 \
> -b RELEASE \
> -D HTTP_BOOT_ENABLE \
> --cmd-len=65536 \
> --hash
>
> with an up-to-date Fedora 28 install:
> - gcc (GCC) 8.1.1 20180502 (Red Hat 8.1.1-1)
> - binutils-2.29.1-23.fc28.x86_64
>
On Ubuntu 18.04, I need to add -fno-pie -fno-pic to the IA32 gcc
flags, or I get the same errors. Also, I need to disable PIE linking,
or I get weird errors at link time with duplicate .rel.text ELF
sections
I will follow up with a patch shortly (but not today)
prev parent reply other threads:[~2018-06-10 11:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-10 13:37 Trying to build OVMF fails apianti
2018-05-10 14:28 ` Marvin H?user
2018-05-10 14:42 ` Laszlo Ersek
2018-05-10 15:06 ` Gao, Liming
2018-05-10 15:44 ` Rebecca Cran
2018-05-11 0:36 ` Gao, Liming
2018-06-10 11:48 ` Ard Biesheuvel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKv+Gu-vw=tLTFi+VvNkf__LkoYDNCbTbb3SPNB0ZUk6OhXyvQ@mail.gmail.com' \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox