Subject: Re: [libssh2] CVS build failures

Re: [libssh2] CVS build failures

From: James Housley <jim_at_thehousleys.net>
Date: Fri, 8 Jun 2007 20:47:42 -0400

On Jun 8, 2007, at 5:29 PM, Daniel Stenberg wrote:

> Hi
>
> I tried on two of my Debian unstable machines, and both give me this:
>
> $ ./buildconf
> $ ./configure --enable-debug --disable-shared
> $ make
> [...]
> if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H
> -I../include -I../src -DLIBSSH2DEBUG -g -I/usr/include -g -W -Wall
> -Wwrite-strings -pedantic -Wpointer-arith -Wnested-externs -Winline
> -Wmissing-prototypes -Wmissing-declarations -Wundef -Wno-long-long
> -Wsign-compare -Wfloat-equal -Wno-format-nonliteral -Wendif-labels
> -Wstrict-prototypes -Wdeclaration-after-statement -MT channel.lo -
> MD -MP -MF
> ".deps/channel.Tpo" -c -o channel.lo channel.c; \
> then mv -f ".deps/channel.Tpo" ".deps/channel.Plo"; else
> rm -f
> ".deps/channel.Tpo"; exit 1; fi
> gcc -DHAVE_CONFIG_H -I../include -I../src -DLIBSSH2DEBUG -g -I/
> usr/include -g
> -W -Wall -Wwrite-strings -pedantic -Wpointer-arith -Wnested-externs
> -Winline
> -Wmissing-prototypes -Wmissing-declarations -Wundef -Wno-long-long
> -Wsign-compare -Wfloat-equal -Wno-format-nonliteral -Wendif-labels
> -Wstrict-prototypes -Wdeclaration-after-statement -MT channel.lo -
> MD -MP -MF
> .deps/channel.Tpo -c channel.c -o channel.o
> In file included from libssh2_priv.h:67,
> from channel.c:38:
> ../include/libssh2.h:360: error: expected '=', ',', ';', 'asm' or
> '__attribute__' before 'libssh2_channel_read_ex'
> In file included from channel.c:38:
> libssh2_priv.h:204: error: expected specifier-qualifier-list before
> 'uint32_t'
> libssh2_priv.h:219: error: expected specifier-qualifier-list before
> 'uint32_t'
> libssh2_priv.h:317: error: expected specifier-qualifier-list before
> 'uint32_t'
> channel.c: In function 'libssh2_channel_open_ex':
> channel.c:268: error: 'LIBSSH2_CHANNEL' has no member named
> 'write_packet'
> channel.c:269: error: 'LIBSSH2_CHANNEL' has no member named
> 'write_packet'
> channel.c:270: error: 'LIBSSH2_CHANNEL' has no member named
> 'write_packet'
> channel.c: In function 'libssh2_channel_handle_extended_data2':
> channel.c:1142: error: 'LIBSSH2_CHANNEL' has no member named
> 'extData2_state'
> channel.c:1147: error: 'LIBSSH2_CHANNEL' has no member named
> 'extData2_state'
> [...]
>
> I have to admit it isn't obvious to me why this happens, but I
> didn't research
> very carefully yet.
>

I believe that is declared in "inttypes.h", adding to the top of
libssh2_priv.h should fix it.

#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif

 From looking at libssh2.h, the following might actually be needed to:

#if defined(LIBSSH2_WIN32) && defined(_MSC_VER) && (_MSC_VER < 1300)
typedef unsigned __int64 libssh2_uint64_t;
typedef __int64 libssh2_int64_t;
#if (_MSC_VER <= 1200)
typedef long ssize_t;
typedef unsigned int uint32_t;
#endif
#else
typedef unsigned long long libssh2_uint64_t;
typedef long long libssh2_int64_t;
#endif

The other options is to include libssh2_config.h at the top of the
".c" files and include libssh2_priv.h after all the #if HAVE_ includes.

Jim

--
/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
  X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
jeh@FreeBSD.org      http://www.FreeBSD.org     The Power to Serve
jim@TheHousleys.Net  http://www.TheHousleys.net
---------------------------------------------------------------------
The wise man built his network upon Un*x.
     The foolish man built his network upon Windows.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2007-06-09