[Tutor] sockets broken on New Install???

Bruce Sass bsass@freenet.edmonton.ab.ca
Thu, 16 Aug 2001 12:20:11 -0600 (MDT)


On Thu, 16 Aug 2001, Sheila King wrote:
> On Thu, 16 Aug 2001 11:00:19 -0600 (MDT), Bruce Sass
<...>
> Well, I get something like this:
>
> [thinker@FQ-Nine:~ ]$ locate openssl | grep include | more
> /usr/local/ssl/include/openssl
> /usr/local/ssl/include/openssl/asn1_mac.h
> /usr/local/ssl/include/openssl/asn1.h
> /usr/local/ssl/include/openssl/blowfish.h
> /usr/local/ssl/include/openssl/bio.h
> /usr/local/ssl/include/openssl/buffer.h
> ...
>
> I wish I could say that gave ME a clue.

looks like it did...

> I look in <dir>/Modules.Setup for _socket and find this:
>
> # for socket(2), without SSL support.
> #_socket socketmodule.c
>
> # Socket module compiled with SSL support; you must comment out the
> other
> # socket line above, and possibly edit the SSL variable:
> #SSL=/usr/local/ssl
> #_socket socketmodule.c \
> #	-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
> #	-L$(SSL)/lib -lssl -lcrypto
>
> And it looks to me like
> SSL = /usr/local/ssl
> is correct??? (Is that the part I would edit?)

...yes (yes)...

> Do I need to change it to
> SSL=/usr/local/ssl/include/openssl
> ????

...nope...

> Plus, what's with all the # at the beginning of the lines. Looks like
> everything is commented out. Is this the normal way for it to look?
> (Confusing to me.)

...just uncomment the whole section.
The "$(SSL)" bits will be substituted with the value of SSL, so...
-I$(SSL)/include/openssl becomes -I/usr/local/ssl/include/openssl
which is where "locate" found the headers.

When you've finished re-make-ing, test it with:
	./python ./Lib/test/test_socketserver.py


> I think I figured out the expat part.
> In the <dir>/Modules/Setup file I changed the line
> #EXPAT_DIR=/usr/local/src/expat
> to
> #EXPAT_DIR=/usr/local/include/php/ext/xml/expat
>
> after getting these results from a commandline prompt:
> [thinker@FQ-Nine:~ ]$ locate expat | more
> /usr/local/include/php/ext/xml/expat
> /usr/local/include/php/ext/xml/expat/xmlparse
> /usr/local/include/php/ext/xml/expat/xmlparse/expat_hashtable.h
> /usr/local/include/php/ext/xml/expat/xmlparse/xmlparse.h
> /usr/local/include/php/ext/xml/expat/xmltok
> ...

Hmmm, you can try it, but it might be PHP stuff that just has the same
names as what you want.

I keep running into this because I don't have all the headers
(probably missing a -dev package).  However, I did notice that the
Amaya source installed what I needed because it now does xml stuff;
the line ended up looking like:
	EXPAT_DIR=/usr/local/src/libwww/modules/expat

If the PHP location doesn't work, http://www.w3.org/amaya ...
Amaya is worth playing with (WYSIWYG (X)HTML editor.browser).

> So, I think that I've got expat set to go, but I'm not sure about
> SSL/Socket, since my results from
> $locate openssl | grep include | more
>
> seem to indicate to me, that the Modules/Setup file has that directory
> set correctly???

...except for being commented out.  :)


- Bruce