Python Image Library (PIL) build error on Cygwin

S

Steve Holden

Does anyone know the workaround for this error, encountered when trying
to build PIL 1.1.4 from source under cygwin (Python 2.3.3)?

[...]

running build_ext
building '_imaging' extension
gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
-IlibImaging
-I/usr/include/python2.3 -c encode.c -o
build/temp.cygwin-1.5.9-i686-2.3/encode.o
C:\cygwin\bin\python2.3.exe (2352): *** unable to remap
C:\cygwin\bin\tk84.dll to same address as parent(0x6F0000) != 0xB40000
5 [main] python 1996 sync_with_child: child 2352(0x224) died
before initialization with status code 0x1
385 [main] python 1996 sync_with_child: *** child state child
loading dlls
error: Resource temporarily unavailable

Erk. I *hate* having to mess around with stuff like this.

regards
Steve
 
J

Jason Tishler

Steve,

Yup, now I can't find the Tk library,

Does the following from the Cygwin Python README help?

4. _tkinter users should note that Cygwin tcltk is really a Win32
package and hence, does *not* understand Cygwin style paths. To use
the _tkinter module you must define the following environment
variables:

$ export TCL_LIBRARY=$(cygpath -w /usr/share/tcl$version)
$ export TK_LIBRARY=$(cygpath -w /usr/share/tk$version)

Jason
 
S

Steve Holden

Jason said:
Steve,



Does the following from the Cygwin Python README help?

4. _tkinter users should note that Cygwin tcltk is really a Win32
package and hence, does *not* understand Cygwin style paths. To use
the _tkinter module you must define the following environment
variables:

$ export TCL_LIBRARY=$(cygpath -w /usr/share/tcl$version)
$ export TK_LIBRARY=$(cygpath -w /usr/share/tk$version)

Unfortunately that doesn't seem to help:

sholden@DELLBOY ~/install/Imaging-1.1.4
$ export TCL_LIBRARY=$(cygpath -w /usr/share/tcl8.4)

sholden@DELLBOY ~/install/Imaging-1.1.4
$ export TK_LIBRARY=$(cygpath -w /usr/share/tk8.4)

sholden@DELLBOY ~/install/Imaging-1.1.4
$ python setup.py build
running build
running build_py
running build_ext
building '_imagingtk' extension
gcc -shared -Wl,--enable-auto-image-base
build/temp.cygwin-1.5.9-i686-2.3/_imagingtk.o
build/temp.cygwin-1.5.9-i686-2.3/Tk/tkImaging.o -LlibImaging
-L/usr/lib/python2.3/config -lImaging -ltk8.4 -ltcl8.4 -lpython2.3 -o
build/lib.cygwin-1.5.9
-i686-2.3/_imagingtk.dll
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cygwin/bin/ld:
cannot find -ltk8.4
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

I'm wondering if I might need to download extra libraries, but I can't
see anything appropriate.

regards
Steve
 
N

Norman Vine

Steve Holden said:
sholden@DELLBOY ~/install/Imaging-1.1.4
$ python setup.py build
running build
running build_py
running build_ext
building '_imagingtk' extension
gcc -shared -Wl,--enable-auto-image-base
build/temp.cygwin-1.5.9-i686-2.3/_imagingtk.o
build/temp.cygwin-1.5.9-i686-2.3/Tk/tkImaging.o -LlibImaging
-L/usr/lib/python2.3/config -lImaging -ltk8.4 -ltcl8.4 -lpython2.3 -o
build/lib.cygwin-1.5.9
-i686-2.3/_imagingtk.dll
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cygwin/bin/ld:
cannot find -ltk8.4
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

I'm wondering if I might need to download extra libraries, but I can't
see anything appropriate.

Try

cd /usr/lib
ln -s libtk84.a libtk8.4.a
ln -s libtcl84.a libtcl8.4.aHTHNorman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,962
Messages
2,570,134
Members
46,690
Latest member
MacGyver

Latest Threads

Top