cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-1871649 ] problem compiling curl-7.17.1 with openssl-0.9.8g by source

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Mon, 14 Jan 2008 20:22:00 -0800

Bugs item #1871649, was opened at 2008-01-14 22:37
Message generated for change (Comment added) made by pierregrand
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1871649&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: compile or build problem
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: pierregrand (pierregrand)
Assigned to: Daniel Stenberg (bagder)
Summary: problem compiling curl-7.17.1 with openssl-0.9.8g by source

Initial Comment:
Hi,

I have a new clean system running Centos 5 (minimal install - nothing except the compilers).

uname -a:

Linux localhost.localdomain 2.6.18-8.1.15.el5 #1 SMP Mon Oct 22 08:32:04 EDT 2007 i686 i686 i386 GNU/Linux

I then installed openssl-0.9.8g from source:

cd openssl-0.9.8g
./config --openssldir=/usr/local/ssl
make; make install

I then attempted to install curl-7.17.1:

cd curl-7.17.1
./configure --disable-ipv6 --with-ssl=/usr/local/ssl;

Here's the error message:

checking whether to support http... yes
checking whether to support ftp... yes
checking whether to support file... yes
checking whether to support ldap... yes
checking whether to support ldaps... no
checking whether to support dict... yes
checking whether to support telnet... yes
checking whether to support tftp... yes
checking whether to provide built-in manual... yes
checking for icc in use... no
checking for gethostbyname... yes
checking for strcasecmp... yes
checking for connect... yes
checking whether to use libgcc... no
checking for lber.h... no
checking for ldap.h... no
checking for ldapssl.h... no
checking for ldap_ssl.h... no
checking for LDAP libraries... cannot find LDAP libraries
configure: WARNING: Cannot find libraries for LDAP support: LDAP disabled
checking for timeGetTime in winmm... no
checking whether to enable ipv6... no
checking non-blocking sockets style... O_NONBLOCK
checking if argv can be written to... yes
checking if Kerberos4 support is requested... no
checking if SPNEGO support is requested... no
checking if GSSAPI support is requested... no
checking for gdi32... no
checking for CRYPTO_lock in -lcrypto... yes
checking for SSL_connect in -lssl... no
checking for ssl with RSAglue/rsaref libs in use... checking for SSL_connect in -lssl... (cached) no
no
configure: error: OpenSSL libs and/or directories were not found where specified!

I also attempted to add /usr/local/ssl/lib and /usr/local/ssl/include in the file /etc/ld.so.conf and running ldconfig - didn't do anything.

I also attempted to compile using:

CPPFLAGS="-I/usr/local/ssl/include" LDFLAGS="-L/usr/local/ssl/lib" \
./configure --disable-ipv6 --with-ssl=/usr/local/ssl;

Same problem. Is this a known issue?

Thanks,

Pierre G

----------------------------------------------------------------------

>Comment By: pierregrand (pierregrand)
Date: 2008-01-15 02:21

Message:
Logged In: YES
user_id=1981607
Originator: YES

Hi,

In a previous post I mentioned that I had attempted the following:

PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig \
./configure --disable-ipv6 --with-ssl=/usr/local/ssl;

The result was the same as without the
PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig \ line.
The config.log is exactly the same as the previous failed configure
without the PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig . (I did a diff)

If you could please try it on your end, it might help for you to see what
I am experiencing.

Cheers,

----------------------------------------------------------------------

Comment By: Dan Fandrich (dfandrich)
Date: 2008-01-14 23:56

Message:
Logged In: YES
user_id=236775
Originator: NO

Dynamic libraries' names end in .so while static libraries end in .a

Does the config.log file look any different this time? Did the -ldl hack
work? What's the output of the command:
PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig pkg-config --libs libssl

----------------------------------------------------------------------

Comment By: pierregrand (pierregrand)
Date: 2008-01-14 23:42

