Hello. Recently I tried to compile swfmill on a multicore machine and started to get random fatal errors during compilation. They look as if GCC tries to compile one of g*.cpp files before its creation finished. The errors are different in each run, sometimes the compilation succeeds. Disabling parallel compilation seems to have fixed this problem.
It was suggested here: http://forums.gentoo.org/viewtopic-t-924018.html that the problem can be fixed by splitting the rule for $(CODEGEN_GENERATEDSOURCES) and $(CODEGEN_GENERATEDHEADERS) in two like this: $(CODEGEN_GENERATEDSOURCES) $(CODEGEN_GENERATEDHEADERS): .code.generated .code.generated: $(CODEGEN_SRC) xsltproc $(srcdir)/codegen/mk.xsl $(srcdir)/codegen/source.xml touch .code.generated The patch is attached. I also added .code.generated to nodist_swfmill_SOURCES and CLEANFILES. Maybe something like that should also be done with $(SIMPLE_DIALECT_GENERATEDSOURCES) rule.
diff -r -u swfmill-0.3.2-old/src/Makefile.am swfmill-0.3.2/src/Makefile.am --- swfmill-0.3.2-old/src/Makefile.am 2011-11-05 16:29:20.000000000 +0400 +++ swfmill-0.3.2/src/Makefile.am 2012-05-20 21:39:48.928636631 +0400 @@ -73,8 +73,11 @@ $(CODEGEN_GENERATEDHEADERS) \ $(NULL) -$(CODEGEN_GENERATEDSOURCES) $(CODEGEN_GENERATEDHEADERS): $(CODEGEN_SRC) +$(CODEGEN_GENERATEDSOURCES) $(CODEGEN_GENERATEDHEADERS): .code.generated + +.code.generated: $(CODEGEN_SRC) xsltproc $(srcdir)/codegen/mk.xsl $(srcdir)/codegen/source.xml + touch .code.generated NAMESPACES = xmlns:swft=\"http:\/\/subsignal.org\/swfml\/swft\" \ xmlns:str=\"http:\/\/exslt.org\/strings\" \ @@ -129,6 +132,7 @@ nodist_swfmill_SOURCES = \ $(CODEGEN_GENERATEDSOURCES) \ $(SIMPLE_DIALECT_GENERATEDSOURCES) \ + .code.generated \ $(NULL) noinst_HEADERS = \ @@ -172,4 +176,5 @@ $(CODEGEN_GENERATEDSOURCES) \ $(SIMPLE_DIALECT_GENERATEDXSL) \ $(SIMPLE_DIALECT_GENERATEDSOURCES) \ + .code.generated \ $(NULL) diff -r -u swfmill-0.3.2-old/src/Makefile.in swfmill-0.3.2/src/Makefile.in --- swfmill-0.3.2-old/src/Makefile.in 2011-11-06 06:33:10.000000000 +0400 +++ swfmill-0.3.2/src/Makefile.in 2012-05-20 21:43:53.068634708 +0400 @@ -371,6 +371,7 @@ nodist_swfmill_SOURCES = \ $(CODEGEN_GENERATEDSOURCES) \ $(SIMPLE_DIALECT_GENERATEDSOURCES) \ + .code.generated \ $(NULL) noinst_HEADERS = \ @@ -414,6 +415,7 @@ $(CODEGEN_GENERATEDSOURCES) \ $(SIMPLE_DIALECT_GENERATEDXSL) \ $(SIMPLE_DIALECT_GENERATEDSOURCES) \ + .code.generated \ $(NULL) all: $(BUILT_SOURCES) @@ -1471,8 +1473,11 @@ uninstall-binPROGRAMS -$(CODEGEN_GENERATEDSOURCES) $(CODEGEN_GENERATEDHEADERS): $(CODEGEN_SRC) +$(CODEGEN_GENERATEDSOURCES) $(CODEGEN_GENERATEDHEADERS): .code.generated + +.code.generated: $(CODEGEN_SRC) xsltproc $(srcdir)/codegen/mk.xsl $(srcdir)/codegen/source.xml + touch .code.generated $(SIMPLE_DIALECT_GENERATEDSOURCES): $(SIMPLE_DIALECT_GENERATEDSOURCES:.cpp=.xml) xslt/assemble.xsl $(SIMPLE_DIALECT_XSLTS) xsltproc $(srcdir)/xslt/assemble.xsl $< > $(@:.cpp=.xsl)
_______________________________________________ swfmill mailing list [email protected] http://osflash.org/mailman/listinfo/swfmill_osflash.org
