11PostgresSQL on QNX 4
22--------------------
33
4- PosgresSQL 6.5.2 could be ported to QNX 4.25.
5-
64This port is an important step because PostgreSQL is now the only free
75relational database with full SQL and ODBC support available for QNX 4.
86The only commercial databases available are Empress RDBMS and Velocis
97Database Server (not supported for Digital Unix).
108
11- The mostexpensive topics where the emulation of System V semaphore sets,
9+ The mosteffort required the emulation of System V semaphore sets,
1210shared memory and IPC and of some IEEE floating-point functionality. For
1311the Watcom compiler spinlocks have been implemented using POSIX semaphores.
14- A lot of make files had to be changed because $(LD) doesn't support the
15- -r option on QNX 4.
1612
1713It is recomended to use the GNU C compiler instead of the Watcom compiler
1814because the Watcom compiler doesn't support a int8 datatype (long or
@@ -24,7 +20,7 @@ have to be made which are not described here.
2420
2521QNX 4 does not offer native support of shared libraries. Therefore the related
2622functionality cannot be used. Shared library support could probably be
27- implemented.
23+ implemented in future .
2824
2925QNX 4 does not support UNIX domain sockets. Connections can only be made
3026with TCP/IP sockets. Therefore postmaster must always be started with the
@@ -36,6 +32,7 @@ Prerequisites:
3632The following prerequisites have been used:
3733
3834QNX 4.25
35+ Watcom C 10.6
3936GNU make
4037flex-2.5.4a.tar.gz (flex)
4138egcs111-qnx4-r20.tar[.gz] (GNU C)
@@ -77,25 +74,17 @@ modifications of the code the following links should be made:
7774ln -s /usr/local/bin/perl /usr/local/bin/perl5
7875ln -s /usr/include/errno.h /usr/include/sys/errno.h
7976ln -s /usr/include/ioctl.h /usr/include/sys/ioctl.h
77+ ln -s /usr/src/pgsql/src/backend/port/qnx4/ipc.h /usr/include/sys/ipc.h
78+ ln -s /usr/src/pgsql/src/backend/port/qnx4/sem.h /usr/include/sys/sem.h
79+ ln -s /usr/src/pgsql/src/backend/port/qnx4/shm.h /usr/include/sys/shm.h
8080
81- The sources can be unpacked by
82- cd /usr/src
83- gunzip -c postgresql-6.5.2.tar.gz | tar xvf -
84- mv postgresql-6.5.2 pgsql
85- gunzip -c postgresql-6.5.2-qnx4-gcc-patch.tar.gz | tar xvf -
86-
87- Furthermore the header files ipc.h, sem.h and shm.h must be installed.
88- They are not available on QNX 4. stl_alloc.h must be modified
89- (extern "C++" { ... }).
90- su
91- cd /usr
92- gunzip -c qnx4-gcc-header-patch.tar.gz | tar xvf -
93- exit
94- Possibly the file
81+ For ecgs-2.91.60 the file
9582/usr/local/lib/gcc-lib/i386-pc-qnx4/egcs-2.91.60/include/g++/stl_alloc.h
96- must be copied to the right path in your environment.
97- If this ist the case the path has to be adopted in src/Makefile.custom too
98- (CXXFLAGS).
83+ had to be patched (extern "C++" { ... } // extern "C++").
84+ See attached patch.
85+
86+ If you use another ecpg version the include/g++ path in Makefile.qnx4
87+ (CXXFLAGS) has to be adopted.
9988
10089If all prerequisites are available postgres can be built and installed by
10190cd pgsql/src
10998
11099All other steps can be carried out as stated in the INSTALL file.
111100
101+ Make problems:
102+ --------------
103+
104+ Sometimes the Watcom library manager wlib crashes with SIGSEGV on some
105+ object files. This is a general problem and not PostgreSQL related.
106+ Currently bootstrap.o causes such a crash. The workaround is not to include
107+ the object file into the SUBSYS.o but link it directly. For further information
108+ see backend/Makefile and backend/bootstrap/Makefile.
109+ libpgsql.a currently cannot be generated because of the same problem. But this
110+ doesn't matter since shared libraries are not supported.
111+
112+ Currently yacc fails on interfaces/ecpg/preproc/preproc.y because of
113+ exceeded maximum table size. You can generate the preproc.h and preproc.c
114+ files on another platform and use them. This is only a problem when you use
115+ the current source tree since preproc.h and preporc.c are included in official
116+ distributions.
117+
112118Regression tests:
113119-----------------
114120
@@ -122,7 +128,7 @@ int8, float4:
122128Exponent expression "e+nnn" instead of "e+nn". Can be ignored.
123129
124130float8:
125- Exponent expression "e+nnn" instead of "e+nn" and some slightdeviation
131+ Exponent expression "e+nnn" instead of "e+nn" and some slightdifference
126132in the last digit.
127133Can be ignored.
128134
@@ -143,12 +149,40 @@ Subject of further investigation.
143149
144150numeric, numeric_big:
145151ERROR: Cannot create unique index. Table contains non-unique values
146- Subject of further investigation.
152+ Subject of further investigation. Probably because of the missing indices
153+ these tests take a long time.
147154
148155The reached state of this port should be sufficient for lot of applications.
149156
150157Have fun!
151158
152159Andreas Kardos
153160kardos@repas-aeg.de
154- 1999-12-09
161+ 1999-12-16
162+
163+
164+ ---------------------------------------------------------------------------
165+
166+ *** ./stl_alloc.h.origSat Feb 28 05:17:28 1998
167+ --- ./stl_alloc.hTue Nov 23 04:14:09 1999
168+ ***************
169+ *** 120,125 ****
170+ --- 120,126 ----
171+ #pragma set woff 1174
172+ #endif
173+
174+ + extern "C++" {
175+ // Malloc-based allocator. Typically slower than default alloc below.
176+ // Typically thread-safe and more storage efficient.
177+ #ifdef __STL_STATIC_TEMPLATE_MEMBER_BUG
178+ ***************
179+ *** 682,687 ****
180+ --- 683,689 ----
181+ # endif
182+
183+ #endif /* ! __USE_MALLOC */
184+ + } // extern "C++"
185+
186+ #if defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32)
187+ #pragma reset woff 1174
188+