Skip to contentSkip to conversation

Make poky work correctly with long TMPDIR

PATCH In review [email protected] 3 participants 12 messages Nov 30, 2012 – Dec 4, 2012

lore
Share & tools
lore
#0 lore raw

cover Make poky work correctly with long TMPDIR

From: Chen Qi <[email protected]>

Poky had a problem with long TMPDIR.
If the TMPDIR had a length of 410 chars, for example, the world building would fail for three reasons.
1) autotools.bbclass: With long TMPDIR, aclocal would have a very long argument list whick makes building some packages (coretuils for example) fail.
2) qt4-native: It hardcodes some static char arrays to be 256.
3) ghostscript: It configures its MAX_TOKEN to be 256.

This series of patches are aimed at making poky building system working correctly with long TMPDIR. The three patches solve the three above problems respectively.

The following changes since commit 0d7d413d64bab8d3c758414c6c8c653ccc325653:

build-appliance-image: Update to dee77eca39f406f90e60d9c5ef7a66fcc8f57dbf commit (2012-11-21 20:40:43 +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 (3):
autotools.bbclass: use relative path for acpaths whenever possible
qt4-native: make qt4-native work with long building path
ghostscript: make ghostscript work with long building path

 meta/classes/autotools.bbclass                     |   14 ++--
 ...tscript-work-with-long-building-directory.patch |   19 +++++
 .../ghostscript/ghostscript_9.05.bb                |   10 +--
 ...e-qt4-native-work-with-long-building-path.patch |   82 ++++++++++++++++++++
 meta/recipes-qt/qt4/qt4-native.inc                 |    3 +-
 5 files changed, 116 insertions(+), 12 deletions(-)
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/0001-make-ghostscript-work-with-long-building-directory.patch
 create mode 100644 meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/3 autotools.bbclass: use relative path for acpaths whenever possible

From: Chen Qi <[email protected]>

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]

---
 meta/classes/autotools.bbclass |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
meta/classes/autotools.bbclass +9 -5
index ca981ec..ce2d264 100644
@@ -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
Signature · 1 line
1.7.9.5
author
#2 lore raw

Re: [PATCH 1/3] autotools.bbclass: use relative path for acpaths whenever possible

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

Quoted 60 lines · On 11/30/2012 11:08 AM, [email protected] wrote:

From: Chen Qi<[email protected]>

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]

---
  meta/classes/autotools.bbclass |   14 +++++++++-----
  1 file changed, 9 insertions(+), 5 deletions(-)
meta/classes/autotools.bbclass +9 -5
index ca981ec..ce2d264 100644
@@ -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
#3 lore raw

Re: [PATCH 1/3] autotools.bbclass: use relative path for acpaths whenever possible

Quoted 8 lines · ChenQi

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.

I know but I'm rather unhappy having the autotools code work two rather different ways depending on the number of configure scripts a project has, it all seems like a bit of a hack :(

I don't like the fix but I haven't found time to propose any alternative...

Cheers,

Richard

author
#4 lore raw

Re: [PATCH 1/3] autotools.bbclass: use relative path for acpaths whenever possible

Quoted 13 lines · Richard Purdie
Quoted 8 lines · ChenQi

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.

I know but I'm rather unhappy having the autotools code work two rather different ways depending on the number of configure scripts a project has, it all seems like a bit of a hack :(

Quoted 8 lines

I don't like the fix but I haven't found time to propose any alternative...

Cheers,

Richard

OK. I see.
I've tried a lot but I can't figure out a better way to do it. Hope someone could come up with a better proposal to this problem:)

Thanks,
Chen Qi

#5 lore raw

PATCH 2/3 qt4-native: make qt4-native work with long building path

In reply to [email protected]

From: Chen Qi <[email protected]>

If the TMPDIR has more than 256 chars, building qt4-native fails. This violates the 410 length limit of TMPDIR.

This patch makes building qt4-native succeed with a long building path (410 for example) by extending its static arrays' sizes by 256 chars.

