Re: [OpenWrt-Devel] Fwd: [PATCH][include] Update CyaSSL library to last version 2.6.0

2013-06-17 Thread Felix Fietkau
On 2013-06-17 1:57 AM, Ben West wrote:
 I can confirm the 100-sizeof_long_long.patch patch for curl provided
 by Massimo does work fine for me under ar71xx and atheros platforms. 
 That is, I can now successfully have libcurl link to cyassl instead of
 openssl.
 
 What additional steps are needed to close this thread, specifically to
 update the cyassl Makefile to pull version 2.6.0?
A size comparison would be useful. Also, libustream-cyassl + uhttpd
needs to be tested against the new version.

- Felix

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Fwd: [PATCH][include] Update CyaSSL library to last version 2.6.0

2013-06-17 Thread Sebastian Muszynski
Am Montag, 17. Juni 2013, 13:16:13 schrieb Felix Fietkau:
 On 2013-06-17 1:57 AM, Ben West wrote:
  I can confirm the 100-sizeof_long_long.patch patch for curl provided
  by Massimo does work fine for me under ar71xx and atheros platforms.
  That is, I can now successfully have libcurl link to cyassl instead of
  openssl.
  
  What additional steps are needed to close this thread, specifically to
  update the cyassl Makefile to pull version 2.6.0?
 
 A size comparison would be useful. 

CyaSSL:

insgesamt 340
-rw-r--r-- 1 x x   43182 Jun 17 13:23 curl_7.29.0-1_ar71xx.ipk
-rw-r--r-- 1 x x 123484 Jun 17 13:23 libcurl_7.29.0-1_ar71xx.ipk
-rw-r--r-- 1 x x 101719 Jun 17 13:23 libcyassl_2.6.0-1_ar71xx.ipk
-rw-r--r-- 1 x x   31580 Jun 17 13:23 libpthread_0.9.33.2-1_ar71xx.ipk
-rw-r--r-- 1 x x   40643 Jun 17 13:23 zlib_1.2.7-1_ar71xx.ipk

OpenSSL:

-rw-r--r-- 1 x x   42620 Jun 16 00:40 curl_7.29.0-1_ar71xx.ipk
-rw-r--r-- 1 x x 133415 Jun 16 00:39 libcurl_7.29.0-1_ar71xx.ipk
-rw-r--r-- 1 x x 630003 Jun 16 00:30 libopenssl_1.0.1e-1_ar71xx.ipk
-rw-r--r-- 1 x x   31285 Jun 16 00:14 libpthread_0.9.33.2-1_ar71xx.ipk
-rw-r--r-- 1 x x   40219 Jun 16 00:18 zlib_1.2.7-1_ar71xx.ipk

CyaSSL is pretty small, so you can use it on small flashs (4MB). Curl + OpenSSL 
does not fit usually. 

Kind regards,

Sebastian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Fwd: [PATCH][include] Update CyaSSL library to last version 2.6.0

2013-06-17 Thread Sebastian Muszynski
Am Montag, 17. Juni 2013, 13:40:20 schrieb Felix Fietkau:
 On 2013-06-17 1:33 PM, Sebastian Muszynski wrote:
  Am Montag, 17. Juni 2013, 13:16:13 schrieb Felix Fietkau:
  On 2013-06-17 1:57 AM, Ben West wrote:
   I can confirm the 100-sizeof_long_long.patch patch for curl provided
   by Massimo does work fine for me under ar71xx and atheros platforms.
   That is, I can now successfully have libcurl link to cyassl instead of
   openssl.
   
   What additional steps are needed to close this thread, specifically to
   update the cyassl Makefile to pull version 2.6.0?
  
  A size comparison would be useful.
  
  CyaSSL:
  
  insgesamt 340
  -rw-r--r-- 1 x x   43182 Jun 17 13:23 curl_7.29.0-1_ar71xx.ipk
  -rw-r--r-- 1 x x 123484 Jun 17 13:23 libcurl_7.29.0-1_ar71xx.ipk
  -rw-r--r-- 1 x x 101719 Jun 17 13:23 libcyassl_2.6.0-1_ar71xx.ipk
  -rw-r--r-- 1 x x   31580 Jun 17 13:23 libpthread_0.9.33.2-1_ar71xx.ipk
  -rw-r--r-- 1 x x   40643 Jun 17 13:23 zlib_1.2.7-1_ar71xx.ipk
  
  OpenSSL:
  
  -rw-r--r-- 1 x x   42620 Jun 16 00:40 curl_7.29.0-1_ar71xx.ipk
  -rw-r--r-- 1 x x 133415 Jun 16 00:39 libcurl_7.29.0-1_ar71xx.ipk
  -rw-r--r-- 1 x x 630003 Jun 16 00:30 libopenssl_1.0.1e-1_ar71xx.ipk
  -rw-r--r-- 1 x x   31285 Jun 16 00:14 libpthread_0.9.33.2-1_ar71xx.ipk
  -rw-r--r-- 1 x x   40219 Jun 16 00:18 zlib_1.2.7-1_ar71xx.ipk
  
  CyaSSL is pretty small, so you can use it on small flashs (4MB). Curl +
  OpenSSL does not fit usually.
 
 I meant a size comparison of old CyaSSL vs. new CyaSSL of course :)

Ups. :-) 

-rw-r--r-- 1 x x 64570 Jun 16 00:29 libcyassl_1.6.5-2_ar71xx.ipk

This is the filesize of the current version in trunk.

Kind regards,

Sebastian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Fwd: [PATCH][include] Update CyaSSL library to last version 2.6.0

2013-06-17 Thread Ben West
Thank you all for filling in details about remaining steps to get cyassl
Makefile updated.

Here are sizes of the compiled cyassl ipk under ar71xx platform:

-rw-r--r-- 1 ben ben 105819 Jun 11 18:53 libcyassl_2.6.0-1_ar71xx.ipk

... and under atheros:

-rw-r--r-- 1 ben ben 105826 Jun  6 14:10 libcyassl_2.6.0-1_atheros.ipk

I'm assuming the ~40Kbyte size increase for my  Massimo's instance results
from our enabling additional options while compiling cyassl, for use with
libcurl.  Namely --enable-dtls and --enable-opensslextra.  I have not had
opportunity to verify cyassl still functions adequately with libcurl, with
these options disabled.

