Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7095b43

Browse files
committed
New platform-specific FAQ for HP-UX sites.
1 parent971175f commit7095b43

File tree

1 file changed

+170
-0
lines changed

1 file changed

+170
-0
lines changed

‎doc/FAQ_HPUX

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
=======================================================
2+
Frequently Asked Questions (FAQ) for PostgreSQL V6.4
3+
HP-UX Specific
4+
TO BE READ IN CONJUNCTION WITH THE NORMAL FAQ
5+
=======================================================
6+
last updated: Sat Nov 28 16:21:25 EST 1998
7+
8+
current maintainer: Tom Lane (tgl@sss.pgh.pa.us)
9+
original author: Tom Lane (tgl@sss.pgh.pa.us)
10+
11+
12+
Questions covered here:
13+
1.1)What do I need to install PostgreSQL on HP-UX?
14+
1.2)Anything special about the build/install procedure?
15+
1.3)yacc dies trying to process src/backend/parser/gram.y.
16+
1.4)Linking the main postgres executable fails, complaining that
17+
there's no "alloca" function.
18+
1.5)OK, it seemed to build and install, but the regression test fails.
19+
20+
21+
----------------------------------------------------------------------
22+
Section 1: Installing PostgreSQL
23+
----------------------------------------------------------------------
24+
25+
1.1)What do I need to install PostgreSQL on HP-UX?
26+
27+
PostgreSQL 6.4 is known to build and pass regression test on HPUX 9.03,
28+
9.05, and 10.20, given appropriate system patch levels and build tools.
29+
It should work on other HPUX 9.* and 10.* releases for Series 700/800
30+
machines, too. (No one has reported trying it with HPUX 11 yet.)
31+
Since this is a new FAQ, I don't yet have a lot of information about the
32+
exact prerequisites, but I'd appreciate hearing from anyone who fails to
33+
build a working copy, so that we can add more info about exactly what is
34+
needed.
35+
36+
Aside from PostgreSQL 6.4 or later sources, you will need GNU make
37+
(HP's make will not do), and either GNU gcc or HP's full ANSI C compiler.
38+
You must also get flex (GNU lex) 2.5.4 or later --- all versions of
39+
HP's lex fail on the Postgres lexer files.
40+
41+
I'd also recommend making sure you are fairly up-to-date on HP patches,
42+
particularly if you are using HPUX 9. At a minimum, if you are on HPUX 9,
43+
you *must* have PHSS_4630 (libm update) or a successor patch; otherwise
44+
Postgres' date/time functions will misbehave. On general principles you
45+
should be current on libc and ld/dld patches, as well as compiler
46+
patches if you are using HP's C compiler (but I don't currently know of
47+
any specific failures due to not having recent patches for these files).
48+
See HP's support websites, such as http://us-support.external.hp.com/,
49+
for free copies of their latest patches.
50+
51+
PostgreSQL 6.3.2 and earlier required quite a few small tweaks to
52+
install on HPUX, so I recommend you not bother with anything older
53+
than 6.4.
54+
55+
56+
1.2)Anything special about the build/install procedure?
57+
58+
When you run configure, you will want to explicitly select either the
59+
hpux_cc or hpux_gcc template depending on which compiler you plan to
60+
use:
61+
./configure --with-template=hpux_cc
62+
for HP's C compiler, or
63+
./configure --with-template=hpux_gcc
64+
for GNU gcc. (If you omit --with-template, configure may either
65+
default to hpux_cc or give up entirely, depending on which HPUX and
66+
PostgreSQL releases you have.)
67+
68+
You may want to tweak the CFLAGS setting in template/hpux_[g]cc before
69+
you configure; the distributed files contain neither -O nor -g switches,
70+
which is hardly optimal for any situation. I've seen no problems using
71+
-O with gcc 2.7.2.*.
72+
73+
The default install target location is /usr/local/pgsql, which
74+
(particularly on HPUX 10) you might want to change to something under
75+
/opt. If so, use the --prefix switch to configure.
76+
77+
If you have both HP and GNU C++ compilers in your PATH, keep an eye on
78+
whether configure picks the right one --- you want the HP c++ if you are
79+
using HP C, or g++ if you are using gcc. Mixing HP and GNU compilers
80+
won't work. You may need to provide a --with-CXX=compiler switch to
81+
force configure to pick the matching C++ compiler, or even say
82+
--without-CXX if you have a C++ compiler but it doesn't match the C
83+
compiler you want to use.
84+
85+
Otherwise the standard build/install procedure described in the
86+
PostgreSQL documentation works fine.
87+
88+
89+
1.3)yacc dies trying to process src/backend/parser/gram.y.
90+
91+
HP's yacc doesn't create its tables large enough to handle the Postgres
92+
grammar (a lot of other vendors' yaccs have this problem too). There
93+
are three possible workarounds:
94+
95+
1. The quickest answer is just to "touch" src/backend/parser/gram.c
96+
and src/backend/parser/parse.h and repeat the build. Any PostgreSQL
97+
distribution file should have up-to-date copies of those files included,
98+
so you shouldn't need to run yacc on gram.y at all ... but sometimes
99+
gram.y mistakenly has a newer timestamp in the distribution than the
100+
derived files do.
101+
102+
2. Install "bison" (GNU yacc) and reconfigure. Bison doesn't have a
103+
problem with large grammars. Note this is not the right choice if you
104+
are using HP's cc on HPUX 9 --- see next item.
105+
106+
3. Increase yacc's table sizes enough to cope. With a pre-6.4
107+
PostgreSQL grammar, I was able to get HPUX 9's yacc to work by
108+
setting YFLAGS to
109+
-d -Np2000 -Ns3000 -Nm100000 -Nl2000 -Na30000 -Nc10000
110+
(You can edit YFLAGS either in the template file before running
111+
configure, or in src/Makefile.global afterwards.) Future PostgreSQL
112+
releases might require even larger tables, but this should do for
113+
a starting point.
114+
115+
116+
1.4)Linking the main postgres executable fails, complaining that
117+
there's no "alloca" function.
118+
119+
If you're using HP's cc on HPUX 9, it's right: there's no alloca
120+
function. The only place in PostgreSQL that uses alloca is the parser
121+
(gram.c), and that does so only if it was generated with GNU bison.
122+
Unfortunately the distribution copy of gram.c is made with bison.
123+
There are several possible answers:
124+
125+
1. Remake gram.c with HP's yacc (see above item for switch settings).
126+
You might also need to remake src/backend/bootstrap/bootparse.c.
127+
128+
2. Build with gcc, which treats alloca as a compiled-in-line function.
129+
130+
3. Install HPUX 10, which has alloca. You're gonna have to do that
131+
before Y2K anyway...
132+
133+
134+
1.5)OK, it seemed to build and install, but the regression test fails.
135+
136+
There are several "expected failures" due to differences between HPUX
137+
and the regression test reference platform used by the PostgreSQL group.
138+
A look at the textual differences between the expected and actual
139+
outputs will usually reveal that the differences are minor. You should
140+
expect these differences:
141+
142+
TEST(S)COMMENTS
143+
144+
int2, int4:pg_atoi generates a differently worded error
145+
message for integer overflow.
146+
147+
float8:In 6.4, float8 shows some differences due to
148+
different handling of overflow/underflow errors in
149+
exp() and pow(). This should be fixed in 6.4.1
150+
and later.
151+
152+
float8, geometry:Lots of differences in the last digit or two
153+
because of different roundoff errors in floating
154+
arithmetic. Also, HPUX does not distinguish
155+
-0 from 0 during printout, but the reference
156+
platform does.
157+
158+
horology:HPUX time library does not know about daylight
159+
savings time before 1970, so there are some
160+
places in horology where a time will be shown
161+
in PST instead of PDT.
162+
163+
In addition, the int8 regression test will fail massively on HPUX 9,
164+
because int8 doesn't actually work on this platform (sprintf/sscanf
165+
don't cope with long long int). Either upgrade to HPUX 10, or don't
166+
use int8 data.
167+
168+
Any other error is cause for suspicion. In particular, if you see
169+
failures in the datetime test on HPUX 9, you probably forgot to
170+
install the libm patch PHSS_4630 --- see item 1.1 above.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp