Forum OpenACS Q&A: OpenBSD 2.8 + AOLserver compile problem

I am trying to do a "proof-of-concept" test using OpenBSD 2.8,
PostgreSQL 7.0.2 and AOLserver 3.2 or 3.3 under a vm using VMWare.

The problem I have been encountering is gettin AOLserver to compile.
I've never had problems under Linux, but the compile dies with the
following error:

[...clipped...]
creating ./config.status
creating Makefile
creating tclConfig.sh
(cd /home/jps3/packages/AOLServer/aolserver3_2/tcl8.3.2/unix; gmake
CFLAGS='-g
-I../include -D_REENTRANT -pthread -D_THREAD_SAFE -DHAVE_CMMSG=1
-DUSE_DLSYMPREFIX=1 -DUSE_RTLD_LAZY=1 -DNO_TIMEZONE=1 -DHAVE_TIMEGM
-DUSE_TCL8X -Dfork=ns_fork
-Dreaddir=ns_readdir -Dgmtime=ns_gmtime -Dsignal=ns_signal
-Dlocaltime=ns_localtime' libtcl8.3g.a)
gmake[2]: Entering directory
`/home/jps3/packages/AOLServer/aolserver3_2/tcl8.3.2/unix'
gmake[2]: *** No rule to make target `libtcl8.3g.a'.  Stop.
gmake[2]: Leaving directory
`/home/jps3/packages/AOLServer/aolserver3_2/tcl8.3.2/unix'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory
`/home/jps3/packages/AOLServer/aolserver3_2/tcl8.3.2'
g

  I can't figure out why it keeps failing at that one point. I am
*very* rusty with [g]make at this time, and could use a pointer here
as to what to look for.

  Thanks!

-Jason

Collapse
Posted by Patrick Giagnocavo on
I have had problems with AS3.2 as well when trying to compile
under OpenBSD.

The problem appears to stem from making the tcl8.3.2 runtime,
rather than the AOLserver bits.

I hacked around the sources as best I could, but then found that
compiling mod_aolserver (which runs perfectly under the stock
Apache shipped with OBSD) was simply easier...while
performance dropped somewhat, at least as measured by "ab",
30 to 35 db backed hits per second on an EIDE based PII-350 is
fast enough for me.

Collapse
Posted by Connie Hentosh on
Question regarding your setup:  I tried installing OpenBSD under VMWare and was having trouble with the NIC interface.  I can't remember if it was 2.7 or 2.8 that I was attempting. Did you have any issues with the network interface and if you did ... what was your workaround?

did you install via FTP or CDROM?

Collapse
Posted by Jason Stanford on
Yes, the problem lies with the compilation of the tcl8.x part, but that seems to be one of the *first* things being compiled (after the 7.x part).

*** No rule to make target `libtcl8.3g.a'. Stop.

I've been going through the Makefile(s) trying to find where this file 'libtcl8.3g.a' is defined or even a general '.a' but cannot.

Frustrating. Apparently it worked for OBSD 2.5, wonder what changed since then?

Collapse
Posted by Jason Stanford on
Ah ha! (Sort of...)

In the file <aolserver_root>/include/Makefile.global, I changed line #291 from 'TCL8X_LIB=libtcl8.3g.a' to 'TCL8X_LIB=libtcl83g.a' which seems to have gotten past the first error I mentioned.

  However, now I'm seeing linker errors:

    gcc -pthread -Wl,-E -o test test.o  ../thread/libnsthread.a
    ld: invalid command option `-E'

  Checking the man pages for 'ld' under both Linux and OpenBSD that only the Linux linker (GCC, I assume) has the '-E' option which is the same as '--export-dynamic', but the OpenBSD 'ld' man page does not list '-E' as a valid option.

  I see several '-B...' options such as '-Bdynamic'. If anyone has greater *BSD knowledge would this be a valid substitute? (Not such much that it would just compile, but is this overall a valid translation from a "linux" linker option to an "openbsd" linker option call?)

  Thanks.
                                              

Collapse
Posted by Jason Stanford on

Sorry for the plethora of replies to my own question here, but I think I've figured it out. I finally got it to compile w/o error. If I do a command line as user 'nsadmin' (a la ACS installs):

nsadmin:~$ ./bin/nsd -f -t sample-config.tcl
<...snipped...>
[06/Feb/2001:15:00:10][31314.991232][-main-] Notice: nsmain: AOLserver/3.2 running
[06/Feb/2001:15:00:10][31314.991232][-main-] Notice: nsmain: security info: uid=1003, euid=1003, gid=1003, egid=1003
Segmentation fault

However, when I did:

root:~nsadmin# ./bin/nsd -u nsadmin -g nsadmin -f -t sample-config.tcl

It worked... the first time, now I just keep getting segfaults. Grrr. Possibly not quite "perfect" with the linker options yet?

-Jason

P.S. Here's the mods I made to aolserver3_2/include/Makefile.global:


--- include/Makefile.global     Sat Oct  7 15:08:42 2000
+++ include/Makefile-OpenBSD2_8.global  Tue Feb  6 14:58:05 2001
@@ -8,8 +8,8 @@
 
 #
 # Installation locations.
-#
-PREFIX       =   /usr/local/aolserver
+#PREFIX       =   /usr/local/aolserver
+PREFIX       =   /home/nsadmin
 INST         =   $(PREFIX)
 INSTBIN      =   $(INST)/bin
 INSTLIB      =   $(INST)/lib
@@ -220,7 +220,8 @@
 ifeq (OpenBSD,$(shell uname))
     PLATFORM=openbsd
     CFLAGS+=-pthread -D_THREAD_SAFE
-    LDFLAGS+=-pthread -Wl,-E
+    #LDFLAGS+=-pthread -Wl,-E
+    LDFLAGS+=-pthread -Wl,-Bdynamic
     RANLIB=ranlib
     CFLAGS+=-DHAVE_CMMSG=1 -DUSE_DLSYMPREFIX=1 -DUSE_RTLD_LAZY=1
     CFLAGS+=-DNO_TIMEZONE=1 -DHAVE_TIMEGM
@@ -288,7 +289,8 @@
 #    Note:  Tcl 7.6 on *BSD has a different name for no apparent reason.
 #
 TCL8X_DIR=tcl8.3.2
-TCL8X_LIB=libtcl8.3g.a
+#TCL8X_LIB=libtcl8.3g.a
+TCL8X_LIB=libtcl83g.a
 TCL76_DIR=tcl7.6
 ifeq (bsd, $(findstring bsd, $(PLATFORM)))
   TCL76_LIB=libtcl76.a


#eof