On Mon, Jun 17, 2013 at 6:47 AM, Sebastian Muszynski ba...@linkt.de wrote:

 Am Montag, 17. Juni 2013, 13:40:20 schrieb Felix Fietkau:
  On 2013-06-17 1:33 PM, Sebastian Muszynski wrote:
   Am Montag, 17. Juni 2013, 13:16:13 schrieb Felix Fietkau:
   On 2013-06-17 1:57 AM, Ben West wrote:
I can confirm the 100-sizeof_long_long.patch patch for curl
 provided
by Massimo does work fine for me under ar71xx and atheros platforms.
That is, I can now successfully have libcurl link to cyassl instead
 of
openssl.
   
What additional steps are needed to close this thread, specifically
 to
update the cyassl Makefile to pull version 2.6.0?
  
   A size comparison would be useful.
  
   CyaSSL:
  
   insgesamt 340
   -rw-r--r-- 1 x x   43182 Jun 17 13:23 curl_7.29.0-1_ar71xx.ipk
   -rw-r--r-- 1 x x 123484 Jun 17 13:23 libcurl_7.29.0-1_ar71xx.ipk
   -rw-r--r-- 1 x x 101719 Jun 17 13:23 libcyassl_2.6.0-1_ar71xx.ipk
   -rw-r--r-- 1 x x   31580 Jun 17 13:23 libpthread_0.9.33.2-1_ar71xx.ipk
   -rw-r--r-- 1 x x   40643 Jun 17 13:23 zlib_1.2.7-1_ar71xx.ipk
  
   OpenSSL:
  
   -rw-r--r-- 1 x x   42620 Jun 16 00:40 curl_7.29.0-1_ar71xx.ipk
   -rw-r--r-- 1 x x 133415 Jun 16 00:39 libcurl_7.29.0-1_ar71xx.ipk
   -rw-r--r-- 1 x x 630003 Jun 16 00:30 libopenssl_1.0.1e-1_ar71xx.ipk
   -rw-r--r-- 1 x x   31285 Jun 16 00:14 libpthread_0.9.33.2-1_ar71xx.ipk
   -rw-r--r-- 1 x x   40219 Jun 16 00:18 zlib_1.2.7-1_ar71xx.ipk
  
   CyaSSL is pretty small, so you can use it on small flashs (4MB). Curl +
   OpenSSL does not fit usually.
 
  I meant a size comparison of old CyaSSL vs. new CyaSSL of course :)

 Ups. :-)

 -rw-r--r-- 1 x x 64570 Jun 16 00:29 libcyassl_1.6.5-2_ar71xx.ipk

 This is the filesize of the current version in trunk.

 Kind regards,

 Sebastian
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/mailman/listinfo/openwrt-devel




-- 
Ben West
http://gowasabi.net
b...@gowasabi.net
314-246-9434
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Fwd: [PATCH][include] Update CyaSSL library to last version 2.6.0

2013-06-16 Thread Ben West
I can confirm the 100-sizeof_long_long.patch patch for curl provided by
Massimo does work fine for me under ar71xx and atheros platforms.  That is,
I can now successfully have libcurl link to cyassl instead of openssl.

What additional steps are needed to close this thread, specifically to
update the cyassl Makefile to pull version 2.6.0?

On Thu, May 23, 2013 at 3:17 PM, Massimo Vellucci vema...@gmail.com wrote:

 Hi,
 sorry for the delay, I found the problem about the curl library. There
 is a bug in configure.ac file of curl package.
 You have to add the file 100-sizeof_long_long.patch in the 
 pathtrunk/feeds/packages/libs/curl/patches

 diff -u a/configure.ac b/configure.ac
 --- a/configure.ac  2013-02-06 10:47:19.0 +0100
 +++ b/configure.ac  2013-05-23 22:00:59.233980076 +0200
 @@ -2928,6 +2928,7 @@

  AC_CHECK_SIZEOF(size_t)
  AC_CHECK_SIZEOF(long)
 +AC_CHECK_SIZEOF(long long)
  AC_CHECK_SIZEOF(int)
  AC_CHECK_SIZEOF(short)
  CURL_CONFIGURE_LONG


 Curl did not determine the size of the type long long that is a value
 necessary to CyaSSL.


 My libs/curl/Makefile

 --- libs/curl/Makefile
 +++ libs/curl/Makefile

 @@ -43,7 +43,7 @@
$(call Package/curl/Default)
SECTION:=libs
CATEGORY:=Libraries
 -  DEPENDS:=+libopenssl +zlib
 +  DEPENDS:=+libcyassl +zlib
