delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/09/05/09:56:41

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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 <pechtcha AT cs DOT nyu DOT edu>
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: <OF901AEDEA.6A0C4C96-ONC1256D97.005C786B-C1256D97.005D7BA2@diamond.philips.com>
Message-ID: <Pine.GSO.4.56.0309050949200.26266@slinky.cs.nyu.edu>
References: <OF901AEDEA DOT 6A0C4C96-ONC1256D97 DOT 005C786B-C1256D97 DOT 005D7BA2 AT diamond DOT philips DOT com>
Importance: Normal
MIME-Version: 1.0

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019