The Apache Portable Runtime Project

Get Involved

  • Subversion
  • Mailing Lists
  • Build on Win32
  • Build on Unix
  • Download!

  • from a mirror
  • APR Docs

  • Version 1.7
  • Trunk APR 2.0 (dev preview)
  • APR-util Docs

  • Version 1.6
  • Trunk APR 2.0 (dev preview)
  • APR-iconv Docs

  • Version 1.2
  • Trunk (dev preview)
  • Guidelines

  • Project Guidelines
  • Contributing
  • Version Numbers
  • Miscellaneous

  • License
  • Security Reports
  • Projects using APR
  • Thanks!
  • Sponsorship
  • Foundation
  • Events
  • Building from Source

    We've attempted to ensure that compiling apr, apr-iconv and apr-util distribution tarballs requires nothing more than what comes installed by default on various UNIX platforms.

    All you should have to do is this:

       make install

    Note that if you are compiling directly from the Subversion repository, you'll need GNU autoconf and GNU libtool installed, and you'll need to run ./buildconf before running the commands listed above.

    Building RPMs (Redhat / CentOS / Fedora)

    While APR is available as an RPM for most distributions, it can sometimes be desirable to install and use the canonical version of APR on these systems, replacing the natively provided versions of the packages.

    While the APR project does not currently create binary RPMs for the various distributions out there, it is easy to build your own binary RPMs from the canonical APR and APR-Util tarballs as follows.

    Creating Source RPMs

    The APR and APR-Util source tarballs can be converted into SRPMs as follows:

    rpmbuild -ts apr-1.4.x.tar.bz2
    rpmbuild -ts apr-util-1.4.x.tar.bz2
    Building RPMs

    The APR RPM can be built directly from the APR source tarball using the following command:

    rpmbuild -tb apr-1.4.x.tar.bz2

    Corresponding "-devel" packages will be required to be installed on your build system prior to building the RPMs, the rpmbuild command will automatically calculate what RPMs are required and will list any dependencies that are missing on your system. These "-devel" packages will not be required after the build is completed, and can be safely removed.

    If successful, the following RPMs will be created:

    The core APR library.
    Debugging symbols for the library.
    Headers and development files for the library.

    An APR-Util RPM can be built directly from the APR-Util source tarball using the following command:

    rpmbuild -tb apr-util-1.4.x.tar.bz2

    If successful, the following RPMs will be created:

    The core APR-Util library.
    Debugging symbols for the library.
    Headers and development files for the library.
    DBM driver, dependent on db4.
    DBD Postgres driver, dependent on postgresql.
    DBD MySQL driver, dependent on mysql.
    DBD SQLite3 driver, dependent on sqlite3.
    DBD FreeTDS driver, dependent on freetds.
    DBD ODBC driver, dependent on unixODBC.
    LDAP driver, dependent on openldap.
    Crypto OpenSSL driver, dependent on openssl.
    Crypto NSS driver, dependent on Mozilla NSS.

    Copyright © 2008-2021, The Apache Software Foundation
    Apache Portable Runtime, Apache, and the Apache feather logo are trademarks of The Apache Software Foundation.