Maurizio,

File pasted below.

-PT

#
# The contents of this file are subject to the AOLserver Public License
# Version 1.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://aolserver.com.
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
#
# Alternatively, the contents of this file may be used under the terms
# of the GNU General Public License (the "GPL"), in which case the
# provisions of GPL are applicable instead of those above.  If you wish
# to allow use of your version of this file only under the terms of the
# GPL and not to allow others to use your version of this file under the
# License, indicate your decision by deleting the provisions above and
# replace them with the notice and other provisions required by the GPL.
# If you do not delete the provisions above, a recipient may use your
# version of this file under either the License or the GPL.
#
# Copyright (C) 2001-2003 Scott S. Goodwin
#
# Portions created by AOL are Copyright (C) 1999 America Online, Inc. All
# Rights Reserved.
#
#
# $Header: /cvsroot/aolserver/nsopenssl/Makefile,v 1.44 2004/11/20 06:42:54 dossy Exp $
#

AOLSERVER ?= ../aolserver

ifndef OPENSSL

all:
        @echo "** "
        @echo "** OPENSSL variable not set."
        @echo "** nsopenssl will not be built."
        @echo "** "

install: all

clean:

else

#
# Version number used in release tags. Valid VERs are "1.1c", "2.1",
# "2.2beta7". VER "1.1c" will be translated into "v1_1c" by this Makefile.
#
VER_ = $(subst .,_,$(VER))

MODNAME  = nsopenssl

LIB      = nsopenssl
LIBOBJS  = sslcontext.o ssl.o tclcmds.o x509.o
LIBLIBS  = -L$(OPENSSL)/lib -lssl -lcrypto

MOD      = nsopenssl.so
MODOBJS  = nsopenssl.o
HDRS     = nsopenssl.h
MODLIBS  = -L$(OPENSSL)/lib -lssl -lcrypto

TCLMOD   = https.tcl

# Add static compilation ability, per grax3272
ifeq ($(STATIC),1)
        MODLIBS = $(OPENSSL)/lib/libssl.a $(OPENSSL)/lib/libcrypto.a
endif

#
# Kerberos headers are included in case your OpenSSL library was built with # Kerberos support. This is generally true on RedHat 9 and possibly Fedora # Core. If OPENSSL_NO_KRB5 is define in <openssl/opensslconf.h> then OpenSSL
# *was not* compiled with Kerberos support.
#

CFLAGS   += -I$(OPENSSL)/include -I/usr/kerberos/include

INSTALL = install-https.tcl

include  $(AOLSERVER)/include/Makefile.module

##
## Extra install targets.
##

install-https.tcl:
        $(INSTALL_SH) $(TCLMOD) $(INSTTCL)

.PHONY: install-https.tcl

#
# Help the poor developer
#
help:
        @echo "**"
        @echo "** DEVELOPER HELP FOR THIS $(MODNAME)"
        @echo "**"
        @echo "** make tag VER=X.Y"
        @echo "**     Tags the module CVS code with the given tag."
@echo "** You can tag the CVS copy at any time, but follow the rules."
        @echo "**     VER must be of the form:"
        @echo "**         X.Y"
        @echo "**         X.YbetaN"
        @echo "**     You should browse CVS at SF to find the latest tag."
        @echo "**"
        @echo "** make file-release VER=X.Y"
        @echo "**     Checks out the code for the given tag from CVS."
        @echo "**     The result will be a releaseable tar.gz file of"
        @echo "**     the form: module-X.Y.tar.gz."
        @echo "**"

#
# Tag the code in CVS right now
#
tag:
@if [ "$(VER)" = "" ]; then echo 1>&2 "VER must be set to version number!"; exit 1; fi
        cvs rtag v$(VER_) $(MODNAME)

#
# Create a distribution file release
#
file-release:
@if [ "$(VER)" = "" ]; then echo 1>&2 "VER must be set to version number!"; exit 1; fi
        @echo "(Just hit the return key when prompted for CVS password)"
        cvs -d :pserver:anonym...@cvs.sf.net:/cvsroot/aolserver login
cd /tmp && cvs -d :pserver:anonym...@cvs.sf.net:/cvsroot/aolserver co -rv$(VER_) -d$(MODNAME)-$(VER) $(MODNAME) && tar cf - $(MODNAME)-$ (VER) | gzip -c > $(MODNAME)-$(VER).tar.gz
        echo "--- FILE RELEASE is: /tmp/$(MODNAME)-$(VER).tar.gz"

endif

On Jul 17, 2009, at 6:46 AM, Maurizio Martignano wrote:

Could I have copy of your Makefile?

Thanks in advance,
Maurizio


