qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] edk2 fails to compile in v4.0.0-rc2
Date: Fri, 5 Apr 2019 12:39:28 +0200	[thread overview]
Message-ID: <20190405123928.70da87e2.olaf@aepfle.de> (raw)

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

It seems in qemu.git#master the edk2.git submodule is now mandatory.
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?

Olaf

[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Olaf Hering <olaf@aepfle.de>
To: <qemu-devel@nongnu.org>
Subject: [Qemu-devel] edk2 fails to compile in v4.0.0-rc2
Date: Fri, 5 Apr 2019 12:39:28 +0200	[thread overview]
Message-ID: <20190405123928.70da87e2.olaf@aepfle.de> (raw)
Message-ID: <20190405103928.0vr_fq0Ae8Is5o4UEGL8WzyJP_8ekdWjFaDpIiOrWjw@z> (raw)

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

It seems in qemu.git#master the edk2.git submodule is now mandatory.
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?

Olaf

[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05 10:39 Olaf Hering [this message]
2019-04-05 10:39 ` [Qemu-devel] edk2 fails to compile in v4.0.0-rc2 Olaf Hering
2019-04-05 10:49 ` Philippe Mathieu-Daudé
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=20190405123928.70da87e2.olaf@aepfle.de \
    --to=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).