problem compiling libjingle

http://stackoverflow.com/questions/5238953/problem-compiling-libjingle




I downloaded and installed libjingle-0.5.2.zip, and according to the README also downloaded and installed swtoolkit.0.9.1.zip, scons-local-2.1.0.alpha.20101125.tar.gz, and expat-2.0.1.tar.gz, and got nrtp by cvs download. After overwriting my Makefile twice, attempting to follow the rather poorly-written README, I came up with the following Makefile that almost works:


# First, make sure the SCONS_DIR environment variable is set correctly.
SCONS_DIR ?= /usr/src/scons-local/scons-local-2.1.0.alpha.20101125/
#SCONS_DIR ?= /usr/src/scons-local/
export
default: build
# Second, run talk/third_party/expat-2.0.1/configure...
talk/third_party/expat-2.0.1/Makefile:
    cd talk/third_party/expat-2.0.1 && ./configure
# ...and talk/third_party/srtp/configure.
talk/third_party/srtp/Makefile:
    cd talk/third_party/srtp && ./configure
# Third, go to the talk/ directory and run $path_to_swtoolkit/hammer.sh. Run
# $path_to_swtoolkit/hammer.sh --help for information on how to build for
# different modes.
build: talk/third_party/expat-2.0.1/Makefile talk/third_party/srtp/Makefile
    cd talk && ../../swtoolkit/hammer.sh
help:
    ../swtoolkit/hammer.sh --help

However, make gives me the following errors:

jcomeau@intrepid:/usr/src/libjingle-0.5.2$ make
cd talk && ../../swtoolkit/hammer.sh
*** Error loading site_init file './../../swtoolkit/site_scons/site_init.py':
AttributeError: 'Dir' object has no attribute 'endswith':
  File "/usr/src/scons-local/scons-local-2.1.0.alpha.20101125/SCons/Script/Main.py", line 1338:
    _exec_main(parser, values)
  File "/usr/src/scons-local/scons-local-2.1.0.alpha.20101125/SCons/Script/Main.py", line 1302:
    _main(parser)
  File "/usr/src/scons-local/scons-local-2.1.0.alpha.20101125/SCons/Script/Main.py", line 929:
    _load_site_scons_dir(d.path, options.site_dir)
  File "/usr/src/scons-local/scons-local-2.1.0.alpha.20101125/SCons/Script/Main.py", line 719:
    exec fp in site_m
  File "./../../swtoolkit/site_scons/site_init.py", line 455:
    SiteInitMain()
  File "./../../swtoolkit/site_scons/site_init.py", line 451:
    SCons.Node.FS.get_default_fs().SConstruct_dir, None)
  File "/usr/src/scons-local/scons-local-2.1.0.alpha.20101125/SCons/Script/Main.py", line 677:
    site_dir = os.path.join(topdir, site_dir_name)
  File "/usr/lib/python2.6/posixpath.py", line 67:
    elif path == '' or path.endswith('/'):
make: *** [build] Error 2

I'm guessing that something new (a 'Dir' object being where a POSIX path string is expected) in one of the packages is breaking the build process, but which one? There are just too many layers of cruft here for me to follow. For sure I could just keep trying older packages, particularly for swtoolkit and scons, but if anyone here has successfully compiled libjingle and could prod me in the right direction, I'd appreciate it.

share | improve this question
 
You'd be much better off asking the upstream developers about compilation problems. –  Glenn Maynard  Mar 8 '11 at 22:17
 
probably. I posted this to the google voice forum and it disappeared. I'll try again. –  jcomeau_ictx  Mar 8 '11 at 22:26
 
it reappeared. judging by the first response, though, I'm not too optimistic of getting any help on that forum:google.com/support/forum/p/voice/… –  jcomeau_ictx  Mar 8 '11 at 22:41
 
I fighted with libjingle when it was in version 0.4. Seems nothing changed... I finally decided to use farsight, a gstreamer wrapper for libjingle. It was much easier to use. –  liori  Mar 8 '11 at 23:00

2 Answers

up vote 16 down vote accepted

I'm not familiar with the project, but think I have a fix to get you past that point. You need to cast thoseDir instances using str() in swtoolkit/site_scons/site_init.py. That way they can safely be evaluated by path.endswith('/'). Odd that such an issue would exist for very long in the main part of the build infrastructure:

Line 330:

SCons.Script.Main._load_site_scons_dir(
    str(SCons.Node.FS.get_default_fs().SConstruct_dir), site_dir)

Line 450:

SCons.Script.Main._load_site_scons_dir(
    str(SCons.Node.FS.get_default_fs().SConstruct_dir), None)
share | improve this answer
 
thanks man! I didn't have the patience to do what you did. –  jcomeau_ictx  Mar 8 '11 at 23:32
 
No sweat, good luck with the rest of your build. :-) –  samplebias  Mar 8 '11 at 23:33

I did following to build libjingle :

Building LibJingle for Linux

  1. How to Build

