| Summary: | libjingle Video Chat support for Jabber/XMPP | ||
|---|---|---|---|
| Product: | TDE | Reporter: | Kris <krisgamrat> |
| Component: | tdenetwork | Assignee: | Timothy Pearson <kb9vqf> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | bugwatch, darrella, gamrat.kristopher, krisgamrat, slavek.banko |
| Priority: | P5 | ||
| Version: | R14.0.0 [Trinity] | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Compiler Version: | TDE Version String: | ||
| Application Version: | Application Name: | ||
| Bug Depends on: | |||
| Bug Blocks: | 2246 | ||
| Attachments: |
Partial patch to build jingle voice support.
Patch to fix the online URL for the jingle voice tutorial Patch to build libjingle voice support Fix automake build: jingle support Patch to fix automake warnings Kopete stuck in libjingle |
||
|
Description
Kris
2012-07-11 21:22:39 CDT
I'm changing this wishlist request to a bug report. Easier than filing a new and almost similar bug report. :) I uploaded several patches to bug report 1040 to resolve build issues with tdenetwork. After creating those patches and digging into the build issues, there exists support for jingle voice, just broken. Thus a bug, not an wishlist request. :) Notes: Building the jingle voice support requires explicitly using the --enable-jingle configure (automake) or WITH_JINGLE=ON (cmake) option. The --with-speex or WITH_SPEEX options are not needed as the configure files find speex. Building the jingle voice support requires ortp. As the ortp.pc file lists /usr/include as the include directory, but the ortp.h header file is actually in /usr/include/ortp/, I'm providing a partial patch to fix the includes to <ortp/ortp.h>. Although there are internal ortp sources in the third_party directory, they appear abandoned. I'm presuming we should delete those sources and only use the upstream ortp (much like we deleted the internal libgadu sources). Despite the presence of the internal ortp sources, tdenetwork will not build without the external upstream ortp package. The build code specifically looks for the ortp.pc pkgconfig file. When the external sources are not installed the configure process displays a warning that no support will be built. I don't know when the internal ortp sources were abandoned and left hanging in the source tree. The current problem with compiling voice support is there are references in the code that are in the internal version of ortp but no longer in the external upstream version. So that is where my partial patch ends. I will provide another post with those build failures. Another patch fixes the online URL for the Required Jingle dependencies tutorial. Created attachment 917 [details]
Partial patch to build jingle voice support.
Created attachment 918 [details]
Patch to fix the online URL for the jingle voice tutorial
Build errors when trying to build with jingle support: /dev/shm/tdenetwork/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msrtprecv.c:29: error: 'struct datab' has no member named 'ref_count' /dev/shm/tdenetwork/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msrtprecv.c:123: error: 'RtpSession' has no member named 'profile' /dev/shm/tdenetwork/kopete/protocols/jabber/jingle/libjingle/talk/third_party/mediastreamer/msrtprecv.c:123: error: 'RtpSession' has no member named 'payload_type' Comment on attachment 917 [details]
Partial patch to build jingle voice support.
Patch no longer needed after the latest patch tested in bug report 1040.
Comment on attachment 918 [details]
Patch to fix the online URL for the jingle voice tutorial
Link for jingle voice tutorial pushed to GIT in commit b701e9bd.
Interesting. When build with automake jingle support cannot be enabled, because is expected ortp on system. When build with cmake jingle can be enabled because is used internal ortp copy from third_party folder. I looked at the page for jingle support on KDE3 and states that ortp should be exaclty 0.7.1 - which is precisely what makes the cmake build == uses internal copy ortp 0.7.1. I do not know how it is with functionality jingle. I do not know if it is possible to use newer ortp - from the system. Only would it be the same for automake and cmake. What to do? Leave automake without useable jingle support? Add to automake using internal copy ortp? Solve usability with system ortp and change cmake build to use system ortp? There seem to be several problems. I notice the automake configure stdout message provides no information why libjingle support will not be built. The answer is simple: libjingle support must be explicitly declared with --enable-jingle. After I updated my build script with --enable-jingle, like you, the automake build failed. Turns out the patch I tagged yesterday as obsolete, attachment 917 [details], partially resolves the problem with automake. Although the patch in attachment 917 [details] succeeds, I don't believe the patch is the correct solution. I believe the correct solution is to use -I/usr/include/ortp to find the ortp headers rather than -I/usr/include. The problem is a broken ortp pkgconfig file, which contains this: Cflags: -I${prefix}/include -D_REENTRANT -DORTP_INET6 The correct entry should be: Cflags: -I${prefix}/include/ortp -D_REENTRANT -DORTP_INET6 The configure output shows ortp being found: checking for ortp... yes In tdenetwork/kopete/protocols/jabber/jingle/configure.in.in, the PKG_CHECK_MODULES function only tests for the existence of a pkgconfig file and when found, extracts the Cflags information rather than checking the actual location of the ortp headers. This is acceptable because the pkgconfig file should be reliable, which is not the case here. We could use the patch in attachment 917 [details], but if future versions of the ortp pkgconfig file are fixed, or the pkgconfig file is patched by a distro maintainer, then the patch in attachment 917 [details] will fail because the build process will be looking for the ortp headers in /usr/include/ortp/ortp rather than /usr/include/ortp. Probably we need to edit configure.in.in to actually test the location of the ortp headers rather than depend solely on the pkgconfig file. After getting past those problems, seems libjingle still fails to build with automake and cmake. I looked at the last official KDE 3.5.10 kdenetwork package built for Slackware. The --enable-jingle option was not used. Therefore no libjingle support was built and I don't have a package that can serve as a guide for what files should be created. The build error: /dev/shm/tdenetwork/kopete/protocols/jabber/jingle/libjingle/talk/third_party/ortp/rtpparse.c:104: error: 'RtpSession' has no member named 'recv_ssrc' I have ortp-0.16.1 installed. The old information about ortp-0.7.1 seems "correct" and the build failure message confirms that failure. Seems then the solution is to address what replaced member recv_ssrc in function RtpSession. Regarding actual functionality, I don't use kopete and therefore can't test libjingle. In summary: * With automake the --enable-jingle option must be explicitly declared. * With both automake and cmake, the broken ortp pkgconfig file will not return the correct location of the ortp headers. * Either use the patch in attachment 917 [details] or fix the configure and cmake files to find the actual location of the ortp headers. * Fix the calls to member recv_ssrc in function RtpSession. I believe the problem with ortp can be resolved. The tdenetwork sources contain the ortp 0.7.1 sources. The build failure seems to be that those internal sources are not being used and instead the external version is used. The configure process should not query or look for an external version at all. Created attachment 1024 [details]
Patch to build libjingle voice support
Yay! I have a patch to build libjingle that works with both automake and cmake. Based upon a cursory review of the build log and the final package, looks like some related files are actually built.
Basically the patch ignores an external ortp package and uses the old 0.7.1 version that is part of the tdenetwork sources.
Please review and feel welcome to improve the patch. :) I left some snippets of code in place and only commented them out in order for you to see how I did the patch. But in the end we probably can delete the commented code.
It surprises me - no need to build the code in third_party/ortp and link it to the jingle library? For cmake code is builded, but I not see it being linked. For automake is not builded at all. This might work? The patch worked for me with both automake and cmake. If the patch builds for you then all we need do is push and then find somebody to functionally test libjingle. Created attachment 1030 [details]
Fix automake build: jingle support
Because it seemed to me unlikely that there was no need build and link ortp, I've updated the patch to ortp build and link.
Please test it. For me, are build successfully both with automake and with cmake.
No problems with the updated patch with either cmake or automake. Let's push to GIT. As the original report filed by Kris is a usability issue, let's not close this report as resolved until somebody functionally tests libjingle. Update. Although the package builds, I noticed the following in my build log: ./../../talk/base/criticalsection.h:43:5: warning: "CS_TRACK_OWNER" is not defined socketaddress.cc:256:5: warning: "WIN32" is not defined ./../../talk/base/criticalsection.h:43:5: warning: "CS_TRACK_OWNER" is not defined ./../../talk/base/criticalsection.h:43:5: warning: "CS_TRACK_OWNER" is not defined ./../../../talk/p2p/base/stun.h:199:6: warning: "_MSC_VER" is not defined ./../../../talk/p2p/base/stun.h:227:6: warning: "_MSC_VER" is not defined ./../../../talk/p2p/base/stun.h:276:6: warning: "_MSC_VER" is not defined ./../../../talk/p2p/base/stun.h:326:6: warning: "_MSC_VER" is not defined I haven't yet started investigating. I just wanted to post before I forget. This was with automake. I'll have to repeat again with cmake to check for the same warnings. Looks like the warnings are automake only. (Odpověď na komentář #16)
> Looks like the warnings are automake only.
I noticed that with automake is used "-std=iso9899:1990", while cmake leaving the default - probably "-std=gnu89". Therefore, may be build warnings and errors different. I had to use "-std=gnu89" when build 'ortp' with automake, otherwise there was a FTBFS due to comments in c++ style - //.
We will deal with these warnings? In any case, the current patch I'll push to GIT. And cleaning warnings can be solved as a separate patch.
Attachment 1030 [details] pushed to GIT in hash 99a94433.
Although our goal is to migrate to cmake, I would like us to resolve the automake build warnings. They are warnings and not errors, but a decent barometer of our cmake migration is comparing the results to automake and vice-versa. A separate patch makes sense. We might as well test any such patch through this bug report, although to close this report all we really need is somebody to functionally test libjingle. Kris mentioned GTalk, we probably should include that in any testing. I tried to enable jingle and it does not look too good (tested on 3.5.13.2~pre27+c45e2db6). Successful is that one of my contacts (his client is QIP) I see as available voice call. The functionality of a voice call, I have not tested. However, regardless of the voice call, I noticing three alternatives during quit kopete: 1) Properly terminate 2) Remains invisible, but eating 100% CPU 3) Crashes 2) Remains invisible, but eating 100% CPU
#0 __pthread_mutex_lock_full (mutex=0x10a48b0) at pthread_mutex_lock.c:448
#1 0x00007fdc75d0ca50 in cricket::CriticalSection::Enter (this=0x10a4810, phandler=0x0,
id=14155778)
at /tmp/buildd/kdenetwork-trinity-3.5.13/kopete/protocols/jabber/jingle/libjingle/talk/base/../../talk/base/criticalsection.h:93
#2 CritScope (this=0x10a4810, phandler=0x0, id=14155778)
at /tmp/buildd/kdenetwork-trinity-3.5.13/kopete/protocols/jabber/jingle/libjingle/talk/base/../../talk/base/criticalsection.h:109
#3 cricket::MessageQueue::Clear (this=0x10a4810, phandler=0x0, id=14155778)
at /tmp/buildd/kdenetwork-trinity-3.5.13/kopete/protocols/jabber/jingle/libjingle/talk/base/messagequeue.cc:265
#4 0x00007fdc75d0e782 in cricket::Thread::Clear (this=<value optimized out>, phandler=0x0,
id=<value optimized out>)
at /tmp/buildd/kdenetwork-trinity-3.5.13/kopete/protocols/jabber/jingle/libjingle/talk/base/thread.cc:258
#5 0x00007fdc75d0ef11 in ~Thread (this=0x10a4810, __in_chrg=<value optimized out>)
at /tmp/buildd/kdenetwork-trinity-3.5.13/kopete/protocols/jabber/jingle/libjingle/talk/base/thread.cc:107
#6 0x00007fdc75d0ea5d in ~ThreadManager (this=0x7fdc75ff49a0,
__in_chrg=<value optimized out>)
at /tmp/buildd/kdenetwork-trinity-3.5.13/kopete/protocols/jabber/jingle/libjingle/talk/base/thread.cc:54
#7 0x00007fdc7d347612 in __run_exit_handlers (status=0, listp=0x7fdc7d66d4a8,
run_list_atexit=true) at exit.c:78
#8 0x00007fdc7d347665 in *__GI_exit (status=17451184) at exit.c:100
#9 0x00007fdc7d32fc94 in __libc_start_main (main=<value optimized out>,
argc=<value optimized out>, ubp_av=<value optimized out>, init=<value optimized out>,
fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fff495583e8)
at libc-start.c:260
#10 0x0000000000454f19 in _start ()
3) Crashes
#0 0x00007f106c7c31b5 in *__GI_raise (sig=<value optimized out>)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007f106c7c5fc0 in *__GI_abort () at abort.c:92
#2 0x00007f106c7bc301 in *__GI___assert_fail (
assertion=0x7f1069f53068 "(-(e)) != 3 || !robust", file=<value optimized out>, line=312,
function=0x7f1069f53170 "__pthread_mutex_lock_full") at assert.c:81
#3 0x00007f1069f4ae09 in __pthread_mutex_lock_full (mutex=0x1939610)
at pthread_mutex_lock.c:312
#4 0x00007f106518e6f1 in cricket::CriticalSection::Enter (this=<value optimized out>,
phandler=0x1df5, id=6)
at /tmp/buildd/kdenetwork-trinity-3.5.13/kopete/protocols/jabber/jingle/libjingle/talk/base/../../talk/base/criticalsection.h:93
#5 CritScope (this=<value optimized out>, phandler=0x1df5, id=6)
at /tmp/buildd/kdenetwork-trinity-3.5.13/kopete/protocols/jabber/jingle/libjingle/talk/base/../../talk/base/criticalsection.h:109
#6 cricket::Thread::Clear (this=<value optimized out>, phandler=0x1df5, id=6)
at /tmp/buildd/kdenetwork-trinity-3.5.13/kopete/protocols/jabber/jingle/libjingle/talk/base/thread.cc:238
#7 0x00007f106518ef11 in ~Thread (this=0x1939570, __in_chrg=<value optimized out>)
at /tmp/buildd/kdenetwork-trinity-3.5.13/kopete/protocols/jabber/jingle/libjingle/talk/base/thread.cc:107
#8 0x00007f106518ea5d in ~ThreadManager (this=0x7f10654749a0,
__in_chrg=<value optimized out>)
at /tmp/buildd/kdenetwork-trinity-3.5.13/kopete/protocols/jabber/jingle/libjingle/talk/base/thread.cc:54
#9 0x00007f106c7c7612 in __run_exit_handlers (status=0, listp=0x7f106caed4a8,
run_list_atexit=true) at exit.c:78
#10 0x00007f106c7c7665 in *__GI_exit (status=7669) at exit.c:100
#11 0x00007f106c7afc94 in __libc_start_main (main=<value optimized out>,
argc=<value optimized out>, ubp_av=<value optimized out>, init=<value optimized out>,
fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fff5c0ad658)
#12 0x0000000000454f19 in _start ()
Created attachment 1032 [details]
Patch to fix automake warnings
Attached is a patch to resolve the automake warnings. Please review.
(Odpověď na komentář #23)
> Vytvořena příloha 1032
> Patch to fix automake warnings
>
> Attached is a patch to resolve the automake warnings. Please review.
I can confirm - warnings _symbol_ is not defined in libjingle are removed.
Problem with crashes at quit remains.
> I can confirm - warnings _symbol_ is not defined in libjingle are removed.
Patch pushed to GIT in commit 84889ea4.
Is this problem still valid? (In reply to comment #26) > Is this problem still valid? I cannot test until bug #1492 gets resolved (that one is still valid, I just tried). #1492? Did you mean 1412? (Odpověď na komentář #26) > Is this problem still valid? To my knowledge, so far there are no patches that would solve this problems from comment 20. (In reply to comment #28) > #1492? Did you mean 1412? Yes, sorry. I was tired last night when I typed that. Unless the R14 Nightlies for Debian Wheezy are missing the build switch to enable libjingle support, this bug isn't fixed. Created attachment 2346 [details]
Kopete stuck in libjingle
I tried to build tdenetwork WITH_JINGLE and WITH_SPEEX. First start - the first login to jabber - kopete stuck in libjingle.
For this reason, tdenetwork for Debian / Ubuntu continues built without libjingle.
Thanks to patch taken from FreeBSD - commit 34dd52ad (master), f2a40364 (r14.0.x) - it seems, that problem with threads is resolved. Debian and Ubuntu packages are now built with Jingle support! |