diff mbox

package/libsrtp: fix static build only

Message ID 1424906225-11543-1-git-send-email-romain.naour@openwide.fr
State Rejected
Headers show

Commit Message

Romain Naour Feb. 25, 2015, 11:17 p.m. UTC
Use PKG_CHECK_MODULES to check openssl, otherwise the check fail
to detect it due to a link issue with zlib.

Fixes:
http://autobuild.buildroot.net/results/a71/a71d85a5bb9af2ee82a8e61054025bceb03dbdeb/

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
---
 .../0002-configure-fix-static-build-only.patch     | 45 ++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 package/libsrtp/0002-configure-fix-static-build-only.patch

Comments

Vicente Olivert Riera Feb. 26, 2015, 2:27 p.m. UTC | #1
Hello Romain,

could you please propose your fix upstream in this issue?

https://github.com/cisco/libsrtp/issues/97

Or do a pull request.

Regards,
--
Vincent
Vicente Olivert Riera Feb. 26, 2015, 5 p.m. UTC | #2
Hello Romain,

upstream replied to the reported issue. I have replied again and gave
them the link to your patch so they can check it and see if it can be
applied upstream:

https://github.com/cisco/libsrtp/issues/97#issuecomment-76213763

Regards,
--
Vincent

On 26/02/15 15:27, Vicente Olivert Riera wrote:
> Hello Romain,
> 
> could you please propose your fix upstream in this issue?
> 
> https://github.com/cisco/libsrtp/issues/97
> 
> Or do a pull request.
> 
> Regards,
> --
> Vincent
>
Vicente Olivert Riera Feb. 26, 2015, 6:01 p.m. UTC | #3
Hello Romain,

upstream fixed the problem. Could you please backport this patch instead
of adding your own?

https://github.com/cisco/libsrtp/commit/b5fad5f893c7f323a8f8e1c512fa48cf6cdb1c8d

This way we can remove it in the next version bump.

Regards,
--
Vincent
Romain Naour Feb. 26, 2015, 9:01 p.m. UTC | #4
Hi Vicente,

Le 26/02/2015 19:01, Vicente Olivert Riera a écrit :
> Hello Romain,
> 
> upstream fixed the problem. Could you please backport this patch instead
> of adding your own?

Ok, I'll mark my patch as rejected in the patchwork and submit another one with
the backported upstream patch.

Thank you for reporting the issue upstream and John Foley for fixing the issue.

Best regards,
Romain

> 
> https://github.com/cisco/libsrtp/commit/b5fad5f893c7f323a8f8e1c512fa48cf6cdb1c8d
> 
> This way we can remove it in the next version bump.
> 
> Regards,
> --
> Vincent
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
diff mbox

Patch

diff --git a/package/libsrtp/0002-configure-fix-static-build-only.patch b/package/libsrtp/0002-configure-fix-static-build-only.patch
new file mode 100644
index 0000000..49b608f
--- /dev/null
+++ b/package/libsrtp/0002-configure-fix-static-build-only.patch
@@ -0,0 +1,45 @@ 
+From 1296962830e8c7469f1b5a58dac982dc9a66c69c Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@openwide.fr>
+Date: Wed, 25 Feb 2015 22:30:41 +0100
+Subject: [PATCH] configure: fix static build only
+
+Use PKG_CHECK_MODULES to check openssl, otherwise the check fail
+to detect it due to a link issue with zlib.
+
+config.log:
+arm-linux-gcc -o conftest -Os  -static -I/usr/include -static -L/usr/lib -lz -lcrypto -lssl
+conftest.c -lcrypto /usr/lib/libcrypto.a(c_zlib.o): In function `zlib_stateful_expand_block':
+c_zlib.c:(.text+0x54): undefined reference to `inflate'
+
+Signed-off-by: Romain Naour <romain.naour@openwide.fr>
+---
+ configure.in | 13 +++----------
+ 1 file changed, 3 insertions(+), 10 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index ee30daf..101a58a 100644
+--- a/configure.in
++++ b/configure.in
+@@ -144,16 +144,9 @@ AC_ARG_ENABLE(openssl,
+   [], enable_openssl=no)
+ AC_MSG_RESULT($enable_openssl)
+ if test "$enable_openssl" = "yes"; then
+-   LDFLAGS="$LDFLAGS $(pkg-config --libs openssl)";
+-   CFLAGS="$CFLAGS $(pkg-config --cflags openssl)";
+-
+-   AC_CHECK_LIB([crypto], [EVP_EncryptInit], [],
+-             [AC_MSG_FAILURE([can't find openssl >1.0.1 crypto lib])])
+-   AC_CHECK_LIB([crypto], [EVP_aes_128_ctr], [],
+-             [AC_MSG_FAILURE([can't find openssl >1.0.1 crypto lib])])
+-   AC_CHECK_LIB([crypto], [EVP_aes_128_gcm], [],
+-             [AC_MSG_FAILURE([can't find openssl >1.0.1 crypto lib])])
+-   AC_DEFINE(OPENSSL, 1, [Define this to use OpenSSL crypto.])
++   PKG_CHECK_MODULES([OPENSSL], [openssl],
++		[AC_DEFINE(OPENSSL, 1, [Define this to use OpenSSL crypto.])],
++		[AC_MSG_FAILURE([can't find openssl >1.0.1 crypto lib])])
+    AES_ICM_OBJS="crypto/cipher/aes_icm_ossl.o crypto/cipher/aes_gcm_ossl.o"
+    RNG_OBJS=rand_source_ossl.o
+    HMAC_OBJS=crypto/hash/hmac_ossl.o
+-- 
+1.9.3
+