-----Original Message-----
From: AOLserver Discussion [mailto:aolser...@listserv.aol.com] On Behalf Of
Prem Thomas
Sent: 17 July 2009 00:41
To: AOLSERVER@LISTSERV.AOL.COM
Subject: Re: [AOLSERVER] nsopenssl fails to load

Maurizio,

Thanks for the reply. A Win32 OpenACS....!

I checked my build directory (below) and it has all the files you
mentioned.

I think this is a problem with loading and linking on Solaris.

drwxr-xr-x  6 root root      26 Jul 15 23:54 .
drwxr-xr-x 16 root root      26 Jul 15 23:50 ..
drwxr-xr-x  2 root root       6 Jul 15 23:50 CVS
-rw-r--r--  1 root root   40468 Nov 20  2004 ChangeLog
-rw-r--r--  1 root root    3981 Nov 20  2004 Makefile
-rw-r--r--  1 root root   15485 Aug 25  2004 README
-rw-r--r--  1 root root    2172 Apr  9  2004 TODO
drwxr-xr-x  3 root root       6 Jul 15 23:50 ca
-rw-r--r--  1 root root    1450 Jun 23  2004 defaults.h
drwxr-xr-x  3 root root       3 Jul 15 23:50 docs
-rw-r--r--  1 root root   13877 Jun 16  2004 https.tcl
-rwxr-xr-x  1 root root 1312755 Jul 15 23:51 libnsopenssl.so
-rw-r--r--  1 root root    8538 Oct 27  2004 nsd.tcl
-rw-r--r--  1 root root   30910 Nov 20  2004 nsopenssl.c
-rw-r--r--  1 root root   11117 Mar 28  2006 nsopenssl.h
-rw-r--r--  1 root root   12496 Jul 15 23:51 nsopenssl.o
-rwxr-xr-x  1 root root   15067 Jul 15 23:54 nsopenssl.so
-rw-r--r--  1 root root   23439 Mar 28  2006 ssl.c
-rw-r--r--  1 root root    8648 Jul 15 23:51 ssl.o
-rw-r--r--  1 root root   51954 Mar 28  2006 sslcontext.c
-rw-r--r--  1 root root   17484 Jul 15 23:51 sslcontext.o
-rw-r--r--  1 root root   56427 Jun 13  2004 tclcmds.c
-rw-r--r--  1 root root   24404 Jul 15 23:51 tclcmds.o
drwxr-xr-x  3 root root      18 Jul 15 23:50 tests
-rw-r--r--  1 root root    9446 Apr 13  2004 x509.c
-rw-r--r--  1 root root    5804 Jul 15 23:51 x509.o

-Prem Thomas

On Jul 16, 2009, at 8:54 AM, Maurizio Martignano wrote:

Hello Thomas,
        the variable you seem to be missing

Tcl_HashTable NsOpenSSLServers;

is declared inside the file

sslcontext.c


From the errors you're getting I believe you have not included this
file in
your build.

I'm currently working on providing my Win32-OpenACS

http://www.friendlybits.com/en/inf_tec_en/win32openacs_en/

distribution with HTTPS/SSL support and up to now I didn't find any
problem
whatsoever.

Of course I'm using makefiles and development tools different from
yours,
anyhow I believe you should make sure the following files are
included in
your build:

nsopenssl.c
ssl.c
sslcontext.c
tclcmds.c
x509.c

Hope this helps,
Maurizio



-----Original Message-----
From: AOLserver Discussion [mailto:aolser...@listserv.aol.com] On
Behalf Of
Prem Thomas
Sent: 16 July 2009 01:28
To: AOLSERVER@LISTSERV.AOL.COM
Subject: [AOLSERVER] nsopenssl fails to load

I'm having trouble loading nsopenssl with AOLserver 4.5.1.  Despite
multiple attempts to address the problem, I'm going nowhere. Details
below. I'd greatly appreciate advice.  --Prem Thomas

Details
=======

64-bit x86
OpenSolaris (Nexenta: SunOS 5.11 kernel with a Ubuntu Hardy 8.04
userland)
AOLserver 4.5.1
TCL 8.5.7
OpenSSL 0.9.8k
nsopenssl 3.0.b26
GNU Make 3.81
gcc (GCC) 4.2.3 (Ubuntu 4.2.3-2nexenta7)

Both OpenSSL and nsopenssl built successfully. When I start
AOLserver, I get this fatal error:

[12/Jul/2009:23:26:14][1142.1][-main-] Notice: modload: loading '/ usr/
local/aolserver/bin/nsopenssl.so'
[12/Jul/2009:23:26:14][1142.1][-main-] Warning: modload: could not
load /usr/local/aolserver/bin/nsopenssl.so: ld.so.1: nsd: fatal:
relocation error: file /usr/local/aolserver/bin/nsopenssl.so: symbol
NsOpenSSLServers: referenced symbol not found
[12/Jul/2009:23:26:14][1142.1][-main-] Fatal: modload: failed to load
module '/usr/local/aolserver/bin/nsopenssl.so'


