Skip to contentSkip to conversation

package/libsrtp: fix static build only

PATCH New Romain Naour 2 participants 5 messages Feb 25, 2015 – Feb 26, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libsrtp: 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.

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

---
 .../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
package/libsrtp/0002-configure-fix-static-build-only.patch new file +45 -0
new file mode 100644
index 0000000..49b608f
@@ -0,0 +1,45 @@
+From 1296962830e8c7469f1b5a58dac982dc9a66c69c Mon Sep 17 00:00:00 2001
+From: Romain Naour <[email protected]>
+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 <[email protected]>
+---
+ 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
+
Signature · 1 line
1.9.3
#2 lore raw

PATCH 1/1 package/libsrtp: fix static build only

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

Quoted 12 lines · Vicente Olivert Riera

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

#4 lore raw

PATCH 1/1 package/libsrtp: fix static build only

Hi Vicente,

Le 26/02/2015 19:01, Vicente Olivert Riera a ?crit :

Quoted 4 lines

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

Quoted 13 lines

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

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

Regards,
--
Vincent
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot