Forum OpenACS Q&A: Re: When building nsopenssl-2.1a I get the "OpenSSL was not compiled with thread support!" error

I came up with a dirty workaround. I guess this is not a common aolserver-3.3+ad13 problem.

To build aolserver-3.3+ad13 with nsopenssl I did the following:

----------------------------------------------
- Get the source for aolserver-3.3+ad13
    wget http://www.eveandersson.com/arsdigita/acs-repository/log-downloads?software_filename=aolserver-src.tar.gz
- Get the source for nsopenssl-2.1a
    wget http://easynews.dl.sourceforge.net/sourceforge/aolserver/nsopenssl-2.1a.tar.gz
- Get the source for openssl
    wget http://www.openssl.org/source/openssl-0.9.8b.tar.gz
- Untar the sources
- Move the nsopenssl source to the /home/aol3/source direcotry
    mv /home/aol3/source/nsopenssl-2.1a /home/aol3/source/root/
- Build and install AOLserver
    cd /home/aol3/source/root/aolserver
    gmake
    gmake install PREFIX=/home/aol3
- Build and install nsopenssl
    cd /home/aol3/source/root/nsopenssl-2.1a
    export OPENSSL=/home/aol3/source/openssl-0.9.8b
    gmake
    - if you run into the following error "OpenSSL was not compiled with thread support!"
      - comment the lines that throw the error in the thread.c file:
          /* pliska: I commented the lines below! This might bring some future problems */
          /* #ifndef OPENSSL_THREADS */
          /* #error "OpenSSL was not compiled with thread support!" */
          /* #endif */
    - if it can't find the ssl library or the crypto library:
        ln -s /lib/libssl.so.0.9.7a /lib/libssl.so
          - There are new libraries availabe libssl.so.2 and .4! test this in dev
        ln -s /lib/libcrypto.so.0.9.7a /lib/libcrypto.so
          - There are new libraries availabe libcrypto.so.2 and .4! test this in dev
    gmake install INST=/home/aol3
----------------------------------------------

I say this is dirty because I just commented out the code that displays the error message.

Also note that I just obtained the openssl tar.gz to use the code when building nsopenssl by setting the OPENSSL environment variable before the gmake. I'm not sure if this is what I had to do.

Things are working ok but I do get the following errors on the error.log:
- Error:nsopenssl: nsdserver: connection closed by peer
- Error:nsopenssl: error 0/6 during SSL handshake
- Error: nsopenssl: EOF during SSL handshake
- Debug: nsopenssl: nsdserver: NsOpenSSLCreateConn failed

Any comments are appreciated,

Pedro