error: conflicting types for ‘ImagingJpegDecode’ while installing PIL on Mac OS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

error: conflicting types for ‘ImagingJpegDecode’ while installing PIL on Mac OS

Steve Strassmann
Hi, I'm trying to install Imaging 1.1.7 on Mac OS 10.6.8 with python 2.6.
I've already installed jpeg-6b, which seems to be ok ('make check' seems to run without errors).

I have tried both 'python setup.py install' and
pip install http://effbot.org/downloads/Imaging-1.1.7.tar.gz
and I get the same error (snip 1 below) either way. Does anyone know how I can get past this?

When I run ./BUILDME (see snip 2 below), setup seems to claim that "JPEG support available"
but selftest seems to claim "JPEG support not installed". That seems odd to me.

thanks,
Steve

--- snip 1 ---
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -arch x86_64 -DHAVE_LIBJPEG -DHAVE_LIBZ -I/System/Library/Frameworks/Tcl.framework/Headers -I/System/Library/Frameworks/Tk.framework/Headers -IlibImaging -I/System/Library/Frameworks/Python.framework/Versions/2.6/include -I/usr/local/include -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c libImaging/JpegDecode.c -o build/temp.macosx-10.6-universal-2.6/libImaging/JpegDecode.o

libImaging/JpegDecode.c:119: error: conflicting types for ‘ImagingJpegDecode’
libImaging/Imaging.h:416: error: previous declaration of ‘ImagingJpegDecode’ was here
libImaging/JpegDecode.c: In function ‘ImagingJpegDecode’:
libImaging/JpegDecode.c:145: warning: assignment from incompatible pointer type
libImaging/JpegDecode.c:151: error: invalid operands to binary - (have ‘const JOCTET *’ and ‘UINT8 *’)
libImaging/JpegDecode.c:237: warning: passing argument 1 of ‘state->shuffle’ from incompatible pointer type
libImaging/JpegDecode.c:262: error: invalid operands to binary - (have ‘const JOCTET *’ and ‘UINT8 *’)
error: command 'gcc-4.2' failed with exit status 1

--- snip 2 ---

--------------------------------------------------------------------
PIL 1.1.7 SETUP SUMMARY
--------------------------------------------------------------------
version       1.1.7
platform      darwin 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
              [GCC 4.2.1 (Apple Inc. build 5646)]
--------------------------------------------------------------------
--- TKINTER support available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
*** FREETYPE2 support not available
*** LITTLECMS support not available
--------------------------------------------------------------------
To add a missing option, make sure you have the required
library, and set the corresponding ROOT variable in the
setup.py script.

To check the build, run the selftest.py script.
--------------------------------------------------------------------
PIL 1.1.7 TEST SUMMARY
--------------------------------------------------------------------
Python modules loaded from ./PIL
Binary modules loaded from ./PIL
--------------------------------------------------------------------
--- PIL CORE support ok
--- TKINTER support ok
*** JPEG support not installed
--- ZLIB (PNG/ZIP) support ok
*** FREETYPE2 support not installed
*** LITTLECMS support not installed
--------------------------------------------------------------------

_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig
Reply | Threaded
Open this post in threaded view
|

Re: error: conflicting types for ‘ImagingJpegDecode’ while installing PIL on Mac OS

Dale Cieslak
Have you tried installing with MacPorts?  I've always had good luck installing packages with it (including PIL).

http://www.macports.org

~Dale

On Jan 13, 2012, at 7:19 PM, Steve Strassmann wrote:

