Update for QNX.
This commit is contained in:
parent
8d49a6608a
commit
4cb1fb6f59
@ -1,18 +1,14 @@
|
||||
PostgresSQL on QNX 4
|
||||
--------------------
|
||||
|
||||
PosgresSQL 6.5.2 could be ported to QNX 4.25.
|
||||
|
||||
This port is an important step because PostgreSQL is now the only free
|
||||
relational database with full SQL and ODBC support available for QNX 4.
|
||||
The only commercial databases available are Empress RDBMS and Velocis
|
||||
Database Server (not supported for Digital Unix).
|
||||
|
||||
The most expensive topics where the emulation of System V semaphore sets,
|
||||
The most effort required the emulation of System V semaphore sets,
|
||||
shared memory and IPC and of some IEEE floating-point functionality. For
|
||||
the Watcom compiler spinlocks have been implemented using POSIX semaphores.
|
||||
A lot of make files had to be changed because $(LD) doesn't support the
|
||||
-r option on QNX 4.
|
||||
|
||||
It is recomended to use the GNU C compiler instead of the Watcom compiler
|
||||
because the Watcom compiler doesn't support a int8 datatype (long or
|
||||
@ -24,7 +20,7 @@ have to be made which are not described here.
|
||||
|
||||
QNX 4 does not offer native support of shared libraries. Therefore the related
|
||||
functionality cannot be used. Shared library support could probably be
|
||||
implemented.
|
||||
implemented in future.
|
||||
|
||||
QNX 4 does not support UNIX domain sockets. Connections can only be made
|
||||
with TCP/IP sockets. Therefore postmaster must always be started with the
|
||||
@ -36,6 +32,7 @@ Prerequisites:
|
||||
The following prerequisites have been used:
|
||||
|
||||
QNX 4.25
|
||||
Watcom C 10.6
|
||||
GNU make
|
||||
flex-2.5.4a.tar.gz (flex)
|
||||
egcs111-qnx4-r20.tar[.gz] (GNU C)
|
||||
@ -77,25 +74,17 @@ modifications of the code the following links should be made:
|
||||
ln -s /usr/local/bin/perl /usr/local/bin/perl5
|
||||
ln -s /usr/include/errno.h /usr/include/sys/errno.h
|
||||
ln -s /usr/include/ioctl.h /usr/include/sys/ioctl.h
|
||||
ln -s /usr/src/pgsql/src/backend/port/qnx4/ipc.h /usr/include/sys/ipc.h
|
||||
ln -s /usr/src/pgsql/src/backend/port/qnx4/sem.h /usr/include/sys/sem.h
|
||||
ln -s /usr/src/pgsql/src/backend/port/qnx4/shm.h /usr/include/sys/shm.h
|
||||
|
||||
The sources can be unpacked by
|
||||
cd /usr/src
|
||||
gunzip -c postgresql-6.5.2.tar.gz | tar xvf -
|
||||
mv postgresql-6.5.2 pgsql
|
||||
gunzip -c postgresql-6.5.2-qnx4-gcc-patch.tar.gz | tar xvf -
|
||||
|
||||
Furthermore the header files ipc.h, sem.h and shm.h must be installed.
|
||||
They are not available on QNX 4. stl_alloc.h must be modified
|
||||
(extern "C++" { ... }).
|
||||
su
|
||||
cd /usr
|
||||
gunzip -c qnx4-gcc-header-patch.tar.gz | tar xvf -
|
||||
exit
|
||||
Possibly the file
|
||||
For ecgs-2.91.60 the file
|
||||
/usr/local/lib/gcc-lib/i386-pc-qnx4/egcs-2.91.60/include/g++/stl_alloc.h
|
||||
must be copied to the right path in your environment.
|
||||
If this ist the case the path has to be adopted in src/Makefile.custom too
|
||||
(CXXFLAGS).
|
||||
had to be patched (extern "C++" { ... } // extern "C++").
|
||||
See attached patch.
|
||||
|
||||
If you use another ecpg version the include/g++ path in Makefile.qnx4
|
||||
(CXXFLAGS) has to be adopted.
|
||||
|
||||
If all prerequisites are available postgres can be built and installed by
|
||||
cd pgsql/src
|
||||
@ -109,6 +98,23 @@ exit
|
||||
|
||||
All other steps can be carried out as stated in the INSTALL file.
|
||||
|
||||
Make problems:
|
||||
--------------
|
||||
|
||||
Sometimes the Watcom library manager wlib crashes with SIGSEGV on some
|
||||
object files. This is a general problem and not PostgreSQL related.
|
||||
Currently bootstrap.o causes such a crash. The workaround is not to include
|
||||
the object file into the SUBSYS.o but link it directly. For further information
|
||||
see backend/Makefile and backend/bootstrap/Makefile.
|
||||
libpgsql.a currently cannot be generated because of the same problem. But this
|
||||
doesn't matter since shared libraries are not supported.
|
||||
|
||||
Currently yacc fails on interfaces/ecpg/preproc/preproc.y because of
|
||||
exceeded maximum table size. You can generate the preproc.h and preproc.c
|
||||
files on another platform and use them. This is only a problem when you use
|
||||
the current source tree since preproc.h and preporc.c are included in official
|
||||
distributions.
|
||||
|
||||
Regression tests:
|
||||
-----------------
|
||||
|
||||
@ -122,7 +128,7 @@ int8, float4:
|
||||
Exponent expression "e+nnn" instead of "e+nn". Can be ignored.
|
||||
|
||||
float8:
|
||||
Exponent expression "e+nnn" instead of "e+nn" and some slight deviation
|
||||
Exponent expression "e+nnn" instead of "e+nn" and some slight difference
|
||||
in the last digit.
|
||||
Can be ignored.
|
||||
|
||||
@ -143,7 +149,8 @@ Subject of further investigation.
|
||||
|
||||
numeric, numeric_big:
|
||||
ERROR: Cannot create unique index. Table contains non-unique values
|
||||
Subject of further investigation.
|
||||
Subject of further investigation. Probably because of the missing indices
|
||||
these tests take a long time.
|
||||
|
||||
The reached state of this port should be sufficient for lot of applications.
|
||||
|
||||
@ -151,4 +158,31 @@ Have fun!
|
||||
|
||||
Andreas Kardos
|
||||
kardos@repas-aeg.de
|
||||
1999-12-09
|
||||
1999-12-16
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
*** ./stl_alloc.h.orig Sat Feb 28 05:17:28 1998
|
||||
--- ./stl_alloc.h Tue Nov 23 04:14:09 1999
|
||||
***************
|
||||
*** 120,125 ****
|
||||
--- 120,126 ----
|
||||
#pragma set woff 1174
|
||||
#endif
|
||||
|
||||
+ extern "C++" {
|
||||
// Malloc-based allocator. Typically slower than default alloc below.
|
||||
// Typically thread-safe and more storage efficient.
|
||||
#ifdef __STL_STATIC_TEMPLATE_MEMBER_BUG
|
||||
***************
|
||||
*** 682,687 ****
|
||||
--- 683,689 ----
|
||||
# endif
|
||||
|
||||
#endif /* ! __USE_MALLOC */
|
||||
+ } // extern "C++"
|
||||
|
||||
#if defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32)
|
||||
#pragma reset woff 1174
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
# Makefile for the bootstrap module
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.18 1999/12/16 01:25:01 momjian Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.19 1999/12/16 16:52:46 momjian Exp $
|
||||
#
|
||||
#
|
||||
# We must build bootparse.c and bootscanner.c with yacc and lex and sed,
|
||||
@ -32,17 +32,20 @@ endif
|
||||
|
||||
BOOTYACCS= bootstrap_tokens.h bootparse.c
|
||||
|
||||
ifneq ($(PORTNAME), qnx4)
|
||||
OBJS= bootparse.o bootscanner.o bootstrap.o
|
||||
else
|
||||
# wlink crashes with bootstrap.o
|
||||
OBJS= bootparse.o bootscanner.o
|
||||
ifeq ($(PORTNAME), qnx4)
|
||||
# wlink currently crashes with bootstrap.o
|
||||
OBJS1= bootparse.o bootscanner.o
|
||||
endif
|
||||
|
||||
all: SUBSYS.o
|
||||
|
||||
SUBSYS.o: $(OBJS)
|
||||
ifneq ($(PORTNAME), qnx4)
|
||||
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
|
||||
else
|
||||
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS1)
|
||||
endif
|
||||
|
||||
# bootstrap.o's dependency on bootstrap_tokens.h is computed by the
|
||||
# make depend, but we state it here explicitly anyway because
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@
|
||||
# Makefile for port/sparc
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/Makefile,v 1.1 1999/12/16 01:25:06 momjian Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/Makefile,v 1.1 1999/12/16 16:52:52 momjian Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/ipc.h,v 1.1 1999/12/16 01:25:06 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/ipc.h,v 1.1 1999/12/16 16:52:52 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/isnan.c,v 1.1 1999/12/16 01:25:06 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/isnan.c,v 1.1 1999/12/16 16:52:52 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/rint.c,v 1.1 1999/12/16 01:25:06 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/rint.c,v 1.1 1999/12/16 16:52:52 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/sem.c,v 1.1 1999/12/16 01:25:06 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/sem.c,v 1.1 1999/12/16 16:52:52 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/sem.h,v 1.1 1999/12/16 01:25:06 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/sem.h,v 1.1 1999/12/16 16:52:52 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/shm.c,v 1.1 1999/12/16 01:25:06 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/shm.c,v 1.1 1999/12/16 16:52:52 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/shm.h,v 1.1 1999/12/16 01:25:06 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/shm.h,v 1.1 1999/12/16 16:52:52 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
10096
src/backend/port/qnx4/tags
Normal file
10096
src/backend/port/qnx4/tags
Normal file
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/tstrint.c,v 1.1 1999/12/16 01:25:06 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstrint.c,v 1.1 1999/12/16 16:52:52 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/tstsem.c,v 1.1 1999/12/16 01:25:06 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstsem.c,v 1.1 1999/12/16 16:52:52 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/tstshm.c,v 1.1 1999/12/16 01:25:06 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstshm.c,v 1.1 1999/12/16 16:52:52 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.34 1999/12/16 01:25:23 momjian Exp $
|
||||
# $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.35 1999/12/16 16:52:53 momjian Exp $
|
||||
#
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
@ -110,7 +110,6 @@ do
|
||||
echo "----------------------"; \
|
||||
echo "" ) >> regression.diffs
|
||||
echo failed
|
||||
echo "diff ${DIFFOPT} -C3 ${EXPECTED} results/${i}.out"
|
||||
else
|
||||
echo ok
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user