Monday, January 13, 2014

Building log4cxx from dev trunk [new incubation repo]

Log4CXX recently moved to Apache incubation. So its trunk[dev branch] is moved to

Here I'll explain how to build log4cxx from trunk. In additionally to log4cxx, you need Apache Portable Runtime and , APR-Utils libraries. Because, Log4CXX depends on APR. I'm using Ubuntu 12.04 version here.

Download APR and APR-Utils from APR site at:

I've tree my downloaded folder here, with latest[at blogging date].
Using wget will be easier for apr and apr-utils.

├── apr-1.5.0
├── apr-util-1.5.3
└── trunk
    └── src
        ├── ant
        ├── assembly
        ├── changes
        ├── examples
        ├── main
        │   ├── cpp
        │   ├── include
        │   └── resources
        ├── site
        └── test
Do SVN checkout of log4cxx trunk as well.

svn checkout

Unzip APR and APR-Utils
tar -zxvf apr-1.5.0.tar.gz
tar -zxvf apr-util-1.5.3.tar.gz

Build APR
cd apr-1.5.0

Build APR-Utils
cd ../apr-util-1.5.3
./configure  --with-apr=../apr-1.5.0

To Configure Log4CXX, you need some more tools.

Make sure you have them already installed or install them.
apt-get install automake

Generate configure script:
 autoreconf --force --install

Set environment variables in to configure file using script

Configure Log4CXX configure file with APR and APR-Utils paths
 ./configure --with-apr=../apr-1.5.0 --with-apr-util=../apr-util-1.5.3
make install

Enjoy. Please drop any suggestions, bugs to

No comments:

Post a Comment