[Bf-committers] Mac OS X again

Charles Wardlaw bf-committers@blender.org
Sun, 12 Jan 2003 19:51:30 -0800 (PST)


Hi all,

Still working through building the mac os X port from the command line.
 Some new notes:

1) libblender_imbuf does not seem to be included in whatever was build
beforehand, and on attempting to build blender.app, there's a halt with
a list of unresolved symbols.  I copied
blender/source/blender/intern/.libs/libblender_imbuf.a to
/usr/local/lib and ran ranlib on it; problem solved.  I don't
personally understand the build system enough (got the autotools book
today, woot) to see where this goes wrong.

2) fink.  Fink is driving me nuts.  For whatever reason, it's slow on
the uptake for updating its packages to the latest version.  For
instance, libpng 1.2.5 works fine on OS X, but fink installs one of the
1.0xx releases.  Whatever version of libpng it uses doesn't work with
the blender build.  I'd like to vote we suggest in the readme that
people don't rely on fink (I had similar problems with python until I
built it myself), instead getting source tarballs of the required
external libs.  I guess this won't be an issue once all external libs
are hosted in CVS (are we still doing that?).

3) The current list of libraries for building blender.app is wrong. 
libpng isn't passed in, and neither are the Apple frameworks.  Adding
"-lpng -framework Carbon -framework OpenGL -framework AGL" fixes this.

4) Weezer's "Pinkerton" is great coding music. ^.^

5) Libtool does some strange things: anybody else notice the many
-lm's?

/bin/sh ./libtool --mode=link gcc -g -O2 -o blender.app
-L/usr/lib/python2.2/config source/libblender_source.la
intern/libblender_intern.la intern/python/frozen/libfrozen.a
-lpython2.2 -lm -ljpeg -lcrypto -lssl -lpthread -lstdc++ -lz -framework
OpenGL -framework Carbon -lpng -framework AGL -lblender_imbuf
-lblender_GHOST

gcc -g -O2 -o blender.app -framework OpenGL -framework Carbon
-framework AGL  -L/usr/lib/python2.2/config
source/.libs/libblender_source.a -lm -lm -lm -lm -lm -lm -lm -lm -lm
-lm -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm
-lm -lm intern/.libs/libblender_intern.a -lm
intern/python/frozen/libfrozen.a -lpython2.2 -lm -ljpeg -lcrypto -lssl
-lpthread -lstdc++ -lz -lpng -lblender_imbuf -lblender_GHOST

ld: Undefined symbols:
GHOST_WindowManager::GHOST_WindowManager[in-charge]()

6) The last thing I can't find is the above undefined symbol.  I ran a
grep for it but I'm turning up blank.  It's the last thing blocking a
configure;make build.  Anyone know where that's referenced?

7) I could be wrong on this, but I don't think that the actual .app
bundle is being built by the current make system.  It seems to be just
creating blender.app as it would a regular console executable, which
doesn't work under OS X if you want it double-clickable.  If we've
already got the resources, the following'd would work (given another
target, blender.app):

mkdir -p blender.app/Contents/MacOS
mkdir blender.app/Contents/Resources
cp blender blender.app/Contents/MacOS
cp Info.plist blender.app/Contents
cp PkgInfo blender.app/Contents
cp blender\ file\ icon.icns blender.app/Contents/Resources
cp blender\ publisher\ icon.icns blender.app/Contents/Resources

The above of course assumes that Info.plist is properly-formed XML and
contains the names of the above .icns files; since it's a text file it
could be generated at build time.  PkgInfo is only a text file with
"APPL????" in it, which could also be generated.

Whew.  Somebody respond to all this and tell me I'm not (completely)
crazy.  It'd be great if the above suggestions and missing libs were
added to CVS too, as I (ashamedly) haven't learned to use CVS yet or
signed up for an account. ^.^

- Charles Wardlaw
http://www.ministryofdoom.org/cloud/