Bug 185266 - [PATCH] devel/libzrtpcpp port does not produce a functional shared library
Summary: [PATCH] devel/libzrtpcpp port does not produce a functional shared library
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Jose Alonso Cardenas Marquez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-29 13:40 UTC by M. Vefa Bicakci
Modified: 2014-11-23 19:44 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (313 bytes, patch)
2013-12-29 13:40 UTC, M. Vefa Bicakci
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description M. Vefa Bicakci 2013-12-29 13:40:00 UTC
Hello,

When built with OpenSSL support enabled (which happens to be the default configuration) the libzrtpcpp port included in FreeBSD does not produce a functional shared library, because a bug in src/CMakeLists.txt in the source code of libzrtpcpp prevents the shared library from including essential object files.

The problem can be reproduced using the shell snippets in the "How to repeat the problem" section.

Please note: the linker warnings related to the version of libcrypto and libssl are not related to this bug.

Thank you,

M. Vefa Bicakci

Fix: Please find attached a patch which fixes this issue.


Patch attached with submission follows:
How-To-Repeat: # # install the libzrtpcpp port or the package.
$ touch abc.c
$ gcc46 -o abc abc.c -L/usr/local/lib -lzrtpcpp  -lcrypto -lssl
/usr/local/bin/ld: warning: libssl.so.7, needed by //usr/local/lib/libcommoncpp.so.6, may conflict with libssl.so.8
/usr/local/bin/ld: warning: libcrypto.so.7, needed by //usr/local/lib/libcommoncpp.so.6, may conflict with libcrypto.so.8
/usr/lib/crt1.o: In function `_start':
/root/pcbsd-build10.0/git/freebsd/lib/csu/amd64/crt1.c:(.text+0x14b): undefined reference to `main'
/usr/local/lib/libzrtpcpp.so: undefined reference to `closeSha384Context(void*, unsigned char*)'
/usr/local/lib/libzrtpcpp.so: undefined reference to `ZrtpDH::ZrtpDH(char const*)'
/usr/local/lib/libzrtpcpp.so: undefined reference to `ZrtpDH::computeSecretKey(unsigned char*, unsigned char*)'
/usr/local/lib/libzrtpcpp.so: undefined reference to `sha256(unsigned char**, unsigned int*, unsigned char*)'
/usr/local/lib/libzrtpcpp.so: undefined reference to `randomZRTP(unsigned char*, int)'
/usr/local/lib/libzrtpcpp.so: undefined reference to `hmac_sha256(unsigned char*, unsigned int, unsigned char*, int, unsigned char*, unsigned int*)'
/usr/local/lib/libzrtpcpp.so: undefined reference to `ZrtpDH::getPubKeyBytes(unsigned char*) const'
/usr/local/lib/libzrtpcpp.so: undefined reference to `sha256Ctx(void*, unsigned char**, unsigned int*)'
/usr/local/lib/libzrtpcpp.so: undefined reference to `aesCfbEncrypt(unsigned char*, int, unsigned char*, unsigned char*, int)'
/usr/local/lib/libzrtpcpp.so: undefined reference to `sha384Ctx(void*, unsigned char*, unsigned int)'
/usr/local/lib/libzrtpcpp.so: undefined reference to `createSha256Context()'
/usr/local/lib/libzrtpcpp.so: undefined reference to `createSha384Context()'
/usr/local/lib/libzrtpcpp.so: undefined reference to `ZrtpDH::~ZrtpDH()'
/usr/local/lib/libzrtpcpp.so: undefined reference to `closeSha256Context(void*, unsigned char*)'
/usr/local/lib/libzrtpcpp.so: undefined reference to `sha384(unsigned char**, unsigned int*, unsigned char*)'
/usr/local/lib/libzrtpcpp.so: undefined reference to `hmac_sha384(unsigned char*, unsigned int, unsigned char*, int, unsigned char*, unsigned int*)'
/usr/local/lib/libzrtpcpp.so: undefined reference to `hmac_sha384(unsigned char*, unsigned int, unsigned char**, unsigned int*, unsigned char*, unsigned int*)'
/usr/local/lib/libzrtpcpp.so: undefined reference to `ZrtpDH::checkPubKey(unsigned char*) const'
/usr/local/lib/libzrtpcpp.so: undefined reference to `sha256(unsigned char*, unsigned int, unsigned char*)'
/usr/local/lib/libzrtpcpp.so: undefined reference to `sha384Ctx(void*, unsigned char**, unsigned int*)'
/usr/local/lib/libzrtpcpp.so: undefined reference to `aesCfbDecrypt(unsigned char*, int, unsigned char const*, unsigned char*, int)'
/usr/local/lib/libzrtpcpp.so: undefined reference to `ZrtpDH::getDHtype()'
/usr/local/lib/libzrtpcpp.so: undefined reference to `ZrtpDH::generatePublicKey()'
/usr/local/lib/libzrtpcpp.so: undefined reference to `sha384(unsigned char*, unsigned int, unsigned char*)'
/usr/local/lib/libzrtpcpp.so: undefined reference to `ZrtpDH::getDhSize() const'
/usr/local/lib/libzrtpcpp.so: undefined reference to `sha256Ctx(void*, unsigned char*, unsigned int)'
/usr/local/lib/libzrtpcpp.so: undefined reference to `hmac_sha256(unsigned char*, unsigned int, unsigned char**, unsigned int*, unsigned char*, unsigned int*)'
collect2: ld returned 1 exit status
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-12-30 03:02:56 UTC
Responsible Changed
From-To: freebsd-ports-bugs->acm

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Dmitry Marakasov freebsd_committer freebsd_triage 2014-11-23 16:19:26 UTC
Maintainer timeout, fix committed.
Comment 3 commit-hook freebsd_committer freebsd_triage 2014-11-23 16:19:38 UTC
A commit references this bug:

Author: amdmi3
Date: Sun Nov 23 16:19:12 UTC 2014
New revision: 373165
URL: https://svnweb.freebsd.org/changeset/ports/373165

Log:
  - Add missing patch needed to produce usable shared library

  PR:		185266
  Submitted by:	m.v.b@runbox.com
  Approved by:	acm (maintainer timeout)
  MFH:		2014Q4

Changes:
  head/devel/libzrtpcpp/Makefile
  head/devel/libzrtpcpp/files/patch-src__CMakeLists.txt
Comment 4 commit-hook freebsd_committer freebsd_triage 2014-11-23 19:44:57 UTC
A commit references this bug:

Author: amdmi3
Date: Sun Nov 23 19:44:45 UTC 2014
New revision: 373172
URL: https://svnweb.freebsd.org/changeset/ports/373172

Log:
  MFH: r373165

  - Add missing patch needed to produce usable shared library

  PR:		185266
  Submitted by:	m.v.b@runbox.com
  Approved by:	acm (maintainer timeout)
  Approved by:	ports-secteam (rea)

Changes:
_U  branches/2014Q4/
  branches/2014Q4/devel/libzrtpcpp/Makefile
  branches/2014Q4/devel/libzrtpcpp/files/patch-src__CMakeLists.txt