How to compile cyrus-sasl as universal
Published April 15th, 2006 in Mac OS X, UNIXMost people probably aren’t going to care about this, but I want to share this so no one else has to go through the same pain. A few things are fairly hackish, but hey, it works. Much thanks goes to Nicholas Riley in helping me figure this out.
- Download the cyrus-sasl tarball from http://asg.web.cmu.edu/sasl/sasl-library.html
- The newest version of GCC is much stricter when compiling so you’ll have to comment out line 112 in file lib/saslint.h, like so:
//extern sasl_global_callbacks_t global_callbacks; - DO NOT run configure by itself, instead execute this:
env CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386" ./configure --disable-dependency-tracking - Open libtool in a text editor and change this (should be about line 177):
# Commands used to build and install a shared archive.
archive_cmds="\$CC \$(test x\$module = xyes && echo -bundle || echo -dynamiclib) \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$linkopts \$(test x\$module != xyes && echo -install_name \$rpath/\$soname \$tmp_verstring)"To this:
# Commands used to build and install a shared archive.
-archive_cmds="\$CC -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 \$(test x\$module = xyes && echo -bundle || echo -dynamiclib) \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$linkopts \$(test x\$module != xyes && echo -install_name \$rpath/\$soname \$tmp_verstring)” - Now run make, and it should compile
I think that this is not the right change :
//extern sasl_global_callbacks_t global_callbacks;
that global_callbacks looks strange.
I would remove the static declaration in client.c line 64 :
static sasl_global_callbacks_t global_callbacks;
as I suppose that global_callbacks is shared between client.c and server.c.
I love you, Adium thanks you.