[gambit-list] Gambit under QNX 4.25

Кириенко Олег oleg-n-k at mail.ru
Mon Aug 15 16:12:16 EDT 2011


Thank you for your answer. Your script was usefull to move forward.

I have also added:

echo "#ifndef ___CHAR_WIDTH"                   >> include/gambit.h
echo "#define ___CHAR_WIDTH 8"             	   >> include/gambit.h
echo "#endif"                                  >> include/gambit.h

echo "#ifndef ___SHORT_WIDTH"                  >> include/gambit.h
echo "#define ___SHORT_WIDTH 16"                >> include/gambit.h
echo "#endif"                                  >> include/gambit.h

echo "#ifndef ___INT_WIDTH"                    >> include/gambit.h
echo "#define ___INT_WIDTH 32"                 >> include/gambit.h
echo "#endif"                                  >> include/gambit.h

echo "#ifndef ___LONG_WIDTH"                   >> include/gambit.h
echo "#define ___LONG_WIDTH 32"                >> include/gambit.h
echo "#endif"                                  >> include/gambit.h

echo "#ifndef ___LONGLONG_WIDTH"               >> include/gambit.h
echo "#define ___LONGLONG_WIDTH 32"            >> include/gambit.h
echo "#endif"                                  >> include/gambit.h

echo "#ifndef ___FLOAT_WIDTH"                  >> include/gambit.h
echo "#define ___FLOAT_WIDTH 32"               >> include/gambit.h
echo "#endif"                                  >> include/gambit.h

echo "#ifndef ___DOUBLE_WIDTH"                 >> include/gambit.h
echo "#define ___DOUBLE_WIDTH 64"              >> include/gambit.h
echo "#endif"                                  >> include/gambit.h

And I had a problem with wchar_t so I have added -D___DONT_HAVE_WCHAR_H

Now I have a problem with S64/U64 because Watcom 10.6 (the only compiler available) on QNX doesn't support long long and any other 64 bit values.

Is it possible build without 64bit?


15 августа 2011, 01:21 от Marc Feeley <feeley at iro.umontreal.ca>:
> 
> 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

--
Все возможности @Mail.Ru в твоем мобильном.
Просто зайди с телефона на m.mail.ru


More information about the Gambit-list mailing list