Bug 2591

Summary: gcc-cross: argument list too long when do_install
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Robert Yang <liezhi.yang>
Component: devtools / tool chainAssignee: Robert Yang <liezhi.yang>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: liang.li2, meta.mr.watcher, meta.watcher, sgw, song.liu, zhenfeng.zhao
Version: 1.3   
Target Milestone: 1.3 M2   
Hardware: x86   
OS: Multiple   
See Also: https://bugzilla.yoctoproject.org/show_bug.cgi?id=2434
Whiteboard: (QA testing completed) Done
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Robert Yang 2012-06-13 06:09:15 UTC
There would be an "Argument list too long" error when the length of
tmpdir is longer than 190, this is caused by:
    
headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`
    
The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle
it, use the $(sort list) of GNU make which can handle the too long list
would fix the problem, the header would be short enough after sorted.
The "tr ' ' '\012'" was used for translating the space to "\n", the
$(sort list) doesn't need this.
Comment 2 liang li 2012-06-25 09:40:52 UTC
the build dir I tried is "/home/yocto/yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto" ,its dir length equals 252 characters.

---------------
in the builddir above run "bitbake gcc-cross",no error in build,do_install (gcc 4.7 is used)info below: 

NOTE: Running task 180 of 185 (ID: 3, /buildarea/poky.ubuntu.new/meta/recipes-devtools/gcc/gcc-cross_4.7.bb, do_install)
NOTE: package gcc-cross-4.7.0+svnr186651-r2: task do_install: Started
NOTE: package gcc-cross-4.7.0+svnr186651-r2: task do_install: Succeeded
NOTE: Running noexec task 183 of 185 (ID: 9, /buildarea/poky.ubuntu.new/meta/recipes-devtools/gcc/gcc-cross_4.7.bb, do_package_write)
NOTE: Running task 184 of 185 (ID: 4, /buildarea/poky.ubuntu.new/meta/recipes-devtools/gcc/gcc-cross_4.7.bb, do_populate_sysroot)
NOTE: package gcc-cross-4.7.0+svnr186651-r2: task do_populate_sysroot: Started
NOTE: package gcc-cross-4.7.0+svnr186651-r2: task do_populate_sysroot: Succeeded
NOTE: Running noexec task 185 of 185 (ID: 6, /buildarea/poky.ubuntu.new/meta/recipes-devtools/gcc/gcc-cross_4.7.bb, do_build)
NOTE: Tasks Summary: Attempted 185 tasks of which 74 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown
--------------------------
another do_install (gcc 4.6 is used and add 'GCCVERSION = "4.6%"' to conf/local.conf) info below:

NOTE: Running task 180 of 185 (ID: 3, /buildarea/poky.ubuntu.new/meta/recipes-devtools/gcc/gcc-cross_4.6.bb, do_install)
NOTE: package gcc-cross-4.6.3+svnr184847-r27: task do_install: Started
NOTE: package gcc-cross-4.6.3+svnr184847-r27: task do_install: Succeeded
NOTE: Running noexec task 183 of 185 (ID: 9, /buildarea/poky.ubuntu.new/meta/recipes-devtools/gcc/gcc-cross_4.6.bb, do_package_write)
NOTE: Running task 184 of 185 (ID: 4, /buildarea/poky.ubuntu.new/meta/recipes-devtools/gcc/gcc-cross_4.6.bb, do_populate_sysroot)
NOTE: package gcc-cross-4.6.3+svnr184847-r27: task do_populate_sysroot: Started
NOTE: package gcc-cross-4.6.3+svnr184847-r27: task do_populate_sysroot: Succeeded
NOTE: Running noexec task 185 of 185 (ID: 6, /buildarea/poky.ubuntu.new/meta/recipes-devtools/gcc/gcc-cross_4.6.bb, do_build)
NOTE: Tasks Summary: Attempted 185 tasks of which 167 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.

so change status to "verified".

git info:e0a70547069fe7e8a2d6bdaffc985fb172d46c31
git branch: poky/master

test env:
host : fedora 17 x86_64
kernel:kernel:3.3.4-5.fc17.x86_64 #1 SMP