Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Fri, 5 Sep 2003 09:53:16 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: daniel DOT hempel AT philips DOT com cc: cygwin AT cygwin DOT com Subject: Re: bug in "ar" when creating libraries on cross linked filesystems In-Reply-To: Message-ID: References: Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 4 Sep 2003 you wrote: > Hello, > > the command > ar cq libdh.a a.o b.o > does not work, if the current directory is on a linked filesystem. > In my case "." referes to /cygdrive/h". > The error message of "ar" is: > ar: libdh.a: rename: Cross-device link > make: *** [libdh.a] Error 1 > > The program works, when using local files, e.g. /usr/src > > # uname -a > CYGWIN_NT-5.1 PCHEMPEL2 1.5.3(0.90/3/2) 2003-09-01 13:15 i686 unknown unknown Cygwin > > Best regards > Daniel On a hunch, try running "TMPDIR=. ar cq libdh.a a.o b.o". I'm guessing that ar builds the archive in TMPDIR (/tmp?) and then tries moving it to your directory. However, it calls "rename()", which tries to hard link the file and then unlink it later (a guess from looking at "strings /bin/ar.exe" -- I haven't looked at the code). If you do this across devices, there's obviously a problem. I'm surprised, though, that this works on Linux, since /tmp and /home/* usually *are* on different devices... Perhaps some configury option? Or is Linux "rename()" simply more robust? Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "I have since come to realize that being between your mentor and his route to the bathroom is a major career booster." -- Patrick Naughton -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/