Libjingle is built with swtoolkit ( http://code.google.com/p/swtoolkit/), which is a set of extensions to the open-source SCons build tool ( http://www.scons.org).

  • First, install Python 2.4 or later from http://www.python.org/. Please note that since swtoolkit only works with Python 2.x, you will not be able to use Python 3.x.

  • Second, install the stand alone scons-local package 2.0.0 or later fromhttp://www.scons.org/download.php and set an environment variable, SCONS_DIR, to point to the directory containing SCons, for example, /src/libjingle/scons-local/scons-local-2.0.0.final.0/.

  • Third, install swtoolkit from http://code.google.com/p/swtoolkit/.

  • Finally, Libjingle depends on two open-source projects, expat and srtp. Download expat fromhttp://sourceforge.net/projects/expat/ to talk/third_party/expat-2.0.1/. Follow the instructions athttp://sourceforge.net/projects/srtp/develop to download latest srtp to talk/third_party/srtp. Note thatsrtp-1.4.4 does not work since it misses the extensions used by Libjingle. If you put expat or srtp in a different directory, you need to edit talk/libjingle.scons correspondingly.

2.1 Build Libjingle under Linux or OS X

  • First, make sure the SCONS_DIR environment variable is set correctly.
  • Second, run talk/third_party/expat-2.0.1/configure andtalk/third_party/srtp/configure.
  • Third, go to the talk/ directory and run $path_to_swtoolkit/hammer.sh. Run$path_to_swtoolkit/hammer.sh --help for information on how to build for different modes.

Other than above given steps, See following as reference

Set SCONS_DIR Path

export SCONS_DIR=/home/esumit/libjingle/libjingle-0.5.2/talk/third_party/scons-local/scons-local-2.0.1

Install libasound2-dev Lib to compile libJingle, otherwise you will encounter errors.

sudo apt-get install libasound2-dev

Download SRTP using the following command. If it asks for a passowrd, just hit Enter.

cvs -z3 -d:pserver:anonymous@srtp.cvs.sourceforge.net:/cvsroot/srtp co -P srtp

Possible components in LibJingle Directory

libjingle-0.5.2/talk/third_party$ ls
expat-2.0.1  libudev  scons-local  srtp  swtoolkit

Execute following command to build LibJingle

libjingle-0.5.2/talk$ ./third_party/swtoolkit/hammer.sh
share | improve this answer
 
+1 thank you Sumit. I'm glad it works "out of the box" now, it didn't back when I posted the question. –  jcomeau_ictx  Jul 16 '12 at 23:15

I downloaded and installed libjingle-0.5.2.zip, and according to the README also downloaded and installed swtoolkit.0.9.1.zip, scons-local-2.1.0.alpha.20101125.tar.gz, and expat-2.0.1.tar.gz, and got nrtp by cvs download. After overwriting my Makefile twice, attempting to follow the rather poorly-written README, I came up with the following Makefile that almost works:


# First, make sure the SCONS_DIR environment variable is set correctly.
SCONS_DIR ?= /usr/src/scons-local/scons-local-2.1.0.alpha.20101125/
#SCONS_DIR ?= /usr/src/scons-local/
export
default: build
# Second, run talk/third_party/expat-2.0.1/configure...
talk/third_party/expat-2.0.1/Makefile:
    cd talk/third_party/expat-2.0.1 && ./configure
# ...and talk/third_party/srtp/configure.
talk/third_party/srtp/Makefile:
    cd talk/third_party/srtp && ./configure
# Third, go to the talk/ directory and run $path_to_swtoolkit/hammer.sh. Run
# $path_to_swtoolkit/hammer.sh --help for information on how to build for
# different modes.
build: talk/third_party/expat-2.0.1/Makefile talk/third_party/srtp/Makefile
    cd talk && ../../swtoolkit/hammer.sh
help:
    ../swtoolkit/hammer.sh --help

However, make gives me the following errors:

jcomeau@intrepid:/usr/src/libjingle-0.5.2$ make
cd talk && ../../swtoolkit/hammer.sh
*** Error loading site_init file './../../swtoolkit/site_scons/site_init.py':
AttributeError: 'Dir' object has no attribute 'endswith':
  File "/usr/src/scons-local/scons-local-2.1.0.alpha.20101125/SCons/Script/Main.py", line 1338:
    _exec_main(parser, values)
  File "/usr/src/scons-local/scons-local-2.1.0.alpha.20101125/SCons/Script/Main.py", line 1302:
    _main(parser)
  File "/usr/src/scons-local/scons-local-2.1.0.alpha.20101125/SCons/Script/Main.py", line 929:
    _load_site_scons_dir(d.path, options.site_dir)
  File "/usr/src/scons-local/scons-local-2.1.0.alpha.20101125/SCons/Script/Main.py", line 719:
    exec fp in site_m
  File "./../../swtoolkit/site_scons/site_init.py", line 455:
    SiteInitMain()
  File "./../../swtoolkit/site_scons/site_init.py", line 451:
    SCons.Node.FS.get_default_fs().SConstruct_dir, None)
  File "/usr/src/scons-local/scons-local-2.1.0.alpha.20101125/SCons/Script/Main.py", line 677:
    site_dir = os.path.join(topdir, site_dir_name)
  File "/usr/lib/python2.6/posixpath.py", line 67:
    elif path == '' or path.endswith('/'):
