Ticket #52 (closed defect)

Opened 9 years ago

Last modified 9 years ago

Cannot compile libssh2-0.14 on a Suse 10 Enterprise Server

Reported by: anonymous Owned by:
Priority: normal Milestone:
Component: Version:
Keywords: Cc: dfandrich, bagder
Blocked By: Blocks:

Description

Hi

I'm trying to compile libssh2-0.14 on a Suse 10 Enterprise Server updated to SP1,.

This is the error:

slc-107:/tmp/libssh2-0.14 # ./configure

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for socket in -lsocket... no
checking for ceil in -lm... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for ranlib... ranlib
checking whether byte ordering is bigendian... no
checking for pkg-config... no
checking for OpenSSL... configure: error: Cannot find OpenSSL's

libcrypto

I have installed openssl and openssl-devel packages and the libraries seems to be well linked:

slc-107:/tmp/libssh2-0.14 # ldconfig -v |grep libcrypto

ldconfig: Can't stat /usr/X11R6/lib64/Xaw3d: No such file or directory
ldconfig: Can't stat /usr/X11R6/lib/Xaw3d: No such file or directory
ldconfig: Can't stat /opt/kde3/lib: No such file or directory
ldconfig: Can't stat /opt/kde3/lib64: No such file or directory
ldconfig: Path `/lib' given more than once
ldconfig: Path `/lib64' given more than once
ldconfig: Path `/usr/lib' given more than once
ldconfig: Path `/usr/lib64' given more than once
libcrypto.so.0.9.8 -> libcrypto.so.0.9.8
libcrypto.so.0.9.7 -> libcrypto.so.0.9.7

I tried to compile the lastest version too but i had the same error.

In this machine i have compiled and installed nrpe (for example) that uses the same libraries without problems.

What can i do?

Thank you very much and sorry for my English ;-)

jmachr@…

Change History

comment:1 Changed 9 years ago by dfandrich

Version 0.14 is 4 versions out of date. Try ver. 0.18.

comment:2 Changed 9 years ago by dfandrich

Ah, I missed the line in the middle that said you tried the latest version as well. It sounds like you might not have the OpenSSL development package installed, or, if you do, use the --with-openssl option on configure to point to its installation directory. If you still can't figure it out, look at the config.log file and get some clues. Oh, and please stick with the latest version!

comment:3 Changed 9 years ago by anonymous

Logged In: NO

The reason for install an old version is that we have some programs compiled to run with that library in an older machine, and we want to keep the same configuration in both servers.

I have OpenSSL development package already install, so i'll try to compile with the openssl option.

Thanks!!!

comment:4 Changed 9 years ago by anonymous

Logged In: NO

I tried to compiled with the --with-opensssl option, but it didn't work, this is the new error:

checking for OpenSSL... Using explicit path /usr/include/openssl
configure: error: Missing one or more of <openssl/bn.h>, <openssl/evp.h>, <openssl/hmac.h>, <openssl/pem.h>, <openssl/sha.h>

I checked that all the "missing" headers are in the path given.

This ocurred with both version of the library (14 and 18), and config.log don´t give more usefull information.

thanks

comment:5 Changed 9 years ago by dfandrich

What argument did you give --with-openssl? It should point to the OpenSSL installation location (i.e. a directory containing include/ and lib/ directories). If it's not installed that way, you'll need to set the CPPFLAGS and LDFLAGS variables instead.

comment:6 Changed 9 years ago by anonymous

Logged In: NO

I gave the argument /usr/include/openssl

Should i give another argument pointing to the lib dir?

comment:7 Changed 9 years ago by anonymous

Logged In: NO

Problem solved!!!

The problem was the value of found_openssl (it was "yes" instead of "no") and we can't enter to the if in line 3747 , we change the value and it worked well:

echo VAMOS BIEN $found_openssl
found_openssl="no"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
# Elsewise, search for OpenSSL wherever it might be
if test "$found_openssl" = "no"; then
# OPENSSL_SEARCH_PATH="/usr/local/ssl /usr/local /usr /usr/local/openssl"

OPENSSL_SEARCH_PATH="/usr"

for i in $OPENSSL_SEARCH_PATH; do

echo "Mira en $i"

if test -r $i/include/openssl/evp.h; then

OPENSSL_INCLINE="-I$i/include"
OPENSSL_INCDIR=$i/include

fi
if test -r $i/include/openssl/hmac.h; then

OPENSSL_INCLINE="-I$i/include"
OPENSSL_INCDIR=$i/include

fi
if test -r $i/lib/libcrypto.a -o -r $i/lib/libcrypto.$SHLIB_SUFFIX_NAME; then

OPENSSL_LIBLINE="-L$i/lib -lcrypto"

fi
test -n "$OPENSSL_INCLINE" && test -n "$OPENSSL_LIBLINE" && break

done

Thanks for all

comment:8 Changed 9 years ago by bagder

I don't see how this fix makes sense but I won't pursue this anymore.

Note: See TracTickets for help on using tickets.