openmpi: fix uClibc regdef.h include path
PATCH 1/1 openmpi: fix uClibc regdef.h include path
In uClibc the regdef.h file is located under the sys directory. Due to that openmpi is failing to build with an error like this one:
atomic-asm.S:7:20: fatal error: regdef.h: No such file or directory
#include <regdef.h>
Add a patch in order to detect when we are building with uClibc and therefore include regdef.h from the right location.
Pull request sent upstream:
https://github.com/open-mpi/ompi-release/pull/1241
Fixes:
http://autobuild.buildroot.net/results/de5/de524cbef057c7c3cb45125ecf62202a2f74129c/
http://autobuild.buildroot.net/results/165/165bf4156b27ecea0b226550a42560f789659b03/
--- ...se-MIPS.asm-fix-uClibc-regdef.h-include-p.patch | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 package/openmpi/0001-opal-asm-base-MIPS.asm-fix-uClibc-regdef.h-include-p.patch
package/openmpi/0001-opal-asm-base-MIPS.asm-fix-uClibc-regdef.h-include-p.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 8cb4d489256866038eb6935afea36ee721b14bd4 Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera <[email protected]> +Date: Wed, 22 Jun 2016 11:11:10 +0100 +Subject: [PATCH] opal/asm/base/MIPS.asm: fix uClibc regdef.h include path + +Otherwise it will fail with an error like this one: + +atomic-asm.S:7:20: fatal error: regdef.h: No such file or directory + #include <regdef.h> + +Signed-off-by: Vicente Olivert Riera <[email protected]> +--- + opal/asm/base/MIPS.asm | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/opal/asm/base/MIPS.asm b/opal/asm/base/MIPS.asm +index 3dd758c..83c12f2 100644 +--- a/opal/asm/base/MIPS.asm ++++ b/opal/asm/base/MIPS.asm +@@ -5,7 +5,12 @@ START_FILE + #else + #include <asm.h> + #endif ++#include <features.h> ++#ifdef __UCLIBC__ ++#include <sys/regdef.h> ++#else + #include <regdef.h> ++#endif + + TEXT + +-- +2.7.3 +
Signature · 1 line
2.7.3
PATCH 1/1 openmpi: fix uClibc regdef.h include path
Hello,
Quoted 9 lines · Vicente Olivert Riera
In uClibc the
regdef.hfile is located under the sys directory. Due to that openmpi is failing to build with an error like this one:atomic-asm.S:7:20: fatal error:
regdef.h: No such file or directory
#include <regdef.h>Add a patch in order to detect when we are building with uClibc and therefore include
regdef.hfrom the right location.
Quoted 8 lines
Pull request sent upstream:
https://github.com/open-mpi/ompi-release/pull/1241Fixes:
http://autobuild.buildroot.net/results/de5/de524cbef057c7c3cb45125ecf62202a2f74129c/
http://autobuild.buildroot.net/results/165/165bf4156b27ecea0b226550a42560f789659b03/Signed-off-by Vicente Olivert Riera <[email protected]>
This problem has actually been fixed in uClibc-ng 1.0.17, by commit
http://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=ff58e44fc38474b1898c59caf9a5e75d0d8c6c57.
We have updated Buildroot to uClibc-ng 1.0.17, so the problem will disappear once I rebuild the MIPS toolchain.
I believe using the fix in uClibc-ng is better than a workaround in the code itself, so I've marked your patch as rejected in patchwork.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 openmpi: fix uClibc regdef.h include path
Great, thanks Thomas!
Regards,
Vincent.
Quoted 33 lines · Thomas Petazzoni
Hello,
Quoted 9 lines · Vicente Olivert Riera
In uClibc the
regdef.hfile is located under the sys directory. Due to that openmpi is failing to build with an error like this one:atomic-asm.S:7:20: fatal error:
regdef.h: No such file or directory
#include <regdef.h>Add a patch in order to detect when we are building with uClibc and therefore include
regdef.hfrom the right location.Quoted 8 lines
Pull request sent upstream:
https://github.com/open-mpi/ompi-release/pull/1241Fixes:
http://autobuild.buildroot.net/results/de5/de524cbef057c7c3cb45125ecf62202a2f74129c/
http://autobuild.buildroot.net/results/165/165bf4156b27ecea0b226550a42560f789659b03/Signed-off-by Vicente Olivert Riera <[email protected]>This problem has actually been fixed in uClibc-ng 1.0.17, by commit
http://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=ff58e44fc38474b1898c59caf9a5e75d0d8c6c57.
We have updated Buildroot to uClibc-ng 1.0.17, so the problem will disappear once I rebuild the MIPS toolchain.I believe using the fix in uClibc-ng is better than a workaround in the code itself, so I've marked your patch as rejected in patchwork.
Thanks,
Thomas