Bug 58602 - solaris only: tar '-C' not supported -> (g)make fails
Summary: solaris only: tar '-C' not supported -> (g)make fails
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-17 14:49 UTC by Daniel Franke
Modified: 2003-05-20 17:45 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Franke 2003-05-17 14:49:41 UTC
Version:           3.0.0a4 (using KDE 3.1.1)
Installed from:    compiled sources
Compiler:          gcc version 3.2.2
OS:          SunOS (sun4u) release 5.8

Building latest CVS source (030517):

[...]
Making all in common
gmake[4]: Entering directory `/home/franke/build/kdevelop-cvs/kdevelop/parts/appwizard/common'
tar -C . -cf admin.tar admin/
tar: C: unknown option
Usage: tar {txruc}[vfbFXhiBEelmopwnq[0-7]] [-k size] [tapefile] [blocksize] [exclude-file] [-I include-file] files ...
gmake[4]: *** [admin.tar.gz] Error 1
[...]

This 'tar' is SUN standard tar-package.  (Solaris 8, sparc)
Workaround: use solaris 'gtar' package (SFWgtar, link gtar->tar) or get 'tar' from www.sunfreeware.com ...

Could it be possible to omit the '-C' option?
Comment 1 Daniel Franke 2003-05-17 15:35:11 UTC
See Bug #58145 also. 
Comment 2 Harald Fernengel 2003-05-18 19:17:38 UTC
"-C" means "change to that directory", is there a similar command line switch on solaris? 
Comment 3 Daniel Franke 2003-05-19 19:32:58 UTC
There is a similar command (from solaris tar man-page): 
 
SYNOPSIS 
     tar c  [  bBeEfFhiklnopPqvwX  [ 0-7 ]  ]  [ block ]  [  tar- 
     file  ]   [ exclude-file ]  { -I include-file | -C directory 
     | file  | file }  ... 
 
-C directory file 
           Performs a chdir (see cd(1))  operation  on  directory 
           and  performs  the c (create) or r (replace) operation 
           on file. Use short relative path names  for  file.  If 
           file  is  `.',  archive  all  files in directory. This 
           option enables archiving files  from  multiple  direc- 
           tories not related by a close common parent. 
 
It seems that the command order is important. Using  
>  tar -cf admin.tar admin/  -C . 
instead of 
>  tar -C . -cf admin.tar admin/  
works (at least I get a file named "admin.tar" containing the desired files). 
 
Comment 4 Harald Fernengel 2003-05-19 21:05:35 UTC
Hmm... from the man page I'd guess that the correct use of "-C" would be 
 
> tar -cf admin.tar -C . admin/ 
 
Can you please try that? If it succeeds, I'll patch the Makefile.am so we can close this bug. 
 
Thank you, 
Harry 
Comment 5 Daniel Franke 2003-05-20 09:58:27 UTC
Subject: RE:  solaris only: tar '-C' not supported -> (g)make fails         

It seems that it doesn't matter if
> tar -cf admin.tar -C . admin 
or 
> tar -cf admin.tar -C . admin -C .

but it does matter if

> tar -cf admin.tar -C . admin 
or 
> tar -cf admin.tar -C . admin/ 

since the latter DOES NOT work.
(tar: admin/: No such file or directory)

Hope I helped
	Daniel

Comment 6 Harald Fernengel 2003-05-20 15:09:37 UTC
okay, should be fixed in CVS now. Thanks for you help :) 
Comment 7 Daniel Franke 2003-05-20 17:45:13 UTC
Yes, works fine :)