TITLE:=A client-side URL transfer library
  endef

 @@ -70,7 +70,8 @@
  --enable-tftp \
  --disable-verbose \
  --with-random=/dev/urandom \
 ---with-ssl=$(STAGING_DIR)/usr \
 +--with-cyassl=$(STAGING_DIR)/usr \
 +--without-ssl
  --without-ca-bundle \
  --without-gnutls \
  --without-krb4 \
 @@ -81,7 +82,7 @@
  $(call autoconf_bool,CONFIG_IPV6,ipv6) \

  CONFIGURE_VARS += \
 -LIBS=-lcrypto -lssl -lz \
 +LIBS=-lcyassl -lz \
  CC=$(filter-out ccache,$(TARGET_CC))


 With these settings I was able to compile curl for atheros 71xx


 Bye
 Massimo




 2013/5/21 Massimo Vellucci vema...@gmail.com

 I'm sorry but these days I have been very busy with work. I have not
 found the time to do the tests.
 I would like to remove OpenSSL from my application that I am developing and
 using CyaSSL.
 The problem of porting applications from OpenSSL to CyaSSL is requires a
 lot of work. The two libraries are not compatible 100%


 2013/5/21 Ben West b...@gowasabi.net

 For an update, I have since been able to get libcurl to link to the new
 cyassl package, provided I explicitly insert sizeof_long definitions into
 libcurl header files, shown in the patch below.  It is unusual that libcurl
 seems to require these additional defines to link to libcyassl.so, but
 uhttpd-mod-tls does not.

 I'm not sure if this patch resides properly with the package curl,
 perhaps accompanied by another patch that defines a new sub-package
 libcurl-cyassl.

 Massimo, are you using the newer version of cyassl for anything besides
 uhttpd?

 --- curl-7.29.0/include/curl/curl.h.201305182013-05-17
 23:25:23.816083944 -0500
 +++ curl-7.29.0/include/curl/curl.h2013-05-17 23:30:43.304082086
 -0500
 @@ -118,6 +118,13 @@ typedef void CURL;
  #endif
  #endif

 +/* These definitions needed for cyassl */
 +/* The size of `long', as computed by sizeof. */
 +#define SIZEOF_LONG 4
 +
 +/* The size of `long long', as computed by sizeof. */
 +#define SIZEOF_LONG_LONG 8
 +
  #ifndef curl_socket_typedef
  /* socket typedef */
  #if defined(WIN32)  !defined(__LWIP_OPT_H__)



 On Fri, May 17, 2013 at 12:00 PM, Ben West b...@gowasabi.net wrote:

 Thank you for responding.  Below is the diff of the curl Makefile,
 against that included in the Attitude Adjustment v12.09 packages 
 herehttps://dev.openwrt.org/browser/branches/packages_12.09/libs/curl/Makefile
 .

 Note that the addition of -lm to libraries for curl to link to came
 from my own research in pending OpenWRT issues about compiling curl with
 cyassl.  However, the error about long long size mismatch occurs whether
 libm.so is included or not.

 Index: libs/curl/Makefile
 ===
 --- libs/curl/Makefile(revision 36652)
 +++ libs/curl/Makefile(working copy)
 @@ -43,7 +43,7 @@
$(call Package/curl/Default)
SECTION:=libs
CATEGORY:=Libraries
 -  DEPENDS:=+libopenssl +zlib
 +  DEPENDS:=+libcyassl +zlib
TITLE:=A client-side URL transfer library
  endef

 @@ -70,7 +70,8 @@
  --enable-tftp \
  --disable-verbose \
  --with-random=/dev/urandom \
 ---with-ssl=$(STAGING_DIR)/usr \
 +--with-cyassl=$(STAGING_DIR)/usr \
 +--without-ssl
  --without-ca-bundle \
  --without-gnutls \
  --without-krb4 \
 @@ -81,7 +82,7 @@
  $(call autoconf_bool,CONFIG_IPV6,ipv6) \

  CONFIGURE_VARS += \
 -LIBS=-lcrypto -lssl -lz \
 +LIBS=-lm -lcyassl -lz \
  CC=$(filter-out ccache,$(TARGET_CC))

  define Build/Compile


 On Fri, May 17, 2013 at 2:10 AM, Massimo Vellucci vema...@gmail.comwrote:

 CyaSSL must determine the environment to recognize the size of 

Re: [OpenWrt-Devel] Fwd: [PATCH][include] Update CyaSSL library to last version 2.6.0

2013-05-26 Thread Massimo Vellucci
Sorry, i forget sign off and now the diff contains the complete path from
the trunk folder:


diff -ur a/package/libs/cyassl/Makefile b/package/libs/cyassl/Makefile
--- a/package/libs/cyassl/Makefile  2013-05-25 19:18:22.0 +0200
+++ b/package/libs/cyassl/Makefile  2013-05-25 17:34:24.0 +0200
@@ -8,16 +8,14 @@
 include $(TOPDIR)/rules.mk

 PKG_NAME:=cyassl
-PKG_VERSION:=1.6.5
-PKG_RELEASE:=2
+PKG_VERSION:=2.6.0
+PKG_RELEASE:=1

 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
 PKG_SOURCE_URL:=http://www.yassl.com/
-PKG_MD5SUM:=98c2c6350acf1d089756a1de9ccb9903
+PKG_MD5SUM:=9c48fd4ab677c11b4612fb4eb15444d9

-PKG_FIXUP:=patch-libtool
 PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1

 include $(INCLUDE_DIR)/package.mk

@@ -37,8 +35,15 @@
 TARGET_CFLAGS += $(FPIC)

 CONFIGURE_ARGS += \
-   --without-zlib \
-   --enable-singleThreaded
+   --enable-dtls \
+   --enable-static \
+   --enable-opensslextra \
+   --enable-singlethreaded \
+   --disable-examples
+
+ifeq ($(CONFIG_TARGET_x86),y)
+  CONFIGURE_ARGS += --without-pic
+endif

 define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include



Signed-off-by: Massimo Vellucci vema...@gmail.com




Bye
Massimo
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Fwd: [PATCH][include] Update CyaSSL library to last version 2.6.0

2013-05-25 Thread Massimo Vellucci
Hi,
  after several tests with also other people of the ML I found a stable
version of the patch to use version 2.6 of the library CyaSSL.
With CyaSSL was able to recompile curl without requiring the OpenSSL library
. The size of CyaSSL library is 300K compared to OpenSSL
library that is 1500K there is much more space for build custom rom.

The diff of the Makefile is as attached into email and must be remove the
folder patches.
If the update of CyaSSL can be integrated into the trunk version of OpenWRT I
can work to the Makefile to curl allows you to choose OpenSSL or
CyaSSLcrypto library.


diff -ur a/cyassl/Makefile b/cyassl/Makefile
--- a/cyassl/Makefile   2013-05-25 19:18:22.0 +0200
+++ b/cyassl/Makefile   2013-05-25 17:34:24.0 +0200
@@ -8,16 +8,14 @@
 include $(TOPDIR)/rules.mk

 PKG_NAME:=cyassl
-PKG_VERSION:=1.6.5
-PKG_RELEASE:=2
+PKG_VERSION:=2.6.0
+PKG_RELEASE:=1

 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
 PKG_SOURCE_URL:=http://www.yassl.com/
-PKG_MD5SUM:=98c2c6350acf1d089756a1de9ccb9903
+PKG_MD5SUM:=9c48fd4ab677c11b4612fb4eb15444d9

-PKG_FIXUP:=patch-libtool
 PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1

 include $(INCLUDE_DIR)/package.mk

@@ -37,8 +35,15 @@
 TARGET_CFLAGS += $(FPIC)

 CONFIGURE_ARGS += \
