The chat2.pl problems are history. Wais.pm uses the IO extension for
perl5 now. The perl distributions starting from version 5.003_01 do
contain this extension. For older Perl versions, get
GBARR/IO-1.12.tar.gz or later from CPAN.
Also you need the freeWAIS-sf-2.0 distribution with patchlevel >=
46. Any version must be compiled with LOCAL_SEARCH enabled.
There are two ways to build this extension:
1) Using the freeWAIS-sf source directory
2) Using the installed libraries
Untar the waisperl tarfile outside the perl source tree.
1) Building using the freeWAIS-sf source directory
==================================================
For compilation the source directory of freeWAIS-sf is used. For the
tests the test database in the freeWAIS-sf source directory is
used. So recreate it if you cleaned there.
Edit Makefile.PL and customize it with the name of your freeWAIS-sf
source directory. 'perl Makefile.PL' will ask you for the directory if
you did not do that. (Hopefully, you didn't blow the latter away after
compiling freeWAIS-sf. :))
2) Building using the installed libraries
=========================================
Currently no pubic version of freeWAIS-sf installes all the needed
library and include files. So there is some work to do before you
start. But installation from the installed linbrary allowes you to
remove the freeWAIS-sf source tree from you hard disk. You should keep
your test database (from the FIELD-EXAMPLE subdirectory) arround if
you want ot run the tests. The sources and format files should fit
into 10k bytes ;-)
This version of the WAIS extension comes with a script which you
should use to generate a 'wais.h' include file in the 'ir'
subdirectory of the freeWAIS-sf source tree:
Do not use '-I../ctype' if you did use your systems ctypes when
compiling freeWAIS-sf. Generally you can use the same flags as you did
when compiling the sources of freeWAIS-sf. Only '-I' flags are used.
If you want to use this alternative, make sure that the compiler can
find the 'wais.h' and the linker can find the freeWAIS-sf libraries.
Here is a complete receipe which works for freeWAIS-sf-2.0.6* and
freeWAIS-sf-2.1.1:
If you used the freeWAIS-sf ctypes you might get lots of warnings. To
avoid them, generate an empty ctype.h
,-----
| touch ctype.h
`-----
and add -I. to the CFLAGS.
1,2) After that proceed as you would with most perl extensions.
===============================================================
Then run 'perl Makefile.PL'. For building a dynamic extension use
make; make test; make install
For building a perl with the wais extensions statically linked use
make waisperl; make test_static;
See the documentation of MakeMaker for details. Run
perldoc ExtUtils::MakeMaker
If you don't have acces to the internet, the output of 'make test'
will look like this:
,-----
| t/basic.............Use of uninitialized value at t/basic.t line 85.
| Use of uninitialized value at t/basic.t line 86.
| FAILED tests 3-4
| Failed 2/4 tests, 50.00% okay
| t/dict..............ok
| t/ndict.............ok
| t/parallel..........Use of uninitialized value at /usr/local/lib/perl5/Socket.pm line 239.
| Can't use an undefined value as an ARRAY reference at t/parallel.t line 104.
| dubious
| Test returned status 32 (wstat 8192)
| Failed Test Status Wstat Total Fail Failed List of failed
| ------------------------------------------------------------------------------
| t/basic.t 4 2 50.00% 3-4
| t/parallel.t 32 8192 6 ?? % ??
| Failed 2/4 test scripts, 50.00% okay. 6/33 subtests failed, 81.82% okay.
`-----