Subject: [libssh2] Introduction, plans, and some pkg-config problems

[libssh2] Introduction, plans, and some pkg-config problems

From: Simon Josefsson <>
Date: Thu, 16 Nov 2006 17:28:37 +0100

Hello everyone! I'm attempting to port libssh2 to use libgcrypt
instead of OpenSSL. Rather than sending a huge patch that will be
difficult to review, I'm going to do things step by step. I've done
some initial testing with libgcrypt, and going back to the current CVS
the first problem that needs to be solved is the FLAG_EVP stuff, as
mentioned in include/libssh2_priv.h:

/* When FLAG_EVP is set, crypt contains a pointer to an EVP_CIPHER generator and init and dtor are ignored
 * Yes, I know it's a hack.

I'm working on a standalone patch that solves this problem in a clean
way without changing anything else. If there are early comments on
this direction, I'd be happy to discuss it.

However, my first impressions building libssh2 is that it generates
some warnings:

jas_at_mocca:~/src/libssh2$ make
make[1]: Entering directory `/home/jas/self/src/libssh2/src'
gcc -o channel.o channel.c -c -g -O2 /usr/include -I/usr/include -Wall -I../include/ -fPIC
gcc: /usr/include: linker input file unused because linking not done

The origin of the spurious /usr/include in the command line appear to
be this part of

  OPENSSL_INCLINE=`$PKG_CONFIG --variable=includedir openssl`

On my system, the first command results in this:

jas_at_mocca:~/src/libssh2$ pkg-config --variable=includedir openssl

I suggest the following patch:

--- 16 Nov 2006 17:19:06 +0100 1.26
+++ 16 Nov 2006 17:23:21 +0100
@@ -85,7 +85,7 @@
   OPENSSL_LIBLINE=`$PKG_CONFIG --libs openssl`
- OPENSSL_INCLINE=`$PKG_CONFIG --variable=includedir openssl`
+ OPENSSL_INCLINE=`$PKG_CONFIG --cflags openssl`
   AC_MSG_RESULT([Using paths from pkg-config])


Take Surveys. Earn Cash. Influence the Future of IT
Join's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
libssh2-devel mailing list
Received on 2006-11-16