Ubuntu 14.04 latest tar version is 1.27.1:
tar --version
tar (GNU tar) 1.27.1
But compiling Yocto (as provided by Altera: http://download.altera.com/akdlm/software/acdsinst/13.0/156/ib_installers/linux-socfpga-13.02-RC10-src.bsx, and instructions given here: http://rocketboards.org/foswiki/view/Documentation/AlteraSoCDevelopmentBoardYoctoGettingStarted) have been giving this error:
| tar: --same-order option cannot be used with -c
| Try 'tar --help' or 'tar --usage' for more information.
Attributed to 1.27's tar feature (http://lists.openembedded.org/pipermail/openembedded-core/2013-October/085105.html). Alternatively I download tar 1.26 from GNU website and compilation gives the following error:
CC argp-eexst.o
In file included from argp.h:24:0,
from argp-eexst.c:27:
./stdio.h:479:1: error: ‘gets’ undeclared here (not in a function)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
^
So does anyone have any workaround when compiling Yocto in the latest patched Ubuntu 14.04?
Finally I got overcome the problem. It is not a bug with tar 1.27.1, just that it breaks many existing system that uses the old tar feature.
I took 1.26 version of tar from GNU, commented out the comment in line 479 in stdio.h that created the error, and generated a new tar that ignore the gets() warning. Not a long term solution, but now at least I can successfully compile Yocto.