-   --without-zlib \
-   --enable-singleThreaded
+   --enable-dtls \
+   --enable-static \
+   --enable-opensslextra \
+   --enable-singlethreaded \
+   --disable-examples
+
+ifeq ($(CONFIG_TARGET_x86),y)
+  CONFIGURE_ARGS += --without-pic
+endif

 define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include


Waiting for your opinions, bye
Massimo




2013/5/23 Massimo Vellucci vema...@gmail.com

 Hi,
 sorry for the delay, I found the problem about the curl library. There
 is a bug in configure.ac file of curl package.
 You have to add the file 100-sizeof_long_long.patch in the 
 pathtrunk/feeds/packages/libs/curl/patches

 diff -u a/configure.ac b/configure.ac
 --- a/configure.ac  2013-02-06 10:47:19.0 +0100
 +++ b/configure.ac  2013-05-23 22:00:59.233980076 +0200
 @@ -2928,6 +2928,7 @@

  AC_CHECK_SIZEOF(size_t)
  AC_CHECK_SIZEOF(long)
 +AC_CHECK_SIZEOF(long long)
  AC_CHECK_SIZEOF(int)
  AC_CHECK_SIZEOF(short)
  CURL_CONFIGURE_LONG


 Curl did not determine the size of the type long long that is a value
 necessary to CyaSSL.


 My libs/curl/Makefile

 --- libs/curl/Makefile
 +++ libs/curl/Makefile

 @@ -43,7 +43,7 @@
$(call Package/curl/Default)
SECTION:=libs
CATEGORY:=Libraries
 -  DEPENDS:=+libopenssl +zlib
 +  DEPENDS:=+libcyassl +zlib
TITLE:=A client-side URL transfer library
  endef

 @@ -70,7 +70,8 @@
  --enable-tftp \
  --disable-verbose \
  --with-random=/dev/urandom \
 ---with-ssl=$(STAGING_DIR)/usr \
 +--with-cyassl=$(STAGING_DIR)/usr \
 +--without-ssl
  --without-ca-bundle \
  --without-gnutls \
  --without-krb4 \
 @@ -81,7 +82,7 @@
  $(call autoconf_bool,CONFIG_IPV6,ipv6) \

  CONFIGURE_VARS += \
 -LIBS=-lcrypto -lssl -lz \
 +LIBS=-lcyassl -lz \
  CC=$(filter-out ccache,$(TARGET_CC))


 With these settings I was able to compile curl for atheros 71xx


 Bye
 Massimo




 2013/5/21 Massimo Vellucci vema...@gmail.com

 I'm sorry but these days I have been very busy with work. I have not
 found the time to do the tests.
 I would like to remove OpenSSL from my application that I am developing and
 using CyaSSL.
 The problem of porting applications from OpenSSL to CyaSSL is requires a
 lot of work. The two libraries are not compatible 100%


 2013/5/21 Ben West b...@gowasabi.net

 For an update, I have since been able to get libcurl to link to the new
 cyassl package, provided I explicitly insert sizeof_long definitions into
 libcurl header files, shown in the patch below.  It is unusual that libcurl
 seems to require these additional defines to link to libcyassl.so, but
 uhttpd-mod-tls does not.

 I'm not sure if this patch resides properly with the package curl,
 perhaps accompanied by another patch that defines a new sub-package
 libcurl-cyassl.

 Massimo, are you using the newer version of cyassl for anything besides
 uhttpd?

 --- curl-7.29.0/include/curl/curl.h.201305182013-05-17
 23:25:23.816083944 -0500
 +++ curl-7.29.0/include/curl/curl.h2013-05-17 23:30:43.304082086
 -0500
 @@ -118,6 +118,13 @@ typedef void CURL;
  #endif
  #endif

 +/* These definitions needed for cyassl */
 +/* The size of `long', as computed by sizeof. */
 +#define SIZEOF_LONG 4
 +
 +/* The size of `long long', as computed by sizeof. */
 +#define SIZEOF_LONG_LONG 8
 +
  #ifndef curl_socket_typedef
  /* socket typedef */
  #if defined(WIN32)  !defined(__LWIP_OPT_H__)



 On Fri, May 17, 2013 at 12:00 PM, Ben West b...@gowasabi.net wrote:

 Thank you for responding.  Below is the diff of the curl Makefile,
 against that included in the Attitude Adjustment v12.09 packages 
 herehttps://dev.openwrt.org/browser/branches/packages_12.09/libs/curl/Makefile
 .

 Note that 

Re: [OpenWrt-Devel] Fwd: [PATCH][include] Update CyaSSL library to last version 2.6.0

2013-05-23 Thread Massimo Vellucci
Hi,
sorry for the delay, I found the problem about the curl library. There
is a bug in configure.ac file of curl package.
You have to add the file 100-sizeof_long_long.patch in the
pathtrunk/feeds/packages/libs/curl/patches

diff -u a/configure.ac b/configure.ac
--- a/configure.ac  2013-02-06 10:47:19.0 +0100
+++ b/configure.ac  2013-05-23 22:00:59.233980076 +0200
@@ -2928,6 +2928,7 @@

 AC_CHECK_SIZEOF(size_t)
 AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(long long)
 AC_CHECK_SIZEOF(int)
 AC_CHECK_SIZEOF(short)
 CURL_CONFIGURE_LONG


Curl did not determine the size of the type long long that is a value
necessary to CyaSSL.


My libs/curl/Makefile

--- libs/curl/Makefile
+++ libs/curl/Makefile
@@ -43,7 +43,7 @@
   $(call Package/curl/Default)
   SECTION:=libs
   CATEGORY:=Libraries
-  DEPENDS:=+libopenssl +zlib
+  DEPENDS:=+libcyassl +zlib
   TITLE:=A client-side URL transfer library
 endef

@@ -70,7 +70,8 @@
 --enable-tftp \
 --disable-verbose \
 --with-random=/dev/urandom \
---with-ssl=$(STAGING_DIR)/usr \
+--with-cyassl=$(STAGING_DIR)/usr \
+--without-ssl
 --without-ca-bundle \
 --without-gnutls \
 --without-krb4 \
