Date: Sun, 29 Dec 2013 13:30:51 GMT From: "M. Vefa Bicakci" <m.v.b@runbox.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/185266: [PATCH] libzrtpcpp port does not produce a functional shared library Message-ID: <201312291330.rBTDUpKU060623@oldred.freebsd.org> Resent-Message-ID: <201312291340.rBTDe1Sd071131@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 185266 >Category: ports >Synopsis: [PATCH] libzrtpcpp port does not produce a functional shared library >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Dec 29 13:40:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: M. Vefa Bicakci >Release: 10.0-RC2 >Organization: >Environment: FreeBSD freebsd 10.0-RELEASE-p1 FreeBSD 10.0-RELEASE-p1 #3 1c0248c(releng/10.0): Fri Dec 20 16:30:45 EST 2013 root@avenger:/usr/obj/root/pcbsd-build10.0/git/freebsd/sys/GENERIC amd64 >Description: 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 >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 >Fix: Please find attached a patch which fixes this issue. Patch attached with submission follows: --- src/CMakeLists.txt.orig 2013-12-29 08:12:53.166636305 -0500 +++ src/CMakeLists.txt 2013-12-29 08:13:07.331637285 -0500 @@ -27,7 +27,7 @@ set(crypto_src ${gcrypt_src}) endif() -if (OPENSSL_FOUND AND HAVE_OPENSSL_EC_H) +if (OPENSSL_LIB AND HAVE_OPENSSL_EC_H) set(crypto_src ${openssl_src}) endif() >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312291330.rBTDUpKU060623>