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

I finally got a chance to get back to this and had some successes and failures.

As a recap, I was getting the "OpenSSL was not compiled with thread support!" error because I was using an up2date installation of OpenSSL (through the Red Hat Network for Enterprise Linux ES release 4). I'm now using a local installation of OpenSSL. Since I did that, I stopped getting the "OpenSSL was not compiled with thread support!" error. I'm now also using a local installation of Tcl, just to make sure I have threads enabled (--enable_threads).

After getting the "thread support" error out of the way I ran into other problems that lead me to trying out AOLserver 4.5. I WAS able to run ACS 3.4.9 under AOLserver 4.5 =). I just had to tweak the ReturnHeaders proc (like Andrew said). I tweaked it based on the ReturnHeaders proc of OpenACS.

But I ran into problems when trying to get SSL working. My ideal configuration would be AOLserver 4.5 and nsopenssl-2.1a but I also tried getting nsopenssl-3.0beta26 to work.

When gmake'ing nsopenssl-2.1a I get the following error:

------------------------------------------------------------------
[root@predevlms nsopenssl-2.1a]# gmake OPENSSL=/usr/local/ssl
gcc -pipe -I/usr/local/ssl/include -O2 -Wall -Wno-implicit-int -fno-strict-aliasing -fPIC -I/usr/local/aolserver/include -I/usr/local/aolserver/include -DNO_CONST -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_PTHREAD_ATFORK=1 -DTCL_THREADS=1 -DPEEK_XCLOSEIM=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_OPEN64=1 -DHAVE_LSEEK64=1 -DHAVE_TYPE_OFF64_T=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_STRTOLL=1 -DHAVE_STRTOULL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DHAVE_GETPWUID_R_5=1 -DHAVE_GETPWUID_R=1 -DHAVE_GETPWNAM_R_5=1 -DHAVE_GETPWNAM_R=1 -DHAVE_GETGRGID_R_5=1 -DHAVE_GETGRGID_R=1 -DHAVE_GETGRNAM_R_5=1 -DHAVE_GETGRNAM_R=1 -DHAVE_GETHOSTBYNAME_R_6=1 -DHAVE_GETHOSTBYNAME_R=1 -DHAVE_GETHOSTBYADDR_R_8=1 -DHAVE_GETHOSTBYADDR_R=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1 -DHAVE_FTS=1 -DHAVE_SYS_IOCTL_H=1 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_TIMEGM=1 -DHAVE_DRAND48=1 -DHAVE_RANDOM=1 -DHAVE_POLL=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1 -c -o nsopenssl.o nsopenssl.c
nsopenssl.c: In function `Ns_ModuleInit':
nsopenssl.c:167: warning: passing arg 3 of `Ns_DriverInit' from incompatible pointer type
nsopenssl.c:167: error: too many arguments to function `Ns_DriverInit'
nsopenssl.c: In function `NsOpenSSLGetModuleName':
nsopenssl.c:190: warning: unused variable `sdPtr'
nsopenssl.c: In function `NsOpenSSLGetSockServerSSLContext':
nsopenssl.c:228: error: `firstSSLDriverPtr' undeclared (first use in this function)
nsopenssl.c:228: error: (Each undeclared identifier is reported only once
nsopenssl.c:228: error: for each function it appears in.)
nsopenssl.c: In function `NsOpenSSLGetSockClientSSLContext':
nsopenssl.c:257: error: `firstSSLDriverPtr' undeclared (first use in this function)
nsopenssl.c: At top level:
nsopenssl.c:850: error: syntax error before "Ns_Buf"
nsopenssl.c: In function `OpenSSLProc':
nsopenssl.c:851: error: number of arguments doesn't match prototype
nsopenssl.c:117: error: prototype declaration
nsopenssl.c:853: error: `sock' undeclared (first use in this function)
nsopenssl.c:856: error: `cmd' undeclared (first use in this function)
nsopenssl.c:870: error: structure has no member named `sdPtr'
nsopenssl.c:871: error: structure has no member named `sdPtr'
nsopenssl.c:872: error: `sdPtr' undeclared (first use in this function)
nsopenssl.c:891: error: `bufs' undeclared (first use in this function)
nsopenssl.c:901: error: `nbufs' undeclared (first use in this function)
nsopenssl.c: At top level:
nsopenssl.c:41: warning: 'RCSID' defined but not used
gmake: *** [nsopenssl.o] Error 1
------------------------------------------------------------------

So decided to give nsopenssl-3.0beta26 a shot. The building of the source and installation went successfully but when running AOLserver I get the following error:

------------------------------------------------------------------
[root@predevlms ~]# cat run-aol4-server
/usr/local/aolserver/bin/nsd -u pliska -g nmont -ft /usr/local/aolserver/neumont-dev.tcl -b 127.0.0.1:80
[root@predevlms ~]# ./run-aol4-server
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: prebind: bound: 127.0.0.1:80
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: nsmain: AOLserver/4.5.0 starting
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: nsmain: security info: uid=500, euid=500, gid=504, egid=504
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: nsmain: max files: FD_SETSIZE = 1024, rl_cur = 1024, rl_max = 1024
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: encoding: loaded: utf-8
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: fastpath[neumont-dev]: mapped GET /
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: fastpath[neumont-dev]: mapped HEAD /
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: fastpath[neumont-dev]: mapped POST /
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: adp[neumont-dev]: mapped GET /*.adp
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: adp[neumont-dev]: mapped HEAD /*.adp
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: adp[neumont-dev]: mapped POST /*.adp
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nssock.so'
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nslog.so'
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: nslog: opened '/usr/local/aolserver/servers/neumont-dev/log/neumont-dev.log'
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nsdb.so'
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: modload: loading '/usr/local/aolserver/bin/ora8.so'
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: ora8 driver LobBufferSize = 16384
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: ora8 driver PrefetchRows = 0
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: ora8 driver PrefetchMemory = 0
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: Loaded ArsDigita Oracle Driver version 2.7, built on 15:17:54/Mar 28 2006
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nspasswd.so'
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nsopenssl.so'
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Notice: nsopenssl: generating 512-bit temporary RSA key ...
[22/Jan/2007:16:04:43][6250.3086841536][-main-] Fatal: received fatal signal 11
./run-aol4-server: line 1: 6250 Aborted /usr/local/aolserver/bin/nsd -u pliska -g nmont -ft /usr/local/aolserver/neumont-dev.tcl -b 127.0.0.1:80
------------------------------------------------------------------

Please let me know if you see something I'm missing. I'll also post my errors on the AOLserver mailing list (as Gustaf recommended) and see if I get some help through them.

Thanks!

Just as a follow up: nsopenssl 2.x won't work with AOLserver 4.5.x. Scott Goodwin informed me about that through the AOLserver mailing list.

I'm still fighting with nsopenssl-3.0beta26 ...

Collapse
Posted by Pedro Liska on
I finally got things working.

To get rid of the "fatal signal 11" error I just started from absolute scratch. Deleting all executables and sources.

I made sure Tcl and OpenSSL were compiled with thread support (which I had done before as well). And things worked. I probably had a typo or some other tiny error that made things break.

Thank you Gustaf and Andrew for your help,

Pedro