[gnutls-help] Compiling gnutls on solaris

dev dev at cor0.com
Tue Sep 30 20:04:29 CEST 2014



On September 27, 2014 at 11:53 AM Nikos Mavrogiannopoulos
<nmav at gnutls.org> wrote:
> On Sat, 2014-09-27 at 06:56 -0400, dev wrote:
>
> > OKay, this looks familiar and I remember running into this last time
> > I
> > tried a build of gnutls and I think I recall the solution was we
> > need
> > -lsocket -lnsl on Solaris because the socket funcs inet_ntop,
> > inet_ntoa
> > etc etc are buried somewhere in some lib.  We definately need this :
> >
> >      #include <sys/types.h>
> >      #include <sys/socket.h>
> >      #include <netinet/in.h>
> >      #include <arpa/inet.h>
> >
> > In any case we have progress and let me hack at it and I will
> > certainly
> > let you know.
>
> Thanks.

I have made no progress on that yet. There is someplace in that Makefile
within the ./lib directory that needs -lnsl and -lsocket but I can not
seem to find where. Any hints ?

Also, unrelated, but annoying little type mismatch warnings from two
source
files are easily fixed with a simple cast thus :


Warning :

  CC       x509.lo
"x509.c", line 2954: warning: argument #3 is incompatible with
prototype:
        prototype: pointer to unsigned int :
"./../includes/gnutls/x509-ext.h", line 64
        argument : pointer to enum gnutls_x509_subject_alt_name_t
{GNUTLS_SAN_OTHERNAME_XMPP(1000), GNUTLS_SAN_DN(6),
GNUTLS_SAN_OTHERNAME(5), GNUTLS_SAN_IPADDRESS(4), GNUTLS_SAN_URI(3),
GNUTLS_SAN_RFC822NAME(2), GNUTLS_SAN_DNSNAME(1)}


Trivial fix :

$ diff -cu  ./lib/x509/x509.c_ ./lib/x509/x509.c
--- ./lib/x509/x509.c_  Mon Sep 15 18:40:54 2014
+++ ./lib/x509/x509.c   Tue Sep 30 11:19:29 2014
@@ -2951,7 +2951,7 @@
                goto cleanup;
        }