@@ -81,7 +82,7 @@
 $(call autoconf_bool,CONFIG_IPV6,ipv6) \

 CONFIGURE_VARS += \
-LIBS=-lcrypto -lssl -lz \
+LIBS=-lcyassl -lz \
 CC=$(filter-out ccache,$(TARGET_CC))


With these settings I was able to compile curl for atheros 71xx


Bye
Massimo




2013/5/21 Massimo Vellucci vema...@gmail.com

 I'm sorry but these days I have been very busy with work. I have not found
 the time to do the tests.
 I would like to remove OpenSSL from my application that I am developing and
 using CyaSSL.
 The problem of porting applications from OpenSSL to CyaSSL is requires a
 lot of work. The two libraries are not compatible 100%


 2013/5/21 Ben West b...@gowasabi.net

 For an update, I have since been able to get libcurl to link to the new
 cyassl package, provided I explicitly insert sizeof_long definitions into
 libcurl header files, shown in the patch below.  It is unusual that libcurl
 seems to require these additional defines to link to libcyassl.so, but
 uhttpd-mod-tls does not.

 I'm not sure if this patch resides properly with the package curl,
 perhaps accompanied by another patch that defines a new sub-package
 libcurl-cyassl.

 Massimo, are you using the newer version of cyassl for anything besides
 uhttpd?

 --- curl-7.29.0/include/curl/curl.h.201305182013-05-17
 23:25:23.816083944 -0500
 +++ curl-7.29.0/include/curl/curl.h2013-05-17 23:30:43.304082086 -0500
 @@ -118,6 +118,13 @@ typedef void CURL;
  #endif
  #endif

 +/* These definitions needed for cyassl */
 +/* The size of `long', as computed by sizeof. */
 +#define SIZEOF_LONG 4
 +
 +/* The size of `long long', as computed by sizeof. */
 +#define SIZEOF_LONG_LONG 8
 +
  #ifndef curl_socket_typedef
  /* socket typedef */
  #if defined(WIN32)  !defined(__LWIP_OPT_H__)



 On Fri, May 17, 2013 at 12:00 PM, Ben West b...@gowasabi.net wrote:

 Thank you for responding.  Below is the diff of the curl Makefile,
 against that included in the Attitude Adjustment v12.09 packages 
 herehttps://dev.openwrt.org/browser/branches/packages_12.09/libs/curl/Makefile
 .

 Note that the addition of -lm to libraries for curl to link to came
 from my own research in pending OpenWRT issues about compiling curl with
 cyassl.  However, the error about long long size mismatch occurs whether
 libm.so is included or not.

 Index: libs/curl/Makefile
 ===
 --- libs/curl/Makefile(revision 36652)
 +++ libs/curl/Makefile(working copy)
 @@ -43,7 +43,7 @@
$(call Package/curl/Default)
SECTION:=libs
CATEGORY:=Libraries
 -  DEPENDS:=+libopenssl +zlib
 +  DEPENDS:=+libcyassl +zlib
TITLE:=A client-side URL transfer library
  endef

 @@ -70,7 +70,8 @@
  --enable-tftp \
  --disable-verbose \
  --with-random=/dev/urandom \
 ---with-ssl=$(STAGING_DIR)/usr \
 +--with-cyassl=$(STAGING_DIR)/usr \
 +--without-ssl
  --without-ca-bundle \
  --without-gnutls \
  --without-krb4 \
 @@ -81,7 +82,7 @@
  $(call autoconf_bool,CONFIG_IPV6,ipv6) \

  CONFIGURE_VARS += \
 -LIBS=-lcrypto -lssl -lz \
 +LIBS=-lm -lcyassl -lz \
  CC=$(filter-out ccache,$(TARGET_CC))

  define Build/Compile


 On Fri, May 17, 2013 at 2:10 AM, Massimo Vellucci vema...@gmail.comwrote:

 CyaSSL must determine the environment to recognize the size of the
 types, there is a conflict on the size of the long type. Can you attach the
 changes on curl makefile for using CyaSSL ?



 2013/5/16 Ben West b...@gowasabi.net

 Thank you for sharing this patch!

 I'm trying this very patch to see if I can use cyassl with curl,
 instead of openssl.  (cyassl v1.6.5 is apparently old enough that the
 current version of curl can no longer use libcyassl.so.)

 However, my build on ar71xx target fails when libcurl tries to link 

Re: [OpenWrt-Devel] Fwd: [PATCH][include] Update CyaSSL library to last version 2.6.0

2013-05-21 Thread Ben West
For an update, I have since been able to get libcurl to link to the new
cyassl package, provided I explicitly insert sizeof_long definitions into
libcurl header files, shown in the patch below.  It is unusual that libcurl
seems to require these additional defines to link to libcyassl.so, but
uhttpd-mod-tls does not.

I'm not sure if this patch resides properly with the package curl, perhaps
accompanied by another patch that defines a new sub-package libcurl-cyassl.

Massimo, are you using the newer version of cyassl for anything besides
uhttpd?

--- curl-7.29.0/include/curl/curl.h.201305182013-05-17
23:25:23.816083944 -0500
+++ curl-7.29.0/include/curl/curl.h2013-05-17 23:30:43.304082086 -0500
@@ -118,6 +118,13 @@ typedef void CURL;
 #endif
 #endif

+/* These definitions needed for cyassl */
+/* The size of `long', as computed by sizeof. */
+#define SIZEOF_LONG 4
+
+/* The size of `long long', as computed by sizeof. */
+#define SIZEOF_LONG_LONG 8
+
 #ifndef curl_socket_typedef
 /* socket typedef */
 #if defined(WIN32)  !defined(__LWIP_OPT_H__)


On Fri, May 17, 2013 at 12:00 PM, Ben West b...@gowasabi.net wrote:

 Thank you for responding.  Below is the diff of the curl Makefile, against
 that included in the Attitude Adjustment v12.09 packages 
 herehttps://dev.openwrt.org/browser/branches/packages_12.09/libs/curl/Makefile
 .

 Note that the addition of -lm to libraries for curl to link to came from
 my own research in pending OpenWRT issues about compiling curl with
 cyassl.  However, the error about long long size mismatch occurs whether
 libm.so is included or not.

 Index: libs/curl/Makefile
 ===
 --- libs/curl/Makefile(revision 36652)
 +++ libs/curl/Makefile(working copy)
 @@ -43,7 +43,7 @@
