GnuTLS 2.3.4 error in gnutls_extra.c with --with-lzo

Simon Josefsson simon at josefsson.org
Wed Mar 19 22:08:26 CET 2008


"Kristofer T. Karas" <ktk at enterprise.bidmc.harvard.edu> writes:

> Hello,
>
> Just wanted to report a build error in the most recent 2.3.4 version
> of gnutls:
>
> 	libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I../lgl -I../lgl -I../lib -I../includes -I../includes -I../lib/minitasn1 -I/usr/include -pipe -g -O2 -Wno-pointer-sign -MT gnutls_extra.lo -MD -MP -MF .deps/gnutls_extra.Tpo -c gnutls_extra.c  -fPIC -DPIC -o .libs/gnutls_extra.o
> 	gnutls_extra.c: In function 'gnutls_global_init_extra':
> 	gnutls_extra.c:127: error: 'ret' undeclared (first use in this function)
>
>
> This occurs with three different Linux systems with three different
> versions of gcc (3.3.6, 3.4.6, 4.2.3), glibc (2.3.5, 2.3.6, 2.7) and
> autoconf (2.59, 2.60, 2.61), so it doesn't appear to be
> platform-specific as far as I can tell.  The configure line used in
> all three cases was:
>
> 	./configure --with-lzo --build=i686-slackware-linux-gnu --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --localstatedir=/var --mandir=/usr/man --infodir=/usr/info
>
> Tracking this down a bit, the error only seems to occur when
> "--with-lzo" is given to ./configure.  (I have lzo-2.02 installed in
> the normal /usr/lib location.)

Ah, it seems I don't test LZO enabled anymore.  I've installed the
following patch on the trunk, thanks!

/Simon

commit 45af721c79dad46ba60e1fc75911ebe7fc1ce25f
Author: Simon Josefsson <simon at josefsson.org>
Date:   Wed Mar 19 22:03:55 2008 +0100

    Fix LZO build failure.

diff --git a/libextra/gnutls_extra.c b/libextra/gnutls_extra.c
index bf81a50..970208e 100644
--- a/libextra/gnutls_extra.c
+++ b/libextra/gnutls_extra.c
@@ -116,20 +116,24 @@ gnutls_global_init_extra (void)
   /* Initialize the LZO library
    */
 #ifdef USE_LZO
-  if (lzo_init () != LZO_E_OK)
-    {
-      return GNUTLS_E_LZO_INIT_FAILED;
-    }
-
-  /* Add the LZO compression method in the list of compression
-   * methods.
-   */
-  ret = _gnutls_add_lzo_comp ();
-  if (ret < 0)
-    {
-      gnutls_assert ();
-      return ret;
-    }
+  {
+    int ret;
+
+    if (lzo_init () != LZO_E_OK)
+      {
+	return GNUTLS_E_LZO_INIT_FAILED;
+      }
+
+    /* Add the LZO compression method in the list of compression
+     * methods.
+     */
+    ret = _gnutls_add_lzo_comp ();
+    if (ret < 0)
+      {
+	gnutls_assert ();
+	return ret;
+      }
+  }
 #endif
 
   return 0;





More information about the Gnutls-devel mailing list