qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Olaf Hering <olaf@aepfle.de>, qemu-devel@nongnu.org
Cc: Laszlo Ersek <lersek@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] edk2 fails to compile in v4.0.0-rc2
Date: Fri, 5 Apr 2019 12:49:15 +0200	[thread overview]
Message-ID: <1cec1873-9962-f258-a052-167efec620e9@redhat.com> (raw)
In-Reply-To: <20190405123928.70da87e2.olaf@aepfle.de>

[-- Attachment #1: Type: text/plain, Size: 2184 bytes --]

Hi Olaf,

On 4/5/19 12:39 PM, Olaf Hering wrote:
> It seems in qemu.git#master the edk2.git submodule is now mandatory.

The EDK2 submodule was added for UEFI testing, you don't need to compile
it to build/use QEMU.

How did you end up compiling it?

> For me it fails to compile. This is not a new error. It needs to be compiled with -fPIC since essentially forever.
> 
> But I wonder, why does it fail to compile only for me?!
> Example of failure:
> 
>  $ grep -h CommonLib.o /dev/shm/*/.build.log 
> [   85s] gcc  -c  -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/  -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict -Wno-unused-result -nostdlib -g -O2  CommonLib.c -o CommonLib.o
> [   89s] ar crs ../libs/libCommon.a BasePeCoff.o BinderFuncs.o CommonLib.o Crc32.o Decompress.o EfiCompress.o EfiUtilityMsgs.o FirmwareVolumeBuffer.o FvLib.o MemoryFile.o MyAlloc.o OsPath.o ParseGuidedSectionTools.o ParseInf.o PeCoffLoaderEx.o SimpleFileParsing.o StringFuncs.o TianoCompress.o PcdValueCommon.o
> [  106s] /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: ../libs/libCommon.a(CommonLib.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
> [  106s] /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: ../libs/libCommon.a(CommonLib.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
> [  120s] /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: ../libs/libCommon.a(CommonLib.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
> 
> What do I need to change in my setup so that -fPIC is not required?

Apparently your Linux distribution has transitioned to enabling PIE by
default in GCC 7, see:
https://lists.opensuse.org/opensuse-factory/2017-06/msg00403.html

"This is achieved by a gcc defaults override in the "gcc-PIE" package."

Regards,

Phil.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2019-04-05 10:49 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05 10:39 [Qemu-devel] edk2 fails to compile in v4.0.0-rc2 Olaf Hering
2019-04-05 10:39 ` Olaf Hering
2019-04-05 10:49 ` Philippe Mathieu-Daudé [this message]
2019-04-05 10:49   ` Philippe Mathieu-Daudé
2019-04-05 10:59   ` Olaf Hering
2019-04-05 10:59     ` Olaf Hering
2019-04-05 11:14     ` Philippe Mathieu-Daudé
2019-04-05 11:14       ` Philippe Mathieu-Daudé
2019-04-05 11:24       ` Philippe Mathieu-Daudé
2019-04-05 11:24         ` Philippe Mathieu-Daudé
2019-04-05 11:27       ` Olaf Hering
2019-04-05 11:27         ` Olaf Hering
2019-04-05 11:16     ` Olaf Hering
2019-04-05 11:16       ` Olaf Hering
2019-04-05 11:29       ` Philippe Mathieu-Daudé
2019-04-05 11:29         ` Philippe Mathieu-Daudé
2019-04-05 11:31         ` Olaf Hering
2019-04-05 11:31           ` Olaf Hering
2019-04-08  9:04     ` Laszlo Ersek
2019-04-08  9:04       ` Laszlo Ersek
2019-04-08  9:09       ` Olaf Hering
2019-04-08  9:09         ` Olaf Hering
2019-04-08  9:42         ` Laszlo Ersek
2019-04-08  9:42           ` Laszlo Ersek

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-all 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=1cec1873-9962-f258-a052-167efec620e9@redhat.com \
    --to=philmd@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mst@redhat.com \
    --cc=olaf@aepfle.de \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).