Recent Changes - Search:

Documents

Download

Building

Support

Wiki Stuff

edit SideBar

Building PTLib on Unix

Main.BuildingPTLibUnix History

Hide minor edits - Show changes to output

Changed line 38 from:
             unixodbc-dev liblua5.3-dev libv8-dev libncurses-dev libsdl2-dev libavformat-dev libswscale-dev \
to:
             unixodbc-dev liblua5.3-dev libv8-dev libncurses-dev libsdl2-dev libavformat-dev \
Changed lines 44-45 from:
             unixODBC-devel lua-devel v8-devel ncurses-devel SDL2-devel libavformat-devel libswscale-devel \
              gstreamer1.0-devel gstreamer-plugins-base1.0-devel
to:
             unixODBC-devel lua-devel v8-devel ncurses-devel SDL2-devel libavformat-devel \
              gstreamer1-devel gstreamer-plugins-base1-devel
Changed lines 37-38 from:
  apt install g++ git make autoconf libpcap-dev libexpat-dev libssl-dev libsasl2-dev libldap-dev \
              unixodbc-dev liblua5.3-dev libv8-dev libncurses-dev libsdl-dev libjpeg-dev \
to:
  apt install g++ git make autoconf libpcap-dev libexpat-dev libssl1.0-dev libsasl2-dev libldap-dev \
              unixodbc-dev liblua5.3-dev libv8-dev libncurses-dev libsdl2-dev libavformat-dev libswscale-dev \
Changed lines 44-45 from:
             unixODBC-devel lua-devel v8-devel ncurses-devel SDL-devel libjpeg-devel \
              gstreamer-devel gstreamer-plugins-base-devel
to:
             unixODBC-devel lua-devel v8-devel ncurses-devel SDL2-devel libavformat-devel libswscale-devel \
              gstreamer1.0-devel gstreamer-plugins-base1.0-devel
Changed lines 37-40 from:
  apt-get install subversion autoconf libpcap-dev libexpat-dev libssl-dev libsasl2-dev libldap-dev \
                 unixodbc-dev liblua5.3-dev libv8-dev libncurses-dev libsdl-dev libjpeg-dev \
   
              libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
to:
  apt install g++ git make autoconf libpcap-dev libexpat-dev libssl-dev libsasl2-dev libldap-dev \
              unixodbc-dev liblua5.3-dev libv8-dev libncurses-dev libsdl-dev libjpeg-dev \
              libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
Changed line 43 from:
  yum install subversion autoconf libpcap-devel expat-devel openssl-devel cyrus-sasl-devel openldap-devel \
to:
  yum install g++ git make autoconf libpcap-devel expat-devel openssl-devel cyrus-sasl-devel openldap-devel \
Changed lines 37-38 from:
  apt-get install subversion autoconf libpcap-dev libexpat-dev libssl-dev libsasl2-dev libldap-dev unixodbc-dev liblua5.3-dev libv8-dev libncurses-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libsdl-dev libjpeg-dev
to:
  apt-get install subversion autoconf libpcap-dev libexpat-dev libssl-dev libsasl2-dev libldap-dev \
                  unixodbc-dev liblua5.3-dev libv8-dev libncurses-dev libsdl-dev libjpeg-dev \
                  libgstreamer1.0-dev libgstreamer-plugins-base1.0
-dev
Changed lines 43-45 from:
  yum install subversion autoconf libpcap-devel expat-devel openssl-devel cyrus-sasl-devel openldap-devel unixODBC-devel lua-devel v8-devel ncurses-devel gstreamer-devel gstreamer-plugins-base-devel SDL-devel libjpeg-devel
to:
  yum install subversion autoconf libpcap-devel expat-devel openssl-devel cyrus-sasl-devel openldap-devel \
              unixODBC-devel lua-devel v8-devel ncurses-devel SDL-devel libjpeg-devel \
              gstreamer-devel gstreamer-plugins-base
