There are a number of syntax errors in openvms.mmk and some of the included mak files that prevent the build procedure from completing. I have created a text file at the URL referenced in this report with the changes I made to the files. After these changes the program builds cleanly on OpenVMS 8.3 on both Alpha and Itanium architectures. The snprintf.c module does not compile on Itanium (HP C V7.2-001 on OpenVMS IA64 V8.3). I removed this module from the build as the distributed C RTL on VMS contains the procedures.
Wow, thanks for the report. We haven't had anyone report anything on the VMS build for years. I was about to remove support on the apparently correct assumption it was bit-rotten. I've applied some fixes based on your changes. Could you please re-test svn r9105 or later and generate a new patch? The list should be a lot smaller now, but resolving the rest needs some back-and-forth. For example: * the change to JPXI_ in gs.mak isn't portable. How does the current definition not work? * why doesn't jbig2dec/snprintf compile on ia64? * why did you need to comment out the debug flag variables in openvms.mmk * does openvms.mak still work? Should we remove one or the other? If you don't have a convenient svn client, you can pull a snapshot from http://git.ghostscript.com/?p=gs-svn;a=snapshot;h=d8ede28794d282c60bec5f73e5e0a39459980393;sf=tgz
Created attachment 4412 [details] patched versions of makefiles for VMS Changed versions of makefiles to deal with OpenVMS
>* the change to JPXI_ in gs.mak isn't portable. How does the current definition not work? The directory syntax comes out wrong. It has to do with VMS using three different characters ( [ . ] ) to start and end a directory spec, rather than the single character used by unix or windows. If one is specifying the entire directory this isn't an issue, but in this case the script wants to build a directory name based on an earlier defined symbol. I've made changes to a number of the mak files to fix this in what should be a portable way. >* why doesn't jbig2dec/snprintf compile on ia64? It fails with the following errors: char *fmt; .............^ %CC-E-PROMOTMATCH, In the definition of the function "vsnprintf", the promoted type of fmt is incompatible with the type of the corresponding parameter in a prior declaration. at line number 114 in file USERDISK:[COMPSERV.DUNNETT.gs-svn.jbig2dec] SNPRINTF.C;1 char *fmt; .............^ %CC-E-PROMOTMATCH, In the definition of the function "snprintf", the promoted type of fmt is incompatible with the type of the corresponding parameter in a prior declaration. at line number 150 in file USERDISK:[COMPSERV.DUNNETT.gs-svn.jbig2dec] SNPRINTF.C;1 My understanding was that this module was just included for systems that didn't have snprintf/vsnprintf in the standard RTL. Since VMS now has these it seems the easiest thing to do is leave them out of the build. Otherwise you'd need to: - fix the source code to make the IA64 compiler happy - modify the build procedure so that snprintf and vsnprintf are not prefixed during the compile so that they don't conflict with the module names in the RTL (if you don't do this the linker produces a warning message, which caused the make procedure to abort, although the executable does still get built. The modification would involve the following change in openvms.mmk Change: SW_PLATFORM=/DECC/PREFIX=ALL/NESTED_INCLUDE=PRIMARY/name= (as_is,short)/nowarn To: SW_PLATFORM=/DECC/PREFIX=EXCEPT= ("snprintf","vsnprintf")/NESTED_INCLUDE=PRIMARY/name=(as_is,short)/nowarn you also need to remove the "#include <params.h>" from snprintf.c at line 28 Is there a reason to use this module, rather than the standard versions of these functions? >* why did you need to comment out the debug flag variables in openvms.mmk It appears that leaving it defined, even with a blank value, causes MMK to evaluate the .ifdef as true, so the code will always be compiled /DEBUG if the line is not commented out >* does openvms.mak still work? Should we remove one or the other? I don't have the GNU build so I didn't evaluate openvms.mak. My suggestion would be to just go with the mmk version, as mmk is widely available I've made the following changes (see uploaded attachment): In openvms.mmk: - Add a definition for PSRESDIR - Add an OPENVMS symbol that other scripts can use for conditional directory syntax definitions - Add a symbol DCLOSE that equates to "]" - change the format of the symbols JBIG2SRCDIR and JPXSRCDIR to leave off the trailing "]" (it gets added via the symbol DCLOSE after the subdirectories have been appended in the included make files. In various other files (see attached files) - test for OPENVMS and conditionally compose directory names looks like a lot of changes, but you'll find that they're mostly pretty trivial (additions of a conditional directory syntax based on the OPENVMS symbol) With these changes it builds ok on Alpha (and would on IA64 except for the snprintf.c issue)
Confirm and re-assign bugs with attached/in-line patches for another person to review.
Bug still reproducible in Ghostscript 9.03
I/we have no way to work on this, so..... LATER.....