Openembedded Core Discussions
 help / color / mirror / Atom feed
* Autoconf problems in OE build of LTP realtime tests
@ 2014-09-05 20:36 Gary Robertson
  2014-09-05 21:51 ` Peter A. Bigot
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Gary Robertson @ 2014-09-05 20:36 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Mike Holmes

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

Dear OE developers,

Linaro Networking Group is building root filesystem images containing  the
LTP test suite, using the current recipe at
openembedded-core/meta/recipes-extended/ltp/ltp_20140422.bb.  This build
uses autoconf to probe mutex feature support for protocol specification,
priority inheritance, and robust mutexes.  The macros used for this can be
found in ltp/testcases/realtime/m4/check.m4 from the LTP git repository.

We are cross-building for the armv7a architecture using the machine
definition found in
meta-linaro/meta-linaro/conf/machine/genericarmv7a.conf.  The development
host platform is an Ubuntu 12.04 x86_64 platform with all software kept
regularly updated from the Ubuntu repositories.

The macros in check.m4 use the AC_TRY_COMPILE function macro to attempt
compilation of POSIX function calls utilizing the features being probed -
such that if the compilation fails the features are deemed to be
unsupported... and if compilation succeeds the features are deemed
supported.

Native compilation of the same code used in the probes, and execution of
the resulting program - shows support for all the probed mutex features on
both the development host as well as the armv7a target platform... that is
when this probe code is built on either the host or target machine and then
executed in that environment... so support is there in both environments.

Despite the presence of this support the AC_TRY_COMPILE macro is indicating
a lack of support for the probed features during the cross-build process.

I am not personally familiar with the detailed function of the autoconf
macros, and I can find no documentation about how OE interacts with those
macros in order to coerce them into configuring for the target machine in a
cross-build environment... so I am hoping the autoconf experts at OE can
shed some light on this and at least provide some clues as to where to look
for the problem and possible resolution.  Any insight you can provide in
this matter would be appreciated.

Gary Robertson

Real-time engineer, Linaro Networking Group

[-- Attachment #2: Type: text/html, Size: 2324 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Autoconf problems in OE build of LTP realtime tests
  2014-09-05 20:36 Autoconf problems in OE build of LTP realtime tests Gary Robertson
@ 2014-09-05 21:51 ` Peter A. Bigot
  2014-09-05 22:34 ` Randy Witt
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Peter A. Bigot @ 2014-09-05 21:51 UTC (permalink / raw)
  To: Gary Robertson, Patches and discussions about the oe-core layer
  Cc: Mike Holmes

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

On 09/05/2014 03:36 PM, Gary Robertson wrote:
> Dear OE developers,
>
> Linaro Networking Group is building root filesystem images containing  
> the LTP test suite, using the current recipe at 
> openembedded-core/meta/recipes-extended/ltp/ltp_20140422.bb 
> <http://ltp_20140422.bb>. This build uses autoconf to probe mutex 
> feature support for protocol specification, priority inheritance, and 
> robust mutexes.  The macros used for this can be found in 
> ltp/testcases/realtime/m4/check.m4 from the LTP git repository.
>
> We are cross-building for the armv7a architecture using the machine 
> definition found in 
> meta-linaro/meta-linaro/conf/machine/genericarmv7a.conf. The 
> development host platform is an Ubuntu 12.04 x86_64 platform with all 
> software kept regularly updated from the Ubuntu repositories.
>
> The macros in check.m4 use the AC_TRY_COMPILE function macro to 
> attempt compilation of POSIX function calls utilizing the features 
> being probed - such that if the compilation fails the features are 
> deemed to be unsupported... and if compilation succeeds the features 
> are deemed supported.
>
> Native compilation of the same code used in the probes, and execution 
> of the resulting program - shows support for all the probed mutex 
> features on both the development host as well as the armv7a target 
> platform... that is when this probe code is built on either the host 
> or target machine and then executed in that environment... so support 
> is there in both environments.
>
> Despite the presence of this support the AC_TRY_COMPILE macro is 
> indicating a lack of support for the probed features during the 
> cross-build process.
>
> I am not personally familiar with the detailed function of the 
> autoconf macros, and I can find no documentation about how OE 
> interacts with those macros in order to coerce them into configuring 
> for the target machine in a cross-build environment... so I am hoping 
> the autoconf experts at OE can shed some light on this and at least 
> provide some clues as to where to look for the problem and possible 
> resolution.  Any insight you can provide in this matter would be 
> appreciated.

Any mention of "armv7a" and "mutex" points me to 
http://cgit.openembedded.org/openembedded-core/commit/?id=0ba6ab39f187ecd4261f08e768f365f461384a3a 
which fixed a problem where the compiler and runtime disagreed about the 
capabilities of the target processor unless special flags were passed to 
the compiler.  Presence of armv7a enables mutex-related instructions 
which affect what support is provided in the C runtime system; absence 
of armv7 at compile-time will result in attempts to locate alternative 
implementations that are not present.

It's possible that a similar issue is hitting you, depending on what 
options are present in the test compile and whether the libraries linked 
to were built with compatible options.

I tried setting up a meta-linaro + meta-linaro-toolchain build to see if 
I could reproduce it, but meta-linaro appears to not be up to date with 
the removal of eglibc from oe-core.

The autoconf test should have left information in the config.log file 
showing how it tried to build the application.  Having that information 
would help with diagnosis.

Hope this is some help.

Peter

[-- Attachment #2: Type: text/html, Size: 4794 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Autoconf problems in OE build of LTP realtime tests
  2014-09-05 20:36 Autoconf problems in OE build of LTP realtime tests Gary Robertson
  2014-09-05 21:51 ` Peter A. Bigot
@ 2014-09-05 22:34 ` Randy Witt
  2014-09-29 11:07 ` Gary Robertson
  2014-09-29 18:52 ` Gary Robertson
  3 siblings, 0 replies; 5+ messages in thread
From: Randy Witt @ 2014-09-05 22:34 UTC (permalink / raw)
  To: Gary Robertson, Patches and discussions about the oe-core layer
  Cc: Mike Holmes

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


> I am not personally familiar with the detailed function of the autoconf
> macros, and I can find no documentation about how OE interacts with
> those macros in order to coerce them into configuring for the target
> machine in a cross-build environment... so I am hoping the autoconf
> experts at OE can shed some light on this and at least provide some
> clues as to where to look for the problem and possible resolution.  Any
> insight you can provide in this matter would be appreciated.

Gary,

I looked at the configure logs on an x86 build and saw the same problem. 
By default the autotools.bbclass searches for m4 macros in the source 
tree. But it searches a depth that is lower than the directory depth of 
the location of testcases/realtime/m4. That seems to be causing some of 
the macros to be missing and falsely causing features to be missing.

I made this patch and it seemed to address the issue. Let me know if it 
resolves the issues you are seeing.




[-- Attachment #2: 0001-ltp-Add-additional-m4-path-to-autoconf.patch --]
[-- Type: text/plain, Size: 1165 bytes --]

From bce5869545cacd4923b1efcf6e1218f65ad46af7 Mon Sep 17 00:00:00 2001
From: Randy Witt <randy.e.witt@linux.intel.com>
Date: Fri, 5 Sep 2014 15:00:59 -0700
Subject: [PATCH] ltp: Add additional m4 path to autoconf.

The ltp code has some m4 macros that are deeper than the default depth
that the directory depth the autotools.bbclass checks. This causes some
macros to not be found and for supported features to not be enabled.

This patch adds the extra m4 path to the autoconf arguments.
---
 meta/recipes-extended/ltp/ltp_20140422.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-extended/ltp/ltp_20140422.bb b/meta/recipes-extended/ltp/ltp_20140422.bb
index c658bc0..0b29ea4 100644
--- a/meta/recipes-extended/ltp/ltp_20140422.bb
+++ b/meta/recipes-extended/ltp/ltp_20140422.bb
@@ -37,6 +37,7 @@ TARGET_CC_ARCH += "${LDFLAGS}"
 export prefix = "/opt/ltp"
 export exec_prefix = "/opt/ltp"
 
+EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4"
 EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite "
 
 # ltp doesn't regenerate ffsb-6.0-rc2 configure and hardcode configure call.
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: Autoconf problems in OE build of LTP realtime tests
  2014-09-05 20:36 Autoconf problems in OE build of LTP realtime tests Gary Robertson
  2014-09-05 21:51 ` Peter A. Bigot
  2014-09-05 22:34 ` Randy Witt
@ 2014-09-29 11:07 ` Gary Robertson
  2014-09-29 18:52 ` Gary Robertson
  3 siblings, 0 replies; 5+ messages in thread
From: Gary Robertson @ 2014-09-29 11:07 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Mike Holmes

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

Thanks to Randy Witt for a patch which resolves this issue.  Randy wrote:
"I looked at the configure logs on an x86 build and saw the same problem.
By default the autotools.bbclass searches for m4 macros in the source tree.
But it searches a depth that is lower than the directory depth of the
location of testcases/realtime/m4. That seems to be causing some of the
macros to be missing and falsely causing features to be missing."  I
believe he will be submitting the patch soon, but am including a link below
for reference:

0001-ltp-Add-additional-m4-path-to-autoconf.patch
<https://mail.google.com/mail/u/0/?ui=2&ik=670054f0eb&view=att&th=14847f46218cf453&attid=0.1&disp=safe&zw>

On Fri, Sep 5, 2014 at 3:36 PM, Gary Robertson <gary.robertson@linaro.org>
wrote:

> Dear OE developers,
>
> Linaro Networking Group is building root filesystem images containing  the
> LTP test suite, using the current recipe at
> openembedded-core/meta/recipes-extended/ltp/ltp_20140422.bb.  This build
> uses autoconf to probe mutex feature support for protocol specification,
> priority inheritance, and robust mutexes.  The macros used for this can be
> found in ltp/testcases/realtime/m4/check.m4 from the LTP git repository.
>
> We are cross-building for the armv7a architecture using the machine
> definition found in
> meta-linaro/meta-linaro/conf/machine/genericarmv7a.conf.  The development
> host platform is an Ubuntu 12.04 x86_64 platform with all software kept
> regularly updated from the Ubuntu repositories.
>
> The macros in check.m4 use the AC_TRY_COMPILE function macro to attempt
> compilation of POSIX function calls utilizing the features being probed -
> such that if the compilation fails the features are deemed to be
> unsupported... and if compilation succeeds the features are deemed
> supported.
>
> Native compilation of the same code used in the probes, and execution of
> the resulting program - shows support for all the probed mutex features on
> both the development host as well as the armv7a target platform... that is
> when this probe code is built on either the host or target machine and then
> executed in that environment... so support is there in both environments.
>
> Despite the presence of this support the AC_TRY_COMPILE macro is
> indicating a lack of support for the probed features during the cross-build
> process.
>
> I am not personally familiar with the detailed function of the autoconf
> macros, and I can find no documentation about how OE interacts with those
> macros in order to coerce them into configuring for the target machine in a
> cross-build environment... so I am hoping the autoconf experts at OE can
> shed some light on this and at least provide some clues as to where to look
> for the problem and possible resolution.  Any insight you can provide in
> this matter would be appreciated.
>
> Gary Robertson
>
> Real-time engineer, Linaro Networking Group
>
>

[-- Attachment #2: Type: text/html, Size: 3476 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Autoconf problems in OE build of LTP realtime tests
  2014-09-05 20:36 Autoconf problems in OE build of LTP realtime tests Gary Robertson
                   ` (2 preceding siblings ...)
  2014-09-29 11:07 ` Gary Robertson
@ 2014-09-29 18:52 ` Gary Robertson
  3 siblings, 0 replies; 5+ messages in thread
