Skip to contentSkip to conversation

libhugetlbfs: fix build problems with ix86 and armv7ab

PATCH In review Gary S. Robertson 4 participants 22 messages Nov 24, 2014 – May 19, 2015

lore
Share & tools
lore
#0 lore raw

cover libhugetlbfs: fix build problems with ix86 and armv7ab

OE builds of libhugetlbfs were failing for armv7ab and i586 (qemux86) architectures. In addition, once patched so builds completed, execution of some tests was failing for armv7ab.

Patched OE recipe and Makefile to add support for 32-bit ix86 architectures... (patches 1 and 2).
Then patched linker control script to include armv7ab in the set of architectures whose text section offset and page size were corrected by the script...(patch 3).

Patches 2 and 3 have been submitted upstream to the libhugetlbfs maintainers and acceptance has been indicated for both...
however patch 2 has yet to appear in the upstream repository, while patch 3 has been verified as merged.

OE builds of libhugetlbfs with these patches added have been successfully completed here for qemux86, qemux86_64, armv7a, armv7ab, armv8, and armv8b platforms, and tests run successfully on all except armv8b - which failed with unrelated boot time issues.

#1 lore raw

PATCH 1/3 libhugetlbfs: Add ix86 to list of compatible host architectures

From: "Gary S. Robertson" <[email protected]>

COMPATIBLE_HOST included support for x86_64 but not for 32-bit x86 architectures - added generic 32-bit x86 arch names

Upstream Status - not applicable - recipe change only

---
 .../libhugetlbfs/libhugetlbfs_git.bb               |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +1 -1
index c2262ea..737acb9 100644
@@ -23,7 +23,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \
 
 S = "${WORKDIR}/git"
 
-COMPATIBLE_HOST = "(x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
+COMPATIBLE_HOST = "(i386|i486|i586|i686|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
 
 LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
 LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
Signature · 1 line
1.7.9.5
#2 lore raw

Re: [meta-oe][PATCH 1/3] libhugetlbfs: Add ix86 to list of compatible host architectures

I am wondering if this patch was overlooked, as I have seen no commentary regarding it, and the two other patches which accompanied it have been merged into the meta-oe libhugetlbfs recipe already.
I added explicit arch designators for the typically-used 32-bit intel architectures so the recipe could be built for those platforms and not just for 64-bit intel platforms.

Thanks & have a happy holiday season!

Gary Robertson

Quoted 32 lines · Gary S. Robertson

From: "Gary S. Robertson" <[email protected]>

COMPATIBLE_HOST included support for x86_64 but not for 32-bit x86 architectures - added generic 32-bit x86 arch names

Upstream Status - not applicable - recipe change only

---
 .../libhugetlbfs/libhugetlbfs_git.bb               |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +1 -1
index c2262ea..737acb9 100644
@@ -23,7 +23,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \
 
 S = "${WORKDIR}/git"
 
-COMPATIBLE_HOST = "(x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
+COMPATIBLE_HOST =

"(i386|i486|i586|i686|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"

LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
--
1.7.9.5

#3 lore raw

Re: [meta-oe][PATCH 1/3] libhugetlbfs: Add ix86 to list of compatible host architectures

I've intentionally skipped it, because it failed to build.

Unfortunately I've reported the issue in reply to different patch which wasn't the cause of the error:
http://lists.openembedded.org/pipermail/openembedded-devel/2014-December/099239.html

Quoted 52 lines · Gary Robertson

I am wondering if this patch was overlooked, as I have seen no commentary regarding it, and the two other patches which accompanied it have been merged into the meta-oe libhugetlbfs recipe already.
I added explicit arch designators for the typically-used 32-bit intel architectures so the recipe could be built for those platforms and not just for 64-bit intel platforms.

Thanks & have a happy holiday season!

Gary Robertson

Quoted 26 lines · Gary S. Robertson

From: "Gary S. Robertson" <[email protected]>

COMPATIBLE_HOST included support for x86_64 but not for 32-bit x86 architectures - added generic 32-bit x86 arch names

Upstream Status - not applicable - recipe change only

---
 .../libhugetlbfs/libhugetlbfs_git.bb               |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +1 -1
