Bug 691911

Summary: nmake build with xps_msvc.mak fails on jpegxr.h
Product: GhostXPS Reporter: norbert.janssen
Component: GeneralAssignee: Tor Andersson <tor.andersson>
Status: NOTIFIED FIXED    
Severity: normal    
Priority: P4    
Version: master   
Hardware: PC   
OS: Windows XP   
Customer: 661 Word Size: ---
Attachments: xps testfile with hdphoto

Description norbert.janssen 2011-01-26 07:25:06 UTC
On the svn-head I did a nmake -f xps_msvc.mak, but it fails on the jpegxr.h

If I modify this file into:
at the beginning of the file:
#ifdef __cplusplus
extern "C" {
#endif


#if ! defined(JXR_EXTERN)
# if defined(_MSC_VER)
#  if defined(JXR_DLL_EXPORTS)
#   define JXR_EXTERN __declspec(dllexport)
#  else
#   define JXR_EXTERN __declspec(dllimport)
#  endif
# elif defined(__GNUC__)
#  define JXR_EXTERN
# else
#  error "unknown compiler"
# endif
#endif


.
.
.
#ifdef __cplusplus
}
#endif

at the end of the file, the compilation is ok.
However, the jpegxr.dev is not created:
NMAKE : fatal error U1073: don't know how to make '.\obj\jpegxr.dev'

I.e. the appropriate defines are missing in common/msvc_top.mak, gs/base/gs.mak and xps_msvc.mak for:
JPEGXR_OBJDIR, JPEGXR_GENDIR, SHARE_EXPAT, JPEGXR_SRCDIR

after this it tries to compile the jpegxr\algo.c: line 103 (parameter declaration after codelines???). And there are a lot of these violations.
Comment 1 norbert.janssen 2011-01-26 17:44:37 UTC
Compiles again. colorcirc.xps and tiger.xps printed ok.
Comment 2 norbert.janssen 2011-01-27 07:15:22 UTC
Created attachment 7156 [details]
xps testfile with hdphoto

for testing new jpegxr library. This testfile causes a crash in jpegxr
Comment 3 norbert.janssen 2011-01-27 07:17:34 UTC
I assume that jpegxr replaces the xpshdp.c, HDPhoto support. I tested with attached xps testfile (with an HDPhoto image in it). And this causes a crash in the jpegxr library.
Note that we had a hdphoto implementation (based on the the MS libraries), so for us it should also work with jpegxr.
Comment 4 norbert.janssen 2011-01-27 08:14:29 UTC
(In reply to comment #3)
> I assume that jpegxr replaces the xpshdp.c, HDPhoto support. I tested with
> attached xps testfile (with an HDPhoto image in it). And this causes a crash in
> the jpegxr library.
> Note that we had a hdphoto implementation (based on the the MS libraries), so
> for us it should also work with jpegxr.

compiled:
nmake -f xps_msvc.mak DEBUG=1 TDEBUG=1 DEBUGSYM=1

run:
debugobj\gxps -sDEVICE=display testHDPhoto-RGB32-Transparent.xps
error:

Assertion failed: (ifd_off & 1) == 0, file ..\gs\jpegxr\cr_parse.c, line 1167
Comment 5 norbert.janssen 2011-01-28 07:23:33 UTC
fixed with 12067, 12068 and 12070