#78 staden-2.0.0b7-src: parallel make fails

closed-fixed
None
5
2010-09-01
2010-08-02
No

If I compile from sources using 4 CPUs on linux using GNU make I get to link some stuff while the staden-2.0.0b7-src/lib/libprimer3.so was not there yet. I do not have the problem when running only one 1 CPU. Would you make the Makefiles more resistent to parallel issues? Thanks.

Discussion

  • James Bonfield

    James Bonfield - 2010-08-02

    I've noticed this myself and it's something I was planning to look into. I'm not sure how easy it is to resolve, but I'll experiment with the top-level Makefile. I think perhaps if I specify the depdencies of directories on each other then this may cure it.

     
  • James Bonfield

    James Bonfield - 2010-08-02
    • assigned_to: nobody --> jkbonfield
    • status: open --> open-accepted
     
  • Martin Mokrejs

    Martin Mokrejs - 2010-08-02

    build.log

     
  • James Bonfield

    James Bonfield - 2010-08-02

    Ah it looks like I've already been here in an attempt to fix this, but didn't update it when I added primer3 support into Gap5. What was it attempting to link when the parallel make broke?

    I think the solution is to edit Makefile.in and add "primer3/src" to the gap5 dependency line near the end of the file.
    (Annoyingly I can't get it to fail here to verify the fix, but it's perhaps a bit random depending on which make version you're using and the speed of each sub-process.)

     
  • Martin Mokrejs

    Martin Mokrejs - 2010-08-02

    Seems to be fixed with http://staden.svn.sourceforge.net/viewvc/staden/staden/trunk/src/Makefile.in:

    <quote>
    Revision 2191 - (view) (download) (annotate) - [select for diffs]
    Modified Mon Aug 2 10:29:24 2010 UTC (76 minutes, 54 seconds ago) by jkbonfield
    File length: 5080 byte(s)
    Diff to previous 1968

    Added primer3/src as dependency to gap5, given the recent addition to
    using this library. Hopefully this fixed some parallel make failures.
    </quote>

     
  • Martin Mokrejs

    Martin Mokrejs - 2010-08-02
    • status: open-accepted --> open-fixed
     
  • Martin Mokrejs

    Martin Mokrejs - 2010-08-02

    another_build.log

     
  • Martin Mokrejs

    Martin Mokrejs - 2010-08-02

    No, it is not fixed yet. :(

     
  • James Bonfield

    James Bonfield - 2010-08-02

    Could you please give me the appropriate make output lines where it fails? Specifically enough to see which dependency is missing.

    Thanks,

    James

     
  • James Bonfield

    James Bonfield - 2010-08-02
    • status: open-fixed --> open-accepted
     
  • Martin Mokrejs

    Martin Mokrejs - 2010-08-02

    See the another_build.log file.

     
  • James Bonfield

    James Bonfield - 2010-08-02

    Oops, sorry I didn't notice the attached files.

    I believe the problem is to do with the output file, ie the gcc ... -o lib/libprimer3.so fails when the lib directory itself doesn't yet exist. Adding "$(L)/.dir" to the end of the "$(L)/$(SHLIB_PREFIX)$(LIBS)$(SHLIB_SUFFIX):" target in src/primer3/src/Makefile should solve this. I see that it's done by some of the earlier subdirs (eg Misc), but not by all meaning that parallel makes could fail. I'm checking this into svn along with several other Makefiles with similar issues.

    Can you please test again? For me make -j4 works anyway, but I can manually reproduce the problem by removing lib and doing a "make primer3/src" directly to force this to be built before any other element is built.

     
  • Martin Mokrejs

    Martin Mokrejs - 2010-08-02

    Please send me the patches by email, I will have problems to browse the web interactively next 6 days. mmokrejs G i r e s i t e .org should work. Thanks.

     
  • James Bonfield

    James Bonfield - 2010-09-01

    I believe this to be fixed now.

     
  • James Bonfield

    James Bonfield - 2010-09-01
    • status: open-accepted --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks