Compiling libjingle on Ubuntu Feisty Fawn or Ubuntu Gutsy Gibbon

My first compilation was on Ubuntu 7.04 installed on VMware as guest and i was testing it with Win XP Pro as the host. libjingle worked great for me.

I followed the links given below to compile libjingle on Ubuntu 7.04 (Feisty Fawn)

  1. First install all the build tools.

    sudo apt-get install build-essential

  2. Install all the dependencies.

    sudo apt-get install libexpat1 libexpat1-dev libspeex1 libspeex-dev libssl-dev openssl
    sudo apt-get install libasound2-dev

    This step is important, otherwise libjingle make would give an error when you want to compile with speex.

  3. Download and install the following packages

Now download the libjingle from Google Code


tar zxf libjingle-0.4.0.tar.gz
sudo mkdir /opt/libjingle
cd libjingle-0.4.0
./configure –prefix=/opt/libjingle

The output you get would be like this:

libjingle 0.4.0

Supported Examples: call pcp
Supported Codecs:
Speex: yes
iLBC: yes
MULAW: yes

Continuing with instructions


You wud get errors when compiling with gcc other that version 4.0.x. Feisty has version 4.1.2 installed by default and Gutsy would have a higher version i believe. You dont have to install gcc-4.0.0 or gcc-4.0.4 to make libjingle work. You just need to tweak the source code a bit.

  1. Change line 272 in talk/base/stringutils.h

    inline static const char* Traits::empty_str() { return “”; }


    inline static const char* empty_str() { return “”; }

  2. Change lines 26 & 27 in talk/base/base64.h

    static const std::string Base64::Base64Table;
    static const std::string::size_type Base64::DecodeTable[];


    static const std::string Base64Table;
    static const std::string::size_type DecodeTable[];
  3. Change line 141 in talk/xmpp/xmppclient.h

    std::string XmppClient::GetStateName(int state) const {


    std::string GetStateName(int state) const {
  4. Change line 159 in talk/p2p/base/sessionmanager.h

    buzz::XmlElement* SessionManager::CreateErrorMessage(


    buzz::XmlElement* CreateErrorMessage(
  5. The corrections suggested above would allow you to compile libjingle, but file transfer application will not work without the correction specified next.

    The pcp example will not correctly run giving the error (on the file ‘receiver’):

    File transfer started.
    Get temp failed

    File transfer failed state_ == STATE_RECEIVEDINITIATE @ ChooseTransport
    Aborted (core dumped)

    Change the following function in talk/base/

    bool UnixFilesystem::GetTemporaryFolderI(Pathname &pathname, bool create,
    const std::string *append) {
    if (append) {
    if (create)


    bool UnixFilesystem::GetTemporaryFolderI(Pathname &pathname, bool create,
    const std::string *append) {
    if (append) {
    if (create)
    return true;

Now all the corrections are done. Its time to compile.

make && make check
sudo make install

Testing libjingle

  1. Testing File Sharing Application

    To start the receiver
    /opt/libjingle/pcp -d

    Enter your login details

    JID: “gmail address”
    Password: “gmail password”

    The received files are saved in the directory where you start the program pcp from. Once all the files have been transfered the program quits.

    To start the sender

    /opt/libjingle/pcp -d “files” “receiver_id”

    JID: “gmail address”
    Password: “gmail password”

    Once all the files have been sent, the program quits.

    To test both on the same computer start the sender and receiver from 2 separate directories. You can ignore option -d to avoid messages on terminal.

  2. Testing call application


    Enter your login details

    JID: “gmail address”
    “gmail password”

    Type the command roster to get the list of friends on google talk.


    Roster contains 1 callable “status”

    To make a call to the person who is on roster use the command



* The quotes should not be added while entering file names, email addresses or passwords. The double quotes are shown just to highlight those items.

  • That it good doc. Thanks.

    But I have some questions about.

    Why bin-files so large?

    For example pcp have 12M!


    And I can’t run ‘call’:
    ./call: error while loading shared libraries: cannot open shared object file: No such file or directory

  • Were you able to install all the packages properly? The error means you haven’t installed Ortp properly

    Did you get pcp in the supported examples?

  • Hi,
    I am trying to run the pcp application on windows. it can send files in the working folder correctly, but when a file in any other folder is offered to send (in relative format as well as absolute path), the file transfer fails. Any idea??
    Nuwan Sam