index c2262ea..737acb9 100644
@@ -23,7 +23,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \
 
 S = "${WORKDIR}/git"
 
-COMPATIBLE_HOST = "(x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
+COMPATIBLE_HOST =

"(i386|i486|i586|i686|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"

Quoted 6 lines

LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
--
1.7.9.5

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#4 lore raw

Re: [meta-oe][PATCH 1/3] libhugetlbfs: Add ix86 to list of compatible host architectures

Hmm... Perhaps I goofed with the way I submitted the patches - I'm afraid I'm a relative noob at patch submission, and still learning best practices.

The recipe won't build for qemux86 without also applying the Makefile patch in
'[meta-oe][PATCH 2/3] libhugetlbfs: Make cross-devel recognize all ix86 arches'
(BTW, that Makefile patch has now also been merged into libhugetlbfs.)

So if the patches were applied and tested separately in numerical sequence, I would expect the qemux86 build to fail with only the first patch applied.

However, I generated these patches specifically to enable me to build libhugetlbfs for qemux86, and with both patches in place I have been building successfully for both i586 (qemux86) and x86_64 intel architectures.

Just for confirmation I rebuilt tonight for qemux86, and had no problems. So could I ask you to give this patch another try with the other patches already in place?

Thanks again - and thanks also for the fast reply... looking at the OE lists I know there is lots of activity to be dealt with.

Gay Robertson

Quoted 72 lines · Martin Jansa

I've intentionally skipped it, because it failed to build.

Unfortunately I've reported the issue in reply to different patch which wasn't the cause of the error:

http://lists.openembedded.org/pipermail/openembedded-devel/2014-December/099239.html

Quoted 6 lines · Gary Robertson

I am wondering if this patch was overlooked, as I have seen no commentary regarding it, and the two other patches which accompanied it have been merged into the meta-oe libhugetlbfs recipe already.
I added explicit arch designators for the typically-used 32-bit intel architectures so the recipe could be built for those platforms and not

just

Quoted 14 lines

for 64-bit intel platforms.

Thanks & have a happy holiday season!

Gary Robertson

Quoted 6 lines · Gary S. Robertson

From: "Gary S. Robertson" <[email protected]>

COMPATIBLE_HOST included support for x86_64 but not for 32-bit x86 architectures - added generic 32-bit x86 arch names

Quoted 8 lines

Review

Quoted 8 lines

Upstream Status - not applicable - recipe change only

---
 .../libhugetlbfs/libhugetlbfs_git.bb               |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

libhugetlbfs_git.bb

Quoted 5 lines

meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code

Quoted 5 lines

b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb index c2262ea..737acb9 100644

meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +0 -0
@@ -23,7 +23,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code

\

Quoted 7 lines
Quoted 7 lines
meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +1 -1
 S = "${WORKDIR}/git"
 
-COMPATIBLE_HOST = "(x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
+COMPATIBLE_HOST =

"(i386|i486|i586|i686|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"

Quoted 12 lines
Quoted 6 lines

LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
--
1.7.9.5

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#5 lore raw

Re: [meta-oe][PATCH 1/3] libhugetlbfs: Add ix86 to list of compatible host architectures

Quoted 1 line

So could I ask you to give this patch another try with the other patches

already in place?

I'll do that if I don't forget, but I'm pretty sure that first it was failing with both your patches applied together and then again with all 3 pending libhugetlbfs together.

You have submitted it correctly and it was applied correctly, I always trigger the build with as many cherry-picked changes as possible, only after discovering the qemux86 build issue I've tried to remove this 1/3 patch from master-next to confirm that this is the root cause for the build issue and then I've applied the rest, because it was building fine again.

Regards,

Quoted 111 lines · Gary Robertson

Hmm... Perhaps I goofed with the way I submitted the patches - I'm afraid I'm a relative noob at patch submission, and still learning best practices.

The recipe won't build for qemux86 without also applying the Makefile patch in
'[meta-oe][PATCH 2/3] libhugetlbfs: Make cross-devel recognize all ix86 arches'
(BTW, that Makefile patch has now also been merged into libhugetlbfs.)

