[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: serial vs parallel for ar
From: |
Alexey Neyman |
Subject: |
Re: serial vs parallel for ar |
Date: |
Thu, 18 May 2006 17:45:58 +0400 |
User-agent: |
KMail/1.6.2 |
Just to add. I encountered similar problem when I attempted to use
parallel make for a project that used the following rule:
(%.o): %.c
$(CC) -c -o $% %<
$(AR) cru $@ $%
$(RM) $%
Suspecting somewhat similar in Mr.Patton's project.
Regards,
Alexey.
On Thursday 18 May 2006 17:42, Alexey Neyman wrote:
> There are two options:
>
> 1. You can create objects as usual and then archive all changed
> objects in a single operation:
>
> %.o: %.c
> $(CC) -c -o $@ $<
>
> libxxx.a: $(OBJS)
> $(AR) cru $@ $?
>
> The drawback is, this approach leaves the compiled object files
> behind.
>
> 2. There is a suggested enhancement for make,
>
https://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=14927
> I didn't test it. However, author claims that it is possible to add
> the "$(RM) $?" command to the libxxx.a rule above.
>
> Regards,
> Alexey.
>
>
> On Thursday 18 May 2006 17:21, PATTON, BILLY (SBCSI) wrote:
> > No, that won't work either.
> > If the user does a make proj+bb+topic
> > the rule proj+bb will be bypassed and no archive updates will be
> > performed.
> >
> > When ar is accessing the file can I have it lock the file and have
> other
> > process wait for the lock to be free'd?
> > But this will result in serial processing. what I don't need to
do.
> >
> > > -----Original Message-----
> > > From: address@hidden
> > > [mailto:address@hidden On Behalf
> > > Of PATTON, BILLY (SBCSI)
> > > Sent: Thursday, May 18, 2006 8:16 AM
> > > To: address@hidden
> > > Subject: RE: serial vs parallel for ar
> > >
> > >
> > > I know one way to get around the problem, not very good, but!
> > > During my chain of rules I have
> > > all : proj
> > > proj : proj+bb
> > > proj+bb : proj+bb+topic
> > > proj+bb+topic : $(src+proj+bb+topic:.c=.o)
> > > %.o : %.c
> > > compile $<
> > > create dependencies $<
> > > archive $@
> > >
> > > At the "proj+bb :" target I could do the commands there for
> > > archiving in
> > > a loop. By the time that command fires all .o's will have
> > > been created.
> > > But why should I put them in there every time. They only
> > > need to be put
> > > in when something changes. The most obvious place would be
> > > where/when I
> > > compile. But that puts me back to the problem of multiple
> processes
> > > accessing the .a at the same time. Not using -j is not an
option.
> > >
> > > > -----Original Message-----
> > > > From: address@hidden
> > > > [mailto:address@hidden On Behalf
> > > > Of PATTON, BILLY (SBCSI)
> > > > Sent: Thursday, May 18, 2006 7:48 AM
> > > > To: address@hidden
> > > > Subject: serial vs parallel for ar
> > > >
> > > >
> > > > I'm trying to add files to a .a file. As long as I don't run
> > > > make with
> > > > -j it runs ok. But when I run with the -j I get the following
> error
> > > > messages:
> > > > ar:
> > > > /makefile_test/dev/bp1497/test/v0608/PRODUCT_TREE/ldb/infgn/li
> > > > b/libinfgn
> > > > .a not in archive format
> > > > make: ***
> > > > [/makefile_test/dev/bp1497/test/v0608/PRODUCT_TREE/ldb/infgn/g
> > > > ipasswd.o]
> > > > Error 1
> > > > make: *** Waiting for unfinished jobs....
> > > > ar:
> > > > /makefile_test/dev/bp1497/test/v0608/PRODUCT_TREE/ldb/infgn/li
> > > > b/libinfgn
> > > > .a not in archive format
> > > > make: ***
> > > > [/makefile_test/dev/bp1497/test/v0608/PRODUCT_TREE/ldb/infgn/c
> > > > ryptut.o]
> > > > Error 1
> > > > ar:
> > > > /makefile_test/dev/bp1497/test/v0608/PRODUCT_TREE/ldb/infgn/li
> > > > b/libinfgn
> > > > .a not in archive format
> > > > make: ***
> > > >
> > >
>
[/makefile_test/dev/bp1497/test/v0608/PRODUCT_TREE/ldb/infgn/giconv.o]
> > > > Error 1
> > > > ar:
> > > > /makefile_test/dev/bp1497/test/v0608/PRODUCT_TREE/ldb/infgn/li
> > > > b/libinfgn
> > > > .a not in archive format
> > > > make: ***
> > > >
> > >
>
[/makefile_test/dev/bp1497/test/v0608/PRODUCT_TREE/ldb/infgn/extfsh.o]
> > > > Error 1
> > > > ar:
> > > > /makefile_test/dev/bp1497/test/v0608/PRODUCT_TREE/ldb/infgn/li
> > > > b/libinfgn
> > > > .a not in archive format
> > > > make: ***
> > > >
> > >
>
[/makefile_test/dev/bp1497/test/v0608/PRODUCT_TREE/ldb/infgn/gifile.o]
> > > > Error 1
> > > >
> > > > It is probably the fact that several processes are trying to
> > > > access this
> > > > .a at the same time.
> > > > What can I do?
> > > >
> > > >
> > > > _______________________________________________
> > > > Help-make mailing list
> > > > address@hidden
> > > > http://lists.gnu.org/mailman/listinfo/help-make
> > > >
> > >
> > >
> > > _______________________________________________
> > > Help-make mailing list
> > > address@hidden
> > > http://lists.gnu.org/mailman/listinfo/help-make
> > >
> >
> >
> > _______________________________________________
> > Help-make mailing list
> > address@hidden
> > http://lists.gnu.org/mailman/listinfo/help-make
> >
>
> --
> The only thing is...
> We can't remember why we brought you here.
> -- Pkunks, SC2
>
>
> _______________________________________________
> Help-make mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-make
>
--
Of course, as a loving parent I must push you from the nest.
-- Pkunks, SC2
- serial vs parallel for ar, PATTON, BILLY \(SBCSI\), 2006/05/18
- RE: serial vs parallel for ar, PATTON, BILLY \(SBCSI\), 2006/05/18
- RE: serial vs parallel for ar, PATTON, BILLY \(SBCSI\), 2006/05/18
- RE: serial vs parallel for ar, Paul D. Smith, 2006/05/18
- Re: serial vs parallel for ar, Alexey Neyman, 2006/05/18
- Re: serial vs parallel for ar,
Alexey Neyman <=
- Re: serial vs parallel for ar, David Boyce, 2006/05/18
- RE: serial vs parallel for ar, PATTON, BILLY \(SBCSI\), 2006/05/18
Re: serial vs parallel for ar, Paul D. Smith, 2006/05/18
- RE: serial vs parallel for ar, PATTON, BILLY \(SBCSI\), 2006/05/18
- RE: serial vs parallel for ar, Paul D. Smith, 2006/05/18
- RE: serial vs parallel for ar, PATTON, BILLY \(SBCSI\), 2006/05/18
- RE: serial vs parallel for ar, Paul D. Smith, 2006/05/18
- RE: serial vs parallel for ar, PATTON, BILLY \(SBCSI\), 2006/05/18
- RE: serial vs parallel for ar, Paul D. Smith, 2006/05/18