Re: trouble configuring libwww with openssl

Tony Alexander wrote:

> i'm trying to compile libwww on a server running fedora core 2.  

 Hurrms, currently my workstation has Red Hat Enterprise Linux ES 
release 3 (Taroon),

    [bancroft@hilbert w3c-libwww-5.4.0]$ rpm -qa | grep ssl
    openssl-0.9.7a-22.1
    docbook-style-dsssl-1.76-8
    openssl-devel-0.9.7a-22.1
    mod_ssl-2.0.46-25.ent

Have you checked that the openssl-devel package is installed ?

> checking whether we can find OpenSSL... configure: error: Could not 
> find the /usr/share/ssl libraries.  You must first install openSSL.
>
> i'v also tried --with-ssl, --with-ssl=/usr and --with-ssl=/usr/share 
> all with no joy.

    [bancroft@hilbert w3c-libwww-5.4.0]$ ./configure --with-ssl
    loading cache ./config.cache
    checking host system type... i686-pc-linux-gnu
    checking target system type... i686-pc-linux-gnu
    checking build system type... i686-pc-linux-gnu
    [...]
    checking whether we can find OpenSSL... yes
    [...]
    creating Library/src/SSL/Makefile
    creating Library/src/SSL/windows/Makefile
    [...]

All appears well on the configure, however the compile errors out with 
the following

    gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -I/usr/local/include
    -I../../../modules/md5 -I../../../modules/expat/xmlparse
    -I../../../Library/src -I/usr/local/ssl/include -g -O2 -Wall -c
    HTSSL.c  -fPIC -DPIC -o .libs/HTSSL.lo
    HTSSL.c:32:17: ssl.h: No such file or directory
    HTSSL.c:33:18: rand.h: No such file or directory
    In file included from HTSSL.c:43:
    HTSSLMan.h:24: syntax error before "SSL"
    HTSSLMan.h:24: warning: no semicolon at end of struct or union
    HTSSLMan.h:28: syntax error before '}' token
    HTSSL.c:46: syntax error before '*' token
    HTSSL.c:46: warning: type defaults to `int' in declaration of `app_ctx'
    HTSSL.c:46: warning: data definition has no type or storage class
    HTSSL.c:53: `X509_V_OK' undeclared here (not in a function)
    HTSSL.c:64: syntax error before '*' token
    [...]

The configure script found a copy of openssl-0.9.7d I had in /usr/local 
!  However, the default version in /usr/include has the same issue, 
namely that HTSSL.c has the #include a bit off.  I made the following 
modification and the compile proceeds as expected,

    /* SSL includes */
    #include <openssl/ssl.h>
    #include <openssl/rand.h>

It would appear that HTSSLReader.c and HTSSLWriter.c have the same issue 
with their includes of ssl.h.  Making the same change there allows the 
compile to complete.

> i know there is nothing wrong with the openssl installation on the 
> server because every other application i've configured on this box 
> with ssl has compiled with no problem.

I recall compiling this when the original work was done and do not 
recall having to make this change, so it must be something to do with 
the openssl packaging.

> has anyone out there encountered this problem?  and, if so, how did 
> you rectify it?

I will try this on a Fedora Core release 2 (Tettnang) machine with

    [vic@pc72:~] rpm -qa | grep ssl
    openssl-devel-0.9.7a-35
    docbook-style-dsssl-1.78-3
    openssl-0.9.7a-35
    mod_ssl-2.0.51-2.9

However, I do not expect it to be different since,

    [vic@pc72:/usr/local/src] rpm -ql openssl-devel | grep ssl.h
    /usr/include/openssl/hmac.h
    /usr/include/openssl/kssl.h
    /usr/include/openssl/ssl.h

Perhaps a patch is warrented.

> much thanx in advance.

However, there is a snag with just using the webbot for https after such 
modifications, the requisite make; make install.  Running this command 
on a secure sockets url fails, such as

[bancroft@hilbert w3c-libwww-5.4.0]$ webbot https://sourceforge.net/account/login.php
Can't access resource

Accessed 0 documents in 0.00 seconds (0.00 requests pr sec)
        Did a GET on 0 document(s) and downloaded 0K bytes of document bodies (0.0 bytes/sec)
        Did a HEAD on 0 document(s) with a total of 0K bytes

Using the -v flag for webbot turns up

    HTSimplify.. `https://sourceforge.net/account/login.php' into
    ............ `https://sourceforge.net/account/login.php'
    Find Parent. 0x8056ab8 with hash 100 and address
    `https://sourceforge.net/account/login.ph
    p' created
    Net After... Add 0x804bd60 with order 65535 tmplate `<null>' code 1
    context (nil)
    Host........ Setting event timeout to 20000 ms
    Request..... Created 0x8056b48
    HTAccess.... Accessing document
    https://sourceforge.net/account/login.php
    Memory Free. 0x8056c68
    Net Before.. calling 0xb75deebc (request 0x8056b48, context (nil))
    Check rules. for `https://sourceforge.net/account/login.php'
    Memory Free. 0x8056c68
    Net Before.. calling 0xb75dede0 (request 0x8056b48, context (nil))
    Memory Free. 0x8056110
    Memory Free. 0x8056c68
    Memory Free. 0x8056cc8
    Error....... Add 74 Severity: 1 Parameter: `https' Where:
    `HTProtocol_find'
    Net Object.. NO PROTOCOL Object found for URI scheme `https'

more,
l8r,
v


-- 
america sig

Received on Thursday, 2 December 2004 09:14:19 UTC