So if the patches were applied and tested separately in numerical sequence, I would expect the qemux86 build to fail with only the first patch applied.

However, I generated these patches specifically to enable me to build libhugetlbfs for qemux86, and with both patches in place I have been building successfully for both i586 (qemux86) and x86_64 intel architectures.

Just for confirmation I rebuilt tonight for qemux86, and had no problems. So could I ask you to give this patch another try with the other patches already in place?

Thanks again - and thanks also for the fast reply... looking at the OE lists
I know there is lots of activity to be dealt with.

Gay Robertson

Quoted 7 lines · Martin Jansa

I've intentionally skipped it, because it failed to build.

Unfortunately I've reported the issue in reply to different patch which wasn't the cause of the error:

http://lists.openembedded.org/pipermail/openembedded-devel/2014-December/099239.html

Quoted 6 lines
Quoted 2 lines · Gary Robertson

I am wondering if this patch was overlooked, as I have seen no

commentary

Quoted 26 lines
Quoted 4 lines

regarding it, and the two other patches which accompanied it have been merged into the meta-oe libhugetlbfs recipe already.
I added explicit arch designators for the typically-used 32-bit intel architectures so the recipe could be built for those platforms and not

just

Quoted 21 lines

for 64-bit intel platforms.

Thanks & have a happy holiday season!

Gary Robertson

Quoted 13 lines · Gary S. Robertson

From: "Gary S. Robertson" <[email protected]>

COMPATIBLE_HOST included support for x86_64 but not for 32-bit x86 architectures - added generic 32-bit x86 arch names

Upstream Status - not applicable - recipe change only

---
 .../libhugetlbfs/libhugetlbfs_git.bb               |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 7 lines
Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

libhugetlbfs_git.bb

Quoted 5 lines

meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb SRC_URI = "git://

Quoted 5 lines

b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb index c2262ea..737acb9 100644

meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +0 -0
@@ -23,7 +23,7 @@ SRC_URI = "git://

git.code.sf.net/p/libhugetlbfs/code

Quoted 20 lines

\

Quoted 7 lines
Quoted 7 lines
meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +1 -1
 S = "${WORKDIR}/git"
 
-COMPATIBLE_HOST = "(x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
+COMPATIBLE_HOST =

"(i386|i486|i586|i686|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"

Quoted 12 lines
Quoted 6 lines

LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
--
1.7.9.5

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Quoted 6 lines

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#6 lore raw

PATCH v2 1/1 libhugetlbfs: add i586 to compatible hosts

I am revisiting this patch after a long interlude of doing other work... please accept my apologies for resurrecting such an ancient thread.

After speaking with Koen Kool at Linaro Connect Hong Kong 2015, it dawned on me that the only 32-bit ix86 architecture I had actually tested was i586, and that the other arch designators might indeed somehow cause build breakage in an OE build encompassing those architectures.

Consequently I have revised the patch such that it extends the list of compatible hosts by adding ONLY the i586 architecture which I have tested successfully. I hope you will have similar success and can apply the amended patch.

Regards,

Gary Robertson

#7 lore raw

PATCH v2 1/1 libhugetlbfs: Add i586 to list of compatible hosts

COMPATIBLE_HOST included support for x86_64 but not for 32-bit x86 architectures - added i586 arch name to cover qemux86, etc.

Upstream Status - not applicable - recipe change only

---
 meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +1 -1
index 4ce6a19..6fe5dce 100644
@@ -24,7 +24,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \
 
 S = "${WORKDIR}/git"
 
-COMPATIBLE_HOST = "(x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
+COMPATIBLE_HOST = "(i586|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
 
 LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
 LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
Signature · 1 line
1.9.1
#8 lore raw

PATCH v3 1/1 libhugetlbfs: add i586 to compatible hosts

In reply to Martin Jansa

Some months back in your last comment regarding this proposed patch, you indicated that my original version of this patch had broken one or more builds when applied.

That version added i386, i486, i586, and i686 ito the list of compatible host architectures for libhugetlbfs in an effort to cover all 32-bit ix86 variants.