After googling around, and reading this: http://openacs.org/forums/
message-view?message_id=51691
I tried building nsopenssl with the -Bstatic flag:

# make install OPENSSL=/usr/local/ssl AOLSERVER=${NS} MODLIBS="-
Bstatic -L${OPENSSL}/lib -lssl -lcrypto -L/usr/lib/gcc/i386-pc-
solaris2.11/4.2.3 -lgcc"

Same error.


I also tried rebuilding OpenSSL with the no-asm config option:

# ./Configure solaris-x86-gcc no-asm

Build succeeded and I rebuilt nsopenssl. But I still get the same
error.


I tried rebuilding nsopenssl with make CC="gcc -fPIC" but this
produced errors:

shlib_target=; if [ -n "" ]; then \
                 shlib_target="solaris-shared"; \
         elif [ -n "" ]; then \
           FIPSLD_CC=gcc -fpic; CC=../fips/fipsld; export CC
FIPSLD_CC; \
         fi; \
         LIBRARIES="-L.. -lssl  -L.. -lcrypto" ; \
         [ "x" = "xlibfips" ] && LIBRARIES="$LIBRARIES -lfips"; \
         make -f ../Makefile.shared -e \
                 CC=${CC} APPNAME=openssl OBJECTS="openssl.o verify.o
asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o
errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o
ec.o ecparam.o x509.o genrsa.o gendsa.o s_server.o s_client.o speed.o
s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o
ciphers.o nseq.o pkcs12.o pkcs8.o spkac.o smime.o rand.o engine.o
ocsp.o prime.o cms.o" \
                 LIBDEPS=" $LIBRARIES -lsocket -lnsl -ldl" \
                 link_app.${shlib_target}
make[2]: Entering directory `/usr/local/src/openssl-0.9.8k/apps'
make[2]: pic: No such file or directory
make[2]: *** No rule to make target `pic'.  Stop.


I tried adding extra paths to LD_LIBRARY_PATH, but to no avail.

#echo $LD_LIBRARY_PATH
/usr/local/src/aolserver45/nsopenssl:/usr/local/pgsql/lib:/usr/local/
ssl/lib:/usr/local/aolserver/lib:/usr/lib/gcc/i386-pc-
solaris2.11/4.2.3:


Here's a grep of the symbol in the source and aolserver directories:

# grep -r NsOpenSSLServers /usr/local/src/aolserver45/nsopenssl
Binary file ./nsopenssl.o matches
./sslcontext.c:Tcl_HashTable NsOpenSSLServers;
./sslcontext.c:    hPtr = Tcl_FindHashEntry(&NsOpenSSLServers,
server);
./nsopenssl.c:extern Tcl_HashTable NsOpenSSLServers;
./nsopenssl.c:        Tcl_InitHashTable(&NsOpenSSLServers,
TCL_STRING_KEYS);
./nsopenssl.c:    hPtr = Tcl_CreateHashEntry(&NsOpenSSLServers,
server, &new);
Binary file ./nsopenssl.so matches
Binary file ./libnsopenssl.so matches
Binary file ./sslcontext.o matches

# grep -r NsOpenSSLServers /usr/local/aolserverBinary
file /usr/local/aolserver/bin/nsopenssl.so matches
Binary file /usr/local/aolserver/lib/libnsopenssl.so matches


I also tried ldd -d (see http://docs.sun.com/app/docs/doc/
806-1075/6jacsnimr?a=view)

#ldd -d /usr/local/aolserver/bin/nsd
         libnsd.so =>     /usr/local/aolserver/lib/libnsd.so
         libnsthread.so =>        /usr/local/aolserver/lib/
libnsthread.so
         libtcl8.5.so =>  /usr/local/aolserver/lib/libtcl8.5.so
         libdl.so.1 =>    /lib/libdl.so.1
         libsocket.so.1 =>        /lib/libsocket.so.1
         libpthread.so.1 =>       /lib/libpthread.so.1
         libm.so.2 =>     /lib/libm.so.2
         libgcc_s.so.1 =>         /lib/libgcc_s.so.1
         librt.so.1 =>    /lib/librt.so.1
         libc.so.1 =>     /lib/libc.so.1
         libnsl.so.1 =>   /lib/libnsl.so.1
         libmp.so.2 =>    /lib/libmp.so.2
         libmd.so.1 =>    /lib/libmd.so.1
         libscf.so.1 =>   /lib/libscf.so.1
         libuutil.so.1 =>         /lib/libuutil.so.1
         libgen.so.1 =>   /lib/libgen.so.1


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject:
field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <lists...@listserv.aol.com> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to