[swfmill] Building swfmill from Head on OSX
Will
will at tekimaki.com
Tue Jan 8 15:00:09 PST 2008
this set of instructions is for building a version of swfmill for
running on your OSX system. this builds a non static version of swfmill
wich is not suitable for a release because it depends on external
libraries. These instructions assume familiarity with using the command
line.
Ready? Lets go...
first get the latest swfmill code from svn trunk,
http://swfmill.org/svn/trunk, if you don't know how to use svn google
for help.
$ svn co http://swfmill.org/svn/trunk
next you will run:
$ ./autogen.sh
however there are some things you may need to install first. use
MacPorts (macports.org) to install these things if they are not yet
installed:
port install pkgconfig
port install libxml2
port install libxslt
port install freetype
port install libpng
also autogen.sh is likely going to throw some errors, these are the
common ones and what to do about them:
ERROR #1
> ./configure: line 18836: syntax error near unexpected token `XML,'
> ./configure: line 18836: `PKG_CHECK_MODULES(XML, libxml-2.0)'
ERROR #1 SOLUTION
in autogen.sh change the line
aclocal -I autoconfig/m4
to this:
aclocal -I /opt/local/share/aclocal -I /usr/share/aclocal
That will throw an error. That is ok. Next change that line back to the
original and search for a file with the name "pkg.m4" on your harddisk
and copy (or link) it into the autoconfig/m4 directory inside the
swfmill trunk folder.
ERROR #2
> ./autogen.sh: line 5: libtoolize: command not found
ERROR #2 SOLUTION
again in autogen.sh change this line:
libtoolize --force --copy
to:
glibtoolize --force --copy
ERROR #3
after changing to glibtoolize you may get another error:
> /usr/bin/glibtoolize: line 1: cd: /usr/share/libtool: No such file or
directory
> glibtoolize: cannot list files in `/usr/share/libtool'
ERROR #3 SOLUTION
This is most likely caused when you are running OSX 10.4 and install
XCode 2.5. XCode 2.5 destroys the libtool library - seemingly
inadvertantly (its recreated on OSX 10.5 Leopard in XCode 3). You can go
back and reinstall XCode 2.4.1 from the CDs that shipped with your Mac
(PITA), or you can do this easier patch:
look in /opt/local/share/ and see if there is a libtool in there, if I
recall right it is there. if not install it with MacPort
$ port install libtool
then go to /usr/share/ and link to libtool
$ ln -s /opt/local/share/libtool libtool
ERROR #4
> autoheader: error: AC_CONFIG_HEADERS not found in configure.ac
ERROR #4 SOLUTION
you can ignore it
ERROR #5
> /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: can't locate file for:
-lcrt0.o
ERROR #5 SOLUTION
Remove the lines between "if IS_OSX" and the "endif" in src/Makefile.am
I preferred to just comment them out.
Now you can make your installer and run it
$ ./autogen.sh
$ make
$ sudo make install
Your install may not be complete however, as swfmill may not be in your
user path. I don't know how to make sure that is right. However I
already had a lower version of swfmill installed. when i ran $ sudo make
install, it created a second install in a new location. so I just moved
that swfmill to where the old one was located. to do that I did:
$ locate swfmill
(this will return the location of your swfmill installs)
$ mv path/to/new/swfmill /usr/bin/swfmill
More information about the swfmill
mailing list