After speaking with Koen Kool at Linaro Connect Hong Kong 2015, it dawned on me that the only 32-bit ix86 architecture I had actually tested was i586, and that the other arch designators might indeed somehow cause build breakage in an OE build encompassing those architectures.

Consequently I have revised the patch such that it extends the list of compatible hosts by adding ONLY the i586 architecture which I have tested successfully. I hope you will have similar success and can apply the amended patch.

Finally your response to another recent patch submission I made caused me to realize that the 'Upstream-Status' line in this commit was malformed - so I am resubmitting the commit with a more compliant upstream status.

Regards,

Gary Robertson

#9 lore raw

PATCH 1/1 libhugetlbfs: Add i586 to list of compatible host architectures

COMPATIBLE_HOST included support for x86_64 but not for 32-bit x86 architectures - added i586 arch name to cover qemux86, etc.

Upstream-Status: Inappropriate - OE recipe change only

---
 meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +1 -1
index 4ce6a19..6fe5dce 100644
@@ -24,7 +24,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \
 
 S = "${WORKDIR}/git"
 
-COMPATIBLE_HOST = "(x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
+COMPATIBLE_HOST = "(i586|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
 
 LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
 LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
Signature · 1 line
1.9.1
#10 lore raw

Re: [PATCH] libhugetlbfs: Add i586 to list of compatible host architectures

Quoted 4 lines · Gary S. Robertson

COMPATIBLE_HOST included support for x86_64 but not for 32-bit x86 architectures - added i586 arch name to cover qemux86, etc.

Upstream-Status: Inappropriate - OE recipe change only

This field is used in patch files, not commit log of the Git changes. Drop this.

Quoted 26 lines
---
 meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +1 -2
index 4ce6a19..6fe5dce 100644
@@ -24,7 +24,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \
 
 S = "${WORKDIR}/git"
 
-COMPATIBLE_HOST = "(x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
+COMPATIBLE_HOST = "(i586|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
 
 LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
 LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
--

1.9.1

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#11 lore raw

Re: [PATCH] libhugetlbfs: Add i586 to list of compatible host architectures

Quoted 8 lines · Otavio Salvador
Quoted 4 lines · Gary S. Robertson

COMPATIBLE_HOST included support for x86_64 but not for 32-bit x86 architectures - added i586 arch name to cover qemux86, etc.

Upstream-Status: Inappropriate - OE recipe change only

This field is used in patch files, not commit log of the Git changes. Drop this.

Also, respect version of patch. I think your next send is v4, isn't it?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#12 lore raw

PATCH v4 1/1 libhugetlbfs: add i586 to compatible hosts

Thanks also for pointing out that I neglected to update the patch version in the commit message itself as opposed to the cover email subject line.

I believe I have corrected both oversights with this submission and will try to avoid these mistakes in any future submissions to OE. Hopefully with the formatting issues resolved this patch can finally be validated and merged.

Thank you all for your patience.

Regards,

Gary Robertson

#13 lore raw

PATCH v4 1/1 libhugetlbfs: Add i586 to list of compatible host architectures

COMPATIBLE_HOST included support for x86_64 but not for 32-bit x86 architectures - added i586 arch name to cover qemux86, etc.

---
 meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +1 -1
index 4ce6a19..6fe5dce 100644
@@ -24,7 +24,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \
 
 S = "${WORKDIR}/git"
 
-COMPATIBLE_HOST = "(x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
+COMPATIBLE_HOST = "(i586|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
 
 LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
 LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
Signature · 1 line
1.9.1
#14 lore raw

Re: [PATCH V4] libhugetlbfs: Add i586 to list of compatible host architectures

Quoted 2 lines · Gary S. Robertson

COMPATIBLE_HOST included support for x86_64 but not for 32-bit x86 architectures - added i586 arch name to cover qemux86, etc.

