cURL / Mailing Lists / curl-library / Single Mail

curl-library

Why OpenSSL problems building conftest.c?

From: Saqib Ali <saqib.ali.75_at_gmail.com>
Date: Tue, 12 Apr 2011 12:40:33 -0400

I'm running on a Sparc Box: SunOS 5.10 Generic_142900-05 sun4v sparc
SUNW,Netra-T5220
I'm using this compiler: cc: Sun C 5.11 SunOS_sparc 2010/08/13
I'm using the nightly snapshot of CURL from 3/21/2011

I run the configure script as follows. The result is shown below.

./configure --prefix=<myBuiltCurlLoc> --without-libidn --with-ssl=<mySSLLoc>
--with-libssh2=<mySSH2Loc> --enable-nonblocking --enable-debug
--enable-curldebug

  curl version: 7.21.5-20110321
  Host setup: sparc-sun-solaris2.10
  Install prefix: <myBuiltCurlLoc>
  Compiler: /usr/bin/cc
  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)
  TLS-SRP support: no (--enable-tls-srp)
  resolver: default (--enable-ares / --enable-threaded-resolver)
  ipv6 support: enabled
  IDN support: no (--with-libidn)
  Build libcurl: Shared=yes, Static=yes
  Built-in manual: enabled
  Verbose errors: enabled (--disable-verbose)
  SSPI support: no (--enable-sspi)
  ca cert bundle: no
  ca cert path: no
  LDAP support: enabled (OpenLDAP)
  LDAPS support: enabled
  RTSP support: enabled
  RTMP support: no (--with-librtmp)
  Protocols: DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP
LDAPS POP3 POP3S RTSP SCP SFTP SMTP SMTPS TELNET TFTP

But during the make, it fails while linking:

/usr/bin/cc -g -v -o .libs/curl main.o hugehelp.o urlglob.o writeout.o
writeenv.o getpass.o homedir.o curlutil.o os-specific.o xattr.o strtoofft.o
strdup.o rawstr.o nonblock.o -L<myOpenSSLLoc>/lib -L<mySSH2Lib>/lib
../lib/.libs/libcurl.so -lssl -lcrypto -lldap -lsocket -lnsl -lrt -lz
 -R/SS8/users/sali/curl/curl-7.21.5-built_on_20110411/lib
Undefined first referenced
 symbol in file
libssh2_sftp_seek64 ../lib/.libs/libcurl.so
libssh2_sftp_symlink_ex ../lib/.libs/libcurl.so
libssh2_scp_recv ../lib/.libs/libcurl.so
libssh2_sftp_mkdir_ex ../lib/.libs/libcurl.so
libssh2_channel_free ../lib/.libs/libcurl.so
<... and lots more similarly undefined symbols... >

So my first question is: The configuration script was told to include the
SSH2 library. However, the link step failed to include the "-lssh2" flag.
Why? I dug through the config.log file and found this:

configure:21363: /usr/bin/cc -o conftest -g -v -DCURLDEBUG -DDEBUGBUILD
-I<myOpenSSLLoc>/include -I<MyOpenSSLLoc>/include/openssl
I<mySSH2Loc>/include -L<myOpenSSLLoc> -L<mySSH2Loc>/lib conftest.c -lssh2
 -lssl -lcrypto -lldap -lrt -lsocket -lnsl -lz >&5
"conftest.c", line 89: warning: statement not reached
Undefined first referenced
 symbol in file
EVP_Cipher
 /SS8/users/sali/ssh2/lib/libssh2.a(openssl.o)
EVP_CIPHER_CTX_set_app_data
/SS8/users/sali/ssh2/lib/libssh2.a(openssl.o)
EVP_CIPHER_CTX_get_app_data
/SS8/users/sali/ssh2/lib/libssh2.a(openssl.o)

Can anyone help me with this issue?
BTW, I did a "find / -name conftest.c", I can't find it anywhere. Very
wierd.

- Saqib

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-04-12