Vinod Kurup

Hospitalist/programmer in search of the meaning of life

Jan 15, 2004 - 3 minute read - Comments - mac-os-x openacs software

Compiling OpenFTS on Mac OS X

It wasn’t easy, but I finally got OpenFTS-0.3.2-tcl to compile on Mac OS X (10.2.8). I started by reading the excellent Mac OS X porting guides from Fink and Apple. Unfortunately, the OpenFTS Makefile and configure scripts aren’t standard, so I had to muck around with things alot. Here’s the diff:

diff -U 2 -rbB Search-OpenFTS-tcl-0.3.2/aolserver/Makefile  Search-OpenFTS-tcl-0.3.2-vk/aolserver/Makefile 
--- Search-OpenFTS-tcl-0.3.2/aolserver/Makefile	Tue Nov 19 14:24:44 2002 
+++ Search-OpenFTS-tcl-0.3.2-vk/aolserver/Makefile	Wed Jan 14 23:23:13 2004 
@@ -13,6 +13,6 @@  
OBJ       = $(SOBJ) $(POBJ) $(OOBJ) nsfts.o  NSFTSLIB  = -LDSO      
= gcc -shared  INC       = -I../include -I$(NS_HOME)/include -I$(NS_HOME)/nsd +MODLIBS += -L/sw/lib -L/usr/local/aolserver/lib -ltcl8.4 -lnsd    .SUFFIXES: .c .h .so .l @@ -26,5 +26,5 @@    $(NSFTSLIB): $(OBJ) -	$(LDSO) $(OBJ) $(LIBS) -o $(NSFTSLIB) +	$(LDSO) $(OBJ) $(LIBS) -o $(NSFTSLIB) $(MODLIBS)    clean: diff -U 2 -rbB Search-OpenFTS-tcl-0.3.2/configure Search-OpenFTS-tcl-0.3.2-vk/configure --- Search-OpenFTS-tcl-0.3.2/configure	Tue Nov 19 14:24:44 2002 +++ Search-OpenFTS-tcl-0.3.2-vk/configure	Wed Jan 14 22:36:44 2004 @@ -2771,4 +2771,16 @@  fi   +# +# Mac OS X 10.2 +# +# vinodk: not sure if all of this is needed/accurate +if test `uname` = "Darwin"; then +    PLATFORM="osx" +    CC="cc" +    LD="cc" +    CFLAGS="$CFLAGS -no-cpp-precomp" +    LDSO="$LD -flat_namespace -bundle" +fi +  if test $PLATFORM = "unknown"; then          { { echo "$as_me:2774: error: unknown platform" >&5 

Then, follow the instructions in AOLSERVER.INSTALL. I’m not too handy with this Makefile/configure stuff, so I’d appreciate any guidance on how to do this properly :-).

Comments from old site

Doesn't compile on Panther

Hi Vinod,

Your fix for makefile doesn't seem to be working on Panther. Configure script goes through but when compiling I get the following error:

cc -o -shared Parser.o deflex.o flexparser.o
cc: unrecognized option `-shared'
ld: Undefined symbols:
make[1]: *** [] Error 1
make: *** [parser] Error 2

I'll keep on searching for what should be changed and will keep you posted. Otherwise thanks for spending your time on OS X issues.

Jarkko Laine 2004-02-19 02:31:53

-shared option not supported

OK, from apple dev docs:

In GCC 2, generates shared liibraries. In GCC 3, this option is not supported, so you should use libtool (or use ld directly) instead. Shared libraries in Mac OS X may be different from those you are accustomed to on other platforms. See “Dynamic Libraries and Plug-ins”.

Don't know how to fix this in this case, though.

Jarkko Laine 2004-02-19 02:57:33


Hey Jarkko,

I think you're trying to compile all of OpenFTS and that doesn't work (at least I haven't tried to get it to work). I just wanted to compile the module, which is all that you need for OpenACS. So, instead of doing make in the Search-OpenFTS-tcl-0.3.2 directory, cd aolserver and do the make there.

I think if you follow the directions in the AOLSERVER.INSTALL file, it'll work.

Vinod Kurup 2004-02-19 23:50:27


Thanks, Vinod,

You're right. I actually thought I was running the make in aolserver dir, but now that I retried it there, it went through smoothly :o)

Jarkko Laine 2004-02-20 01:42:53

Installing OpenACS via Darwinports Christmas Break

comments powered by Disqus