2004.03.18 08:04 "[Tiff] 64-bit libtiff build - help?", by James Noyes

2004.03.18 21:45 "FIXED - Re: [Tiff] 64-bit libtiff build - help?", by James Noyes

Well, I guess I shouldn't underestimate my troubleshooting skills. I now have a working 64-bit libtiff.

The problem was a result of the defines in lines 82-88 of tiff.h. In my compile environment (Sun Forte on Solaris/Sparc), none of the appropriate defines were set to trigger the use of int/unsigned int for int32/uint32, so instead they got defined as long/unsigned long. Unfortunately, they wound up 8 bytes as a result, and everything else broke as a result of every uint32 being twice as big as it should be.

Now I have a new quest - to determine if Sun's Forte compiler sets a define when you use the -xarch=v9a option, triggering 64-bit code. If so, just adding that to the list of candidate defines on line 82 of tiff.h will eliminate this problem.

I realize I could just define __LP64__ with compiler options, but since tiff.h is referenced by other applications that use libtiff, I'd need to remember to do that by hand every time I compiled 64-bit code that used libtiff. My memory sucks, so I want to avoid this. :)

I also discovered that "tiff2pdf" throws Bus Errors, even as a 32-bit app, and that "thumbnail" only generates 8-byte output files for me. But those are separate issues for another thread.

James Noyes