All of lore.kernel.org
 help / color / mirror / Atom feed
From: ChenQi <Qi.Chen@windriver.com>
To: <Qi.Chen@windriver.com>
Cc: Zhenfeng.Zhao@windriver.com, openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/3] autotools.bbclass: use relative path for acpaths whenever possible
Date: Tue, 4 Dec 2012 10:57:00 +0800	[thread overview]
Message-ID: <50BD667C.6040005@windriver.com> (raw)
In-Reply-To: <22684c7fc852e5c43d241e760fe8e1af7095f9ff.1354084523.git.Qi.Chen@windriver.com>

Hi Richard,

I saw that this series of patches have been merged except this one.
Is there any problem with this patch?

The thing is, if we don't fix autotool.bbclass like this, building 
coreutils will fail with a long TMPDIR (bug#2766). I tried to build 
coretuils with TMPDIR of 200 char length, it failed.

Thanks,
Chen Qi

On 11/30/2012 11:08 AM, Qi.Chen@windriver.com wrote:
> From: Chen Qi<Qi.Chen@windriver.com>
>
> When the TMPDIR is very long, say, 410 characters, aclocal would
> fail because the argument list is too long. This patch is an effort
> to use relative path for acpaths whenever possible, aiming at
> making the build system work correctly when the sanity check says OK.
>
> With the current implementation of autoreconf, it's impossible to
> thoroughly replace absolute path with relative path. Therefore, we
> use relative path when there's on subdirectory to configure; otherwise,
> we use absolute path.
>
> [YOCTO #2766]
>
> Signed-off-by: Chen Qi<Qi.Chen@windriver.com>
> ---
>   meta/classes/autotools.bbclass |   14 +++++++++-----
>   1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
> index ca981ec..ce2d264 100644
> --- a/meta/classes/autotools.bbclass
> +++ b/meta/classes/autotools.bbclass
> @@ -138,8 +138,11 @@ autotools_do_configure() {
>   		rm -f `dirname $ac`/configure
>   		done )
>   	if [ -e ${S}/configure.in -o -e ${S}/configure.ac ]; then
> +               [ -e configure.in ]&&  CONFIGURE_AC=configure.in || CONFIGURE_AC=configure.ac
>   		olddir=`pwd`
>   		cd ${S}
> +		# Determine whether there's subdirs to configure
> +		grep -q -m 1 AC_CONFIG_SUBDIRS $CONFIGURE_AC&&  sub_cfg=1 || sub_cfg=0
>   		# Remove any previous copy of the m4 macros
>   		rm -rf ${B}/aclocal-copy/
>   		ACLOCAL="aclocal --system-acdir=${B}/aclocal-copy/"
> @@ -147,6 +150,11 @@ autotools_do_configure() {
>   			acpaths=
>   			for i in `find ${S} -maxdepth 2 -name \*.m4|grep -v 'aclocal.m4'| \
>   				grep -v 'acinclude.m4' | grep -v 'aclocal-copy' | sed -e 's,\(.*/\).*$,\1,'|sort -u`; do
> +			        # If no subdirs to configure, we use relative path
> +			        # This is used for supporting long TMPDIR in Yocto
> +			        if [ $sub_cfg == 0 ]; then
> +				        i=`echo $i | sed -e 's#${S}#\.#'`
> +				fi
>   				acpaths="$acpaths -I $i"
>   			done
>   		else
> @@ -176,11 +184,7 @@ autotools_do_configure() {
>   		if ! echo ${EXTRA_AUTORECONF} | grep -q "aclocal"; then
>   			rm -f aclocal.m4
>   		fi
> -		if [ -e configure.in ]; then
> -			CONFIGURE_AC=configure.in
> -		else
> -			CONFIGURE_AC=configure.ac
> -		fi
> +
>   		if grep "^[[:space:]]*AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC>/dev/null; then
>   			if grep "sed.*POTFILES" $CONFIGURE_AC>/dev/null; then
>   				: do nothing -- we still have an old unmodified configure.ac




  reply	other threads:[~2012-12-04  3:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-30  3:08 [PATCH 0/3] Make poky work correctly with long TMPDIR Qi.Chen
2012-11-30  3:08 ` [PATCH 1/3] autotools.bbclass: use relative path for acpaths whenever possible Qi.Chen
2012-12-04  2:57   ` ChenQi [this message]
2012-12-04  8:39     ` Richard Purdie
2012-12-04  9:03       ` ChenQi
2012-11-30  3:08 ` [PATCH 2/3] qt4-native: make qt4-native work with long building path Qi.Chen
2012-11-30  7:46   ` Martin Jansa
2012-11-30  8:01     ` ChenQi
2012-11-30  8:11       ` Martin Jansa
2012-11-30  9:05         ` ChenQi
2012-11-30  3:08 ` [PATCH 3/3] ghostscript: make ghostscript " Qi.Chen
2012-11-30 10:37 ` [PATCH 0/3] [V2] Make poky work correctly with long TMPDIR ChenQi
     [not found] <cover.1354265260.git.Qi.Chen@windriver.com>
2012-11-30 10:33 ` [PATCH 1/3] autotools.bbclass: use relative path for acpaths whenever possible Qi.Chen

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=50BD667C.6040005@windriver.com \
    --to=qi.chen@windriver.com \
    --cc=Zhenfeng.Zhao@windriver.com \
    --cc=openembedded-core@lists.openembedded.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.