But it still fails for qemux86 :(

http://errors.yoctoproject.org/Errors/Details/9749/

Please fix it ASAP, because I've already merged this change before noticing this new build error.

Thanks,

Quoted 26 lines
---
 meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +1 -1
index 4ce6a19..6fe5dce 100644
@@ -24,7 +24,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \
 
 S = "${WORKDIR}/git"
 
-COMPATIBLE_HOST = "(x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
+COMPATIBLE_HOST = "(i586|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
 
 LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
 LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
Signature · 7 lines
1.9.1

-- 
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#15 lore raw

PATCH 1/1 libhugetlbfs: x86 - don't link against host libs

The x86 build linker scripts were still searching hard-coded paths on the build host for libraries. As it happens, the libraries needed for linking the failing executable are present on my build host, so the build succeeds here despite the erroneous linker paths. Consequently I had stupidly assumed the resulting QA warning was a fairly benign error until your test build in a pristine environment demonstrated otherwise.

I'm unclear as to the exact behavior shown by your log of the failed build, but since it is a linker error I am for now assuming it is precipitated somehow by the flawed library search paths. In any case with the hard-coded host paths commented out I get a clean build without the QA warning and see no similar logs in my local builds - so I hope this will also fix the build failures on your end.

Regards,

Gary Robertson

#16 lore raw

PATCH 1/1 libhugetlbfs: x86 - don't link against host libs

An earlier patch from Chunrong Guo <[email protected]> fixed the linker command scripts in ldscripts to comment out hard-coded paths for the linker search directories. This allows the command line to specifiy the proper paths without being overridden. However, the 32-bit ix86 scripts evidently were added after this earlier patch was created and were not corrected by it - so here we simply duplicate the technique in the earlier patch and extend it to correct the linker scripts for 32-bit ix86 builds.

---
 ...86-avoid-host-library-search-in-cross-dev.patch | 48 ++++++++++++++++++++++
 .../libhugetlbfs/libhugetlbfs_git.bb               |  1 +
 2 files changed, 49 insertions(+)
 create mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0001-x86-avoid-host-library-search-in-cross-dev.patch
meta-oe/recipes-benchmark/libhugetlbfs/files/0001-x86-avoid-host-library-search-in-cross-dev.patch new file +48 -0
new file mode 100644
index 0000000..959574e
@@ -0,0 +1,48 @@
+From b028ae9f43111677056f2661c800096f1994b687 Mon Sep 17 00:00:00 2001
+From: "Gary S. Robertson" <[email protected]>
+Date: Mon, 13 Apr 2015 14:41:15 -0500
+Subject: [PATCH] libhugetlbfs: x86 avoid host library search in cross-dev
+
+Upstream-Status: Inappropriate [oe-core specific]
+
+The ldscripts for 32-bit ix86 architectures were not corrected by the earlier
+patch from Chunrong Guo <[email protected]>... presumably they were added
+after that patch was created.  Here we extend the same technique to include
+the 32-bit ix86 linker scripts, so the command line variables can set the
+linker search directories rather than using hard-coded paths in the ldscripts.
+
+Signed-off-by: Gary S. Robertson <[email protected]>
+---
+ ldscripts/elf_i386.xB   | 2 +-
+ ldscripts/elf_i386.xBDT | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ldscripts/elf_i386.xB b/ldscripts/elf_i386.xB
+index 43fe51c..b852781 100644
+--- a/ldscripts/elf_i386.xB
++++ b/ldscripts/elf_i386.xB
+@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386",
+ 	      "elf32-i386")
+ OUTPUT_ARCH(i386)
+ ENTRY(_start)
+-SEARCH_DIR("/usr/i486-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
++/*SEARCH_DIR("/usr/i486-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/
+ INPUT(-lhugetlbfs);
+ /* Do we need any of these for elf?
+    __DYNAMIC = 0;    */
+diff --git a/ldscripts/elf_i386.xBDT b/ldscripts/elf_i386.xBDT
+index d72aebe..b25e225 100644
+--- a/ldscripts/elf_i386.xBDT
++++ b/ldscripts/elf_i386.xBDT
+@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386",
+ 	      "elf32-i386")
+ OUTPUT_ARCH(i386)
+ ENTRY(_start)
+-SEARCH_DIR("/usr/i486-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
++/*SEARCH_DIR("/usr/i486-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/
+ INPUT(-lhugetlbfs);
+ /* Do we need any of these for elf?
+    __DYNAMIC = 0;    */
+-- 
+1.9.1
+
meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +1 -0
index 6fe5dce..25f1672 100644
@@ -20,6 +20,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \
     file://0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch \
     file://0001-Extend-arm32-support-to-include-BE-variants.patch \
     file://0001-Makefile-Recognize-all-ix86-arches.patch \
+    file://0001-x86-avoid-host-library-search-in-cross-dev.patch \
 "
 
 S = "${WORKDIR}/git"
Signature · 1 line
1.9.1
#17 lore raw

Re: [meta-oe][PATCH] libhugetlbfs: x86 - don't link against host libs

In reply to Gary S. Robertson
Quoted 7 lines · Gary S. Robertson

The x86 build linker scripts were still searching hard-coded paths on the build host for libraries. As it happens, the libraries needed for linking the failing executable are present on my build host, so the build succeeds here despite the erroneous linker paths. Consequently I had stupidly assumed the resulting QA warning was a fairly benign error until your test build in a pristine environment demonstrated otherwise.

Quoted 6 lines

I'm unclear as to the exact behavior shown by your log of the failed build, but since it is a linker error I am for now assuming it is precipitated somehow by the flawed library search paths. In any case with the hard-coded host paths commented out I get a clean build without the QA warning and see no similar logs in my local builds - so I hope this will also fix the build failures on your end.

Thanks for quick response, but this doesn't seem to be enough:

| /home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/x86_64-linux/usr/libexec/i586-oe-linux/gcc/i586-oe-linux/4.9.2/ld: Attempt to open /home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemux86/lib/libgcc_s.so succeeded
| i586-oe-linux-gcc  -m32 -march=i586 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemux86 -I.. -O2 -Wall -g -o obj32/zero_filesize_segment.o -c zero_filesize_segment.c
| i586-oe-linux-gcc  -m32 -march=i586 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemux86 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,noexecstack -ldl -L../obj32 -o obj32/zero_filesize_segment -Lobj32 zero_filesize_segment.ld obj32/zero_filesize_segment.o obj32/testutils.o -Wl,--no-as-needed -lpthread -ldl -lhugetlbfs_privutils || cp bad-toolchain.sh obj32/zero_filesize_segment
| /home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/x86_64-linux/usr/libexec/i586-oe-linux/gcc/i586-oe-linux/4.9.2/ld: error: zero_filesize_segment.ld: SECTIONS seen after other input files; try -T/--script
| /home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/x86_64-linux/usr/libexec/i586-oe-linux/gcc/i586-oe-linux/4.9.2/ld: internal error in input_sections_begin, at /home/jenkins/oe/world/shr-core/tmp-glibc/work/x86_64-oe-linux/binutils-cross-i586/2.25-r0/git/gold/merge.h:269
| collect2: error: ld returned 1 exit status
| i586-oe-linux-gcc  -m32 -march=i586 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemux86 -I.. -O2 -Wall -g -o obj32/linkhuge.o -c linkhuge.c
| i586-oe-linux-gcc  -m32 -march=i586 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemux86 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,noexecstack -ldl -L../obj32 -o obj32/linkhuge obj32/linkhuge.o obj32/testutils.o -Wl,--no-as-needed -lpthread -ldl -lhugetlbfs_privutils
| i586-oe-linux-gcc  -m32 -march=i586 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemux86 -I.. -O2 -Wall -g -o obj32/linkhuge_nofd.o -c linkhuge_nofd.c
| i586-oe-linux-gcc  -m32 -march=i586 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemux86 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,noexecstack -ldl -L../obj32 -o obj32/linkhuge_nofd obj32/linkhuge_nofd.o obj32/testutils.o -Wl,--no-as-needed -lpthread -ldl -lhugetlbfs_privutils
| i586-oe-linux-gcc  -m32 -march=i586 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemux86 -I.. -O2 -Wall -g -o obj32/linkshare.o -c linkshare.c
| i586-oe-linux-gcc  -m32 -march=i586 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemux86 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,noexecstack -ldl -L../obj32 -o obj32/linkshare obj32/linkshare.o obj32/testutils.o -Wl,--no-as-needed -lpthread -ldl -lhugetlbfs_privutils
| i586-oe-linux-gcc  -m32 -march=i586 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemux86 -I.. -O2 -Wall -g -o obj32/linkhuge_rw.o -c linkhuge_rw.c
| i586-oe-linux-gcc  -m32 -march=i586 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemux86 -B./obj32 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,noexecstack -ldl -L../obj32 -o obj32/linkhuge_rw -Wl,--no-as-needed -lpthread -ldl -lhugetlbfs_privutils -Wl,--hugetlbfs-align obj32/linkhuge_rw.o obj32/testutils.o
| i586-oe-linux-ld: internal error in do_write, at /home/jenkins/oe/world/shr-core/tmp-glibc/work/x86_64-oe-linux/binutils-cross-i586/2.25-r0/git/gold/output.cc:464
| collect2: error: ld returned 1 exit status

Please try to build qemux86 with gold (ld-is-gold in DISTRO_FEATURES) to see if you reproduce this issue.

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#18 lore raw

PATCH 1/1 Revert "libhugetlbfs: Add i586 to list of compatible host architectures"

It's still failing in world builds even when
"libhugetlbfs: x86 - don't link against host libs" is applied as well.

It was reported month ago:
https://www.mail-archive.com/[email protected]/msg41565.html

This reverts commit 3cc7f186be46a0de049d1fab70ddb84111be6e29.

---
 meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +1 -1
index 6fe5dce..4ce6a19 100644
@@ -24,7 +24,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \
 
 S = "${WORKDIR}/git"
 
-COMPATIBLE_HOST = "(i586|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
+COMPATIBLE_HOST = "(x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
 
 LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
 LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
Signature · 1 line
2.4.0
#19 lore raw

Re: [meta-oe][PATCH] Revert "libhugetlbfs: Add i586 to list of compatible host architectures"

Quoted 9 lines · Martin Jansa

It's still failing in world builds even when
"libhugetlbfs: x86 - don't link against host libs" is applied as well.

It was reported month ago:
https://www.mail-archive.com/[email protected]/msg41565.html

From this message it seems to me that linker script used for x86 is not digested well by gold and there might be incompatibilities and gold certainly should not segfault. so its worth filing a bug report against gold as well. Then there should be another one for libhugetlbfs to ensure that linker script is portable. But then in OE we can use

LDFLAGS += “-fuse-ld=bfd”

in recipe and that should get us going.

Avoid the revert

Quoted 26 lines

This reverts commit 3cc7f186be46a0de049d1fab70ddb84111be6e29.
---
meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +0 -0
index 6fe5dce..4ce6a19 100644
@@ -24,7 +24,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \
 

S = "${WORKDIR}/git"

meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +1 -1
-COMPATIBLE_HOST = "(i586|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
+COMPATIBLE_HOST = "(x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"

LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
--
2.4.0

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#20 lore raw

PATCH 2/3 libhugetlbfs: Make cross-devel recognize all ix86 arches

In reply to Gary S. Robertson

From: "Gary S. Robertson" <[email protected]>

In a non-native cross-development scenario, the Makefile only recognized i386 or x86_64 PC architectures. Extended this to also recognize i486, i586, and i686

Upstream Status: Accepted but not yet applied by libhugetlbfs project

---
 .../0001-Makefile-Recognize-all-ix86-arches.patch  |   32 ++++++++++++++++++++
 .../libhugetlbfs/libhugetlbfs_git.bb               |    1 +
 2 files changed, 33 insertions(+)
 create mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Makefile-Recognize-all-ix86-arches.patch
meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Makefile-Recognize-all-ix86-arches.patch new file +32 -0
new file mode 100644
index 0000000..2718275
@@ -0,0 +1,32 @@
+From a0166583ba5f7b6a6d2de434f633126fb12c9d29 Mon Sep 17 00:00:00 2001
+From: "Gary S. Robertson" <[email protected]>
+Date: Wed, 24 Sep 2014 15:27:31 -0500
+Subject: [PATCH] Makefile: Recognize all ix86 arches
+
+In a non-native build scenario, the makefile
+only recognized i386 or x86_64 arches.  Added support
+to recognize i486, i586, i686.
+
+Upstream Status: Accepted by libhugetlbfs project
+
+Signed-off-by: Gary S. Robertson <[email protected]>
+---
+ Makefile |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 91502e1..0bfaee8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -71,7 +71,7 @@ ELF64 = aarch64elf
+ TMPLIB64 = lib64
+ CUSTOM_LDSCRIPTS = no
+ else
+-ifeq ($(ARCH),i386)
++ifneq (,$(filter i386 i486 i586 i686,$(ARCH)))
+ CC32 = $(CC)
+ ELF32 = elf_i386
+ TMPLIB32 = lib
+-- 
+1.7.9.5
+
meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +1 -0
index 737acb9..5111935 100644
@@ -19,6 +19,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \
     file://0001-aarch64-fix-page-size-not-properly-computed.patch \
     file://0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch \
     file://0001-Extend-arm32-support-to-include-BE-variants.patch \
+    file://0001-Makefile-Recognize-all-ix86-arches.patch \
 "
 
 S = "${WORKDIR}/git"
Signature · 1 line
1.7.9.5
#21 lore raw

PATCH 3/3 libhugetlbfs: Fix page size & text offset for arm arches

In reply to Gary S. Robertson

From: "Gary S. Robertson" <[email protected]>

Fixed computation of page size and text segment offset for various arm architectures - including both LE and BE variants of armv7 as well as aarch64

Upstream Status: Accepted at libhugetlbfs project

---
 ...rch64-fix-page-size-not-properly-computed.patch |   32 -----------
 ...s-arm-arches-fix-page-size-and-text-offse.patch |   57 ++++++++++++++++++++
 .../libhugetlbfs/libhugetlbfs_git.bb               |    2 +-
 3 files changed, 58 insertions(+), 33 deletions(-)
 delete mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-page-size-not-properly-computed.patch
 create mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch
meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-page-size-not-properly-computed.patch deleted +0 -32
deleted file mode 100644
index da60ba0..0000000
@@ -1,32 +0,0 @@
-Subject: [PATCH] aarch64: fix page size not properly computed
-
-There's 2 issues fixed:
-* typo on MB variable (MB -> $MB)
-* some linker variants are missing (linux and big endian)
-  - aarch64elfb
-  - aarch64linux
-  - aarch64linuxb
-
-Signed-off-by: Fathi Boudra <[email protected]>
-
-Upstream-Status: Submitted
----
- ld.hugetlbfs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/ld.hugetlbfs b/ld.hugetlbfs
-index df446dd..6553547 100755
---- a/ld.hugetlbfs
-+++ b/ld.hugetlbfs
-@@ -87,7 +87,7 @@ elf32ppclinux|elf64ppc)	HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;;
- elf64lppc)		HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;;
- elf_i386|elf_x86_64)	HPAGE_SIZE=$((4*$MB)) SLICE_SIZE=$HPAGE_SIZE ;;
- elf_s390|elf64_s390)	HPAGE_SIZE=$((1*$MB)) SLICE_SIZE=$HPAGE_SIZE ;;
--armelf_linux_eabi|aarch64elf)	HPAGE_SIZE=$((2*MB)) SLICE_SIZE=$HPAGE_SIZE ;;
-+armelf_linux_eabi|aarch64elf*|aarch64linux*)	HPAGE_SIZE=$((2*$MB)) SLICE_SIZE=$HPAGE_SIZE ;;
- esac
- 
- if [ "$HTLB_ALIGN" == "slice" ]; then
--- 
-1.9.2
-
meta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch new file +57 -0

57 lines not on this page · raw message

meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +1 -1
index 5111935..72d5c66 100644
@@ -16,7 +16,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \
     file://tests-Makefile-install-static-4G-edge-testcases.patch \
     file://0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch \
     file://0001-aarch64-fix-cross-compilation.patch \
-    file://0001-aarch64-fix-page-size-not-properly-computed.patch \
+    file://0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch \
     file://0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch \
     file://0001-Extend-arm32-support-to-include-BE-variants.patch \
     file://0001-Makefile-Recognize-all-ix86-arches.patch \
Signature · 1 line
1.7.9.5