Bug 4135

Summary: Generated SDK installer script requires a modern version of 'tar'
Product: [Yocto Project Subprojects] ADT Reporter: Andy Dalton <a.spam.filter>
Component: adtAssignee: Laurentiu Palcu <laurentiu.palcu>
Status: RESOLVED OBSOLETE QA Contact:
Severity: normal    
Priority: Undecided CC: poky.adt.watcher, poky.watcher, richard.purdie
Version: 1.3   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Andy Dalton 2013-03-27 15:30:14 UTC
After using 'bitbake -c populate_sdk <core-image-name>', I get an installer script for the generated SDK.  When running that script I get unexpected errors:

$ bash poky-eglibc-x86_64-i586-toolchain-1.0.sh 
Enter target directory for SDK (default: /opt/poky/1.3): /tmp/jkjk/c
You are about to install the SDK to "/tmp/jkjk/c". Proceed[Y/n]?Y
Extracting SDK...tar: sysroots/qemux86-poky-linux/usr/include/et/com_err.h: Cannot hard link to `./opt/poky/1.3/sysroots/qemux86-poky-linux/usr/include/com_err.h': No such file or directory
tar: sysroots/qemux86-poky-linux/etc/terminfo/v/vt220: Cannot hard link to `./opt/poky/1.3/sysroots/qemux86-poky-linux/etc/terminfo/v/vt200': No such file or directory
tar: sysroots/x86_64-pokysdk-linux/usr/bin/i586-poky-linux/i586-poky-linux-ld: Cannot hard link to `./opt/poky/1.3/sysroots/x86_64-pokysdk-linux/usr/bin/i586-poky-linux/i586-poky-linux-ld.bfd': No such file or directory
tar: sysroots/x86_64-pokysdk-linux/etc/terminfo/v/vt220: Cannot hard link to `./opt/poky/1.3/sysroots/x86_64-pokysdk-linux/etc/terminfo/v/vt200': No such file or directory

bzip2: (stdin): trailing garbage after EOF ignored
tar: Error exit delayed from previous errors
done

After some investigation, it turns out that my version of GNU tar (1.15.1) doesn't handle the --strip-components option correctly with respect to hard links.  After pulling in a more modern version of GNU tar (1.26), I no longer get the error.

It might be worth doing some sanity checking on the tar version in the script and generating an error before attempting the extraction, or skipping the --strip-components option all together and move the contents after the extraction.

If you need any additional information, please let me know.

Thanks,

Andy
Comment 1 Laurentiu Palcu 2013-03-27 15:59:30 UTC
This issue is already fixed in master:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=63ccf6242064055e280ffd05a4726f89de6b9b98