On 17/07/11 19:27, ZyX wrote:
Reply to message «Re: Vim build sometimes fails for unknown reason»,
sent 21:12:37 17 July 2011, Sunday
by Tony Mechelynck:
Well, remove the -j5 switch. It looks like make tries to use the objdir
before it has been created, which points to a missing dependency on gobj
for _all_ compiles.
It is not a solution. Most of time vim successfully builds, so it is faster to
keep this switch and hope nothing fails rather then remove it. For this reason I
also pointed out the problem here instead of digging into makefile trying to
find out how to fix it.
What I would try to fix it would be to add gobj to the list of
dependencies for each object file:
e.g. if using Make_ming.mak, replace
----------------------------
$(OUTDIR)/if_python.o : if_python.c $(INCL)
$(CC) -c $(CFLAGS) $(PYTHONINC)
-DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\" $< -o $@
$(OUTDIR)/if_python3.o : if_python3.c $(INCL)
$(CC) -c $(CFLAGS) $(PYTHON3INC)
-DDYNAMIC_PYTHON3_DLL=\"PYTHON$(PYTHON3_VER).dll\" $< -o $@
$(OUTDIR)/%.o : %.c $(INCL)
$(CC) -c $(CFLAGS) $< -o $@
$(OUTDIR)/vimres.res: vim.rc version.h gui_w32_rc.h
$(WINDRES) $(WINDRES_FLAGS) $(DEFINES) vim.rc $(OUTDIR)/vimres.res
$(OUTDIR)/vimrc.o: $(OUTDIR)/vimres.res
$(WINDRES) $(WINDRES_FLAGS) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o
$(OUTDIR):
$(MKDIR) $(OUTDIR)
$(OUTDIR)/ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h
$(CC) -c $(CFLAGS) ex_docmd.c -o $(OUTDIR)/ex_docmd.o
$(OUTDIR)/ex_eval.o: ex_eval.c $(INCL) ex_cmds.h
$(CC) -c $(CFLAGS) ex_eval.c -o $(OUTDIR)/ex_eval.o
$(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h
$(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
----------------------------
by
----------------------------
$(OUTDIR)/if_python.o : $(OUTDIR) if_python.c $(INCL)
$(CC) -c $(CFLAGS) $(PYTHONINC)
-DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\" $< -o $@
$(OUTDIR)/if_python3.o : $(OUTDIR) if_python3.c $(INCL)
$(CC) -c $(CFLAGS) $(PYTHON3INC)
-DDYNAMIC_PYTHON3_DLL=\"PYTHON$(PYTHON3_VER).dll\" $< -o $@
$(OUTDIR)/%.o : $(OUTDIR) %.c $(INCL)
$(CC) -c $(CFLAGS) $< -o $@
$(OUTDIR)/vimres.res: $(OUTDIR) vim.rc version.h gui_w32_rc.h
$(WINDRES) $(WINDRES_FLAGS) $(DEFINES) vim.rc $(OUTDIR)/vimres.res
$(OUTDIR)/vimrc.o: $(OUTDIR) $(OUTDIR)/vimres.res
$(WINDRES) $(WINDRES_FLAGS) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o
$(OUTDIR):
$(MKDIR) $(OUTDIR)
$(OUTDIR)/ex_docmd.o: $(OUTDIR) ex_docmd.c $(INCL) ex_cmds.h
$(CC) -c $(CFLAGS) ex_docmd.c -o $(OUTDIR)/ex_docmd.o
$(OUTDIR)/ex_eval.o: $(OUTDIR) ex_eval.c $(INCL) ex_cmds.h
$(CC) -c $(CFLAGS) ex_eval.c -o $(OUTDIR)/ex_eval.o
$(OUTDIR)/if_cscope.o: $(OUTDIR) if_cscope.c $(INCL) if_cscope.h
$(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
----------------------------
etc., thus adding $(OUTDIR) space-separated on the same line after the
colon on any line starting $(OUTDIR)/<anything>:
This should avoid any attempt to build $OUTDIR/something before
$(OUTDIR) itself has been made.
N.B.: $(OUTDIR) means the object directory, in your case gobj
I know it sounds silly, and that make ought to check for it, but
apparently it doesn't unless you explicitly tell it to.
Best regards,
Tony.
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php