swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swftools-common] errors when building swftools.


From: Norman Khine
Subject: [Swftools-common] errors when building swftools.
Date: Wed, 5 Aug 2009 16:53:21 +0100

Hello,
Recently I updated my hdd on my old powerbook g4 running OS X 10.4.11
Now I want to install swftools and have downloaded version 0.9.0 from
the download section.
I also have Python 2.6.2 running, built as framework.

When I do the folowing, I get the following make error:

$ tar -zxvf ~/downloads/swftools-0.9.0.tar.gz
$ cd swftools-0.9.0
$ ./configure --prefix=/usr/local
...
checking whether we can compile the avifile test program... no
checking for Python.h... 2.6
checking whether we can compile the python test program... yes
checking for Python-Imaging... yes
checking for missing libraries...
configure: creating ./config.status
...
config.status: creating lib/readers/Makefile
config.status: creating config.h

http://khine.3b1.org/config.log

$ make
...
gcc -c -DHAVE_CONFIG_H   -I/opt/local/include
-I/opt/local/include/freetype2 -I/opt/local/include -I
/usr/local/include/lame -fPIC -Wparentheses -Wimplicit -Wreturn-type
-O -fomit-frame-pointer  -Wall -Wno-unused -fPIC
-I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/
-c pyutils.c -o pyutils.o
gcc -DHAVE_CONFIG_H -g -bundle SWF.o taglist.o tag.o image.o tags.o
tagmap.o action.o primitives.o pyutils.o  ../librfxswf.a ../libbase.a
-o SWF.so -framework Python -L/opt/local/lib -L/usr/local/lib
-lmp3lame -lgif -ljpeg -lz -lm  -L/opt/local/lib -lfreetype -lz
-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols:
_ImagingNew
_PyImagingNew
collect2: ld returned 1 exit status
make[1]: *** [SWF.so] Error 1
make: *** [all] Error 2

http://paste.lisp.org/+1TG7

The strange thing is that if I remove the Python-Imaging i.e.
$ sudo rm 
/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/ImPlatform.h
$ sudo rm 
/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Imaging.h

So, now

$ configure --prefix=/usr/local

checking for Python.h... 2.6
checking whether we can compile the python test program... yes
checking for Python-Imaging... no
checking for missing libraries...

$ make

http://paste.lisp.org/+1TG7#1

Now SWF.so compiles, but gfx.so fails with

gcc -DHAVE_CONFIG_H -g -bundle gfx.o -o gfx.so ../libpdf.a
../libgfxswf.a  ../librfxswf.a ../libgfx.a ../libocr.a ../libbase.a
-framework Python -L/opt/local/lib -L/usr/local/lib -lmp3lame -lgif
-ljpeg -lz -lm  -L/opt/local/lib -lfreetype -lz
-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices
-lstdc++
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols:
__Unwind_Resume
collect2: ld returned 1 exit status
make[1]: *** [gfx.so] Error 1
make: *** [all] Error 2

To fix this is to link using g++ instead of gcc, so by doing this:

$ cd lib/python
$ g++  -DHAVE_CONFIG_H -g -bundle gfx.o -o gfx.so ../libpdf.a
../libgfxswf.a  ../librfxswf.a ../libgfx.a ../libocr.a ../libbase.a
-framework Python -L/opt/local/lib -L/usr/local/lib -lmp3lame -lgif
-ljpeg -lz -lm  -L/opt/local/lib -lfreetype -lz
-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices
-lstdc++

I can then copy both SWF.so and gfx.so to my site-packages and test it
from my python
Python 2.6.2 (r262:71600, Apr 16 2009, 09:17:39)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import gfx
>>>

Sorry for the long post, now the question ;)

I have a test python setup at $HOME/usr/local/python2.6, how do I
build swftools against this, I've tried setting both:


$ export PYTHON="/Users/khine/usr/local/python2.6/bin/python"
$ export PYTHON_LIB="/Users/khine/usr/local/python2.6/lib"
$ export PYTHON_INCLUDES="/Users/khine/usr/local/python2.6/include"

and updating my .profile to:

export PYTHON=/Users/khine/usr/local/python2.6/bin/python$PYTHON
export PYTHON_LIB=/Users/khine/usr/local/python2.6/lib$PYTHON_LIB
export PYTHON_INCLUDES=/Users/khine/usr/local/python2.6/include$PYTHON_INCLUDES

but this did not work, the ./configure did not find a suitable python.

Any thoughts and ideas.

Thanks

Norman




reply via email to

[Prev in Thread] Current Thread [Next in Thread]