Bug 956340 - rename internal functions whose name is conflicting with other libraries
Summary: rename internal functions whose name is conflicting with other libraries
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libsrtp
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-24 17:55 UTC by nucleo
Modified: 2014-02-22 00:55 UTC (History)
4 users (show)

Fixed In Version: libsrtp-1.4.4-10.20101004cvs.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-14 07:52:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
patch from git://git.linphone.org/srtp.git (5.65 KB, patch)
2013-04-24 17:56 UTC, nucleo
no flags Details | Diff
patch that requires renaming (612 bytes, patch)
2013-04-24 19:30 UTC, nucleo
no flags Details | Diff
patch to avoid conflict with libzrtpcpp (4.63 KB, patch)
2014-01-09 00:37 UTC, nucleo
no flags Details | Diff

Description nucleo 2013-04-24 17:55:13 UTC
Description of problem:
oRTP from Linphone 3.6 requires patched libsrtp with renamed some internal functions whose name is conflicting with other libraries.

Version-Release number of selected component (if applicable):
libsrtp-1.4.4-7.20101004cvs.fc19


Actual results:
oRTP build fails with error:

This libsrtp version exports symbols conflicting with other libraries. Please use the one from git://git.linphone.org/srtp.git



Please add this patch in Rawhide in F19 libsrtp builds (linphone 3.5 FTBS in F19 so 3.6 should be built for F19).

Comment 1 nucleo 2013-04-24 17:56:59 UTC
Created attachment 739562 [details]
patch from git://git.linphone.org/srtp.git

ommit 14027d37c7574b27bf22e57f508137b4e86b6466
Author: Simon Morlat <simon.morlat>
Date:   Wed Mar 27 20:31:39 2013 +0100

    rename some internal functions whose name is conflicting with other librairies.

Comment 2 Jeffrey C. Ollie 2013-04-24 18:28:43 UTC
First, how does this patch affect other apps that use libsrtp?  From what I can see asterisk, kdenetwork-kopete, and libjingle depend on it.  ISTR that the chromium package that Tom Callaway is working on will require it as well.

Second, it'd be better overall if libsrtp didn't have internal SHA1 and AES code.  There are many crypto libraries out there to use.  Some advantages would be reduced memory usage due to code sharing, code that is more highly optimized, ability to make use of specialized crypto hardware or GPUs, etc.

Third, if no one is willing to replace the internal code with calls to an external library, the conflicting symbol names should be hidden from the linker by marking them with:

__attribute__ ((visibility ("hidden")))

See http://gcc.gnu.org/wiki/Visibility for more information.

Comment 3 Rex Dieter 2013-04-24 18:48:49 UTC
From appearances, the supplied patch is only touching internal functions, so the external api/abi should be unchanged.

of course options 2,3 are better though, but let's not perfect be the enemy of the good.

Comment 4 nucleo 2013-04-24 19:30:47 UTC
Created attachment 739579 [details]
patch that requires renaming

ortp built successfully after I reverted this patch, so maybe it will work fine with unchanged libsrtp and this bug can be closed.

Comment 5 Tom "spot" Callaway 2013-04-24 19:34:45 UTC
I don't think (In reply to comment #4)
> Created attachment 739579 [details]
> patch that requires renaming
> 
> ortp built successfully after I reverted this patch, so maybe it will work
> fine with unchanged libsrtp and this bug can be closed.

Let me know if this patch is still needed. I don't have a problem applying the renaming patch, since I think those are all internal functions, but I don't want to apply it just for fun. :)

Comment 6 Kevin Kofler 2013-04-24 20:38:26 UTC
Symbol conflicts between libraries are very nasty, they can cause crashes when you least expect it. IMHO it's always a good idea to proactively rather than reactively prevent them.

Comment 7 nucleo 2014-01-08 23:32:34 UTC
linphone 3.7.0 beta switched from openssl to polarssl, so now no workaround for conflicting symbols libsrtp and polarssl.

configure: error: This libsrtp version exports symbols conflicting with polar ssl, resulting in a bad execution path.
                         Please use the one from git://git.linphone.org/srtp.git
                         You could also track resolution of defect on https://github.com/cisco/libsrtp/issues/28
                         If you are not linking against polar ssl, you may prefer to skip this test with --enable-broken-srtp

Comment 8 Kevin Kofler 2014-01-09 00:13:33 UTC
Yes, please apply the patch from comment #4, it's really needed now. (Heh, I TOLD you it's better to do this proactively. :-) )

Comment 9 Kevin Kofler 2014-01-09 00:14:36 UTC
Sorry, I mean the patch from comment #1.

Comment 10 nucleo 2014-01-09 00:37:16 UTC
Created attachment 847422 [details]
patch to avoid conflict with libzrtpcpp

Yet one renaming from git://git.linphone.org/srtp.git

commit d719bf1510a485b6760f76c95b8813bdc60781f6
Author: Johan Pascal <johan.pascal>
Date:   Fri Dec 27 00:47:36 2013 +0100

    Rename internal function to avoid conflict with libzrtpcpp
    - aes_encrypt to srtp_aes_encrypt

I don't know how essential this renaming now because ortp compilation fails.

Comment 11 Fedora Update System 2014-02-10 20:26:26 UTC
libsrtp-1.4.4-10.20101004cvs.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/libsrtp-1.4.4-10.20101004cvs.fc19

Comment 12 Fedora Update System 2014-02-10 20:26:36 UTC
libsrtp-1.4.4-10.20101004cvs.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/libsrtp-1.4.4-10.20101004cvs.fc20

Comment 13 Fedora Update System 2014-02-11 23:10:26 UTC
Package libsrtp-1.4.4-10.20101004cvs.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libsrtp-1.4.4-10.20101004cvs.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-2282/libsrtp-1.4.4-10.20101004cvs.fc20
then log in and leave karma (feedback).

Comment 14 Fedora Update System 2014-02-14 07:52:54 UTC
libsrtp-1.4.4-10.20101004cvs.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2014-02-22 00:55:58 UTC
libsrtp-1.4.4-10.20101004cvs.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.