-       ret = gnutls_x509_crl_dist_points_get(cdp, seq, &type, &t_san,
reason_flags);
+       ret = gnutls_x509_crl_dist_points_get(cdp,
seq,(gnutls_x509_subject_alt_name_t) &type, &t_san, reason_flags);
        if (ret < 0) {
                gnutls_assert();
                goto cleanup;


Warnings :

"stream.c", line 1119: warning: argument #2 is incompatible with
prototype:
        prototype: pointer to function(pointer to void, int, pointer to
struct __FILE {array[16] of long __pad}, pointer to struct __FILE
{array[16] of long __pad}) returning enum  {CDK_Network_Error(28),
CDK_No_Passphrase(27), CDK_No_Data(26), CDK_Unusable_Key(25),
CDK_Too_Short(24), CDK_Inv_Packet_Ver(23), CDK_Wrong_Format(22),
CDK_Error_No_Keyring(21), CDK_Inv_Mode(20), CDK_Bad_MDC(19),
CDK_Wrong_Seckey(18), CDK_Out_Of_Core(17), CDK_Weak_Key(16),
CDK_Zlib_Error(15), CDK_Time_Conflict(14), CDK_Chksum_Error(13),
CDK_Error_No_Key(12), CDK_Inv_Value(11), CDK_MPI_Error(10),
CDK_Armor_CRC_Error(9), CDK_Armor_Error(8), CDK_Not_Implemented(6),
CDK_Inv_Algo(5), CDK_Inv_Packet(4), CDK_Bad_Sig(3), CDK_File_Error(2),
CDK_General_Error(1), CDK_Success(0), CDK_EOF(-1)} : "stream.c", line
632
        argument : pointer to function(pointer to void, int, pointer to
struct __FILE {array[16] of long __pad}, pointer to struct __FILE
{array[16] of long __pad}) returning int
"stream.c", line 1158: warning: argument #2 is incompatible with
prototype:
        prototype: pointer to function(pointer to void, int, pointer to
struct __FILE {array[16] of long __pad}, pointer to struct __FILE
{array[16] of long __pad}) returning enum  {CDK_Network_Error(28),
CDK_No_Passphrase(27), CDK_No_Data(26), CDK_Unusable_Key(25),
CDK_Too_Short(24), CDK_Inv_Packet_Ver(23), CDK_Wrong_Format(22),
CDK_Error_No_Keyring(21), CDK_Inv_Mode(20), CDK_Bad_MDC(19),
CDK_Wrong_Seckey(18), CDK_Out_Of_Core(17), CDK_Weak_Key(16),
CDK_Zlib_Error(15), CDK_Time_Conflict(14), CDK_Chksum_Error(13),
CDK_Error_No_Key(12), CDK_Inv_Value(11), CDK_MPI_Error(10),
CDK_Armor_CRC_Error(9), CDK_Armor_Error(8), CDK_Not_Implemented(6),
CDK_Inv_Algo(5), CDK_Inv_Packet(4), CDK_Bad_Sig(3), CDK_File_Error(2),
CDK_General_Error(1), CDK_Success(0), CDK_EOF(-1)} : "stream.c", line
632
        argument : pointer to function(pointer to void, int, pointer to
struct __FILE {array[16] of long __pad}, pointer to struct __FILE
{array[16] of long __pad}) returning int
"stream.c", line 1211: warning: argument #2 is incompatible with
prototype:
        prototype: pointer to function(pointer to void, int, pointer to
struct __FILE {array[16] of long __pad}, pointer to struct __FILE
{array[16] of long __pad}) returning enum  {CDK_Network_Error(28),
CDK_No_Passphrase(27), CDK_No_Data(26), CDK_Unusable_Key(25),
CDK_Too_Short(24), CDK_Inv_Packet_Ver(23), CDK_Wrong_Format(22),
CDK_Error_No_Keyring(21), CDK_Inv_Mode(20), CDK_Bad_MDC(19),
CDK_Wrong_Seckey(18), CDK_Out_Of_Core(17), CDK_Weak_Key(16),
CDK_Zlib_Error(15), CDK_Time_Conflict(14), CDK_Chksum_Error(13),
CDK_Error_No_Key(12), CDK_Inv_Value(11), CDK_MPI_Error(10),
CDK_Armor_CRC_Error(9), CDK_Armor_Error(8), CDK_Not_Implemented(6),
CDK_Inv_Algo(5), CDK_Inv_Packet(4), CDK_Bad_Sig(3), CDK_File_Error(2),
CDK_General_Error(1), CDK_Success(0), CDK_EOF(-1)} : "stream.c", line
632
        argument : pointer to function(pointer to void, int, pointer to
struct __FILE {array[16] of long __pad}, pointer to struct __FILE
{array[16] of long __pad}) returning int



Trivial fixes :


$ diff -cu ./lib/opencdk/stream.c_ ./lib/opencdk/stream.c
--- ./lib/opencdk/stream.c_     Tue Jul 29 20:22:47 2014
+++ ./lib/opencdk/stream.c      Tue Sep 30 11:10:55 2014
@@ -1116,7 +1116,7 @@
                gnutls_assert();
                return CDK_Inv_Value;
        }
-       f = filter_add(s, _cdk_filter_armor, fARMOR);
+       f = filter_add(s, (filter_fnct_t) _cdk_filter_armor, fARMOR);
        if (!f) {
                gnutls_assert();
                return CDK_Out_Of_Core;
@@ -1155,7 +1155,7 @@
        }

        orig_fname = _cdk_stream_get_fname(s);
-       f = filter_add(s, _cdk_filter_literal, fLITERAL);
+       f = filter_add(s,(filter_fnct_t) _cdk_filter_literal, fLITERAL);
        if (!f) {
                gnutls_assert();
                return CDK_Out_Of_Core;
@@ -1208,7 +1208,7 @@
                gnutls_assert();
                return CDK_Inv_Value;
        }
-       f = filter_add(s, _cdk_filter_text, fTEXT);
+       f = filter_add(s,(filter_fnct_t) _cdk_filter_text, fTEXT);
        if (!f) {
                gnutls_assert();
                return CDK_Out_Of_Core;


Dennis



More information about the Gnutls-help mailing list