> Hi, I'm trying to install Imaging 1.1.7 on Mac OS 10.6.8 with python 2.6.
> I've already installed jpeg-6b, which seems to be ok ('make check' seems to run without errors).
>
> I have tried both 'python setup.py install' and
> pip install http://effbot.org/downloads/Imaging-1.1.7.tar.gz
> and I get the same error (snip 1 below) either way. Does anyone know how I can get past this?
>
> When I run ./BUILDME (see snip 2 below), setup seems to claim that "JPEG support available"
> but selftest seems to claim "JPEG support not installed". That seems odd to me.
>
> thanks,
> Steve
>
> --- snip 1 ---
> gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -arch x86_64 -DHAVE_LIBJPEG -DHAVE_LIBZ -I/System/Library/Frameworks/Tcl.framework/Headers -I/System/Library/Frameworks/Tk.framework/Headers -IlibImaging -I/System/Library/Frameworks/Python.framework/Versions/2.6/include -I/usr/local/include -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c libImaging/JpegDecode.c -o build/temp.macosx-10.6-universal-2.6/libImaging/JpegDecode.o
>
> libImaging/JpegDecode.c:119: error: conflicting types for ‘ImagingJpegDecode’
> libImaging/Imaging.h:416: error: previous declaration of ‘ImagingJpegDecode’ was here
> libImaging/JpegDecode.c: In function ‘ImagingJpegDecode’:
> libImaging/JpegDecode.c:145: warning: assignment from incompatible pointer type
> libImaging/JpegDecode.c:151: error: invalid operands to binary - (have ‘const JOCTET *’ and ‘UINT8 *’)
> libImaging/JpegDecode.c:237: warning: passing argument 1 of ‘state->shuffle’ from incompatible pointer type
> libImaging/JpegDecode.c:262: error: invalid operands to binary - (have ‘const JOCTET *’ and ‘UINT8 *’)
> error: command 'gcc-4.2' failed with exit status 1
>
> --- snip 2 ---
>
> --------------------------------------------------------------------
> PIL 1.1.7 SETUP SUMMARY
> --------------------------------------------------------------------
> version       1.1.7
> platform      darwin 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
>              [GCC 4.2.1 (Apple Inc. build 5646)]
> --------------------------------------------------------------------
> --- TKINTER support available
> --- JPEG support available
> --- ZLIB (PNG/ZIP) support available
> *** FREETYPE2 support not available
> *** LITTLECMS support not available
> --------------------------------------------------------------------
> To add a missing option, make sure you have the required
> library, and set the corresponding ROOT variable in the
> setup.py script.
>
> To check the build, run the selftest.py script.
> --------------------------------------------------------------------
> PIL 1.1.7 TEST SUMMARY
> --------------------------------------------------------------------
> Python modules loaded from ./PIL
> Binary modules loaded from ./PIL
> --------------------------------------------------------------------
> --- PIL CORE support ok
> --- TKINTER support ok
> *** JPEG support not installed
> --- ZLIB (PNG/ZIP) support ok
> *** FREETYPE2 support not installed
> *** LITTLECMS support not installed
> --------------------------------------------------------------------
>
> _______________________________________________
> Image-SIG maillist  -  [hidden email]
> http://mail.python.org/mailman/listinfo/image-sig
>

_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig

smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: error: conflicting types for ‘ImagingJpegDecode’ while installing PIL on Mac OS

Steve Strassmann
Thanks, Dale, using macports worked for me!

On Jan 16, 2012, at 12:04 PM, Dale Cieslak wrote:

> Have you tried installing with MacPorts?  I've always had good luck installing packages with it (including PIL).
>
> http://www.macports.org
>
> ~Dale

_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig
Reply | Threaded
Open this post in threaded view
|

Re: error: conflicting types for ‘ImagingJpegDecode’ while installing PIL on Mac OS

Steve Strassmann
In reply to this post by Dale Cieslak
Well, I might have been a bit too quick to celebrate.

It's true that MacPorts installs PIL successfully on Mac OS. I can run my (simple newbie) app
running the MacPort Python 2.7 that gets created. The problem is that my Tk windows
are now all X11-styled, which is very unfriendly to Mac users. Using macports:

$ /opt/local/bin/python2.7
>>> from Tkinter import Tk
>>> Tk().tk.call('tk', 'windowingsystem')
'x11'

Using the native Mac python environment gives me nice spiffy Mac-native windows, but no Imaging:

$ /usr/bin/python
>>> from Tkinter import Tk
>>> Tk().tk.call('tk', 'windowingsystem')
'aqua'

I tried simply copying the macports site-packages/PIL over to my native site-packages,
but running that crashes Tk.

How can I get a working python environment with Imaging that lets me create Tk apps
with the mac aqua GUI enabled?

thanks
_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig