#15179 closed defect (fixed)

Builtin libtiff doesn't build on Mac OS (wxPython Build)

Reported by: artlogic Owned by:
Priority: normal Milestone: 2.9.5
Component: 3rdparty Version: stable-latest
Keywords: Cc:
Blocked By: Blocking:
Patch: no

Description

I'm attempting to compile wxWidgets and wxPython from the trunk (Mac OS, Cocoa), and experiencing a few problems with the new libtiff code.

  1. There's an external dependency on lzma.h that I had to satisfy. I was able to either pass --disable-lzma or provide the proper header files and everything worked fine - but it seems like it should either be packaged along with wxWidgets or at the very least, turned off if the header isn't found.
  1. After resolving that problem, the definition of boolean in wxWidgets/src/tiff/libtiff/tif_ojpeg.c seems to be causing some problems:

/Users/artlogic/Code/wxWidgets/wxPython/wxpy-bld/cocoa/bk-deps gcc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.5 -c -o wxtiff_tif_ojpeg.o -DNDEBUG -I/Users/artlogic/Code/wxWidgets/src/jpeg -I/Users/artlogic/Code/wxWidgets/wxPython/wxpy-bld/cocoa/src/tiff/libtiff -I/Users/artlogic/Code/wxWidgets/src/tiff/libtiff -dynamic -fPIC -DPIC -D_FILE_OFFSET_BITS=64 -I/Users/artlogic/Code/wxWidgets/wxPython/wxpy-bld/cocoa/lib/wx/include/osx_cocoa-unicode-2.9 -I/Users/artlogic/Code/wxWidgets/include -Wall -Wundef -O2 -fno-strict-aliasing -fno-common -fvisibility=hidden /Users/artlogic/Code/wxWidgets/src/tiff/libtiff/tif_ojpeg.c
/Users/artlogic/Code/wxWidgets/src/tiff/libtiff/tif_ojpeg.c:413: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OJPEGLibjpegJpegSourceMgrFillInputBuffer’
/Users/artlogic/Code/wxWidgets/src/tiff/libtiff/tif_ojpeg.c:415: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OJPEGLibjpegJpegSourceMgrResyncToRestart’
/Users/artlogic/Code/wxWidgets/src/tiff/libtiff/tif_ojpeg.c: In function ‘OJPEGWriteHeaderInfo’:
/Users/artlogic/Code/wxWidgets/src/tiff/libtiff/tif_ojpeg.c:1164: error: ‘OJPEGLibjpegJpegSourceMgrFillInputBuffer’ undeclared (first use in this function)
/Users/artlogic/Code/wxWidgets/src/tiff/libtiff/tif_ojpeg.c:1164: error: (Each undeclared identifier is reported only once
/Users/artlogic/Code/wxWidgets/src/tiff/libtiff/tif_ojpeg.c:1164: error: for each function it appears in.)
/Users/artlogic/Code/wxWidgets/src/tiff/libtiff/tif_ojpeg.c:1166: error: ‘OJPEGLibjpegJpegSourceMgrResyncToRestart’ undeclared (first use in this function)
/Users/artlogic/Code/wxWidgets/src/tiff/libtiff/tif_ojpeg.c: At top level:
/Users/artlogic/Code/wxWidgets/src/tiff/libtiff/tif_ojpeg.c:2446: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OJPEGLibjpegJpegSourceMgrFillInputBuffer’
/Users/artlogic/Code/wxWidgets/src/tiff/libtiff/tif_ojpeg.c:2472: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OJPEGLibjpegJpegSourceMgrResyncToRestart’

I spoke with Robin about the above errors and he suggested I might be using system libjpeg headers, however, configure indicates otherwise:

Which libraries should wxWidgets use?

STL no
jpeg builtin
png builtin
regex builtin
tiff builtin
zlib sys
expat sys
libmspack no
sdl no

I think this is probably a wxWidgets issue, but I am assigning as wxPython because that's the only place I've been able to test so far.

Change History (4)

comment:1 Changed 16 months ago by robind

  • Component changed from wxPython to 3rdparty

Should tif_ojpeg.c have the same wxHACK_BOOLEAN code at the top that tif_jpeg.c has?

comment:2 Changed 16 months ago by vadz

  • Milestone set to 2.9.5
  • Status changed from new to confirmed

It looks like we have the same problem under Ubuntu 10.10 too, see this message.

And I don't think wxHACK_BOOLEAN would help, but OTOH I think that using wxjpeg_boolean instead of boolean in src/tiff/libtiff/tif_ojpeg.c would. Do you see any reasons to not just do this?

comment:3 Changed 16 months ago by robind

That seems okay to me.

comment:4 Changed 16 months ago by VZ

  • Resolution set to fixed
  • Status changed from confirmed to closed

(In [73960]) Use wxjpeg_boolean in libtiff sources.

This fixes compilation problem when using libtiff with the built-in modified
version of libjpeg that uses wxjpeg_boolean instead of boolean as it doesn't
define boolean at all in its headers, but just wxjpeg_boolean.

Closes #15179.

Note: See TracTickets for help on using tickets.