$(call Package/curl/Default)
SECTION:=libs
CATEGORY:=Libraries
 -  DEPENDS:=+libopenssl +zlib
 +  DEPENDS:=+libcyassl +zlib
TITLE:=A client-side URL transfer library
  endef

 @@ -70,7 +70,8 @@
  --enable-tftp \
  --disable-verbose \
  --with-random=/dev/urandom \
 ---with-ssl=$(STAGING_DIR)/usr \
 +--with-cyassl=$(STAGING_DIR)/usr \
 +--without-ssl
  --without-ca-bundle \
  --without-gnutls \
  --without-krb4 \
 @@ -81,7 +82,7 @@
  $(call autoconf_bool,CONFIG_IPV6,ipv6) \

  CONFIGURE_VARS += \
 -LIBS=-lcrypto -lssl -lz \
 +LIBS=-lm -lcyassl -lz \
  CC=$(filter-out ccache,$(TARGET_CC))

  define Build/Compile


 On Fri, May 17, 2013 at 2:10 AM, Massimo Vellucci vema...@gmail.comwrote:

 CyaSSL must determine the environment to recognize the size of the types,
 there is a conflict on the size of the long type. Can you attach the
 changes on curl makefile for using CyaSSL ?



 2013/5/16 Ben West b...@gowasabi.net

 Thank you for sharing this patch!

 I'm trying this very patch to see if I can use cyassl with curl, instead
 of openssl.  (cyassl v1.6.5 is apparently old enough that the current
 version of curl can no longer use libcyassl.so.)

 However, my build on ar71xx target fails when libcurl tries to link to
 libcyassl on the rather esoteric error bad math long / long long
 settings.  Are there platform limitations to the new version of cyassl?

 OpenWrt-libtool: compile:  mips-openwrt-linux-uclibc-gcc -DHAVE_CONFIG_H
 -I../include/curl -I../include -I../include -I../lib -I../lib
 -DCURL_HIDDEN_SYMBOLS -isystem
 /blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
 -isystem
 /blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/include
 -isystem
 /blah/blah/openwrt/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/usr/include
 -isystem
 /blah/blah/openwrt/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/include
 -I/blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
 -I/blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
 -fvisibility=hidden -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves
 -funit-at-a-time -fhonour-copts -Wno-error=unused-but-set-variable
 -msoft-float -fpic -Wno-system-headers -MT libcurl_la-cyassl.lo -MD -MP -MF
 .deps/libcurl_la-cyassl.Tpo -c cyassl.c  -fPIC -DPIC -o
 .libs/libcurl_la-cyassl.o
 In file included from
 /blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include/cyassl/ctaocrypt/error.h:26:0,
  from
 /blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include/cyassl/error.h:26,
  from cyassl.c:53:
 /blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include/cyassl/ctaocrypt/types.h:274:6:
 error: #error bad math long / long long settings
 /blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include/cyassl/ctaocrypt/types.h:276:1:
 error: expected identifier before '}' token
 make[5]: *** [libcurl_la-cyassl.lo] Error 1

 The caveat, however, is that I'm trying to compile the newer cyassl for
 Attitude Adjustment v36608, not trunk.  Not sure if that 

Re: [OpenWrt-Devel] Fwd: [PATCH][include] Update CyaSSL library to last version 2.6.0

2013-05-17 Thread Massimo Vellucci
CyaSSL must determine the environment to recognize the size of the types,
there is a conflict on the size of the long type. Can you attach the
changes on curl makefile for using CyaSSL ?


2013/5/16 Ben West b...@gowasabi.net

 Thank you for sharing this patch!

 I'm trying this very patch to see if I can use cyassl with curl, instead
 of openssl.  (cyassl v1.6.5 is apparently old enough that the current
 version of curl can no longer use libcyassl.so.)

 However, my build on ar71xx target fails when libcurl tries to link to
 libcyassl on the rather esoteric error bad math long / long long
 settings.  Are there platform limitations to the new version of cyassl?

 OpenWrt-libtool: compile:  mips-openwrt-linux-uclibc-gcc -DHAVE_CONFIG_H
 -I../include/curl -I../include -I../include -I../lib -I../lib
 -DCURL_HIDDEN_SYMBOLS -isystem
 /blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
 -isystem
 /blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/include
 -isystem
 /blah/blah/openwrt/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/usr/include
 -isystem
 /blah/blah/openwrt/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/include
 -I/blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
 -I/blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
 -fvisibility=hidden -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves
 -funit-at-a-time -fhonour-copts -Wno-error=unused-but-set-variable
 -msoft-float -fpic -Wno-system-headers -MT libcurl_la-cyassl.lo -MD -MP -MF
 .deps/libcurl_la-cyassl.Tpo -c cyassl.c  -fPIC -DPIC -o
 .libs/libcurl_la-cyassl.o
 In file included from
 /blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include/cyassl/ctaocrypt/error.h:26:0,
  from
 /blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include/cyassl/error.h:26,
  from cyassl.c:53:
 /blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include/cyassl/ctaocrypt/types.h:274:6:
 error: #error bad math long / long long settings
 /blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include/cyassl/ctaocrypt/types.h:276:1:
 error: expected identifier before '}' token
 make[5]: *** [libcurl_la-cyassl.lo] Error 1

 The caveat, however, is that I'm trying to compile the newer cyassl for
 Attitude Adjustment v36608, not trunk.  Not sure if that would make a
 difference for this error.

 On Sun, May 5, 2013 at 5:50 AM, Massimo Vellucci vema...@gmail.comwrote:

 Sorry I made a big mistake, I attached the wrong patch. For x86 you need
 to disable the PIC optimization otherwise you get an error at compile
 time.


 diff -r -u a/package/libs/cyassl/Makefile b/package/libs/cyassl/Makefile
 --- a/package/libs/cyassl/Makefile2013-03-21 08:08:18.0 +0100
 +++ b/package/libs/cyassl/Makefile2013-05-05 10:27:06.0 +0200

 @@ -8,16 +8,14 @@
  include $(TOPDIR)/rules.mk

  PKG_NAME:=cyassl
 -PKG_VERSION:=1.6.5
 -PKG_RELEASE:=2
 +PKG_VERSION:=2.6.0
 +PKG_RELEASE:=1

  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
  PKG_SOURCE_URL:=http://www.yassl.com/
 -PKG_MD5SUM:=98c2c6350acf1d089756a1de9ccb9903
 +PKG_MD5SUM:=9c48fd4ab677c11b4612fb4eb15444d9

 -PKG_FIXUP:=patch-libtool
  PKG_INSTALL:=1
 -PKG_BUILD_PARALLEL:=1

  include $(INCLUDE_DIR)/package.mk

 @@ -37,8 +35,12 @@

  TARGET_CFLAGS += $(FPIC)

  CONFIGURE_ARGS += \
 -   --without-zlib \
 -   --enable-singleThreaded
 +   --without-pic \

 +   --enable-dtls \
 +   --enable-static \
 +   --enable-opensslextra \
 +   --enable-singlethreaded \

 +   --disable-examples

  define Build/InstallDev
 $(INSTALL_DIR) $(1)/usr/include



 I'm sorry again for the mistake
 Massimo





 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/mailman/listinfo/openwrt-devel




 --
 Ben West
 http://gowasabi.net
 b...@gowasabi.net
 314-246-9434

 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/mailman/listinfo/openwrt-devel


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Fwd: [PATCH][include] Update CyaSSL library to last version 2.6.0

2013-05-17 Thread Ben West
Thank you for responding.  Below is the diff of the curl Makefile, against
that included in the Attitude Adjustment v12.09 packages
herehttps://dev.openwrt.org/browser/branches/packages_12.09/libs/curl/Makefile
.

Note that the addition of -lm to libraries for curl to link to came from
my own research in pending OpenWRT issues about compiling curl with
cyassl.  However, the error about long long size mismatch occurs whether
libm.so is included or not.

Index: libs/curl/Makefile
===
--- libs/curl/Makefile(revision 36652)
+++ libs/curl/Makefile(working copy)
@@ -43,7 +43,7 @@
   $(call Package/curl/Default)
   SECTION:=libs
   CATEGORY:=Libraries
-  DEPENDS:=+libopenssl +zlib
+  DEPENDS:=+libcyassl +zlib
   TITLE:=A client-side URL transfer library
 endef

@@ -70,7 +70,8 @@
 --enable-tftp \
 --disable-verbose \
 --with-random=/dev/urandom \
---with-ssl=$(STAGING_DIR)/usr \
+--with-cyassl=$(STAGING_DIR)/usr \
+--without-ssl
 --without-ca-bundle \
 --without-gnutls \
 --without-krb4 \
@@ -81,7 +82,7 @@
 $(call autoconf_bool,CONFIG_IPV6,ipv6) \

 CONFIGURE_VARS += \
-LIBS=-lcrypto -lssl -lz \
+LIBS=-lm -lcyassl -lz \
 CC=$(filter-out ccache,$(TARGET_CC))

 define Build/Compile

On Fri, May 17, 2013 at 2:10 AM, Massimo Vellucci vema...@gmail.com wrote:

 CyaSSL must determine the environment to recognize the size of the types,
 there is a conflict on the size of the long type. Can you attach the
 changes on curl makefile for using CyaSSL ?



 2013/5/16 Ben West b...@gowasabi.net

 Thank you for sharing this patch!

 I'm trying this very patch to see if I can use cyassl with curl, instead
 of openssl.  (cyassl v1.6.5 is apparently old enough that the current
 version of curl can no longer use libcyassl.so.)

 However, my build on ar71xx target fails when libcurl tries to link to
 libcyassl on the rather esoteric error bad math long / long long
 settings.  Are there platform limitations to the new version of cyassl?

 OpenWrt-libtool: compile:  mips-openwrt-linux-uclibc-gcc -DHAVE_CONFIG_H
 -I../include/curl -I../include -I../include -I../lib -I../lib
 -DCURL_HIDDEN_SYMBOLS -isystem
 /blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
 -isystem
 /blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/include
 -isystem
 /blah/blah/openwrt/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/usr/include
 -isystem
 /blah/blah/openwrt/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/include
 -I/blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
 -I/blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
 -fvisibility=hidden -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves
 -funit-at-a-time -fhonour-copts -Wno-error=unused-but-set-variable
 -msoft-float -fpic -Wno-system-headers -MT libcurl_la-cyassl.lo -MD -MP -MF
 .deps/libcurl_la-cyassl.Tpo -c cyassl.c  -fPIC -DPIC -o
 .libs/libcurl_la-cyassl.o
 In file included from
 /blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include/cyassl/ctaocrypt/error.h:26:0,
  from
 /blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include/cyassl/error.h:26,
  from cyassl.c:53:
 /blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include/cyassl/ctaocrypt/types.h:274:6:
 error: #error bad math long / long long settings
 /blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include/cyassl/ctaocrypt/types.h:276:1:
 error: expected identifier before '}' token
 make[5]: *** [libcurl_la-cyassl.lo] Error 1

 The caveat, however, is that I'm trying to compile the newer cyassl for
 Attitude Adjustment v36608, not trunk.  Not sure if that would make a
 difference for this error.

 On Sun, May 5, 2013 at 5:50 AM, Massimo Vellucci vema...@gmail.comwrote:

 Sorry I made a big mistake, I attached the wrong patch. For x86 you
 need to disable the PIC optimization otherwise you get an error at
 compile time.


 diff -r -u a/package/libs/cyassl/Makefile b/package/libs/cyassl/Makefile
 --- a/package/libs/cyassl/Makefile2013-03-21 08:08:18.0 +0100
 +++ b/package/libs/cyassl/Makefile2013-05-05 10:27:06.0+0200

 @@ -8,16 +8,14 @@
  include $(TOPDIR)/rules.mk

  PKG_NAME:=cyassl
 -PKG_VERSION:=1.6.5
 -PKG_RELEASE:=2
 +PKG_VERSION:=2.6.0
 +PKG_RELEASE:=1

  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
  PKG_SOURCE_URL:=http://www.yassl.com/
 -PKG_MD5SUM:=98c2c6350acf1d089756a1de9ccb9903
 +PKG_MD5SUM:=9c48fd4ab677c11b4612fb4eb15444d9

 -PKG_FIXUP:=patch-libtool
  PKG_INSTALL:=1
 -PKG_BUILD_PARALLEL:=1

  include $(INCLUDE_DIR)/package.mk

 @@ -37,8 +35,12 @@

  TARGET_CFLAGS += $(FPIC)

  CONFIGURE_ARGS += \
 -   --without-zlib \
 -   --enable-singleThreaded
 +   --without-pic \

 +   --enable-dtls \
 +   --enable-static \
 +   --enable-opensslextra \
 +   

