Problems in compilation & Portabillity
--------------------------------------

Compiler:
	Lndbase requires gcc to compile. It uses gcc extensions and will
	probably have problems with other compilers.

	Note that in many linux distributions, gcc is actually gcc-2.7.2
	because this version is safe to compile the linux kernel.
	Egcs should also be available as `g++'. It is better to use egcs
	as your default C compiler. If that's the case, go to /usr/bin
	type 'ln -s g++ egcs' (provided that `egcs' is not available), and
	edit the Makefiles to change 'CC = gcc' to 'CC = egcs'.

OS:
	It has been tested on Linux. It should run however on any UNIX-like
	operating system.
	The operating system must provide mmap () and SYSV semaphores.

poll:
	The system's libc must provide the system call poll().
	The man page of poll sais : 
	``The poll() system call was introduced in Linux 2.1.23. The
	 poll() library call was introduced in libc 5.4.28 (and 
	 provides emulation using select() if your kernel does not have
	 a poll syscall)''
	CONFORMING TO: XPG4-UNIX
	Now your OS may not have a poll syscall but your libc may
	provide it. It's a lot easier than select.
	GNU C Library also provides poll.
	If you do not have poll, hacking the file client.c to use
	select is the only solution...
	glibc sources have a poll emulation code at sysdeps/unix/bsd/poll.c

Libs:
	The only library required is support for POSIX threads.
	If you do not have a POSIX threads library, it's possible to edit
	the file src/kernel/config.h and comment out the line 
	``#define MULTITHREADED''. The only mode available then will be
	single-user on stdin/stdout.

Arch:
	The default makefiles have the '-m486' gcc option, if you have a
	different CPU this will have to be removed.
	If your system is 32-bit, there should be no problems.
	For 64-bit architectures there _may be nasty problems, they also
	may not.

Troubleshooting
---------------

Ok, so it refuses to compile and you know little about hacking.
The most possible problem is finding header files and linking with the
correct libaries.

First of all.

Type ``make clean''
And then ``make &> Rez''

Now we study the file ``Rez''.

1) Check for any warnings.
   We care about warnings on "implict declaration of ...".
   Such warnings say that we request to use a function but the compiler
   didn't find that function.

   Remember the function name.
   Go to /usr/include and type ``grep <function name> *.h''
   Our goal is to find where the missing function is declared and then
   edit the source and add a line "#include <headerfile.h>" to it.

   If the function wasn't found the last option is to use
   ``find /usr/include -name \*.h -print | xargs grep <function name>''
   If still not found then it may not exist.

2) If at the end of the ``Rez'' file there are lines saying something like
   "/tmp/KLFDSAK/: undefined reference to ..."
   Then there is a problem with a library missing.

   First we have to find the library.
   One way to do that is go to possible library locations (/lib, /usr/lib)
   With the system utility ``nm'' we can see what functions a library
   contains. Try searching various libraries for the one which has the
   missing function.

   Once found, edit the Makefile and at the begining there is a line which
   has a `-lpthread' option. This for example sais : 
   "Use the library libpthread".
   In the same way add the library with the '-l' switch.

3) Send me mail at axanth@tee.gr
