Compiling Psys

This document assumes you are compiling the Psys libraries for one of the currently supported machines, and that you have the required support software detailed in this document. This document also assumes that you have uncompressed and untarred the Psys file, and installed it in the chipmunk directory.

Begin by descending to the psys/src directory. At this point OS/2 users only should execute the following command.

cp Makefile.os2 Makefile

All users should now edit the Makefile, and make any necessary changes. Comments in the Makefile will guide you through these changes; the changes are labeled with the markers (1), (2), (3), etc. Once these changes are made, execute the command

make install

If things are working correctly, a long series of compilations, linkings, and file movements should occur without error. When these operations complete, Psys is successfully installed.

Problems and Solutions

It is quite possible that compilation did not proceed smoothly. Here are some problems that could have happened, along with suggestions.

ANSI header problems
Sometimes, not all the /usr/include/*.h files are ANSI standard, especially in older machines. Symptoms of this problem include mention of the stdlib.h and stddef.h header files in the compilation error message, and mention of the _SIZE_T and _PTRDIFF_T defines in the compilation error message. There are several possible solutions to this problem.
Ranlib problems
On some systems, it may be necessary to run ranlib on the file libp2c.a for linking to be successfull.
Font problems
The Chipmunk system expects the X fonts 8x13and 6x10 to be available. Some minimal systems don't have these. If you don't have them, edit the section of the psys Makefile that configures the default fonts, and change the definitions to be similarly-sized fonts that are in your system.
Gcc installation problems
Sometimes Gcc is installed incorrectly in a system, and the Chipmunk tools are the first program that reveal the incorrect installation. Examples problems include Gcc using the cc preprocessor instead of its own preprocessor, and Gcc is looking in the wrong place for include files. When compiling the Chipmunk tools, a symptom of these problems often involves problems with accessing the system include file varargs.h.
Putc definition problems (Linux users only)
The putc definition in newcrt.c is set up for the current Slackware distribution of Linux. If newcrt.c does not compile for you under Linux, search in newcrt.c for the word dreaded for more information.
Make hangs (OS/2 users only)
Be sure to use nmake, not make.
If these suggestions don't help you compile Psys, I'd be happy to offer suggestions; press here for more information about asking for help.
Email
john [dot] lazzaro [at] gmail [dot] com