-devel
Changed lines 37-38 from:
  apt-get install subversion libpcap-dev libexpat-dev libssl-dev libsasl2-dev libldap-dev unixodbc-dev liblua5.3-dev libv8-dev libncurses-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libsdl-dev libjpeg-dev
to:
  apt-get install subversion autoconf libpcap-dev libexpat-dev libssl-dev libsasl2-dev libldap-dev unixodbc-dev liblua5.3-dev libv8-dev libncurses-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libsdl-dev libjpeg-dev
Changed line 41 from:
  yum install subversion libpcap-devel expat-devel openssl-devel cyrus-sasl-devel openldap-devel unixODBC-devel lua-devel v8-devel ncurses-devel gstreamer-devel gstreamer-plugins-base-devel SDL-devel libjpeg-devel
to:
  yum install subversion autoconf libpcap-devel expat-devel openssl-devel cyrus-sasl-devel openldap-devel unixODBC-devel lua-devel v8-devel ncurses-devel gstreamer-devel gstreamer-plugins-base-devel SDL-devel libjpeg-devel
Changed lines 31-34 from:
* gcc 3.2.2 or later. Earlier versions of gcc may work, but are not maintained.

* GNU @@bison@@ and @@flex@@ must be installed.

to:
* gcc 4.7 or later. Earlier versions of gcc may work, but are not maintained.
Added lines 35-42:
For Ubuntu etc, there are the following optional packages:

  apt-get install subversion libpcap-dev libexpat-dev libssl-dev libsasl2-dev libldap-dev unixodbc-dev liblua5.3-dev libv8-dev libncurses-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libsdl-dev libjpeg-dev

For CentOS, Fedora etc, use:

  yum install subversion libpcap-devel expat-devel openssl-devel cyrus-sasl-devel openldap-devel unixODBC-devel lua-devel v8-devel ncurses-devel gstreamer-devel gstreamer-plugins-base-devel SDL-devel libjpeg-devel

Deleted lines 141-158:
[[#notes]]
!!6. Notes for specific distributions

!!!6.1. Ubuntu etc

To compile with all options, assure you have installed the following packages:

  apt-get install subversion libpcap-dev libexpat-dev libssl-dev libsasl2-dev \
          libldap-dev unixodbc-dev liblua5.3-dev libv8-dev libncurses-dev \
          libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libsdl-dev libjpeg-dev

!!!6.2 CentOS, Fedora etc

To compile with all options, assure you have installed the following packages:

  yum install subversion libpcap-devel expat-devel openssl-devel cyrus-sasl-devel \
      openldap-devel unixODBC-devel lua-devel v8-devel ncurses-devel \
      gstreamer-devel gstreamer-plugins-base-devel SDL-devel libjpeg-devel
Changed lines 152-153 from:
     ldap-devel unixODBC-devel liblua5.3-devel libv8-devel libncurses-devel \
      libgstreamer1.0-devel libgstreamer-plugins-base1.0-devel libsdl-devel libjpeg-devel
to:
     openldap-devel unixODBC-devel lua-devel v8-devel ncurses-devel \
      gstreamer-devel gstreamer-plugins-base-devel SDL-devel libjpeg-devel
Changed lines 147-148 from:
!!!6.2 Fedora etc
to:
!!!6.2 CentOS, Fedora etc
Changed lines 151-152 from:
  yum install subversion libpcap-devel libexpat-devel libssl-devel libsasl2-devel \
      libldap-devel unixodbc-devel liblua5.3-devel libv8-devel libncurses-devel \
to:
  yum install subversion libpcap-devel expat-devel openssl-devel cyrus-sasl-devel \
      ldap-devel unixODBC-devel liblua5.3-devel libv8-devel libncurses-devel \
Changed lines 139-154 from:
[[Ubuntu_9_04 | Ubuntu 9.04]]
to:
!!!6.1. Ubuntu etc

To compile with all options, assure you have installed the following packages:

  apt-get install subversion libpcap-dev libexpat-dev libssl-dev libsasl2-dev \
          libldap-dev unixodbc-dev liblua5
.3-dev libv8-dev libncurses-dev \
          libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libsdl-dev libjpeg-dev

!!!6.2 Fedora etc

To compile with all options, assure you have installed the following packages:

  yum install subversion libpcap-devel libexpat-devel libssl-devel libsasl2-devel \
      libldap-devel unixodbc-devel liblua5.3-devel libv8-devel libncurses-devel \
      libgstreamer1.0-devel libgstreamer-plugins-base1.0-devel libsdl-devel libjpeg-devel

April 08, 2010, at 04:45 AM by 115.64.157.126 -
Changed lines 90-91 from:
!!3. Build and use without install
to:
!!4. Build and use without install
Changed line 123 from:
!!4. Editing configure.ac, and running aclocal and autoconf
to:
!!5. Editing configure.ac, and running aclocal and autoconf
May 30, 2009, at 06:41 AM by 64.34.176.218 -
Changed lines 13-14 from:
## [[#Ubuntu_9_04|Ubuntu 9.04]]
to:
## [[Ubuntu_9_04|Ubuntu 9.04]]
Changed lines 137-163 from:
!!6. Notes for specific distributions]]