[YOCTO #2766]

---
 ...e-qt4-native-work-with-long-building-path.patch |   82 ++++++++++++++++++++
 meta/recipes-qt/qt4/qt4-native.inc                 |    3 +-
 2 files changed, 84 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch
meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch new file +82 -0
new file mode 100644
index 0000000..74f4e1a
@@ -0,0 +1,82 @@
+Upstream-Status: Pending
+
+Make qt4-native work with long building path.
+
+Signed-off-by: Chen Qi <[email protected]>
+
+Index: configure
+=====================================================================
+--- a/configure
++++ b/configure
+@@ -4764,8 +4764,8 @@ DEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INST
+ TODAY=`date +%Y-%m-%d`
+ cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
+ /* License Info */
+-static const char qt_configure_licensee_str          [256 + 12] = "$LICENSE_USER_STR";
+-static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
++static const char qt_configure_licensee_str          [512 + 12] = "$LICENSE_USER_STR";
++static const char qt_configure_licensed_products_str [512 + 12] = "$LICENSE_PRODUCTS_STR";
+ 
+ /* Installation date */
+ static const char qt_configure_installation          [12+11]    = "qt_instdate=$TODAY";
+@@ -4790,36 +4790,36 @@ if [ ! -z "$QT_HOST_PREFIX" ]; then
+ 
+ #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
+ /* Installation Info */
+-static const char qt_configure_prefix_path_str       [256 + 12] = "$HOSTPREFIX_PATH_STR";
+-static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
+-static const char qt_configure_headers_path_str      [256 + 12] = "$HOSTHEADERS_PATH_STR";
+-static const char qt_configure_libraries_path_str    [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
+-static const char qt_configure_binaries_path_str     [256 + 12] = "$HOSTBINARIES_PATH_STR";
+-static const char qt_configure_plugins_path_str      [256 + 12] = "$HOSTPLUGINS_PATH_STR";
+-static const char qt_configure_imports_path_str      [256 + 12] = "$HOSTIMPORTS_PATH_STR";
+-static const char qt_configure_data_path_str         [256 + 12] = "$HOSTDATA_PATH_STR";
+-static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
+-static const char qt_configure_settings_path_str     [256 + 12] = "$HOSTSETTINGS_PATH_STR";
+-static const char qt_configure_examples_path_str     [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
+-static const char qt_configure_demos_path_str        [256 + 12] = "$HOSTDEMOS_PATH_STR";
++static const char qt_configure_prefix_path_str       [512 + 12] = "$HOSTPREFIX_PATH_STR";
++static const char qt_configure_documentation_path_str[512 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
++static const char qt_configure_headers_path_str      [512 + 12] = "$HOSTHEADERS_PATH_STR";
++static const char qt_configure_libraries_path_str    [512 + 12] = "$HOSTLIBRARIES_PATH_STR";
++static const char qt_configure_binaries_path_str     [512 + 12] = "$HOSTBINARIES_PATH_STR";
++static const char qt_configure_plugins_path_str      [512 + 12] = "$HOSTPLUGINS_PATH_STR";
++static const char qt_configure_imports_path_str      [512 + 12] = "$HOSTIMPORTS_PATH_STR";
++static const char qt_configure_data_path_str         [512 + 12] = "$HOSTDATA_PATH_STR";
++static const char qt_configure_translations_path_str [512 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
++static const char qt_configure_settings_path_str     [512 + 12] = "$HOSTSETTINGS_PATH_STR";
++static const char qt_configure_examples_path_str     [512 + 12] = "$HOSTEXAMPLES_PATH_STR";
++static const char qt_configure_demos_path_str        [512 + 12] = "$HOSTDEMOS_PATH_STR";
+ #else // QT_BOOTSTRAPPED
+ EOF
+ fi
+ 
+ cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
+ /* Installation Info */
+-static const char qt_configure_prefix_path_str       [256 + 12] = "$PREFIX_PATH_STR";
+-static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
+-static const char qt_configure_headers_path_str      [256 + 12] = "$HEADERS_PATH_STR";
+-static const char qt_configure_libraries_path_str    [256 + 12] = "$LIBRARIES_PATH_STR";
+-static const char qt_configure_binaries_path_str     [256 + 12] = "$BINARIES_PATH_STR";
+-static const char qt_configure_plugins_path_str      [256 + 12] = "$PLUGINS_PATH_STR";
+-static const char qt_configure_imports_path_str      [256 + 12] = "$IMPORTS_PATH_STR";
+-static const char qt_configure_data_path_str         [256 + 12] = "$DATA_PATH_STR";
+-static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
+-static const char qt_configure_settings_path_str     [256 + 12] = "$SETTINGS_PATH_STR";
+-static const char qt_configure_examples_path_str     [256 + 12] = "$EXAMPLES_PATH_STR";
+-static const char qt_configure_demos_path_str        [256 + 12] = "$DEMOS_PATH_STR";
++static const char qt_configure_prefix_path_str       [512 + 12] = "$PREFIX_PATH_STR";
++static const char qt_configure_documentation_path_str[512 + 12] = "$DOCUMENTATION_PATH_STR";
++static const char qt_configure_headers_path_str      [512 + 12] = "$HEADERS_PATH_STR";
++static const char qt_configure_libraries_path_str    [512 + 12] = "$LIBRARIES_PATH_STR";
++static const char qt_configure_binaries_path_str     [512 + 12] = "$BINARIES_PATH_STR";
++static const char qt_configure_plugins_path_str      [512 + 12] = "$PLUGINS_PATH_STR";
++static const char qt_configure_imports_path_str      [512 + 12] = "$IMPORTS_PATH_STR";
++static const char qt_configure_data_path_str         [512 + 12] = "$DATA_PATH_STR";
++static const char qt_configure_translations_path_str [512 + 12] = "$TRANSLATIONS_PATH_STR";
++static const char qt_configure_settings_path_str     [512 + 12] = "$SETTINGS_PATH_STR";
++static const char qt_configure_examples_path_str     [512 + 12] = "$EXAMPLES_PATH_STR";
++static const char qt_configure_demos_path_str        [512 + 12] = "$DEMOS_PATH_STR";
+ EOF
+ 
+ if [ ! -z "$QT_HOST_PREFIX" ]; then
meta/recipes-qt/qt4/qt4-native.inc +2 -1
index ad20723..42e2801 100644
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \
                     file://LICENSE.GPL3;md5=babc5b6b77441da277f5c06b2e547720 \
                     file://LGPL_EXCEPTION.txt;md5=411080a56ff917a5a1aa08c98acae354"
 
-INC_PR = "r18"
+INC_PR = "r19"
 
 inherit native
 
@@ -17,6 +17,7 @@ SRC_URI = "http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-sr
            file://0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
            file://0002-qkbdtty_qws-fix-build-with-old-kernel-headers.patch \
            file://0003-webkit2-set-OUTPUT_DIR-value-if-empty.patch \
+	   file://0001-make-qt4-native-work-with-long-building-path.patch \
            file://g++.conf \
            file://linux.conf \
 	"
Signature · 1 line
1.7.9.5
#6 lore raw

Re: [PATCH 2/3] qt4-native: make qt4-native work with long building path

Quoted 24 lines · On Fri, Nov 30, 2012 at 11:08:43AM +0800, [email protected] wrote:

From: Chen Qi <[email protected]>

If the TMPDIR has more than 256 chars, building qt4-native fails. This violates the 410 length limit of TMPDIR.

This patch makes building qt4-native succeed with a long building path (410 for example) by extending its static arrays' sizes by 256 chars.

[YOCTO #2766]

---
 ...e-qt4-native-work-with-long-building-path.patch |   82 ++++++++++++++++++++
 meta/recipes-qt/qt4/qt4-native.inc                 |    3 +-
 2 files changed, 84 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch
meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch new file +0 -0
new file mode 100644
index 0000000..74f4e1a

meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch line 1

Quoted 1 line
meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch new file +1 -0
@@ -0,0 +1,82 @@
+Upstream-Status: Pending

Why not submit this upstream? And isn't the same problem in target recipes?

Quoted 94 lines
meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch new file +80 -0
+Make qt4-native work with long building path.
+
+Signed-off-by: Chen Qi <[email protected]>
+
+Index: configure
+=====================================================================
+--- a/configure
++++ b/configure
+@@ -4764,8 +4764,8 @@ DEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INST
+ TODAY=`date +%Y-%m-%d`
+ cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
+ /* License Info */
+-static const char qt_configure_licensee_str          [256 + 12] = "$LICENSE_USER_STR";
+-static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
++static const char qt_configure_licensee_str          [512 + 12] = "$LICENSE_USER_STR";
++static const char qt_configure_licensed_products_str [512 + 12] = "$LICENSE_PRODUCTS_STR";
+ 
+ /* Installation date */
+ static const char qt_configure_installation          [12+11]    = "qt_instdate=$TODAY";
+@@ -4790,36 +4790,36 @@ if [ ! -z "$QT_HOST_PREFIX" ]; then
+ 
+ #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
+ /* Installation Info */
+-static const char qt_configure_prefix_path_str       [256 + 12] = "$HOSTPREFIX_PATH_STR";
+-static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
+-static const char qt_configure_headers_path_str      [256 + 12] = "$HOSTHEADERS_PATH_STR";
+-static const char qt_configure_libraries_path_str    [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
+-static const char qt_configure_binaries_path_str     [256 + 12] = "$HOSTBINARIES_PATH_STR";
+-static const char qt_configure_plugins_path_str      [256 + 12] = "$HOSTPLUGINS_PATH_STR";
+-static const char qt_configure_imports_path_str      [256 + 12] = "$HOSTIMPORTS_PATH_STR";
+-static const char qt_configure_data_path_str         [256 + 12] = "$HOSTDATA_PATH_STR";
+-static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
+-static const char qt_configure_settings_path_str     [256 + 12] = "$HOSTSETTINGS_PATH_STR";
+-static const char qt_configure_examples_path_str     [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
+-static const char qt_configure_demos_path_str        [256 + 12] = "$HOSTDEMOS_PATH_STR";
++static const char qt_configure_prefix_path_str       [512 + 12] = "$HOSTPREFIX_PATH_STR";
++static const char qt_configure_documentation_path_str[512 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
++static const char qt_configure_headers_path_str      [512 + 12] = "$HOSTHEADERS_PATH_STR";
++static const char qt_configure_libraries_path_str    [512 + 12] = "$HOSTLIBRARIES_PATH_STR";
++static const char qt_configure_binaries_path_str     [512 + 12] = "$HOSTBINARIES_PATH_STR";
++static const char qt_configure_plugins_path_str      [512 + 12] = "$HOSTPLUGINS_PATH_STR";
++static const char qt_configure_imports_path_str      [512 + 12] = "$HOSTIMPORTS_PATH_STR";
++static const char qt_configure_data_path_str         [512 + 12] = "$HOSTDATA_PATH_STR";
++static const char qt_configure_translations_path_str [512 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
++static const char qt_configure_settings_path_str     [512 + 12] = "$HOSTSETTINGS_PATH_STR";
++static const char qt_configure_examples_path_str     [512 + 12] = "$HOSTEXAMPLES_PATH_STR";
++static const char qt_configure_demos_path_str        [512 + 12] = "$HOSTDEMOS_PATH_STR";
+ #else // QT_BOOTSTRAPPED
+ EOF
+ fi
+ 
+ cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
+ /* Installation Info */
+-static const char qt_configure_prefix_path_str       [256 + 12] = "$PREFIX_PATH_STR";
+-static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
+-static const char qt_configure_headers_path_str      [256 + 12] = "$HEADERS_PATH_STR";
+-static const char qt_configure_libraries_path_str    [256 + 12] = "$LIBRARIES_PATH_STR";
+-static const char qt_configure_binaries_path_str     [256 + 12] = "$BINARIES_PATH_STR";
+-static const char qt_configure_plugins_path_str      [256 + 12] = "$PLUGINS_PATH_STR";
+-static const char qt_configure_imports_path_str      [256 + 12] = "$IMPORTS_PATH_STR";
+-static const char qt_configure_data_path_str         [256 + 12] = "$DATA_PATH_STR";
+-static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
+-static const char qt_configure_settings_path_str     [256 + 12] = "$SETTINGS_PATH_STR";
+-static const char qt_configure_examples_path_str     [256 + 12] = "$EXAMPLES_PATH_STR";
+-static const char qt_configure_demos_path_str        [256 + 12] = "$DEMOS_PATH_STR";
++static const char qt_configure_prefix_path_str       [512 + 12] = "$PREFIX_PATH_STR";
++static const char qt_configure_documentation_path_str[512 + 12] = "$DOCUMENTATION_PATH_STR";
++static const char qt_configure_headers_path_str      [512 + 12] = "$HEADERS_PATH_STR";
++static const char qt_configure_libraries_path_str    [512 + 12] = "$LIBRARIES_PATH_STR";
++static const char qt_configure_binaries_path_str     [512 + 12] = "$BINARIES_PATH_STR";
++static const char qt_configure_plugins_path_str      [512 + 12] = "$PLUGINS_PATH_STR";
++static const char qt_configure_imports_path_str      [512 + 12] = "$IMPORTS_PATH_STR";
++static const char qt_configure_data_path_str         [512 + 12] = "$DATA_PATH_STR";
++static const char qt_configure_translations_path_str [512 + 12] = "$TRANSLATIONS_PATH_STR";
++static const char qt_configure_settings_path_str     [512 + 12] = "$SETTINGS_PATH_STR";
++static const char qt_configure_examples_path_str     [512 + 12] = "$EXAMPLES_PATH_STR";
++static const char qt_configure_demos_path_str        [512 + 12] = "$DEMOS_PATH_STR";
+ EOF
+ 
+ if [ ! -z "$QT_HOST_PREFIX" ]; then
meta/recipes-qt/qt4/qt4-native.inc +1 -1
index ad20723..42e2801 100644
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \
                     file://LICENSE.GPL3;md5=babc5b6b77441da277f5c06b2e547720 \
                     file://LGPL_EXCEPTION.txt;md5=411080a56ff917a5a1aa08c98acae354"
 
-INC_PR = "r18"
+INC_PR = "r19"
 
 inherit native
 

meta/recipes-qt/qt4/qt4-native.inc SRC_URI = "http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-sr · line 20

Quoted 4 lines
meta/recipes-qt/qt4/qt4-native.inc +1 -0
@@ -17,6 +17,7 @@ SRC_URI = "http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-sr
            file://0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
            file://0002-qkbdtty_qws-fix-build-with-old-kernel-headers.patch \
            file://0003-webkit2-set-OUTPUT_DIR-value-if-empty.patch \
+	   file://0001-make-qt4-native-work-with-long-building-path.patch \

Please don't mix tabs and spaces for indentation.

Quoted 11 lines
meta/recipes-qt/qt4/qt4-native.inc +0 -0
            file://g++.conf \
            file://linux.conf \
 	"
Signature · 7 lines
1.7.9.5


_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
author
#7 lore raw

Re: [PATCH 2/3] qt4-native: make qt4-native work with long building path

Quoted 19 lines · Martin Jansa
Quoted 18 lines · On Fri, Nov 30, 2012 at 11:08:43AM +0800, [email protected] wrote:

From: Chen Qi<[email protected]>

If the TMPDIR has more than 256 chars, building qt4-native fails. This violates the 410 length limit of TMPDIR.

This patch makes building qt4-native succeed with a long building path (410 for example) by extending its static arrays' sizes by 256 chars.

[YOCTO #2766]

---
  ...e-qt4-native-work-with-long-building-path.patch |   82 ++++++++++++++++++++
  meta/recipes-qt/qt4/qt4-native.inc                 |    3 +-
  2 files changed, 84 insertions(+), 1 deletion(-)

create mode 100644 meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch

Quoted 9 lines

meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch line 1

Quoted 7 lines
meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch new file +1 -0
new file mode 100644
index 0000000..74f4e1a
@@ -0,0 +1,82 @@
+Upstream-Status: Pending

Why not submit this upstream? And isn't the same problem in target recipes?

I've tried and are now waiting for their reply.
There's no such problem in target recipe.

Quoted 91 lines
Quoted 91 lines
meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch new file +80 -0
+Make qt4-native work with long building path.
+
+Signed-off-by: Chen Qi<[email protected]>
+
+Index: configure
+=====================================================================
+--- a/configure
++++ b/configure
+@@ -4764,8 +4764,8 @@ DEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INST
+ TODAY=`date +%Y-%m-%d`
+ cat>  "$outpath/src/corelib/global/qconfig.cpp.new"<<EOF
+ /* License Info */
+-static const char qt_configure_licensee_str          [256 + 12] = "$LICENSE_USER_STR";
+-static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
++static const char qt_configure_licensee_str          [512 + 12] = "$LICENSE_USER_STR";
++static const char qt_configure_licensed_products_str [512 + 12] = "$LICENSE_PRODUCTS_STR";
+
+ /* Installation date */
+ static const char qt_configure_installation          [12+11]    = "qt_instdate=$TODAY";
+@@ -4790,36 +4790,36 @@ if [ ! -z "$QT_HOST_PREFIX" ]; then
+
+ #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
+ /* Installation Info */
+-static const char qt_configure_prefix_path_str       [256 + 12] = "$HOSTPREFIX_PATH_STR";
+-static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
+-static const char qt_configure_headers_path_str      [256 + 12] = "$HOSTHEADERS_PATH_STR";
+-static const char qt_configure_libraries_path_str    [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
+-static const char qt_configure_binaries_path_str     [256 + 12] = "$HOSTBINARIES_PATH_STR";
+-static const char qt_configure_plugins_path_str      [256 + 12] = "$HOSTPLUGINS_PATH_STR";
+-static const char qt_configure_imports_path_str      [256 + 12] = "$HOSTIMPORTS_PATH_STR";
+-static const char qt_configure_data_path_str         [256 + 12] = "$HOSTDATA_PATH_STR";
+-static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
+-static const char qt_configure_settings_path_str     [256 + 12] = "$HOSTSETTINGS_PATH_STR";
+-static const char qt_configure_examples_path_str     [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
+-static const char qt_configure_demos_path_str        [256 + 12] = "$HOSTDEMOS_PATH_STR";
++static const char qt_configure_prefix_path_str       [512 + 12] = "$HOSTPREFIX_PATH_STR";
++static const char qt_configure_documentation_path_str[512 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
++static const char qt_configure_headers_path_str      [512 + 12] = "$HOSTHEADERS_PATH_STR";
++static const char qt_configure_libraries_path_str    [512 + 12] = "$HOSTLIBRARIES_PATH_STR";
++static const char qt_configure_binaries_path_str     [512 + 12] = "$HOSTBINARIES_PATH_STR";
++static const char qt_configure_plugins_path_str      [512 + 12] = "$HOSTPLUGINS_PATH_STR";
++static const char qt_configure_imports_path_str      [512 + 12] = "$HOSTIMPORTS_PATH_STR";
++static const char qt_configure_data_path_str         [512 + 12] = "$HOSTDATA_PATH_STR";
++static const char qt_configure_translations_path_str [512 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
++static const char qt_configure_settings_path_str     [512 + 12] = "$HOSTSETTINGS_PATH_STR";
++static const char qt_configure_examples_path_str     [512 + 12] = "$HOSTEXAMPLES_PATH_STR";
++static const char qt_configure_demos_path_str        [512 + 12] = "$HOSTDEMOS_PATH_STR";
+ #else // QT_BOOTSTRAPPED
+ EOF
+ fi
+
+ cat>>  "$outpath/src/corelib/global/qconfig.cpp.new"<<EOF
+ /* Installation Info */
+-static const char qt_configure_prefix_path_str       [256 + 12] = "$PREFIX_PATH_STR";
+-static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
+-static const char qt_configure_headers_path_str      [256 + 12] = "$HEADERS_PATH_STR";
+-static const char qt_configure_libraries_path_str    [256 + 12] = "$LIBRARIES_PATH_STR";
+-static const char qt_configure_binaries_path_str     [256 + 12] = "$BINARIES_PATH_STR";
+-static const char qt_configure_plugins_path_str      [256 + 12] = "$PLUGINS_PATH_STR";
+-static const char qt_configure_imports_path_str      [256 + 12] = "$IMPORTS_PATH_STR";
+-static const char qt_configure_data_path_str         [256 + 12] = "$DATA_PATH_STR";
+-static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
+-static const char qt_configure_settings_path_str     [256 + 12] = "$SETTINGS_PATH_STR";
+-static const char qt_configure_examples_path_str     [256 + 12] = "$EXAMPLES_PATH_STR";
+-static const char qt_configure_demos_path_str        [256 + 12] = "$DEMOS_PATH_STR";
++static const char qt_configure_prefix_path_str       [512 + 12] = "$PREFIX_PATH_STR";
++static const char qt_configure_documentation_path_str[512 + 12] = "$DOCUMENTATION_PATH_STR";
++static const char qt_configure_headers_path_str      [512 + 12] = "$HEADERS_PATH_STR";
++static const char qt_configure_libraries_path_str    [512 + 12] = "$LIBRARIES_PATH_STR";
++static const char qt_configure_binaries_path_str     [512 + 12] = "$BINARIES_PATH_STR";
++static const char qt_configure_plugins_path_str      [512 + 12] = "$PLUGINS_PATH_STR";
++static const char qt_configure_imports_path_str      [512 + 12] = "$IMPORTS_PATH_STR";
++static const char qt_configure_data_path_str         [512 + 12] = "$DATA_PATH_STR";
++static const char qt_configure_translations_path_str [512 + 12] = "$TRANSLATIONS_PATH_STR";
++static const char qt_configure_settings_path_str     [512 + 12] = "$SETTINGS_PATH_STR";
++static const char qt_configure_examples_path_str     [512 + 12] = "$EXAMPLES_PATH_STR";
++static const char qt_configure_demos_path_str        [512 + 12] = "$DEMOS_PATH_STR";
+ EOF
+
+ if [ ! -z "$QT_HOST_PREFIX" ]; then
meta/recipes-qt/qt4/qt4-native.inc +1 -1
index ad20723..42e2801 100644
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \
                      file://LICENSE.GPL3;md5=babc5b6b77441da277f5c06b2e547720 \
                      file://LGPL_EXCEPTION.txt;md5=411080a56ff917a5a1aa08c98acae354"
 
-INC_PR = "r18"
+INC_PR = "r19"
 
Quoted 8 lines

meta/recipes-qt/qt4/qt4-native.inc SRC_URI = "http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-sr · line 20

Quoted 7 lines
meta/recipes-qt/qt4/qt4-native.inc +1 -0
  inherit native
 
@@ -17,6 +17,7 @@ SRC_URI = "http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-sr
             file://0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
             file://0002-qkbdtty_qws-fix-build-with-old-kernel-headers.patch \
             file://0003-webkit2-set-OUTPUT_DIR-value-if-empty.patch \
+	   file://0001-make-qt4-native-work-with-long-building-path.patch \

Please don't mix tabs and spaces for indentation.

I didn't fix indentation. I'm also curious about why it appears this way. On my computer, it's ok.

Quoted 11 lines
Quoted 11 lines
meta/recipes-qt/qt4/qt4-native.inc +0 -0
             file://g++.conf \
             file://linux.conf \
  	"
Signature · 7 lines
1.7.9.5


_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
#8 lore raw

Re: [PATCH 2/3] qt4-native: make qt4-native work with long building path

Quoted 29 lines · ChenQi
Quoted 19 lines · Martin Jansa
Quoted 18 lines · On Fri, Nov 30, 2012 at 11:08:43AM +0800, [email protected] wrote:

From: Chen Qi<[email protected]>

If the TMPDIR has more than 256 chars, building qt4-native fails. This violates the 410 length limit of TMPDIR.

This patch makes building qt4-native succeed with a long building path (410 for example) by extending its static arrays' sizes by 256 chars.

[YOCTO #2766]

---
  ...e-qt4-native-work-with-long-building-path.patch |   82 ++++++++++++++++++++
  meta/recipes-qt/qt4/qt4-native.inc                 |    3 +-
  2 files changed, 84 insertions(+), 1 deletion(-)

create mode 100644 meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch

Quoted 9 lines

meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch line 1

Quoted 7 lines
meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch new file +1 -0
new file mode 100644
index 0000000..74f4e1a
@@ -0,0 +1,82 @@
+Upstream-Status: Pending

Why not submit this upstream? And isn't the same problem in target recipes?

Quoted 1 line

I've tried and are now waiting for their reply.

OK, so it's Submitted now, right?

Quoted 102 lines

There's no such problem in target recipe.

Quoted 91 lines
Quoted 91 lines
meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch new file +80 -0
+Make qt4-native work with long building path.
+
+Signed-off-by: Chen Qi<[email protected]>
+
+Index: configure
+=====================================================================
+--- a/configure
++++ b/configure
+@@ -4764,8 +4764,8 @@ DEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INST
+ TODAY=`date +%Y-%m-%d`
+ cat>  "$outpath/src/corelib/global/qconfig.cpp.new"<<EOF
+ /* License Info */
+-static const char qt_configure_licensee_str          [256 + 12] = "$LICENSE_USER_STR";
+-static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
++static const char qt_configure_licensee_str          [512 + 12] = "$LICENSE_USER_STR";
++static const char qt_configure_licensed_products_str [512 + 12] = "$LICENSE_PRODUCTS_STR";
+
+ /* Installation date */
+ static const char qt_configure_installation          [12+11]    = "qt_instdate=$TODAY";
+@@ -4790,36 +4790,36 @@ if [ ! -z "$QT_HOST_PREFIX" ]; then
+
+ #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
+ /* Installation Info */
+-static const char qt_configure_prefix_path_str       [256 + 12] = "$HOSTPREFIX_PATH_STR";
+-static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
+-static const char qt_configure_headers_path_str      [256 + 12] = "$HOSTHEADERS_PATH_STR";
+-static const char qt_configure_libraries_path_str    [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
+-static const char qt_configure_binaries_path_str     [256 + 12] = "$HOSTBINARIES_PATH_STR";
+-static const char qt_configure_plugins_path_str      [256 + 12] = "$HOSTPLUGINS_PATH_STR";
+-static const char qt_configure_imports_path_str      [256 + 12] = "$HOSTIMPORTS_PATH_STR";
+-static const char qt_configure_data_path_str         [256 + 12] = "$HOSTDATA_PATH_STR";
+-static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
+-static const char qt_configure_settings_path_str     [256 + 12] = "$HOSTSETTINGS_PATH_STR";
+-static const char qt_configure_examples_path_str     [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
+-static const char qt_configure_demos_path_str        [256 + 12] = "$HOSTDEMOS_PATH_STR";
++static const char qt_configure_prefix_path_str       [512 + 12] = "$HOSTPREFIX_PATH_STR";
++static const char qt_configure_documentation_path_str[512 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
++static const char qt_configure_headers_path_str      [512 + 12] = "$HOSTHEADERS_PATH_STR";
++static const char qt_configure_libraries_path_str    [512 + 12] = "$HOSTLIBRARIES_PATH_STR";
++static const char qt_configure_binaries_path_str     [512 + 12] = "$HOSTBINARIES_PATH_STR";
++static const char qt_configure_plugins_path_str      [512 + 12] = "$HOSTPLUGINS_PATH_STR";
++static const char qt_configure_imports_path_str      [512 + 12] = "$HOSTIMPORTS_PATH_STR";
++static const char qt_configure_data_path_str         [512 + 12] = "$HOSTDATA_PATH_STR";
++static const char qt_configure_translations_path_str [512 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
++static const char qt_configure_settings_path_str     [512 + 12] = "$HOSTSETTINGS_PATH_STR";
++static const char qt_configure_examples_path_str     [512 + 12] = "$HOSTEXAMPLES_PATH_STR";
++static const char qt_configure_demos_path_str        [512 + 12] = "$HOSTDEMOS_PATH_STR";
+ #else // QT_BOOTSTRAPPED
+ EOF
+ fi
+
+ cat>>  "$outpath/src/corelib/global/qconfig.cpp.new"<<EOF
+ /* Installation Info */
+-static const char qt_configure_prefix_path_str       [256 + 12] = "$PREFIX_PATH_STR";
+-static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
+-static const char qt_configure_headers_path_str      [256 + 12] = "$HEADERS_PATH_STR";
+-static const char qt_configure_libraries_path_str    [256 + 12] = "$LIBRARIES_PATH_STR";
+-static const char qt_configure_binaries_path_str     [256 + 12] = "$BINARIES_PATH_STR";
+-static const char qt_configure_plugins_path_str      [256 + 12] = "$PLUGINS_PATH_STR";
+-static const char qt_configure_imports_path_str      [256 + 12] = "$IMPORTS_PATH_STR";
+-static const char qt_configure_data_path_str         [256 + 12] = "$DATA_PATH_STR";
+-static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
+-static const char qt_configure_settings_path_str     [256 + 12] = "$SETTINGS_PATH_STR";
+-static const char qt_configure_examples_path_str     [256 + 12] = "$EXAMPLES_PATH_STR";
+-static const char qt_configure_demos_path_str        [256 + 12] = "$DEMOS_PATH_STR";
++static const char qt_configure_prefix_path_str       [512 + 12] = "$PREFIX_PATH_STR";
++static const char qt_configure_documentation_path_str[512 + 12] = "$DOCUMENTATION_PATH_STR";
++static const char qt_configure_headers_path_str      [512 + 12] = "$HEADERS_PATH_STR";
++static const char qt_configure_libraries_path_str    [512 + 12] = "$LIBRARIES_PATH_STR";
++static const char qt_configure_binaries_path_str     [512 + 12] = "$BINARIES_PATH_STR";
++static const char qt_configure_plugins_path_str      [512 + 12] = "$PLUGINS_PATH_STR";
++static const char qt_configure_imports_path_str      [512 + 12] = "$IMPORTS_PATH_STR";
++static const char qt_configure_data_path_str         [512 + 12] = "$DATA_PATH_STR";
++static const char qt_configure_translations_path_str [512 + 12] = "$TRANSLATIONS_PATH_STR";
++static const char qt_configure_settings_path_str     [512 + 12] = "$SETTINGS_PATH_STR";
++static const char qt_configure_examples_path_str     [512 + 12] = "$EXAMPLES_PATH_STR";
++static const char qt_configure_demos_path_str        [512 + 12] = "$DEMOS_PATH_STR";
+ EOF
+
+ if [ ! -z "$QT_HOST_PREFIX" ]; then
meta/recipes-qt/qt4/qt4-native.inc +1 -1
index ad20723..42e2801 100644
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \
                      file://LICENSE.GPL3;md5=babc5b6b77441da277f5c06b2e547720 \
                      file://LGPL_EXCEPTION.txt;md5=411080a56ff917a5a1aa08c98acae354"
 
-INC_PR = "r18"
+INC_PR = "r19"
 
Quoted 8 lines

meta/recipes-qt/qt4/qt4-native.inc SRC_URI = "http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-sr · line 20

Quoted 7 lines
meta/recipes-qt/qt4/qt4-native.inc +1 -0
  inherit native
 
@@ -17,6 +17,7 @@ SRC_URI = "http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-sr
             file://0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
             file://0002-qkbdtty_qws-fix-build-with-old-kernel-headers.patch \
             file://0003-webkit2-set-OUTPUT_DIR-value-if-empty.patch \
+	   file://0001-make-qt4-native-work-with-long-building-path.patch \

Please don't mix tabs and spaces for indentation.

Quoted 2 lines

I didn't fix indentation. I'm also curious about why it appears this way. On my computer, it's ok.

Lines above are using only spaces, your line has tab followed by 3 spaces.

Cheers,

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
author
#9 lore raw

Re: [PATCH 2/3] qt4-native: make qt4-native work with long building path

Quoted 134 lines · Martin Jansa
Quoted 29 lines · ChenQi
Quoted 19 lines · Martin Jansa
Quoted 18 lines · On Fri, Nov 30, 2012 at 11:08:43AM +0800, [email protected] wrote:

From: Chen Qi<[email protected]>

If the TMPDIR has more than 256 chars, building qt4-native fails. This violates the 410 length limit of TMPDIR.

This patch makes building qt4-native succeed with a long building path (410 for example) by extending its static arrays' sizes by 256 chars.

[YOCTO #2766]

---
   ...e-qt4-native-work-with-long-building-path.patch |   82 ++++++++++++++++++++
   meta/recipes-qt/qt4/qt4-native.inc                 |    3 +-
   2 files changed, 84 insertions(+), 1 deletion(-)

create mode 100644 meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch

Quoted 9 lines

meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch line 1

Quoted 7 lines
meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch new file +1 -0
new file mode 100644
index 0000000..74f4e1a
@@ -0,0 +1,82 @@
+Upstream-Status: Pending

Why not submit this upstream? And isn't the same problem in target recipes?

Quoted 1 line

I've tried and are now waiting for their reply.

OK, so it's Submitted now, right?

Quoted 101 lines

There's no such problem in target recipe.

Quoted 99 lines
Quoted 94 lines
meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch new file +80 -0
+Make qt4-native work with long building path.
+
+Signed-off-by: Chen Qi<[email protected]>
+
+Index: configure
+=====================================================================
+--- a/configure
++++ b/configure
+@@ -4764,8 +4764,8 @@ DEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INST
+ TODAY=`date +%Y-%m-%d`
+ cat>   "$outpath/src/corelib/global/qconfig.cpp.new"<<EOF
+ /* License Info */
+-static const char qt_configure_licensee_str          [256 + 12] = "$LICENSE_USER_STR";
+-static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
++static const char qt_configure_licensee_str          [512 + 12] = "$LICENSE_USER_STR";
++static const char qt_configure_licensed_products_str [512 + 12] = "$LICENSE_PRODUCTS_STR";
+
+ /* Installation date */
+ static const char qt_configure_installation          [12+11]    = "qt_instdate=$TODAY";
+@@ -4790,36 +4790,36 @@ if [ ! -z "$QT_HOST_PREFIX" ]; then
+
+ #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
+ /* Installation Info */
+-static const char qt_configure_prefix_path_str       [256 + 12] = "$HOSTPREFIX_PATH_STR";
+-static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
+-static const char qt_configure_headers_path_str      [256 + 12] = "$HOSTHEADERS_PATH_STR";
+-static const char qt_configure_libraries_path_str    [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
+-static const char qt_configure_binaries_path_str     [256 + 12] = "$HOSTBINARIES_PATH_STR";
+-static const char qt_configure_plugins_path_str      [256 + 12] = "$HOSTPLUGINS_PATH_STR";
+-static const char qt_configure_imports_path_str      [256 + 12] = "$HOSTIMPORTS_PATH_STR";
+-static const char qt_configure_data_path_str         [256 + 12] = "$HOSTDATA_PATH_STR";
+-static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
+-static const char qt_configure_settings_path_str     [256 + 12] = "$HOSTSETTINGS_PATH_STR";
+-static const char qt_configure_examples_path_str     [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
+-static const char qt_configure_demos_path_str        [256 + 12] = "$HOSTDEMOS_PATH_STR";
++static const char qt_configure_prefix_path_str       [512 + 12] = "$HOSTPREFIX_PATH_STR";
++static const char qt_configure_documentation_path_str[512 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
++static const char qt_configure_headers_path_str      [512 + 12] = "$HOSTHEADERS_PATH_STR";
++static const char qt_configure_libraries_path_str    [512 + 12] = "$HOSTLIBRARIES_PATH_STR";
++static const char qt_configure_binaries_path_str     [512 + 12] = "$HOSTBINARIES_PATH_STR";
++static const char qt_configure_plugins_path_str      [512 + 12] = "$HOSTPLUGINS_PATH_STR";
++static const char qt_configure_imports_path_str      [512 + 12] = "$HOSTIMPORTS_PATH_STR";
++static const char qt_configure_data_path_str         [512 + 12] = "$HOSTDATA_PATH_STR";
++static const char qt_configure_translations_path_str [512 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
++static const char qt_configure_settings_path_str     [512 + 12] = "$HOSTSETTINGS_PATH_STR";
++static const char qt_configure_examples_path_str     [512 + 12] = "$HOSTEXAMPLES_PATH_STR";
++static const char qt_configure_demos_path_str        [512 + 12] = "$HOSTDEMOS_PATH_STR";
+ #else // QT_BOOTSTRAPPED
+ EOF
+ fi
+
+ cat>>   "$outpath/src/corelib/global/qconfig.cpp.new"<<EOF
+ /* Installation Info */
+-static const char qt_configure_prefix_path_str       [256 + 12] = "$PREFIX_PATH_STR";
+-static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
+-static const char qt_configure_headers_path_str      [256 + 12] = "$HEADERS_PATH_STR";
+-static const char qt_configure_libraries_path_str    [256 + 12] = "$LIBRARIES_PATH_STR";
+-static const char qt_configure_binaries_path_str     [256 + 12] = "$BINARIES_PATH_STR";
+-static const char qt_configure_plugins_path_str      [256 + 12] = "$PLUGINS_PATH_STR";
+-static const char qt_configure_imports_path_str      [256 + 12] = "$IMPORTS_PATH_STR";
+-static const char qt_configure_data_path_str         [256 + 12] = "$DATA_PATH_STR";
+-static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
+-static const char qt_configure_settings_path_str     [256 + 12] = "$SETTINGS_PATH_STR";
+-static const char qt_configure_examples_path_str     [256 + 12] = "$EXAMPLES_PATH_STR";
+-static const char qt_configure_demos_path_str        [256 + 12] = "$DEMOS_PATH_STR";
++static const char qt_configure_prefix_path_str       [512 + 12] = "$PREFIX_PATH_STR";
++static const char qt_configure_documentation_path_str[512 + 12] = "$DOCUMENTATION_PATH_STR";
++static const char qt_configure_headers_path_str      [512 + 12] = "$HEADERS_PATH_STR";
++static const char qt_configure_libraries_path_str    [512 + 12] = "$LIBRARIES_PATH_STR";
++static const char qt_configure_binaries_path_str     [512 + 12] = "$BINARIES_PATH_STR";
++static const char qt_configure_plugins_path_str      [512 + 12] = "$PLUGINS_PATH_STR";
++static const char qt_configure_imports_path_str      [512 + 12] = "$IMPORTS_PATH_STR";
++static const char qt_configure_data_path_str         [512 + 12] = "$DATA_PATH_STR";
++static const char qt_configure_translations_path_str [512 + 12] = "$TRANSLATIONS_PATH_STR";
++static const char qt_configure_settings_path_str     [512 + 12] = "$SETTINGS_PATH_STR";
++static const char qt_configure_examples_path_str     [512 + 12] = "$EXAMPLES_PATH_STR";
++static const char qt_configure_demos_path_str        [512 + 12] = "$DEMOS_PATH_STR";
+ EOF
+
+ if [ ! -z "$QT_HOST_PREFIX" ]; then
meta/recipes-qt/qt4/qt4-native.inc +1 -1
index ad20723..42e2801 100644
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \
                       file://LICENSE.GPL3;md5=babc5b6b77441da277f5c06b2e547720 \
                       file://LGPL_EXCEPTION.txt;md5=411080a56ff917a5a1aa08c98acae354"
 
-INC_PR = "r18"
+INC_PR = "r19"
 
   inherit native
 

meta/recipes-qt/qt4/qt4-native.inc SRC_URI = "http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-sr · line 20

Quoted 4 lines
meta/recipes-qt/qt4/qt4-native.inc +1 -0
@@ -17,6 +17,7 @@ SRC_URI = "http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-sr
              file://0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
              file://0002-qkbdtty_qws-fix-build-with-old-kernel-headers.patch \
              file://0003-webkit2-set-OUTPUT_DIR-value-if-empty.patch \
+	   file://0001-make-qt4-native-work-with-long-building-path.patch \

Please don't mix tabs and spaces for indentation.

Quoted 7 lines
Quoted 2 lines

I didn't fix indentation. I'm also curious about why it appears this way. On my computer, it's ok.

Lines above are using only spaces, your line has tab followed by 3 spaces.

Cheers,

Thanks a lot. I didn't notice that.
I'll fix this and send out this series of patches again.

About the qt4 patch:
I sent the patch to its mailing list. I also opened a bug for it in case of accident.
https://bugreports.qt-project.org/browse/QTBUG-28292

Thanks,
Chen Qi

#10 lore raw

PATCH 3/3 ghostscript: make ghostscript work with long building path

In reply to [email protected]

From: Chen Qi <[email protected]>

If TMPDIR has more than 256 chars, building ghostscript fails. This violates the 410 length limit of TMPDIR.

This patch makes building ghostscript succeed by changing its MAX_TOKEN from 256 to 512.

[YOCTO #2766]

---
 ...tscript-work-with-long-building-directory.patch |   19 +++++++++++++++++++
 .../ghostscript/ghostscript_9.05.bb                |   10 ++++------
 2 files changed, 23 insertions(+), 6 deletions(-)
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/0001-make-ghostscript-work-with-long-building-directory.patch
meta/recipes-extended/ghostscript/ghostscript/0001-make-ghostscript-work-with-long-building-directory.patch new file +19 -0
new file mode 100644
index 0000000..a4ce70a
@@ -0,0 +1,19 @@
+Upstream-Status: Accepted
+
+Make ghost script work with long building directory
+
+Signed-off-by: Chen Qi <[email protected]>
+
+Index: base/genconf.c
+==============================================================
+--- a/base/genconf.c
++++ b/base/genconf.c
+@@ -682,7 +682,7 @@ read_dev(config_t * pconf, const char *arg)
+     string_item_t *item;
+     const char *in;
+ 
+-#define MAX_TOKEN 256
++#define MAX_TOKEN 512
+     char *token = malloc(MAX_TOKEN + 1);
+     char *category = malloc(MAX_TOKEN + 1);
+     int file_index;
meta/recipes-extended/ghostscript/ghostscript_9.05.bb +4 -6
index 1fdcb99..2789897 100644
@@ -15,7 +15,7 @@ SECTION = "console/utils"
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=c5326026692dbed183f0558f926580f8"
 
-PR = "r3"
+PR = "r4"
 
 DEPENDS = "ghostscript-native tiff jpeg fontconfig cups"
 DEPENDS_class-native = ""
@@ -30,7 +30,9 @@ SRC_URI = "${SRC_URI_BASE} \
            file://ghostscript-9.05-NOT-check-endian.patch \
            "
 
-SRC_URI_class-native = "${SRC_URI_BASE}"
+SRC_URI_class-native = "${SRC_URI_BASE} \
+		        file://0001-make-ghostscript-work-with-long-building-directory.patch \
+		        "
 
 SRC_URI[md5sum] = "f7c6f0431ca8d44ee132a55d583212c1"
 SRC_URI[sha256sum] = "593f77f7584704bdf9de41598a084a4208c3ad3b940a1de1faaf8f59a15cc207"
@@ -80,10 +82,6 @@ do_install_append () {
     chown -R root:lp ${D}${sysconfdir}/cups
 }
 
-python do_patch_class-native () {
-    pass
-}
-
 do_compile_class-native () {
     mkdir -p obj
     for i in genarch genconf mkromfs echogs gendev genht; do
Signature · 1 line
1.7.9.5
author
#11 lore raw
In reply to [email protected]
Quoted 29 lines · On 11/30/2012 06:33 PM, [email protected] wrote:

From: Chen Qi<[email protected]>

Poky had a problem with long TMPDIR.
If the TMPDIR had a length of 410 chars, for example, the world building would fail for three reasons.
1) autotools.bbclass: With long TMPDIR, aclocal would have a very long argument list whick makes building some packages (coretuils for example) fail.
2) qt4-native: It hardcodes some static char arrays to be 256.
3) ghostscript: It configures its MAX_TOKEN to be 256.

This series of patches are aimed at making poky building system working correctly with long TMPDIR. The three patches solve the three above problems respectively.

[Version 2 fixes the indentation problem in my last patch]

The following changes since commit 0d7d413d64bab8d3c758414c6c8c653ccc325653:

   build-appliance-image: Update to dee77eca39f406f90e60d9c5ef7a66fcc8f57dbf commit (2012-11-21 20:40:43 +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 (3):
autotools.bbclass: use relative path for acpaths whenever possible
qt4-native: make qt4-native work with long building path
ghostscript: make ghostscript work with long building path

Quoted 9 lines
  meta/classes/autotools.bbclass                     |   14 ++--
  ...tscript-work-with-long-building-directory.patch |   19 +++++
  .../ghostscript/ghostscript_9.05.bb                |   10 +--
  ...e-qt4-native-work-with-long-building-path.patch |   82 ++++++++++++++++++++
  meta/recipes-qt/qt4/qt4-native.inc                 |    3 +-
  5 files changed, 116 insertions(+), 12 deletions(-)

create mode 100644 meta/recipes-extended/ghostscript/ghostscript/0001-make-ghostscript-work-with-long-building-directory.patch create mode 100644 meta/recipes-qt/qt4/qt4-4.8.3/0001-make-qt4-native-work-with-long-building-path.patch

Sorry for my carelessness. Please ignore this version. The upstream status is incorrect.