Message:
Logged In: YES
user_id=1981607
Originator: YES

The log shows that gcc is linking OpenSSL statically, and a library is
missing on the link command. Using LDFLAGS="-L/usr/local/ssl/lib -ldl"
will
probably let you compile, but that's just papering over the problem.
First,
did you compile just a static version of OpenSSL or did you create a
dynamic version as well?

On a clean Centos 5 system (with minimal install, and only development
tools installed) (development tools are gcc, etc):

I install openssl from source by doing the following:

cd /usr/local/src
tar xfz openssl-0.9.8g.tar.gz
cd openssl-0.9.8g
./config --openssldir=/usr/local/ssl
make; make install

I don't know if this installs openssl as static or dynamic. How would I be
able to tell?

Second, did OpenSSL install a .pc file anywhere

Here's the results of my search:

[root_at_localhost src]# updatedb
[root_at_localhost src]# locate .pc
/lib/modules/2.6.18-8.1.15.el5/modules.pcimap
/lib/modules/2.6.18-8.el5/modules.pcimap
/usr/lib/pkgconfig/devmapper-event.pc
/usr/lib/pkgconfig/devmapper.pc
/usr/lib/pkgconfig/libnfsidmap.pc
/usr/lib/pkgconfig/librpcsecgss.pc
/usr/local/lib/pkgconfig/libcrypto.pc
/usr/local/lib/pkgconfig/libcurl.pc
/usr/local/lib/pkgconfig/libssl.pc
/usr/local/lib/pkgconfig/openssl.pc
/usr/local/src/curl-7.17.1/libcurl.pc.in
/usr/local/src/openssl-0.9.7m/openssl.pc
/usr/local/src/openssl-0.9.8g/libcrypto.pc
/usr/local/src/openssl-0.9.8g/libssl.pc
/usr/local/src/openssl-0.9.8g/openssl.pc
/usr/local/ssl/lib/pkgconfig/libcrypto.pc
/usr/local/ssl/lib/pkgconfig/libssl.pc
/usr/local/ssl/lib/pkgconfig/openssl.pc
/usr/local/ssl-0-9-7/lib/pkgconfig/openssl.pc
/usr/share/doc/gawk-3.1.5/README_d/README.pc
/usr/share/doc/gawk-3.1.5/README_d/README.pcdynamic

for use with pkg-config? If so, then try setting the environment variable
PKG_CONFIG_PATH to that directory (probably something like
PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig ) before configuring. You
shouldn't need to specify LDFLAGS or CPPFLAGS if everything is configured
properly.

Sure, Here's my attempt:

PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig \
./configure --disable-ipv6 --with-ssl=/usr/local/ssl;

checking for CRYPTO_lock in -lcrypto... yes
checking for SSL_connect in -lssl... no
checking for ssl with RSAglue/rsaref libs in use... checking for
SSL_connect in -lssl... (cached) no
no
configure: error: OpenSSL libs and/or directories were not found where
specified!

Still the same problem.

Is this an openssl problem or curl problem?

----------------------------------------------------------------------

Comment By: Dan Fandrich (dfandrich)
Date: 2008-01-14 23:22

Message:
Logged In: YES
user_id=236775
Originator: NO

The log shows that gcc is linking OpenSSL statically, and a library is
missing on the link command. Using LDFLAGS="-L/usr/local/ssl/lib -ldl" will
probably let you compile, but that's just papering over the problem. First,
did you compile just a static version of OpenSSL or did you create a
dynamic version as well? Second, did OpenSSL install a .pc file anywhere
for use with pkg-config? If so, then try setting the environment variable
PKG_CONFIG_PATH to that directory (probably something like
PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig ) before configuring. You
shouldn't need to specify LDFLAGS or CPPFLAGS if everything is configured
properly.

----------------------------------------------------------------------

Comment By: pierregrand (pierregrand)
Date: 2008-01-14 23:06

Message:
Logged In: YES
user_id=1981607
Originator: YES

Yes, the file structure is very similar.

For openssl-0.9.8g:

ls -la /usr/local/ssl
total 88
drwxr-xr-x 9 root root 4096 Jan 14 03:46 .
drwxr-xr-x 17 root root 4096 Jan 14 04:05 ..
drwxr-xr-x 2 root root 4096 Jan 14 03:46 bin
drwxr-xr-x 2 root root 4096 Jan 14 03:46 certs
drwxr-xr-x 3 root root 4096 Jan 14 03:46 include
drwxr-xr-x 4 root root 4096 Jan 14 03:46 lib
drwxr-xr-x 6 root root 4096 Jan 14 03:45 man
drwxr-xr-x 2 root root 4096 Jan 14 03:46 misc
-rw-r--r-- 1 root root 9374 Jan 14 03:46 openssl.cnf
drwxr-xr-x 2 root root 4096 Jan 14 03:46 private

for openssl 0.9.7m:

ls -la /usr/local/ssl-0-9-7/
total 48
drwxr-xr-x 6 root root 4096 Jan 14 03:23 .
drwxr-xr-x 17 root root 4096 Jan 14 04:05 ..
drwxr-xr-x 2 root root 4096 Jan 14 03:24 bin
drwxr-xr-x 3 root root 4096 Jan 14 03:23 include
drwxr-xr-x 3 root root 4096 Jan 14 03:24 lib
drwxr-xr-x 6 root root 4096 Jan 14 03:24 ssl

[root_at_localhost curl-7.17.1]# cat config.log | grep openssl
configure:25605: gcc -o conftest -g -O2 -I/usr/local/ssl/include/openssl
-I/usr/local/ssl/include -L/usr/local/ssl/lib conftest.c -lgdi32 >&5
configure:25669: gcc -o conftest -g -O2 -I/usr/local/ssl/include/openssl
-I/usr/local/ssl/include -L/usr/local/ssl/lib conftest.c -lcrypto >&5
configure:25820: gcc -o conftest -g -O2 -I/usr/local/ssl/include/openssl
-I/usr/local/ssl/include -L/usr/local/ssl/lib conftest.c -lssl -lcrypto
>&5
CPPFLAGS=' -I/usr/local/ssl/include/openssl -I/usr/local/ssl/include'

I have also attached the file config.log to help you.
File Added: config.log

----------------------------------------------------------------------

Comment By: pierregrand (pierregrand)
Date: 2008-01-14 22:54

Message:
Logged In: YES
user_id=1981607
Originator: YES

One last comment. I have been able to compile openssl 0.9.8g with curl
7.16.4:

cd curl-7.16.4
./configure --disable-ipv6 --with-ssl=/usr/local/ssl; make; make install

----------------------------------------------------------------------

Comment By: Dan Fandrich (dfandrich)
Date: 2008-01-14 22:54

Message:
Logged In: YES
user_id=236775
Originator: NO

Are the files installed in /usr/local/ssl similar to the ones installed in
/usr/local/ssl-0-9-7? Can you post the relevant parts of the OpenSSL
checking output of config.log for the failing case?

----------------------------------------------------------------------

Comment By: pierregrand (pierregrand)
Date: 2008-01-14 22:42

Message:
Logged In: YES
user_id=1981607
Originator: YES

I'd like to add that when I do the following on the SAME system, the
compile works with openssl version 0.9.7. So this should help to confirm
that I didn't do anything wrong.

I downloaded openssl-0.9.7m.tar.gz
cd openssl-0.9.7m
./config --openssldir=/usr/local/ssl-0-9-7
make; make install

./configure --disable-ipv6 --with-ssl=/usr/local/ssl-0-9-7/;
make; make install

No problem with the configure and the make & make install

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1871649&group_id=976
Received on 2008-01-15

These mail archives are generated by hypermail.

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

File upload with ASP.NET