<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    haven't looked at it yet, just wondering if the symlink cannot be
    created as extra command in the make target building the object.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 1/26/13 12:30 AM, Richard Fuchs
      wrote:<br>
    </div>
    <blockquote cite="mid:51031590.5040209@sipwise.com" type="cite">
      <pre wrap="">Hello,

There seems to be a race condition in Makefile.libs that occurs
sporadically when doing parallel builds (make -j). I believe the culprit
part is this:



$(NAME): $(LIB_RUNTIME_NAME) $(LIB_LINK_NAME) $(LIBINAME_F)

$(LIB_RUNTIME_NAME):
        -@ln -s $(LIB_NAME) $(LIB_RUNTIME_NAME)

$(LIB_LINK_NAME):
ifeq ($(OS), freebsd)
        -@ln -s $(LIB_RUNTIME_NAME) $(LIB_LINK_NAME)
else
        -@ln -s $(LIB_NAME) $(LIB_LINK_NAME)
endif



The problem is that dependencies (the ln -s commands) get built first,
and the actual target ($(NAME)) last. The result is that for a while,
the symlinks already exist while the lib itself is not fully built yet.
In the meantime, other make children build something else that depends
on the lib, see that the symlink already exists and hence think the
target has already been built, which then results in various funny
errors when the linker tries to read a non-existent or half-finished .so
file. At least I think that's what happens.

Unfortunately I have no idea how to fix this within the current makefile
framework. I tried reordering the dependencies (making the symlink
targets depend on the lib instead of the other way around) but those all
resulted in build failures.

cheers

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
sr-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, April 16-17, 2013, Berlin
 - <a class="moz-txt-link-freetext" href="http://conference.kamailio.com">http://conference.kamailio.com</a> -</pre>
  </body>
</html>