From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::22f; helo=mail-io0-x22f.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 63DF021144D09 for ; Sun, 10 Jun 2018 04:48:35 -0700 (PDT) Received: by mail-io0-x22f.google.com with SMTP id f1-v6so20782775ioh.6 for ; Sun, 10 Jun 2018 04:48:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=md7+xf40PtMrhxMTDPX3AQqPc3XXmBHoImddwV9t0tY=; b=BzFf3WW8Eh/Xv/HOu6e34op8mh30iPP8thm8XS1j9elZyw1AKKdzSKqwpk/7Ld8j3M ouV0UwW5Tew9dZLQxkI0RbjDrhRYHE3BJ0fWFRfGWjDnbYXgLPyihbqFK9h7d9jZFVZR Nk37p5fEOans0YAqXmRbflr5EuAR0ZHkPfdyg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=md7+xf40PtMrhxMTDPX3AQqPc3XXmBHoImddwV9t0tY=; b=jfnsuSSVc3oLJtz90Gn46FojsQxu++57JGmSYec8dM4pMsuA6OVtWzaSDcUNNiFPOO 75ljtdhxfACVGmDQiGCzi1GUz7Ccsh22P0zhKFiFLro+cdZ2Yhtf70HcBgzkRc0cvXmS b/BMEhzHAMt5yjLSi0eRWQbuRkjiURR834uNMVrQAMv1qujeJPHjKQMvCZGvBvVVSlaq S3YSDIjZny9REM2yPK9t5VMGuP8wqacW+76sGoPV8PZnwmnTLixNYcgMlyfvMoHLjdGN FSmekCEXpN07D26n+7dWfMBYJ5L3v/PeaNNkD7D3zfw8wqSaG1G6m8t5kkPiw7Ei8yJr Xc/Q== X-Gm-Message-State: APt69E3AS4oKNvGnBwa7ArYiFlNTGwbaxB15eVvydUn3PmrxC+LqjC4+ by56nl/Oynnwwri0EGPzMyXBwJZtuPqnt9kuyygiSQ== X-Google-Smtp-Source: ADUXVKL/7X2jTfTXtCQ/lskkNQV2HPG11mGRmt1MUMkxkVVfI1AByznyksjN2G4mNK7j+rDqgeMEv/t+gkAyecVccmE= X-Received: by 2002:a6b:6709:: with SMTP id b9-v6mr10691380ioc.170.1528631314906; Sun, 10 Jun 2018 04:48:34 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:bbc7:0:0:0:0:0 with HTTP; Sun, 10 Jun 2018 04:48:34 -0700 (PDT) In-Reply-To: <463855a2-2b5b-a636-fab7-59e82bae80a5@redhat.com> References: <1634a4575fc-1dd7-e1c8@webjas-vae180.srv.aolmail.net> <463855a2-2b5b-a636-fab7-59e82bae80a5@redhat.com> From: Ard Biesheuvel Date: Sun, 10 Jun 2018 13:48:34 +0200 Message-ID: To: Laszlo Ersek Cc: apianti@aol.com, "edk2-devel@lists.01.org" Subject: Re: Trying to build OVMF fails X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jun 2018 11:48:36 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On 10 May 2018 at 16:42, Laszlo Ersek 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 bo= th 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\Md= eModulePkg\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_V= S2013x86\X64\MdeModulePkg\Bus\Pci\EhciDxe\EhciDxe\DEBUG /Id:\development\e= dk2\MdePkg /Id:\development\edk2\MdePkg\Include /Id:\development\edk2\Mde= Pkg\Include\X64 /Id:\development\edk2\MdeModulePkg /Id:\development\edk2\= MdeModulePkg\Include d:\development\edk2\MdeModulePkg\Bus\Pci\EhciDxe\EhciU= rb.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/R= ELEASE_GCC5/IA32/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerant= WriteDxe/DEBUG/FaultTolerantWriteDxe.efi /home/development/Desktop/edk2/Bui= ld/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Universal/FaultTolerantWriteDxe/= FaultTolerantWriteDxe/DEBUG/FaultTolerantWriteDxe.dll >> GenFw: ERROR 3000: Invalid >> /home/development/Desktop/edk2/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeMod= ulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe/DEBUG/FaultTol= erantWriteDxe.dll unsupported ELF EM_386 relocation 0xa. >> GenFw: ERROR 3000: Invalid >> /home/development/Desktop/edk2/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeMod= ulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe/DEBUG/FaultTol= erantWriteDxe.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=3D65536 \ > --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)