* [PATCH 0/1] autotools.bbclass: use relative path for acpaths whenever possible @ 2012-11-09 5:47 Qi.Chen 2012-11-09 5:47 ` [PATCH 1/1] " Qi.Chen 0 siblings, 1 reply; 4+ messages in thread From: Qi.Chen @ 2012-11-09 5:47 UTC (permalink / raw) To: openembedded-core; +Cc: Zhenfeng.Zhao From: Chen Qi <Qi.Chen@windriver.com> The following changes since commit e421e95de0ce430cc2c6db9b0712a66ab96288a1: gnome-desktop: Now we depend on gnome-common-native, use the correct sysroot (2012-11-02 16:18:32 +0000) are available in the git repository at: git://git.pokylinux.org/poky-contrib ChenQi/autotools http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/autotools Chen Qi (1): autotools.bbclass: use relative path for acpaths whenever possible meta/classes/autotools.bbclass | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) -- 1.7.9.5 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] autotools.bbclass: use relative path for acpaths whenever possible 2012-11-09 5:47 [PATCH 0/1] autotools.bbclass: use relative path for acpaths whenever possible Qi.Chen @ 2012-11-09 5:47 ` Qi.Chen 2012-11-22 0:19 ` Saul Wold 0 siblings, 1 reply; 4+ messages in thread From: Qi.Chen @ 2012-11-09 5:47 UTC (permalink / raw) To: openembedded-core; +Cc: Zhenfeng.Zhao 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 b97d74b..86d8939 100644 --- a/meta/classes/autotools.bbclass +++ b/meta/classes/autotools.bbclass @@ -123,8 +123,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/" @@ -132,6 +135,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 @@ -161,11 +169,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 -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] autotools.bbclass: use relative path for acpaths whenever possible 2012-11-09 5:47 ` [PATCH 1/1] " Qi.Chen @ 2012-11-22 0:19 ` Saul Wold 2012-11-23 8:31 ` ChenQi 0 siblings, 1 reply; 4+ messages in thread From: Saul Wold @ 2012-11-22 0:19 UTC (permalink / raw) To: Qi.Chen; +Cc: Zhenfeng.Zhao, openembedded-core On 11/08/2012 09:47 PM, 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. > 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? Sau! > [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 b97d74b..86d8939 100644 > --- a/meta/classes/autotools.bbclass > +++ b/meta/classes/autotools.bbclass > @@ -123,8 +123,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/" > @@ -132,6 +135,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 > @@ -161,11 +169,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 > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] autotools.bbclass: use relative path for acpaths whenever possible 2012-11-22 0:19 ` Saul Wold @ 2012-11-23 8:31 ` ChenQi 0 siblings, 0 replies; 4+ messages in thread From: ChenQi @ 2012-11-23 8:31 UTC (permalink / raw) To: Saul Wold; +Cc: Zhenfeng.Zhao, openembedded-core [-- Attachment #1: Type: text/plain, Size: 5312 bytes --] On 11/22/2012 08:19 AM, Saul Wold wrote: > On 11/08/2012 09:47 PM, 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. >> > 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? > > Sau! > Hi Saul, Thank you for your suggestion. I did do the test before I sent out the patch, but at that time I only used 'bitbake core-image-sato'. However when I re-tested it yesterday with 'bitbake world', qt4-native configure failed. (Sorry for my carelessness.) The failure is not caused by the changes in autotools.bbclass. It failed to configure because *the path is too long to be fitted into the static char array defined in its qconfig.cpp file*. Below are some details: src/corelib/global/qconfig.cpp:11:67: *error: initializer-string for array of chars is too long* [-fpermissive] The statements in qconfig.cpp that caused this failure are: static const char qt_configure_prefix_path_str [*256* + 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\ /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\ ubs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs0/sysroots/x86_64-linux/usr"; static const char qt_configure_documentation_path_str[*256* + 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\ /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\ ubs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs/subs0/sysroots/x86_64-linux/usr/doc"; ... Anyway it should be fixed as part of bug#2766 (long TMPDIR problem). Thus, I'll rework on bug#2766 and try to fix it. However, statements in qconfig.cpp lead me to doubt about the length limit of TMPDIR (currently 410). As we see in qconfig.cpp, */if the TMPDIR has chars more than 256, it would fail for certain./* *I think we should re-consider the length limit for TMPDIR.* Thanks, Chen Qi > >> [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 b97d74b..86d8939 100644 >> --- a/meta/classes/autotools.bbclass >> +++ b/meta/classes/autotools.bbclass >> @@ -123,8 +123,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/" >> @@ -132,6 +135,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 >> @@ -161,11 +169,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 >> > [-- Attachment #2: Type: text/html, Size: 9233 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-23 8:45 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-11-09 5:47 [PATCH 0/1] autotools.bbclass: use relative path for acpaths whenever possible Qi.Chen 2012-11-09 5:47 ` [PATCH 1/1] " Qi.Chen 2012-11-22 0:19 ` Saul Wold 2012-11-23 8:31 ` ChenQi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox