public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Igor Pechtchanski <pechtcha@cs.nyu.edu>
To: daniel.hempel@philips.com
Cc: cygwin@cygwin.com
Subject: Re: bug in "ar" when creating libraries on cross linked filesystems
Date: Fri, 05 Sep 2003 13:53:00 -0000	[thread overview]
Message-ID: <Pine.GSO.4.56.0309050949200.26266@slinky.cs.nyu.edu> (raw)
In-Reply-To: <OF901AEDEA.6A0C4C96-ONC1256D97.005C786B-C1256D97.005D7BA2@diamond.philips.com>

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@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.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/

  parent reply	other threads:[~2003-09-05 13:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-04 17:01 daniel.hempel
2003-09-05  8:47 ` Ronald Landheer-Cieslak
2003-09-05 13:53 ` Igor Pechtchanski [this message]
2003-09-05 11:47 daniel.hempel
2003-09-05 14:15 ` Ronald Landheer-Cieslak
2003-09-08 13:17 daniel.hempel
2003-09-08 13:27 ` Robert Collins
2003-09-08 14:13 daniel.hempel
2003-09-15  2:38 Robert Collins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.56.0309050949200.26266@slinky.cs.nyu.edu \
    --to=pechtcha@cs.nyu.edu \
    --cc=cygwin@cygwin.com \
    --cc=daniel.hempel@philips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).