Subject: Re: An SSL Problem
To: Jeremy C. Reed <reed@reedmedia.net>
From: thoran <thoran@fastmail.fm>
List: tech-pkg
Date: 11/09/2005 08:57:55
Hello Jeremy, 

This is an issue for Subversion when attempting to compile this, if it
wasn't already mentioned or apparent that this problem might be more
general than with lynx.  

On Tue, 8 Nov 2005 09:13:08 -0800 (PST), "Jeremy C. Reed"
<reed@reedmedia.net> said:
> On Tue, 8 Nov 2005, thoran wrote:
> 
> >> In your pkgsrc/www/lynx try:
> >>
> >> bmake clean
> >> bmake configure
> >> cat work/.buildlink/.buildlink_openssl_done
> >> bmake show-var VARNAME=USE_BUILTIN.openssl
> >> bmake show-var VARNAME=BUILDLINK_PREFIX.openssl
> >
> > I got to the second command.  Here's the tail of the output:
> >
> > checking for SSL_get_version in -lssl... yes
> > checking for openssl include directory... no
> > checking if we can link to ssl library... no
> > configure: error: Cannot link with ssl library
> 
> Have a look at work/lynx2-8-5/config.log. Start from the bottom and go up 
> until you find the actual errors related to the "ssl". What does it say? 
> (You only need to copy and paste a few lines.)

It is a bit more than a few lines, but then there's a bit more than a
few errors.  

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

...snip...

configure:5080: checking for gethostname
configure:5108: gcc -o conftest -O2 -I/usr/include -I/usr/pkg/include 
-DLINUX -I/usr/include -I/usr/pkg/include -D_GNU_SOURCE -L/usr/lib
-Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib conftest.c  1>&5
configure:5247: checking for main in -linet
configure:5262: gcc -o conftest -O2 -I/usr/include -I/usr/pkg/include 
-DLINUX -I/usr/include -I/usr/pkg/include -D_GNU_SOURCE -L/usr/lib
-Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib conftest.c -linet  
1>&5
/usr/bin/ld: cannot find -linet
collect2: ld returned 1 exit status
configure: failed program was:
#line 5255 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
configure:5287: checking for socket
configure:5315: gcc -o conftest -O2 -I/usr/include -I/usr/pkg/include 
-DLINUX -I/usr/include -I/usr/pkg/include -D_GNU_SOURCE -L/usr/lib
-Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib conftest.c  1>&5
configure:5454: checking for gethostbyname
configure:5482: gcc -o conftest -O2 -I/usr/include -I/usr/pkg/include 
-DLINUX -I/usr/include -I/usr/pkg/include -D_GNU_SOURCE -L/usr/lib
-Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib conftest.c  1>&5
configure:5565: checking for strcasecmp
configure:5681: checking for inet_aton function
configure:5698: gcc -o conftest -O2 -I/usr/include -I/usr/pkg/include 
-DLINUX -I/usr/include -I/usr/pkg/include -D_GNU_SOURCE -L/usr/lib
-Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib conftest.c   1>&5
configure:5804: checking for SSL_get_version in -lssl
configure:5823: gcc -o conftest -O2 -I/usr/include -I/usr/pkg/include 
-DLINUX -I/usr/include -I/usr/pkg/include -D_GNU_SOURCE -L/usr/lib
-Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib conftest.c -lssl
-lcrypto   1>&5
configure:5878: checking for openssl include directory
configure:5889: gcc -c -O2 -I/usr/include -I/usr/pkg/include  -DLINUX
-I/usr/include -I/usr/pkg/include -D_GNU_SOURCE conftest.c 1>&5
In file included from /usr/include/openssl/ssl.h:179,
                 from configure:5883:
/usr/include/openssl/kssl.h:72:18: krb5.h: No such file or directory
In file included from /usr/include/openssl/ssl.h:179,
                 from configure:5883:
/usr/include/openssl/kssl.h:134: syntax error before "krb5_enctype"
/usr/include/openssl/kssl.h:136: syntax error before '*' token
/usr/include/openssl/kssl.h:137: syntax error before '}' token
/usr/include/openssl/kssl.h:149: syntax error before
"kssl_ctx_setstring"
/usr/include/openssl/kssl.h:149: syntax error before '*' token
/usr/include/openssl/kssl.h:150: syntax error before '*' token
/usr/include/openssl/kssl.h:151: syntax error before '*' token
/usr/include/openssl/kssl.h:151: syntax error before '*' token
/usr/include/openssl/kssl.h:152: syntax error before '*' token
/usr/include/openssl/kssl.h:153: syntax error before "kssl_ctx_setprinc"
/usr/include/openssl/kssl.h:153: syntax error before '*' token
/usr/include/openssl/kssl.h:155: syntax error before "kssl_cget_tkt"
/usr/include/openssl/kssl.h:155: syntax error before '*' token
/usr/include/openssl/kssl.h:157: syntax error before "kssl_sget_tkt"
/usr/include/openssl/kssl.h:157: syntax error before '*' token
/usr/include/openssl/kssl.h:159: syntax error before "kssl_ctx_setkey"
/usr/include/openssl/kssl.h:159: syntax error before '*' token
/usr/include/openssl/kssl.h:161: syntax error before "context"
/usr/include/openssl/kssl.h:162: syntax error before
"kssl_build_principal_2"
/usr/include/openssl/kssl.h:162: syntax error before "context"
/usr/include/openssl/kssl.h:165: syntax error before
"kssl_validate_times"
/usr/include/openssl/kssl.h:165: syntax error before "atime"
/usr/include/openssl/kssl.h:167: syntax error before
"kssl_check_authent"
/usr/include/openssl/kssl.h:167: syntax error before '*' token
/usr/include/openssl/kssl.h:169: syntax error before "enctype"
In file included from configure:5883:
/usr/include/openssl/ssl.h:909: syntax error before "KSSL_CTX"
/usr/include/openssl/ssl.h:931: syntax error before '}' token
configure: failed program was:
#line 5880 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <openssl/ssl.h>
int main() {
SSL_shutdown((SSL *)0)
; return 0; }
configure:5906: checking if we can link to ssl library
configure:5922: gcc -o conftest -O2 -I/usr/include -I/usr/pkg/include 
-DLINUX -I/usr/include -I/usr/pkg/include -D_GNU_SOURCE -L/usr/lib
-Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib conftest.c -lssl
-lcrypto -lssl   1>&5
configure:5914:17: ssl.h: No such file or directory
configure: In function `main':
configure:5918: `SSL' undeclared (first use in this function)
configure:5918: (Each undeclared identifier is reported only once
configure:5918: for each function it appears in.)
configure:5918: syntax error before ')' token
configure: failed program was:
#line 5908 "configure"
#include "confdefs.h"

#include <stdio.h>
#ifdef USE_OPENSSL_INCL
#include <openssl/ssl.h>
#else
#include <ssl.h>
#endif

int main() {
SSL_shutdown((SSL *)0)
; return 0; }


> Also, do the
>   cat work/.buildlink/.buildlink_openssl_done
>   bmake show-var VARNAME=USE_BUILTIN.openssl
>   bmake show-var VARNAME=BUILDLINK_PREFIX.openssl

The cat didn't produce anything and the others are below: 

# /usr/pkg/bin/bmake show-var VARNAME=USE_BUILTIN.openssl
yes
# /usr/pkg/bin/bmake show-var VARNAME=BUILDLINK_PREFIX.openssl
/usr

Do I need to set these in mk.conf?  (I have a strong suspicion that this
may be considered a stupid question!)


t