Backport #3437

Does not compile on Windows with Visual Studio

Added by Octagon (Andrey Gerasimenko) over 9 years ago. Updated 7 months ago.



When compiled with Visual Studio, compilation fails with the error message "cannot parse and attach manifest, file not found".

OS: Windows 7

Since ruby is more or less OK without a manifest, just entering "nmake" again allows to advance further and finally get ruby compiled.

With VS 2008 it is necessary to resume nmake about 3 times, just when final executables are being built. With VS 2010 it is necessary to resume nmake very many times.


Updated by usa (Usaku NAKAMURA) over 9 years ago

  • Status changed from Open to Assigned
  • Assignee set to yugui (Yuki Sonoda)

yugui-san, please commit this patch.
this is a part of r25173, and already backported to ruby_1_8, ruby_1_8_7.
Only ruby_1_9_1 and ruby_1_8_6 haven't backported it.

Index: win32/Makefile.sub
--- win32/Makefile.sub (revision 28315)
+++ win32/Makefile.sub (working copy)
@@ -629,9 +629,9 @@ s,@RPATHFLAG@,,;t t
s,@LIBARG@,%s.lib,;t t
s,@LINK_SO@,$$(LDSHARED) -Fe$$(@) $$(OBJS) $$(LIBS) $$(LOCAL_LIBS) -link $$(DLDFLAGS) -implib:$$(*$$(arch).lib -pdb:$$(*$$(arch).pdb -def:$$(DEFFILE),;t t
!if $(MSC_VER) >= 1400
-s,@LINK_SO@,@$$(RUBY) -run -e wait_writable -- -n 10 $$(@),;t t
-s,@LINK_SO@,$(MANIFESTTOOL) -manifest $$(@).manifest -outputresource:$$(@);2,;t t
-s,@LINK_SO@,@$$(RM) $$(@:/=).manifest,;t t
+s,@LINK_SO@,@if exist $$(@).manifest $$(RUBY) -run -e wait_writable -- -n 10 $$(@),;t t
+s,@LINK_SO@,@if exist $$(@).manifest $(MANIFESTTOOL) -manifest $$(@).manifest -outputresource:$$(@);2,;t t
+s,@LINK_SO@,@if exist $$(@).manifest $$(RM) $$(@:/=).manifest,;t t
s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c -Tc$$(<:=/),;t t
s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c -Tp$$(<:=/),;t t



Updated by jeremyevans0 (Jeremy Evans) 7 months ago

  • Status changed from Assigned to Closed
  • Description updated (diff)

Also available in: Atom PDF