staden-2.0.0b7-src: parallel make fails
Brought to you by:
awhitwham,
jkbonfield
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.
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.
build.log
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.)
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>
another_build.log
No, it is not fixed yet. :(
Could you please give me the appropriate make output lines where it fails? Specifically enough to see which dependency is missing.
Thanks,
James
See the another_build.log file.
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.
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.
I believe this to be fixed now.