From: Gary Robertson @ 2014-09-29 18:52 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Mike Holmes

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

Thanks to Randy Witt for a patch which resolves this issue.  Randy wrote:
"I looked at the configure logs on an x86 build and saw the same problem.
By default the autotools.bbclass searches for m4 macros in the source tree.
But it searches a depth that is lower than the directory depth of the
location of testcases/realtime/m4. That seems to be causing some of the
macros to be missing and falsely causing features to be missing."

I beiieve Randy will be submitting this patch soon, and included a link in
my previous response - but evidently that link worked for nobody but myself
- so with apologies I am re-transmitting the response with the patch text
included inline below for reference:

From bce5869545cacd4923b1efcf6e1218f65ad46af7 Mon Sep 17 00:00:00 2001
From: Randy Witt <randy.e.witt@linux.intel.com>
Date: Fri, 5 Sep 2014 15:00:59 -0700
Subject: [PATCH] ltp: Add additional m4 path to autoconf.

The ltp code has some m4 macros that are deeper than the default depth
that the directory depth the autotools.bbclass checks. This causes some
macros to not be found and for supported features to not be enabled.

This patch adds the extra m4 path to the autoconf arguments.
---
 meta/recipes-extended/ltp/ltp_20140422.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-extended/ltp/ltp_20140422.bb