[[#Ubuntu_9_04]]
!!!Ubuntu 9.04

Ubuntu already provides packages for PTLib, as these are needed for Ekiga.

If you want to install the developer packages, then as of 30 May 2009 these are called libpt-2.6.1-dev. The matching Opal package is called libopal3.6.1-dev.

If you want to compile PTLib yourself, then you will either need to uninstall the existing PTLib (and Opal and Ekiga) or install your new PTLib to another directory. See above for instructions on how to do this.

You will also need the following information:

- If you are getting PTLib direct from the SVN archive, you will need to install Subversion:

  sudo apt-get install subversion

- You will need to install GCC, Flex, Bison

  sudo apt-get install g++ flex bison

- It is recommended that you install the Expat development libraries:

  sudo apt-get install libexpat1-dev

   

to:
!!6. Notes for specific distributions

[[Ubuntu_9_04 | Ubuntu 9.04]]
May 30, 2009, at 06:34 AM by 64.34.176.218 -
May 30, 2009, at 06:33 AM by 64.34.176.218 -
Changed lines 12-14 from:
to:
# [[#notes|Notes for specific distributions]]
## [[#Ubuntu_9_04|Ubuntu 9.04]]

Added lines 136-163:
[[#notes]]
!!6. Notes for specific distributions]]

[[#Ubuntu_9_04]]
!!!Ubuntu 9.04

Ubuntu already provides packages for PTLib, as these are needed for Ekiga.

If you want to install the developer packages, then as of 30 May 2009 these are called libpt-2.6.1-dev. The matching Opal package is called libopal3.6.1-dev.

If you want to compile PTLib yourself, then you will either need to uninstall the existing PTLib (and Opal and Ekiga) or install your new PTLib to another directory. See above for instructions on how to do this.

You will also need the following information:

- If you are getting PTLib direct from the SVN archive, you will need to install Subversion:

  sudo apt-get install subversion

- You will need to install GCC, Flex, Bison

  sudo apt-get install g++ flex bison

- It is recommended that you install the Expat development libraries:

  sudo apt-get install libexpat1-dev

   

Added lines 93-94:
'''IMPORTANT''': you must set the environment variable '''''before''''' executing the configure script or the system will get very confused.
Added lines 115-117:
Note that it may be necessary to add /usr/local/lib to LD_LIBRARY_PATH and set PKG_CONFIG_PATH to /usr/local/lib/pkgconfig
in order for other packages to be detected correctly.

Changed line 103 from:
   export LD_LIBRARY_PATH=/usr/local/lib
to:
   export LD_LIBRARY_PATH=${PTLIBDIR}/lib_linux_x86
Changed line 109 from:
   setenv LD_LIBRARY_PATH /usr/local/lib
to:
   setenv LD_LIBRARY_PATH ${PTLIBDIR}/lib_linux_x86
Changed lines 11-12 from:
to:
# [[#aclocal|Editing configure.ac, and running aclocal and autoconf]]
Added lines 114-128:

[[#aclocal]]
!!4. Editing configure.ac, and running aclocal and autoconf
If you are developer, it may be necessary to modify the configure.ac file and regenerate the configure script using autoconf.

The following message may appear

  configure.ac:5: error: possibly undefined macro: dnl
        If this token and others are legitimate, please use m4_pattern_allow.
        See the Autoconf documentation.

If this occurs, then you need to regnerate the aclocal.m4 file by running the following command:

  aclocal

Added line 39:
Added lines 42-43:
If you are using plugins, the PTLIBPLUGINDIR environment variable must be set to the location of the installed plugins. By default, this is /usr/local/lib/ptlib-''minor''.''major''.''patch'', where ''minor''.''major''.''patch'' is the version of PTlib being used.
Changed lines 48-49 from:
to:
  export PTLIBPLUGINDIR=/usr/local/lib/ptlib-''minor''.''major''.''patch''
Changed lines 54-55 from:
to:
  setenv PTLIBPLUGINDIR /usr/local/lib/ptlib-''minor''.''major''.''patch''
Changed lines 91-92 from:
It is also necessary to set the LD_LIBRARY_PATH environment variable so that programs can find the PTLib libraries at link or run time.
to:

It is also necessary to set the LD_LIBRARY_PATH environment variable so that programs can find the PTLib libraries at link or run time. The correct directory name depends on the host architecture:

  For Linux x86 32 bit    ${PTLIBDIR}/lib_linux_x86
  For Linux x86 64 bit    ${PTLIBDIR}/lib_linux_x86_64

If you are using plugins, the PTLIBPLUGINDIR environment variable must be set to the location of the compiled plugins. This will be the same directory as used above for the LD_LIBRARY_PATH

Changed lines 103-104 from:
to:
   export PTLIBPLUGINDIR=${PTLIBDIR}/lib_linux_x86
Changed lines 108-109 from:
   seetnv LD_LIBRARY_PATH /usr/local/lib
to:
   setenv LD_LIBRARY_PATH /usr/local/lib
   setenv PTLIBPLUGINDIR ${PTLIBDIR}/lib_linux_x86
Changed line 20 from:
If you want do not want to install PTLib into a shared locatio, because you do not have root access or because you want to have
to:
If you want do not want to install PTLib into a shared location, because you do not have root access or because you want to have
Changed lines 51-52 from:
Use the following command to build the release (optimised) version as a shared library
to:
Use the following command to build and install the release version (optimised) as a shared library
Changed lines 58-59 from:
Use the following command to build the release (optimised) version as a static library
to:
Use the following command to build and install the release version (optimised) as a static library
Changed lines 65-66 from:
Use the following command to build the debug (includes debugging symbols) version as a shared library
to:
Use the following command to build and install the debug version (includes debugging symbols) as a shared library
Changed lines 72-73 from:
Use the following command to build the debug (includes debugging symbols) version as a static library
to:
Use the following command to build and install the debug version (includes debugging symbols) as a static library
Changed lines 79-80 from:
Multiple versions can be built in the same directory tree and installed seperately
to:
Multiple versions can be built in the same directory tree and installed separately
Changed lines 9-11 from:
# [[#Downloads|Download the PTLib source code]]
# [[#Build|@@configure@@ and build]]
to:
# [[#Install|Default build and install]]
# [[#Noinstall|Build and use without install]]
Changed lines 15-16 from:
PTLib is built from source using @@make@@ and @@configure@@ in the same way as most other Unix programs.
to:
PTLib is built from source using @@make@@ and @@configure@@ in the same way as most other Unix programs.

If you want to install PTLib into a shared location accessible by all users of the system
(normally /usr/local), and you have root access, then you can use the default configure and install procedure [[#Install|Introduction]] described here.

If you want do not want to install PTLib into a shared locatio, because you do not have root access or because you want to have
more than one version of PTLib on the same host, then follow [[#Noinstall|this procedure]]
.
Changed lines 28-29 from:
* gcc 3.2.2 or later. Earlier versions of gcc may work, but are not maintained.
to:
* gcc 3.2.2 or later. Earlier versions of gcc may work, but are not maintained. 
Changed lines 32-52 from:
* A copy of the PTLib source archive from the [[http://sourceforge.net/project/showfiles.php?group_id=204472|SourceForge download page]] or from [[http://wiki.opalvoip.org/index.php?n=Main.Subversion|Subversion]]

[[#Download]]
!!3. Download and install the PTLib source code

Download and extract the PTLib source code. For the purposes of this document, the directory that contains PTLIB will be indicated as ''installdir''/PTLIB

[[#Build]]
!!4. @@configure@@ and build

To build the release (optimised) version of PTLib, use the following commands:

--> @@cd@@ ''installdir''@@/PTLIB@@
--> @@./configure@@
--> @@make opt@@

To build the debug version (includes debugging symbols) of PTLib, use the following commands:

--> @@cd@@ ''installdir''@@/PTLIB@@
--> @@./configure@@
--> @@make debug@@
to:
* A copy of the PTLib source archive from the [[http://sourceforge.net/project/showfiles.php?group_id=204472|SourceForge download page]] or from [[http://wiki.opalvoip.org/index.php?n=Main.Subversion|Subversion]]. This is extracted into a directory referrred to as ''srcdir''

[[#Install]]
!!3. Default build and install

By default, PTLib will install into the /usr/local tree.
In order for other packages (including Opal) to locate PTLib, the directory /usr/local/lib/pkgconfig must be added to the search path for pkg-config. This is usually done by setting the PKG_CONFIG_PATH environment variable.
It is also necessary to set the LD_LIBRARY_PATH environment variable so that programs can find the PTLib libraries at link or run time.

For bash/sh

  export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
  export LD_LIBRARY_PATH=/usr/local/lib

For tcsh/csh

  setenv PKG_CONFIG_PATH /usr/local/lib/pkgconfig
  setenv LD_LIBRARY_PATH /usr/local/lib

Use the following command to build the release (optimised) version as a shared library

  cd ''srcdir''
  ./configure
  make
  sudo make install

Use the following command to build the release (optimised) version as a static library

  cd ''srcdir''
  ./configure --disable-shared
  make
  sudo make install

Use the following command to build the debug (includes debugging symbols) version as a shared library

  cd ''srcdir''
  ./configure --enable-debug
  make debug
  sudo make install

Use the following command to build the debug (includes debugging symbols) version as a static library

  cd ''srcdir''
  ./configure --enable-debug --disable-shared
  make debug
  sudo make install

Multiple versions can be built in the same directory tree and installed seperately

[[#Noinstall]]
!!3. Build and use without install

Set the PTLIBDIR environment variable to point to ''srcdir'' as follows.
This allows other libraries that use PTLib to find the code without using pkg-config.
It is also necessary to set the LD_LIBRARY_PATH environment variable so that programs can find the PTLib libraries at link or run time.

For bash/sh

  export PTLIBDIR=''srcdir''
  export LD_LIBRARY_PATH=/usr/local/lib

For tcsh/csh

  setenv PTLIBDIR ''srcdir''
  seetnv LD_LIBRARY_PATH /usr/local/lib

Once this is done, configure and build the appropriate version of the code using the same commands
as described in section 3 above, but omit the ''sudo make install''
Edit - History - Print - Recent Changes - Search
Page last modified on July 22, 2020, at 10:05 AM