Bug 690126 - Can't build ghostscript for x64
Summary: Can't build ghostscript for x64
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Build Process (show other bugs)
Version: master
Hardware: PC Windows NT
: P3 normal
Assignee: Russell Lang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-18 16:54 UTC by leonardo
Modified: 2010-10-01 12:50 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description leonardo 2008-10-18 16:54:16 UTC
 
Comment 1 leonardo 2008-10-18 17:06:14 UTC
The problem happens with COMPILE_INITS=1 which is default. COMPILE_INITS=0 
avoids the problem.

The nature of the problem is that mkromfs.exe must be called from IDE which is 
32 bits. But the rule for it includes compiler options that forse 64 bits. I 
fixed it with this change : 
 
 
*** F:\SVN-GS\gs\gs\base\msvctail.mak Thu Sep 25 05:54:42 2008
--- files\gs\base\msvctail.mak Sun Oct 19 03:46:22 2008
***************
*** 57,61 ****
  MKROMFS_OBJS=$(MKROMFS_ZLIB_OBJS) $(winplat_) $(GLOBJ)gpmisc.$(OBJ) $(GLOBJ)
gp_getnv.$(OBJ)
  $(MKROMFS_XE): $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS)
! 	$(CCAUX) -I$(GLOBJ) -I$(ZSRCDIR) @$(GLGENDIR)\ccf32.tr $(GLSRC)
mkromfs.c /Fo$(GLOBJ)mkromfs.obj /Fe$(MKROMFS_XE) $(MKROMFS_OBJS) 
$(CCAUX_TAIL) /DEBUG
  
  # PSSRC and PSOBJ aren't defined yet, so we spell out the definitions.
--- 57,61 ----
  MKROMFS_OBJS=$(MKROMFS_ZLIB_OBJS) $(winplat_) $(GLOBJ)gpmisc.$(OBJ) $(GLOBJ)
gp_getnv.$(OBJ)
  $(MKROMFS_XE): $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS)
! 	$(CCAUX) -I$(GLOBJ) -I$(ZSRCDIR) /D__WIN32__ $(GLSRC)
mkromfs.c /Fo$(GLOBJ)mkromfs.obj /Fe$(MKROMFS_XE) $(MKROMFS_OBJS) 
$(CCAUX_TAIL) /DEBUG
  
  # PSSRC and PSOBJ aren't defined yet, so we spell out the definitions.

but I didn't check whether it works for x86. 

Then it fails to link mkromfs.exe because it includes compress.obj which is 
built for x64. Likely it needs to change zlib.mak because compress.c is needed 
to compile with different options than other zlib/*.c .
Comment 2 Ralph Giles 2008-10-18 18:39:14 UTC
Reassigning to Ray, who's more familiar with the mkromfs.
Comment 3 Russell Lang 2009-07-29 22:53:29 UTC
This may have been fixed by revision 9807, but this needs to be tested by
attempting to build Win64 ghostscript within the IDE.
Comment 4 Ray Johnston 2009-07-31 08:37:18 UTC
As confirmed by Russell Lang, 64-bit builds work fine from the command line.
Thanks, Russell!

The only issue may be problems building from the IDE (unconfirmed). Since
Russell was able to help hear, I'll let him (when he has time) see if that is
the case, then he can assign it back to me if he wants.