February 03, 2004

If you want to play with Syncato on Mac OS X, use Syncatomatic !

Tonight was my second attempt at installing Kimbro Staken's very promising Syncato

The first time I started by downloading all dependencies and trying to install them manually, and stopped real quickly: mind you I did this during the day and had to resume real work :-)

Tonight I successfully installed webware, configured it for Apache, read the README for Syncato and the FAQ... but failed to get libxml and libxslt setup for Python.
Python on the mac is a real maze: you have Python 2.3 installed, but in an unusual location so you have to build libxml2 and libxslt and even though Jon Udell succeeded in doing so, he forgot how he did it :-(
Trying another trick to make my life easier, I had used fink to install Python 2.2, libxml and libxslt, but it didn't work for syncato.
Also the excellent FinkCommander doesn't work with Perl 5.08, which came with Panther.
Being more a java than C/C++ guy, I don't like to spend my leisure coding nights mucking with Makefiles and environment variables !

I was ready to call it a day when I stumbled on
Rick Bradley's marvelous Syncatomatic: from the README

The syncatomatic is just a Makefile -- it lists the dependencies between
software packages along with the rules to be used in building them.

The syncatomatic builds a self-contained instance of the Apache webserver,
along with all the libraries and python modules required to run Syncato
under the Webware application server. If you have some of the components
installed already you can tell the syncatomatic and it will try to use

Packaged along with syncatomatic is 'wget' -- a command-line web download
tool (that we make no claim to having written). Since finding the proper
download sites and version numbers for the pieces of software required can
be painful as well, syncato automates that process as well.

With any luck (okay, with a lot of luck) you'll run a configure script and
then call 'make', go out for lunch (or for the weekend, depending upon
your processor speed), and be ready to play.

It's kind of wasteful since I laready have most of this stuff installed on my system already, but I'm willing to give it a try: third attempt.
I just launched it and it seems to run OK.
I'm going to call it a day and check tomorrow morning if it built the full salsa :-)
If it fails I'll try to follow Udell's route !

Mmmm... doesn't work: syncatomatic fails at getting xerces. It tries to download xerces 2.3 source code, which is not there anymore on apache mirrors.
When I replace it by xerces 2.4 in Makefile, it fails later:
/bin/sh: line 1: cd: /Users/pat/Applications/syncatomatic-20030929/src/xerces-c-src_2_4_0: No such file or directory
make: *** [/Users/pat/Applications/syncatomatic-20030929/flags/xerces-c-src_2_4_0.done] Error 1

This kind of build file dependent on online resources that disappear overnight is disturbing: I hope we'll avoid that kind of issues with maven repositories in the java world.
Note to self: send an email to the Apache repository project mailing list to ask them if they took into account the fact that artifacts need to be as long lived as the potential builds that use them, ie forever, or at least following a policy that is longer term than "we just keep the last version" !

I guess I'm back to square 1.
Trying to follow Udell's route, and Kimbro's advice on how to build libxml2 Python bindings on Panther.

Installing libxml2 version 2.6.5 worked fine.
doc/libxml2-python-2.6.5/examples] pat% /usr/bin/python tst.py

Just don't forget to use sudo make install, because it needs root access.

But then making libxslt fails.
> ./configure --with-python=/System/Library/Frameworks/Python.framework/Versions/2.3/

checking for libxml libraries >= 2.6.3... configure: error: Version 2.5.4 found. You need at least libxml2 2.6.3 for this version of libxslt

I installed 2.6.5 but someway 2.5.4 is recognized.
Maybe I need to remove the old library from my system.
How do I do that ?
Maybe that was what Jon Udell doesn't remember !

Looking at /usr/lib and /usr/local/lib
ls -la /usr/lib/libx*
-rwxr-xr-x 1 root wheel 957704 24 Sep 08:44 /usr/lib/libxml2.2.dylib
lrwxr-xr-x 1 root wheel 15 10 Nov 13:55 /usr/lib/libxml2.dylib -> libxml2.2.dylib
-rwxr-xr-x 1 root wheel 731 13 Sep 02:30 /usr/lib/libxml2.la
[chanezon:~/Applications/libxslt-1.1.2] pat% ls -la /usr/local/lib/libx*
-rwxr-xr-x 1 root staff 2548340 3 Feb 02:33 /usr/local/lib/libxml2.2.6.5.dylib
lrwxr-xr-x 1 501 staff 19 3 Feb 02:33 /usr/local/lib/libxml2.2.dylib -> libxml2.2.6.5.dylib
-rw-r--r-- 1 root staff 3094412 3 Feb 02:33 /usr/local/lib/libxml2.a
lrwxr-xr-x 1 501 staff 19 3 Feb 02:33 /usr/local/lib/libxml2.dylib -> libxml2.2.6.5.dylib
-rwxr-xr-x 1 root staff 838 3 Feb 02:33 /usr/local/lib/libxml2.la

and checking in /sw/lib
ls -la /sw/lib/libx*
-rwxr-xr-x 1 root admin 742808 2 Feb 23:25 /sw/lib/libxml.1.8.17.dylib
lrwxr-xr-x 1 root admin 19 2 Feb 23:25 /sw/lib/libxml.1.dylib -> libxml.1.8.17.dylib
-rw-r--r-- 1 root admin 971188 2 Feb 23:25 /sw/lib/libxml.a
lrwxr-xr-x 1 root admin 19 2 Feb 23:25 /sw/lib/libxml.dylib -> libxml.1.8.17.dylib
-rwxr-xr-x 1 root admin 716 2 Feb 23:25 /sw/lib/libxml.la
-rwxr-xr-x 1 root admin 2279420 30 Mar 2003 /sw/lib/libxml2.2.5.4.dylib
lrwxr-xr-x 1 root admin 19 16 May 2003 /sw/lib/libxml2.2.dylib -> libxml2.2.5.4.dylib

This is where the comes from !
Remove all these files
still problem

use the ./configure option

./configure --with-python=/System/Library/Frameworks/Python.framework/Versions/2.3/ --prefix=/usr/local --with-libxml-prefix=/usr/local --with-libxml-include-prefix=/usr/local/include --with-libxml-libs-prefix=/usr/local/lib

This time it works !!!
doc/libxslt-python-1.1.2/examples] pat% sudo python basic.py

Now let's try out syncato.
Works !

Except that if you click preview before an initial Post you get an error.
I guess this is a bug.

3:40 am: time to go to bed.
Next time, I'll install dbxml: right now my syncato weblog runs on the file system.

Posted by chanezon at February 3, 2004 02:14 AM | TrackBack

Thanks for the heads-up about the Syncatomatic build problem. Unfortunately the download-and-build ad hoc Makefile technique is subject to this sort of problem (you should've seen how much of a headache it was to keep up with the PHP "release" system a few years ago). I'll take a look and see what can be done to get a building syncato over the next few days.

Ideally systems like the syncatomatic get obsoleted by OS-level package managers (or add-ons like Fink) catching up with the application being built (here syncato), by the application handling more of the installation dependencies (MT does a decent job of helping to automate the Perl module installation process, e.g.), by the application requiring fewer dependencies, etc. The longer the build tool has to track moving targets the more times it will break.


Posted by: Rick Bradley at February 3, 2004 06:12 PM

I was surfing along and came across your website. I really enjoyed it. Thanks! This site is very informative. I hope to see more in the near future, Wishing you all the best!

unclaimed money

Posted by: unclaimed money at February 18, 2004 07:30 PM


I stumbled across your site from your post on XML.com. I'm trying to use libxml2 and libxslt on OS X for use with Plone--a content management system. Specifically, I'm trying to install a product that allows me to save documents in OpenOffice and uses Plone to reformat the documents as html.

I've been working on this for the past few days and have found your page quite useful. However, I'm unclear on a few things and was hoping you might be able to clear them up:

1. When you are talking about building libxml2 and libxslt, are you doing this from the libxml2 and libxslt source, or from the libxml2-python and libxslt-python sources? or both? and where should the resulting builds go?

2. Having installed a number of different versions of everything--whether it came with Panther or I installed it via Fink, MacPython, or from source--could you please explain what proper versions of Python, libxml and libxslt I should install, and where should they be?

For purposes of Plone, I'm using Panther's 2.3 /System/Library/Frameworks/Python.framework version. Additionally, thinking I had installed libxml and libxslt binaries (from here: http://www.zveno.com/open_source/libxml2xslt.html), I have the following /System/Library/Frameworks/libxml.framework (ver. 2.6.5) and /System/Library/Frameworks/libxslt.framework (ver. 1.1.2). I also have libxml2.2.dylib, libxml2.dylib, libxml2.la in /usr/lib/, but none of the libxml2 stuff in /usr/local/lib. I have some of the libxml2 stuff from my fink install in /sw/lib/, but I'd like to keep everything consistent with OS X, if possible.

3. So I guess, my main question is, would someone be willing to write out exactly (step-by-step) how to install the libxml, libxslt and their python bindings in OS X? If not, if someone could clear up the above two questions, I'd be glad to write out the complete how-to.

Posted by: Alex Curtis at February 19, 2004 06:58 PM

This is definitely a +1 from me regarding Alex' request.

I've tried to get libxml2 python bindings installed for panther with no joy whatsoever.

I downloaded 2.6.4 from xmlsoft and did the
% ./configure --with-python=/System/Library/Frameworks/Python.framework/Versions/2.3

Configure went ok, but make....

gcc -dynamiclib -flat_namespace -undefined suppress -o .libs/libxml2.2.6.4.dylib .libs/SAX.o .libs/entities.o .libs/encoding.o .libs/error.o .libs/parserInternals.o .libs/parser.o .libs/tree.o .libs/hash.o .libs/list.o .libs/xmlIO.o .libs/xmlmemory.o .libs/uri.o .libs/valid.o .libs/xlink.o .libs/HTMLparser.o .libs/HTMLtree.o .libs/debugXML.o .libs/xpath.o .libs/xpointer.o .libs/xinclude.o .libs/nanohttp.o .libs/nanoftp.o .libs/DOCBparser.o .libs/catalog.o .libs/globals.o .libs/threads.o .libs/c14n.o .libs/xmlregexp.o .libs/xmlschemas.o .libs/xmlschemastypes.o .libs/xmlunicode.o .libs/xmlreader.o .libs/relaxng.o .libs/dict.o .libs/SAX2.o .libs/xmlwriter.o .libs/legacy.o .libs/chvalid.o .libs/pattern.o -lpthread -lz /usr/lib/libiconv.dylib -lm -install_name /usr/local/lib/libxml2.2.dylib -compatibility_version 9 -current_version 9.4
ld: -undefined: unknown argument: -L/usr/lib/gcc/darwin/2.95.2
/usr/bin/libtool: internal link edit command failed
make[2]: *** [libxml2.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

And that's it. :(

Posted by: Tony at February 21, 2004 10:25 AM

Great site! Keep it running!

us grants

Posted by: us grants at April 3, 2004 08:00 AM
Post a comment

Remember personal info?