b/meta/recipes-extended/ltp/ltp_20140422.bb
index c658bc0..0b29ea4 100644
--- a/meta/recipes-extended/ltp/ltp_20140422.bb
+++ b/meta/recipes-extended/ltp/ltp_20140422.bb
@@ -37,6 +37,7 @@ TARGET_CC_ARCH += "${LDFLAGS}"
 export prefix = "/opt/ltp"
 export exec_prefix = "/opt/ltp"

+EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4"
 EXTRA_OECONF = " --with-power-management-testsuite
--with-realtime-testsuite "

 # ltp doesn't regenerate ffsb-6.0-rc2 configure and hardcode configure
call.
-- 
1.9.3


On Fri, Sep 5, 2014 at 3:36 PM, Gary Robertson <gary.robertson@linaro.org>
wrote:

> Dear OE developers,
>
> Linaro Networking Group is building root filesystem images containing  the
> LTP test suite, using the current recipe at
> openembedded-core/meta/recipes-extended/ltp/ltp_20140422.bb.  This build
> uses autoconf to probe mutex feature support for protocol specification,
> priority inheritance, and robust mutexes.  The macros used for this can be
> found in ltp/testcases/realtime/m4/check.m4 from the LTP git repository.
>
> We are cross-building for the armv7a architecture using the machine
> definition found in
> meta-linaro/meta-linaro/conf/machine/genericarmv7a.conf.  The development
> host platform is an Ubuntu 12.04 x86_64 platform with all software kept
> regularly updated from the Ubuntu repositories.
>
> The macros in check.m4 use the AC_TRY_COMPILE function macro to attempt
> compilation of POSIX function calls utilizing the features being probed -
> such that if the compilation fails the features are deemed to be
> unsupported... and if compilation succeeds the features are deemed
> supported.
>
> Native compilation of the same code used in the probes, and execution of
> the resulting program - shows support for all the probed mutex features on
> both the development host as well as the armv7a target platform... that is
> when this probe code is built on either the host or target machine and then
> executed in that environment... so support is there in both environments.
>
> Despite the presence of this support the AC_TRY_COMPILE macro is
> indicating a lack of support for the probed features during the cross-build
> process.
>
> I am not personally familiar with the detailed function of the autoconf
> macros, and I can find no documentation about how OE interacts with those
> macros in order to coerce them into configuring for the target machine in a
> cross-build environment... so I am hoping the autoconf experts at OE can
> shed some light on this and at least provide some clues as to where to look
> for the problem and possible resolution.  Any insight you can provide in
> this matter would be appreciated.
>
> Gary Robertson
>
> Real-time engineer, Linaro Networking Group
>
>

[-- Attachment #2: Type: text/html, Size: 4994 bytes --]

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-09-29 18:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-05 20:36 Autoconf problems in OE build of LTP realtime tests Gary Robertson
2014-09-05 21:51 ` Peter A. Bigot
2014-09-05 22:34 ` Randy Witt
2014-09-29 11:07 ` Gary Robertson
2014-09-29 18:52 ` Gary Robertson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox