KadC - P2P library






KadC has been successfully built and tested on the following platforms:

Cygwin tools, either in POSIX or WIN32 (MinGW) mode. In the second case, the Pthreads for Win32 package from RedHat needs to be installed (see the Makefile for the details). The commands to build library (KadC.a) and test executable are:
POSIX mode:
make MAIN=KadC
Note: Recently, probably after upgrading to the version 1.5.11 of the Cygwin library, this port stopped working: typically, when a thread dies it takes down the whole process. This issue does not affect any other platform, including WIN32, and is currently (Oct 10, 2004) being investigated.
WIN32 mode (i.e., --no-cygwin a.k.a. MinGW):
make MAIN=KadC WIN32=1
Note: Compiling for Win32 result in signals NOT interrupting Pending I/O. The KadC application, for instance, after receiving Ctrl-C from keyboard does not shut down until a CR is issued to complete the console input.
Note: the SIGTERM console termination signal is properly caught only if the program is started from a plain command window (a.k.a. DOS box), or from a Cygwin window running /bin/sh; if the shell is bash, and a Ctrl-C is issued on the keyboard, the program is ungracefully terminated anyway. This seems to be caused by a bug in the Cygwin version of bash, and is bad because the INI file is not updated on exit. No attempt is made to catch the WIN32-only SIGBREAK, (issued when  the user hits Ctrl-break on the keyboard) and, as a result, that signal always aborts the process ungracefully, even if the program is started from a plain command window.
Linux RedHat 7.0, either with native pthreads or GNU Pth 2.0.1:
make MAIN=KadC

NetBSD with GNU Pth:
make MAIN=KadC
Note: See below for considerations about the usage of GNU Pth.

MacOS X:
make MAIN=KadC

External components requirements: KadC requires zlib and a POSIX threads package. The latter may be replaced by the GNU Pth package built passing to its ./configure the option --enable-pthread. The option --enable-syscall-hard is not required by the library, but it may be by the end user's calling program if the latter contains blocking I/O calls (see Pth's docs for the details). Also, KadC's Makefile may need minor changes to add to a -I option for the directory containing Pth's pthread.h, a -L option for the directory containing Pth's libpthread.a, and reference the directory containing libpthread.so so that the loader knows where to find it at runtime (a simple way is to listing it in /etc/ld.so.conf and run ldconfig).

© 2004 by Enzo Michelangeli