<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
On 11/22/2012 08:19 AM, Saul Wold wrote:
<blockquote cite="mid:50AD6F8E.50807@linux.intel.com" type="cite">On
11/08/2012 09:47 PM, <a class="moz-txt-link-abbreviated"
href="mailto:Qi.Chen@windriver.com">Qi.Chen@windriver.com</a>
wrote: <br>
<blockquote type="cite">From: Chen Qi <a
class="moz-txt-link-rfc2396E"
href="mailto:Qi.Chen@windriver.com"><Qi.Chen@windriver.com></a>
<br>
<br>
When the TMPDIR is very long, say, 410 characters, aclocal would
<br>
fail because the argument list is too long. This patch is an
effort <br>
to use relative path for acpaths whenever possible, aiming at <br>
making the build system work correctly when the sanity check
says OK. <br>
<br>
With the current implementation of autoreconf, it's impossible
to <br>
thoroughly replace absolute path with relative path. Therefore,
we <br>
use relative path when there's on subdirectory to configure;
otherwise, <br>
we use absolute path. <br>
<br>
</blockquote>
Have you done a world build long path names with this patch on 1.4
and does it cause any failures with autoreconf and subdirs? <br>
<br>
Sau! <br>
<br>
</blockquote>
Hi Saul,<br>
<br>
Thank you for your suggestion. <br>
<br>
I did do the test before I sent out the patch, but at that time I
only used 'bitbake core-image-sato'.<br>
However when I re-tested it yesterday with 'bitbake world',
qt4-native configure failed.<br>
(Sorry for my carelessness.)<br>
<br>
The failure is not caused by the changes in autotools.bbclass. <br>
It failed to configure because <b>the path is too long to be fitted
into the static char array defined in its qconfig.cpp file</b>. <br>
<br>
Below are some details:<br>
src/corelib/global/qconfig.cpp:11:67: <b>error: initializer-string
for array of chars is too long</b> [-fpermissive]<br>
The statements in qconfig.cpp that caused this failure are:<br>
static const char qt_configure_prefix_path_str [<b>256</b> +
12] =
"qt_prfxpath=/buildarea/qchen1/poky/build-autotools-test/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs\<br>
/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/s\<br>
ubs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs0/sysroots/x86_64-linux/usr";<br>
static const char qt_configure_documentation_path_str[<b>256</b> +
12] =
"qt_docspath=/buildarea/qchen1/poky/build-autotools-test/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs\<br>
/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/s\<br>
ubs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs0/sysroots/x86_64-linux/usr/doc";<br>
...<br>
<br>
<br>
Anyway it should be fixed as part of bug#2766 (long TMPDIR problem).<br>
Thus, I'll rework on bug#2766 and try to fix it.<br>
<br>
However, statements in qconfig.cpp lead me to doubt about the length
limit of TMPDIR (currently 410).<br>
As we see in qconfig.cpp, <b><i>if the TMPDIR has chars more than
256, it would fail for certain.</i></b><br>
<br>
<b>I think we should re-consider the length limit for TMPDIR.</b><br>
<br>
<br>
Thanks,<br>
Chen Qi<br>
<br>
<br>
<br>
<blockquote cite="mid:50AD6F8E.50807@linux.intel.com" type="cite"> <br>
<blockquote type="cite">[YOCTO #2766] <br>
<br>
Signed-off-by: Chen Qi <a class="moz-txt-link-rfc2396E"
href="mailto:Qi.Chen@windriver.com"><Qi.Chen@windriver.com></a>
<br>
--- <br>
meta/classes/autotools.bbclass | 14 +++++++++----- <br>
1 file changed, 9 insertions(+), 5 deletions(-) <br>
<br>
diff --git a/meta/classes/autotools.bbclass
b/meta/classes/autotools.bbclass <br>
index b97d74b..86d8939 100644 <br>
--- a/meta/classes/autotools.bbclass <br>
+++ b/meta/classes/autotools.bbclass <br>
@@ -123,8 +123,11 @@ autotools_do_configure() { <br>
rm -f `dirname $ac`/configure <br>
done ) <br>
if [ -e ${S}/configure.in -o -e ${S}/configure.ac ]; then
<br>
+ [ -e configure.in ] &&
CONFIGURE_AC=configure.in || CONFIGURE_AC=configure.ac <br>
olddir=`pwd` <br>
cd ${S} <br>
+ # Determine whether there's subdirs to configure <br>
+ grep -q -m 1 AC_CONFIG_SUBDIRS $CONFIGURE_AC &&
sub_cfg=1 || sub_cfg=0 <br>
# Remove any previous copy of the m4 macros <br>
rm -rf ${B}/aclocal-copy/ <br>
ACLOCAL="aclocal --system-acdir=${B}/aclocal-copy/" <br>
@@ -132,6 +135,11 @@ autotools_do_configure() { <br>
acpaths= <br>
for i in `find ${S} -maxdepth 2 -name \*.m4|grep
-v 'aclocal.m4'| \ <br>
grep -v 'acinclude.m4' | grep -v
'aclocal-copy' | sed -e 's,\(.*/\).*$,\1,'|sort -u`; do <br>
+ # If no subdirs to configure, we use
relative path <br>
+ # This is used for supporting long TMPDIR
in Yocto <br>
+ if [ $sub_cfg == 0 ]; then <br>
+ i=`echo $i | sed -e 's#${S}#\.#'` <br>
+ fi <br>
acpaths="$acpaths -I $i" <br>
done <br>
else <br>
@@ -161,11 +169,7 @@ autotools_do_configure() { <br>
if ! echo ${EXTRA_AUTORECONF} | grep -q "aclocal";
then <br>
rm -f aclocal.m4 <br>
fi <br>
- if [ -e configure.in ]; then <br>
- CONFIGURE_AC=configure.in <br>
- else <br>
- CONFIGURE_AC=configure.ac <br>
- fi <br>
+ <br>
if grep "^[[:space:]]*AM_GLIB_GNU_GETTEXT"
$CONFIGURE_AC >/dev/null; then <br>
if grep "sed.*POTFILES" $CONFIGURE_AC
>/dev/null; then <br>
: do nothing -- we still have an old
unmodified configure.ac <br>
<br>
</blockquote>
<br>
</blockquote>
<br>
<br>
</body>
</html>