[gambit-list] Gambit under QNX 4.25

Marc Feeley feeley at iro.umontreal.ca
Sun Aug 14 17:21:08 EDT 2011


On 2011-08-14, at 4:48 AM, Кириенко Олег wrote:

> Hi,
> 
> I have tried to compile Gambit under QNX 4.25 (not QNX 6) and get error during configure stage
> 
> checking for sys/types.h... /tmp/sh23124234: cannot open file (No such file or directory).
> 
> It seems that configure script doesn't run properly in QNX 4.25 which is very limited realtime POSIX system.
> 
> I have a general question is it possible to build Gambit in system:
> 
> 1. that doesn't support automake/autoconf properly
> 
> 2. that does not have so/dll 
> 
> 3. that doesn't have threads (pthread for instance)
> 
> Is it possible to write manually config.h is such a way?
> 
> In general I want to develop under Linux but run/test everything under QNX 4.25.
> 
> QNX 4.25 supprorts tcp/ip sockets so this is the only requirement for me except standart c functions.
> 
> Oleg.

Yes Gambit can be built without the configure script, but it requires the programmer to supply some information on the platform.  Gambit can be built with the strict minimum C libraries: stdio (for fopen, fread, etc) and stdlib (for malloc/free), but then of course many features will not be available.

Basically, you have to compile and link the .c files in lib/ and gsi/ to get the executable interpreter (gsi.exe).  Similarly, with gsc/ to get the executable compiler (gsc.exe).

The configure script creates the files include/gambit.h and include/config.h which define symbols and macros describing the characteristics of the platform (available C header files, operating system type, pointer width, etc).

include/gambit.h is basically a copy of include/gambit.h.in with a 2 placeholders replaced with the appropriate definition (width of a void* pointer, and the size of Scheme characters).  include/config.h is include/config.h.in where some of the symbols are #define'd rather than #undef'ined (like HAVE_SIGNAL_H, HAVE_STDLIB_H, etc).

I've included the script build.sh which creates vanilla gambit.h and config.h files that should work on most systems (but this will disable many operating system features, like sockets, access to time functions, subprocesses, etc).  You'll have to tweak the script to create a config.h file with the definitions of HAVE_XXX symbols which are appropriate for QNX.  If you define HAVE_WAITPID in config.h, the code will assume that QNX is a POSIX system (which it probably is) and will include support for many features which are possible with POSIX.

There are other similar build scripts in misc/ (for Windows and other systems).  There is however a high likelihood of bit rot in those scripts because I don't keep them in sync with the latest patches.

Marc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.sh
Type: application/octet-stream
Size: 2729 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20110814/3f23ddd3/attachment.obj>
-------------- next part --------------



More information about the Gambit-list mailing list