cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

RE: libcurl and libssh2

From: Xu, Qiang (FXSGSC) <Qiang.Xu_at_fujixerox.com>
Date: Wed, 14 Oct 2009 13:46:02 +0800

> -----Original Message-----
> From: curl-library-bounces_at_cool.haxx.se
> [mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Guenter
> Sent: Monday, October 12, 2009 5:46 PM
> To: libcurl development
> Subject: Re: libcurl and libssh2
>
> Hi,
> you dont need to be root in order to compile a curl version
> just for you; that works fine also within your home
> directory; just download recent sources, and then configure
> with --disable-shared; that results in a statically linked
> curl version which you can test with, and also simply copy to
> your personal ~/bin folder so that it is found before the
> system-own version. Also you can do same with libssh2; build
> a static version, and then configure libcurl to use this
> version, and you should get a curl which is sftp/scp aware.

Following your advice, I did the following:
===============================================
qxu_at_durian(pts/0):~/opensrc/curl-7.19.6[115]$ ./configure --with-libssh2=/home/qxu/opensrc/libssh2-1.2/src/.libs -disable-shared
...
configure: Configured to build curl/libcurl:

  curl version: 7.19.6
  Host setup: i686-pc-linux-gnu
  Install prefix: /usr/local
  Compiler: gcc
  SSL support: enabled (OpenSSL)
  SSH support: enabled (libSSH2)
  zlib support: enabled
  krb4 support: no (--with-krb4*)
  GSSAPI support: no (--with-gssapi)
  SPNEGO support: no (--with-spnego)
  c-ares support: no (--enable-ares)
  ipv6 support: enabled
  IDN support: no (--with-libidn)
  Build libcurl: Shared=no, Static=yes
  Built-in manual: enabled
  Verbose errors: enabled (--disable-verbose)
  SSPI support: no (--enable-sspi)
  ca cert bundle: /etc/pki/tls/certs/ca-bundle.crt
  ca cert path: no
  LDAP support: no (--enable-ldap / --with-ldap-lib / --with-lber-lib)
  LDAPS support: no (--enable-ldaps)

qxu_at_durian(pts/0):~/opensrc/curl-7.19.6[116]$ make
...
libtool: link: warning: library `/usr/lib/libssh2.la' was moved.
libtool: link: warning: library `/usr/lib/libssh2.la' was moved.
libtool: link: gcc -g0 -O2 -Wno-system-headers -o curl main.o hugehelp.o urlglob.o writeout.o writeenv.o getpass.o homedir.o curlutil.o os-specific.o strtoofft.o strdup.o rawstr.o nonblock.o -L/usr/kerberos/lib -L/home/qxu/opensrc/libssh2-1.2/src/.libs/lib ../lib/.libs/libcurl.a -L/usr/lib /usr/lib/libssh2.so -lrt -lssl -lcrypto -ldl -lz
make[1]: Leaving directory `/home/qxu/opensrc/curl-7.19.6/src'

qxu_at_durian(pts/0):~/opensrc/curl-7.19.6/src[118]$ ./curl --version
curl 7.19.6 (i686-pc-linux-gnu) libcurl/7.19.6 OpenSSL/0.9.8b zlib/1.2.3 libssh2/0.18
Protocols: tftp ftp telnet dict http file https ftps scp sftp
Features: IPv6 Largefile NTLM SSL libz

qxu@durian(pts/0):~/opensrc/curl-7.19.6/src[119]$ ./curl -v -u qxu:fair123 -T CMakeLists.txt sftp://13.198.98.202/scan/test.txt
* About to connect() to 13.198.98.202 port 22 (#0)
* Trying 13.198.98.202... connected
* Connected to 13.198.98.202 (13.198.98.202) port 22 (#0)
* SSH authentication methods available: publickey,password
* Using ssh public key file /home/qxu/.ssh/id_dsa.pub
* Using ssh private key file /home/qxu/.ssh/id_dsa
* SSH public key authentication failed: Unable to open public key file
* Initialized password authentication
* Authentication complete
* Failure initializing sftp session: Timeout waiting for response from SFTP subsystem
* Closing connection #0

curl: (2) Failure initializing sftp session: Timeout waiting for response from SFTP subsystem
===============================================
In compiling libss2-1.2, I didn't use the switch "-disable-shared". Will this pose a problem? What is the possible cause of the transfer failure?

Some other questions:
1. How come libtool gives me the warning /usr/lib/libssh2.la was moved. Haven't I pointed the library's location of libss2 to "/home/qxu/opensrc/libssh2-1.2/src/.libs"?
2. In the linking stage, why /usr/lib/libssh2.so is still looked for?
3. In the output of "./curl --version", it reported the version of libss2 is 0.18. Is it wrong?

Thanks for your help,
Xu Qiang
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-10-14

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET