Compile libjingle on ubuntu

Problem 1:

First, the library will not even compile (with gcc 4.x) without source
code modifications:
The first error is:
../../talk/base/stringutils.h:272: error: extra qualification
‘talk_base::Traits::’ on member ‘empty_str’

Solution:
This can easily be fixed by making the source change to ‘talk/base/
stringutils.h’:
From (will be found at line no. 272 in version 0.4 of libjingle, as already gven in the error message):
inline static const char* Traits::empty_str() { return “”; }
To:
inline static const char* empty_str() { return “”; }

Other errors can be corrected by applying a similar change to:
talk/base/base64.h
(i.e. change
Base64::Base64Table to Base64Table and Base64::DecodeTable[] to DecodeTable[] in line nos. 26 & 27)
talk/xmpp/xmppclient.h
(i.e. change XmppClient::GetStateName to GetStateName in line no. 141)

talk/p2p/base/sessionmanager.h
(i.e. change SessionManager::CreateErrorMessage to CreateErrorMessage in line no. 159)


Problem 2:

Second, the pcp example will not correctly run giving the error (on
the file ‘receiver’):
File transfer started.
Get temp failed
File transfer failed
session.cc(377): state_ == STATE_RECEIVEDINITIATE @ ChooseTransport
Aborted (core dumped)

Solution:

This error is caused because a temporary path is attempting to be
generated, but fails because the function incorrectly does not return
the result code ‘true’. The file that must be modified is ‘talk/base/
unixfilesystem.cc’:
simply add the line:
return true;
to the end of the function UnixFilesystem::GetTemporaryFolderI
resulting in:
bool UnixFilesystem::GetTemporaryFolderI(Pathname &pathname, bool
create,
const std::string *append) {
pathname.SetPathname(“/tmp”);
if (append) {
pathname.AppendFolder(*append);
if (create)
CreateFolder(pathname);
}
return true; //Insert this here at line no. 114
}
(more…)

Share
Posted in ubuntu, 网站. Tags: , , , . »