Re: [OpenWrt-Devel] Fwd: [PATCH][include] Update CyaSSL library to last version 2.6.0

2013-05-16 Thread Ben West
Thank you for sharing this patch!

I'm trying this very patch to see if I can use cyassl with curl, instead of
openssl.  (cyassl v1.6.5 is apparently old enough that the current version
of curl can no longer use libcyassl.so.)

However, my build on ar71xx target fails when libcurl tries to link to
libcyassl on the rather esoteric error bad math long / long long
settings.  Are there platform limitations to the new version of cyassl?

OpenWrt-libtool: compile:  mips-openwrt-linux-uclibc-gcc -DHAVE_CONFIG_H
-I../include/curl -I../include -I../include -I../lib -I../lib
-DCURL_HIDDEN_SYMBOLS -isystem
/blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
-isystem
/blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/include
-isystem
/blah/blah/openwrt/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/usr/include
-isystem
/blah/blah/openwrt/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/include
-I/blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
-I/blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
-fvisibility=hidden -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves
-funit-at-a-time -fhonour-copts -Wno-error=unused-but-set-variable
-msoft-float -fpic -Wno-system-headers -MT libcurl_la-cyassl.lo -MD -MP -MF
.deps/libcurl_la-cyassl.Tpo -c cyassl.c  -fPIC -DPIC -o
.libs/libcurl_la-cyassl.o
In file included from
/blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include/cyassl/ctaocrypt/error.h:26:0,
 from
/blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include/cyassl/error.h:26,
 from cyassl.c:53:
/blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include/cyassl/ctaocrypt/types.h:274:6:
error: #error bad math long / long long settings
/blah/blah/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include/cyassl/ctaocrypt/types.h:276:1:
error: expected identifier before '}' token
make[5]: *** [libcurl_la-cyassl.lo] Error 1

The caveat, however, is that I'm trying to compile the newer cyassl for
Attitude Adjustment v36608, not trunk.  Not sure if that would make a
difference for this error.

On Sun, May 5, 2013 at 5:50 AM, Massimo Vellucci vema...@gmail.com wrote:

 Sorry I made a big mistake, I attached the wrong patch. For x86 you need
 to disable the PIC optimization otherwise you get an error at compile
 time.


 diff -r -u a/package/libs/cyassl/Makefile b/package/libs/cyassl/Makefile
 --- a/package/libs/cyassl/Makefile2013-03-21 08:08:18.0 +0100
 +++ b/package/libs/cyassl/Makefile2013-05-05 10:27:06.0 +0200

 @@ -8,16 +8,14 @@
  include $(TOPDIR)/rules.mk

  PKG_NAME:=cyassl
 -PKG_VERSION:=1.6.5
 -PKG_RELEASE:=2
 +PKG_VERSION:=2.6.0
 +PKG_RELEASE:=1

  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
  PKG_SOURCE_URL:=http://www.yassl.com/
 -PKG_MD5SUM:=98c2c6350acf1d089756a1de9ccb9903
 +PKG_MD5SUM:=9c48fd4ab677c11b4612fb4eb15444d9

 -PKG_FIXUP:=patch-libtool
  PKG_INSTALL:=1
 -PKG_BUILD_PARALLEL:=1

  include $(INCLUDE_DIR)/package.mk

 @@ -37,8 +35,12 @@

  TARGET_CFLAGS += $(FPIC)

  CONFIGURE_ARGS += \
 -   --without-zlib \
 -   --enable-singleThreaded
 +   --without-pic \

 +   --enable-dtls \
 +   --enable-static \
 +   --enable-opensslextra \
 +   --enable-singlethreaded \

 +   --disable-examples

  define Build/InstallDev
 $(INSTALL_DIR) $(1)/usr/include



 I'm sorry again for the mistake
 Massimo





 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/mailman/listinfo/openwrt-devel




-- 
Ben West
http://gowasabi.net
b...@gowasabi.net
314-246-9434
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Fwd: [PATCH][include] Update CyaSSL library to last version 2.6.0

2013-05-05 Thread Massimo Vellucci
Sorry I made a big mistake, I attached the wrong patch. For x86 you need
to disable the PIC optimization otherwise you get an error at compile time.

diff -r -u a/package/libs/cyassl/Makefile b/package/libs/cyassl/Makefile
--- a/package/libs/cyassl/Makefile2013-03-21 08:08:18.0 +0100
+++ b/package/libs/cyassl/Makefile2013-05-05 10:27:06.0 +0200
@@ -8,16 +8,14 @@
 include $(TOPDIR)/rules.mk

 PKG_NAME:=cyassl
-PKG_VERSION:=1.6.5
-PKG_RELEASE:=2
+PKG_VERSION:=2.6.0
+PKG_RELEASE:=1

 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
 PKG_SOURCE_URL:=http://www.yassl.com/
-PKG_MD5SUM:=98c2c6350acf1d089756a1de9ccb9903
+PKG_MD5SUM:=9c48fd4ab677c11b4612fb4eb15444d9

-PKG_FIXUP:=patch-libtool
 PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1

 include $(INCLUDE_DIR)/package.mk

@@ -37,8 +35,12 @@
 TARGET_CFLAGS += $(FPIC)

 CONFIGURE_ARGS += \
-   --without-zlib \
-   --enable-singleThreaded
+   --without-pic \
+   --enable-dtls \
+   --enable-static \
+   --enable-opensslextra \
+   --enable-singlethreaded \
+   --disable-examples

 define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include



I'm sorry again for the mistake
Massimo
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel