Installing Bricolage on Mac OS X

phillipadsmith edited this page Jul 26, 2011 · 5 revisions
Clone this wiki locally

Mac OS X 10.6 “Snow Leopard”

Instructions written up on Phillip Smith’s blog.

Mac OS X 10.5 “Leopard”

Mac OS X 10.4 “Tiger”

Mac OS X 10.3 “Panther”

I installed Bricolage on OS X for the first time by following David Wheeler’s instructions for OS X 10.2. Much of what he has written still applies, and you should probably read it in addition to this document. If you come up against any problems with these instructions, check Davidís.

I ran all commands as root! You need to be well aware of what this means before you begin. As root, you have access to the entire filesystem, including critical system files. Root is not the same as the administrator account you use through the GUI; it has even more power. Be careful and consider yourself warned.

To run as root, open Terminal and run =su -=, then enter your administrator password. When you are done with everything, type =exit= to go back to your normal user account.


There are some common conventions used throughout this document:


$ =# command=: Denotes that command should be run by the root user.
$ => command=: Denotes that command should be typed into a CPAN prompt.


Xcode Tools (formerly Developer Tools)

As of OS X 10.3, all of the development libraries, compilers, etc. are included in Xcode Tools. In 10.2 and prior, they were included in the Developer Tools. In order to compile anything on OS X, you need to install Xcode Tools. These are available for free from the [[][Apple Developer Connection]] website. It is currently a 600+ MB download, so go make yourself something to eat while you wait.


Fink is a package installer for OS X, much like apt-get for Linux. While Fink is not required for Bricolage installation, it will keep you from having to manually download, configure, compile, and install all of the necessary libraries. It will also allow you to upgrade these programs automatically in the future.

Download and install the latest version of Fink. Run !FinkCommander from the disk image; donít bother copying it to =/Applications= yet because there is probably an upgrade available. Download the upgrade and put that in =/Applications=.


The first library we will install is Expat, an XML parser.

Open !FinkCommander and use the search box in the top right to find Expat. Install the binary packages for =expat= and =expat-shlibs= by highlighting them and selecting Binary > Install.


Bricolage uses the PostgreSQL relational database to store content, so youíll need to install it. A nice package is available from Marc Liyanage. Make sure to install the StartupItem too, since we will be relying on it later on.

CPAN Configuration

We will be installing a lot of Perl packages using CPAN, which will download, extract, configure, compile, and then install each package and its dependencies. Because there are so many dependencies, you will want to make sure that you configure CPAN to automatically follow dependencies.

  1. cpan
    > o conf prerequisites_policy follow
    > install Bundle::CPAN
    > reload cpan
    > install LWP
    (Make sure you say ìnoî when asked to install the HEAD alias)
    > exit

Perl Packages


Be sure you have already installed Expat through Fink. If you have installed Expat manually, the paths will be different.

  1. cpan
    > look XML::Parser
  2. perl Makefile.PL \
    > EXPATLIBPATH=/sw/lib \
    > EXPATINCPATH=/sw/include
  3. make
  4. make install
  5. exit
    > exit

Gets one error… just ignore it and install anyway.

  1. cpan
    > force install MIME::Parser
    > exit

I had trouble with this on Jaguar, so I used that method on Panther without trying it regularly first. If you try installing Text::Iconv through CPAN right off the bat and it works, please update this section.

Otherwise, use Fink to reinstall =libiconv=. I had to select =libiconv=, =libiconv-bin=, and =libiconv-dev= and choose Source > Rebuild and then Source > Reinstall.

  1. cpan
    > look Text::Iconv
  2. perl Makefile.PL INC=/sw/include LIBS=î-liconvî
  3. make
  4. make test
  5. make install
  6. exit
    > exit
DBI and DBD::Pg

Make sure OpenSSL and PostgreSQL are installed. I installed the binary OpenSSL 0.9.7 (=openssl097=, =openssl097-dev=, =openssl097-shlib=) through Fink.

  1. cpan
    > install DBI
    > look DBD::Pg
  2. export POSTGRES_LIB=î/usr/local/pgsql/lib -lssl -lcryptoî
  3. export POSTGRES_INCLUDE=/usr/local/pgsql/include
  4. perl Makefile.PL
  5. make
  6. make test
  7. make install
  8. exit
    > exit

CPAN couldnít find Apache::ConfigFile, so I had to download and install it manually.

  1. curl -O
  2. tar xzvf Apache-ConfigFile-1.18.tar.gz
  3. cd Apache-ConfigFile-1.18
  4. perl Makefile.PL
  5. make
  6. make test
  7. make install
  8. cd ..
  9. rm -rf Apache-ConfigFile-*

The first few times I have installed this module, it didnít work. Perhaps a new version has been released or a bug in Module::Build has been fixed. The manual installation technique follows, although it may not be necessary.

  1. cpan
    > install Params::CallbackRequest (installs all dependencies)

If it succeeds in installing Params::CallbackRequest too, do not continue with the rest of this.

> look Params::CallbackRequest

  1. perl Build.PL
  2. ./Build
  3. ./Build test
  4. ./Build install
  5. exit
    > exit

Apache::Request appears to be missing a dependency on Apache::TestMM, so it fails until you install Apache::Test.

  1. cpan
    > install Apache::Test (I skipped the test suite)
    > install Apache::Request
    > exit

Iíve never been able to make Data::Dumper install successfully on OS X. It looks like it installs fine, but forgets to tell CPAN that it worked. Ignoring it seems to work fine.

Text::Aspell (OPTIONAL)

Newer versions of Bricolage can use HTMLArea for WYSIWYG editing. This includes a spellchecking plugin that requires Text::Aspell.

First, install =aspell=, =aspell-dev=, =aspell-shlibs=, and =aspell-en= through Fink. Also install any other dictionaries you may want (=en= is required!).

  1. cpan
    > look Text::Aspell
  2. perl Makefile.PL \
    > CCFLAGS=-I/sw/include \
    > LIBS=î-L/sw/lib -laspellî
  3. make
  4. make test
  5. make install
  6. exit
    > exit
  1. cpan
    > force install XML::Parser::PerlSAX
    > install XML::DOM
  1. cpan
    > install Archive::Zip Authen::PAM File::Sync BSD::Resource
    > look Net::FTPServer
  2. nano Makefile.PL

Search for the text “install -c -D”: =[CTRL+W] install -c -D=
Delete the “-D”
Save and quit Pico: =[CTRL+X] [Y] [ENTER]=

  1. perl Makefile.PL
  2. make
  3. make test
  4. make install
  5. exit
    > exit

If you choose to install Imager, you will need to install some graphics libraries. I used Fink to install:

$ PNG Support: =libpng3=, =libpng3-shlibs=
$ JPEG Support: =libjpeg=, =libjpeg-bin=, =libjpeg-shlibs=
$ TIFF Support: =libtiff=, =libtiff-bin=, =libtiff-shlibs=

I chose not to install any of the gif stuff because it requires xfree86. No freetype2 because it had problems and Iím too lazy to debug at the moment.

  1. cpan
    > install Imager
    > exit

This is what weíve been building up to. Since we have manually installed all of the troublesome dependencies, we should be able to simply install it through CPAN.

  1. cpan
    > install Bundle::Bricolage
    > exit

If any other dependency problems arise, you can typically resolve them like this:

  1. cpan
    > look MODULE::NAME
  2. nano README (or INSTALL)
  3. perl Makefile.PL
  4. make
  5. make test (if only 1 or 2 tests fail, continue; otherwise reread the README)
  6. make install
  7. exit
    > exit


Download the Bricolage source or, if you want, checkout the latest development version through Subversion.

When running =make=, be sure you say “no” when asked to install the optional Perl module =Apache::SizeLimit=, as it is not compatible with OS X Panther.

Note for Server users: If you are using Mac OS X Server, you must choose a “multi” install to avoid conflicting with the default Apple Apache instance. If you donít, you will not be able to run both at the same time or administer the Apache through Server Settings. Since we are only installing one copy of Bricolage on this machine, I changed “Executable Directory” to =/usr/local/bin= so that =bric_apachectl= ends up in the path by default.

—Marshall Roch

Mac OS X 10.2 “Jaguar”