Thu, 29 Mar 2007
Compile ming Flash generation library on OS X (ming 0.4.0 beta 4)
libming is "a library for generating Macromedia Flash files (.swf), written in C". As of the current beta (0.4.0.beta4) it does not compile out of the box for me (OS X 10.4 PPC) so I thought I'd write up what worked for me.
For future reference, when trying to compile out of the box the following error occurs when trying to generate libming.0.4.0.dylib:
The problem seems to occur when linking against libfl, I'm not entirely clear why it happens but if you remove the library from the link process the problem "goes away"—seemingly with no ill effects—the small patch below implements this work around.ld: Undefined symbols: _yylex /usr/bin/libtool: internal link edit command failed
How to compile
It seems I had the necessary dependencies (such as libpng) already installed but if you don't you might want to follow the existing ming OS X installation instructions for that.
Okay, here's what you need to do:
Now we need to apply our patch osx_ming_0.4.0.b4.patch to workaround the error:wget http://dl.sourceforge.net/sourceforge/ming/ming-0.4.0.beta4.tar.bz2 tar xjvf ming-0.4.0.beta4.tar.bz2 cd ming-0.4.0.beta4
Then continue:wget http://words.rancidbacon.com/static/osx_ming_0.4.0.b4.patch patch < osx_ming_0.4.0.b4.patch
We then need to work around a permissions isssue:./configure
Finally, we get on with:chmod u+x config/install-sh
And that should be it...make
You can install the library now or run a quick test:
The last command should result in no output—if there are any differences things didn't go as planned...cd test/Movie/new/ make test01 ./test01 ../../../util/listswf test01.swf | diff -u test01.ref -
Hopefully things did go as planned however and you can now start playing with ming on OS X...
The future
I've been working with the ming people on #gnash and hopefully the fixes will be included before the next release. It appears this can be applied to the version in CVS to fix the flex library issue in the proper place:
--- configure.in~ 2007-02-22 07:32:11.000000000 +1300
+++ configure.in 2007-03-29 04:33:23.000000000 +1200
@@ -198,7 +198,6 @@
dnl --------------------------------------------
AC_PROG_YACC
-AM_PROG_LEX
AC_PROG_LIBTOOL
if test x"$LIBTOOL" = x; then
AC_MSG_ERROR([could not detect libtool, bailing out])
Posted at: 05:35 | category: / | | Comments ()