[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Concurrent extraction of convenience-library components on OS X

From: Ralf Wildenhues
Subject: Re: Concurrent extraction of convenience-library components on OS X
Date: Mon, 18 May 2009 23:31:08 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Akim,

thanks for the bug report.

* Akim Demaille wrote on Mon, May 18, 2009 at 02:22:56PM CEST:
> I have two dlopen-modules that use a common convenience library.  If I'm 
> unlucky, libtool will try to extract the objects from the convenience 
> library at the same moment, which ar does not seem to like.

Wow.  What in the world does Darwin's ar do to a library that it is
extracting from?

> libtool: link: (cd runner/.libs/runner.lax/libconfig.a && ar x "/Users/ 
> akim/src/gnet/_build/i386-apple-darwin9.6.0/lib/config/.libs/ 
> libconfig.a")
> libtool: link: (cd muxer/.libs/muxer.lax/libconfig.a && ar x "/Users/ 
> akim/src/gnet/_build/i386-apple-darwin9.6.0/lib/config/.libs/ 
> libconfig.a")
> ar: /Users/akim/src/gnet/_build/i386-apple-darwin9.6.0/lib/ 
> config/.libs/libconfig.a: Resource temporarily unavailable
> Indeed, running several "ar x /tmp/foo.a" concurrently from different  
> directories fails on OS X.

I can reproduce a failure on 8.11.0, but I get a slightly different
$ (cd a && ar x ../libconv.a ) & (cd b && ar x ../libconv.a ) & wait
[1] 29797
[2] 29798
ar: ../libconv.a: Permission denied
[1]-  Done                    ( cd a && ar x ../libconv.a )
[2]+  Exit 1                  ( cd b && ar x ../libconv.a )

So I suppose we now need to put locks around archive extraction on
Darwin.  What else would need to be locked?

Can you work around this issue for the moment with an order-only
prerequisite?  (I'm assuming Darwin uses GNU make only, is that true?)
For example, you could put this in GNUmakefile:

include Makefile
muxer/muxer.la : | runner/runner.la


reply via email to

[Prev in Thread] Current Thread [Next in Thread]