Project

General

Profile

Backport #3437

Does not compile on Windows with Visual Studio

Added by Octagon (Andrey Gerasimenko) almost 9 years ago. Updated about 8 years ago.

Status:
Assigned
Priority:
Normal
[ruby-core:30757]

Description

=begin
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.
=end

History

#1

Updated by usa (Usaku NAKAMURA) almost 9 years ago

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

=begin
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:$$(*F:.so=)-$$(arch).lib -pdb:$$(*F:.so=)-$$(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
!endif
s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c -Tc$$(<:=/),;t t
s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c -Tp$$(<:=/),;t t

=end

Also available in: Atom PDF