make: *** [build] Error 2

I'm guessing that something new (a 'Dir' object being where a POSIX path string is expected) in one of the packages is breaking the build process, but which one? There are just too many layers of cruft here for me to follow. For sure I could just keep trying older packages, particularly for swtoolkit and scons, but if anyone here has successfully compiled libjingle and could prod me in the right direction, I'd appreciate it.

share | improve this question
 
You'd be much better off asking the upstream developers about compilation problems. –  Glenn Maynard  Mar 8 '11 at 22:17
 
probably. I posted this to the google voice forum and it disappeared. I'll try again. –  jcomeau_ictx  Mar 8 '11 at 22:26
 
it reappeared. judging by the first response, though, I'm not too optimistic of getting any help on that forum:google.com/support/forum/p/voice/… –  jcomeau_ictx  Mar 8 '11 at 22:41
 
I fighted with libjingle when it was in version 0.4. Seems nothing changed... I finally decided to use farsight, a gstreamer wrapper for libjingle. It was much easier to use. –  liori  Mar 8 '11 at 23:00

2 Answers

up vote 16 down vote accepted

I'm not familiar with the project, but think I have a fix to get you past that point. You need to cast thoseDir instances using str() in swtoolkit/site_scons/site_init.py. That way they can safely be evaluated by path.endswith('/'). Odd that such an issue would exist for very long in the main part of the build infrastructure:

Line 330:

SCons.Script.Main._load_site_scons_dir(
    str(SCons.Node.FS.get_default_fs().SConstruct_dir), site_dir)

Line 450:

SCons.Script.Main._load_site_scons_dir(
    str(SCons.Node.FS.get_default_fs().SConstruct_dir), None)
share | improve this answer
 
thanks man! I didn't have the patience to do what you did. –  jcomeau_ictx  Mar 8 '11 at 23:32
 
No sweat, good luck with the rest of your build. :-) –  samplebias  Mar 8 '11 at 23:33

I did following to build libjingle :

Building LibJingle for Linux

  1. How to Build

Libjingle is built with swtoolkit ( http://code.google.com/p/swtoolkit/), which is a set of extensions to the open-source SCons build tool ( http://www.scons.org).

  • First, install Python 2.4 or later from http://www.python.org/. Please note that since swtoolkit only works with Python 2.x, you will not be able to use Python 3.x.

  • Second, install the stand alone scons-local package 2.0.0 or later fromhttp://www.scons.org/download.php and set an environment variable, SCONS_DIR, to point to the directory containing SCons, for example, /src/libjingle/scons-local/scons-local-2.0.0.final.0/.

  • Third, install swtoolkit from http://code.google.com/p/swtoolkit/.

  • Finally, Libjingle depends on two open-source projects, expat and srtp. Download expat fromhttp://sourceforge.net/projects/expat/ to talk/third_party/expat-2.0.1/. Follow the instructions athttp://sourceforge.net/projects/srtp/develop to download latest srtp to talk/third_party/srtp. Note thatsrtp-1.4.4 does not work since it misses the extensions used by Libjingle. If you put expat or srtp in a different directory, you need to edit talk/libjingle.scons correspondingly.

2.1 Build Libjingle under Linux or OS X

  • First, make sure the SCONS_DIR environment variable is set correctly.
  • Second, run talk/third_party/expat-2.0.1/configure andtalk/third_party/srtp/configure.
  • Third, go to the talk/ directory and run $path_to_swtoolkit/hammer.sh. Run$path_to_swtoolkit/hammer.sh --help for information on how to build for different modes.

Other than above given steps, See following as reference

Set SCONS_DIR Path

export SCONS_DIR=/home/esumit/libjingle/libjingle-0.5.2/talk/third_party/scons-local/scons-local-2.0.1

Install libasound2-dev Lib to compile libJingle, otherwise you will encounter errors.

sudo apt-get install libasound2-dev

Download SRTP using the following command. If it asks for a passowrd, just hit Enter.

cvs -z3 -d:pserver:anonymous@srtp.cvs.sourceforge.net:/cvsroot/srtp co -P srtp

Possible components in LibJingle Directory

libjingle-0.5.2/talk/third_party$ ls
expat-2.0.1  libudev  scons-local  srtp  swtoolkit

Execute following command to build LibJingle

libjingle-0.5.2/talk$ ./third_party/swtoolkit/hammer.sh
share | improve this answer
 
+1 thank you Sumit. I'm glad it works "out of the box" now, it didn't back when I posted the question. –  jcomeau_ictx  Jul 16 '12 at 23:15
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值