﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
17667	sed for newt may lead to a race condition	pierre	blfs-book	"We have a sed in Makefile.in for newt to prevent building and installing a static library. The sed we have changes all occurrences of ""$(LIBNEWT)"" to ""$(LIBNEWTSONAME)"", but the Makefile contains:
{{{
$(LIBNEWT): $(LIBOBJS)
        ar rv $@ $^
[...]
$(LIBNEWTSH): $(SHAREDOBJS)
        $(CC) -shared -o $(LIBNEWTSH) $(SHLIBFLAGS) $(SHAREDOBJS) $(LDFLAGS) $(LIBS)
        ln -fs $(LIBNEWTSONAME) libnewt.$(SOEXT)
        ln -fs $(LIBNEWTSH) $(LIBNEWTSONAME)
}}}
The problem is that if the first target is done ''after'' the second (which may happen since the two targets are unrelated), then $(LIBNEWTSONAME) is a symlink to $(LIBNEWTSH) (the shared library), so that the ""ar"" command, which reads `ar $(LIBNEWTSONAME) $(LIBOBJS)`, tries to make an archive into an already existing shared library, and complains about a non recognized format."	defect	closed	normal	11.3	BOOK	git	medium	fixed		
