Subject: Re: Libssh2 make error.

Re: Libssh2 make error.

From: Peter Stuge <peter_at_stuge.se>
Date: Wed, 18 Apr 2012 16:37:05 +0200

Hi,

V, AnilKumar wrote:
> Kindly help me.

Well, actually your problem isn't related to libssh2 in any way. I
would recommend that you study and follow the Linux From Scratch
tutorials in order to learn about building packages based on
autotools.

> $ ./configure CC=cc CFLAGS=-xarch=v9 --prefix=/ctxtools/cortex/local/64bit --build=sparc-sun-solaris2.10 --disable-shared --enable-static --with-openssl --without-libgcrypt --with-libgcrypt-prefix=/ctxtools/cortex/local/64bit --with-libssl-prefix=/ctxtools/cortex/local/64bit

Why both --without-libgcrypt and --with-libgrypt-prefix?

> configure:2946: checking libssh2 version
> configure:2948: result: 1.2.4

I already asked you to stop using this ancient version. Use the most
recent code so that you avoid wasting your time and ours on bugs that
have already been solved.

> configure:12952: checking for libssl
> configure:12971: cc -o conftest -xarch=v9 -I/ctxtools/cortex/local/64bit/include conftest.c -lnsl -lsocket /ctxtools/cortex/local/64bit/lib/libssl.a /ctxtools/cortex/local/64bit/lib/libcrypto.a >&5
> configure:12971: $? = 0
> configure:12981: result: yes
> configure:12988: checking how to link with libssl
> configure:12990: result: /ctxtools/cortex/local/64bit/lib/libssl.a /ctxtools/cortex/local/64bit/lib/libcrypto.a

Do you want to link statically against OpenSSL?

> $ make
> make: Warning: File `Makefile' has modification time 2.1e+04 s in the future
> Making all in src
> make[1]: Entering directory `/cortex/build/third_party/64bit/libssh2-1.2.4/src'
> make[1]: Warning: File `Makefile' has modification time 2.1e+04 s in the future
> make all-am
> make[2]: Entering directory `/cortex/build/third_party/64bit/libssh2-1.2.4/src'
> make[2]: Warning: File `Makefile' has modification time 2.1e+04 s in the future
> make[2]: warning: Clock skew detected. Your build may be incomplete.
> make[2]: Leaving directory `/cortex/build/third_party/64bit/libssh2-1.2.4/src'
> make[1]: warning: Clock skew detected. Your build may be incomplete.
> make[1]: Leaving directory `/cortex/build/third_party/64bit/libssh2-1.2.4/src'

The above shows that the library has been built successfully.

> Making all in example
> make[1]: Entering directory `/cortex/build/third_party/64bit/libssh2-1.2.4/example'
> make[1]: Warning: File `Makefile' has modification time 2.1e+04 s in the future
> make all-am
> make[2]: Entering directory `/cortex/build/third_party/64bit/libssh2-1.2.4/example'
> make[2]: Warning: File `Makefile' has modification time 2.1e+04 s in the future
> /bin/bash ../libtool --tag=CC --mode=link cc -xarch=v9 -o direct_tcpip direct_tcpip.o ../src/libssh2.la -lnsl -lsocket
> libtool: link: cc -xarch=v9 -o direct_tcpip direct_tcpip.o ../src/.libs/libssh2.a -L/ctxtools/cortex/local/64bit/lib -lz -lnsl -lsocket
> Undefined first referenced
> symbol in file
> SHA1 ../src/.libs/libssh2.a(openssl.o)
> EVP_cast5_cbc ../src/.libs/libssh2.a(crypt.o)

And this shows that there is a bug in your version of libssh2 with
building examples statically. If this problem still exists in the
latest code we would obviously welcome a patch to the build files
that will fix these things.

If you don't care about the examples then I suggest downloading
the current git code. I have just pushed a commit which adds a
configure option to disable building of the example applications.

git clone git://git.libssh2.org/libssh2.git && cd libssh2 &&
./buildconf && ./configure --disable-examples-build followed by
your other configure options.

//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-04-18