]> granicus.if.org Git - postgresql/blob - doc/FAQ_Solaris
Un-break plperl for non-set case.
[postgresql] / doc / FAQ_Solaris
1 ============================================================
2 Frequently Asked Questions (FAQ) for PostgreSQL
3 Sun Solaris specific
4 to be read in conjunction with the installation instructions
5 ============================================================
6 last updated:        $Date: 2003/10/09 17:11:13 $
7
8 current maintainer:  Peter Eisentraut <peter_e@gmx.net>
9
10
11 Contents:
12
13 1) What tools do I need to build and install PostgreSQL on Solaris?
14 2) Why do I get problems when building with OpenSSL support?
15 3) Why does configure complain about a failed test program?
16 4) Why does my 64-bit build sometimes crash?
17 5) How can I compile for optimum performance?
18
19 1) What tools do I need to build and install PostgreSQL on Solaris?
20
21 You will need
22
23 - GNU zip (for installing the documentation)
24 - GNU make
25 - GNU readline library (optional)
26 - GCC (if you don't have Sun's compiler)
27
28 If you like Solaris packages, you can find these tools here:
29 http://www.sunfreeware.com
30
31 If you prefer sources, look here:
32 http://www.gnu.org/order/ftp.html
33
34 You can build with either GCC or Sun's compiler suite.  We have heard
35 reports of problems when using gcc 2.95.1; gcc 2.95.3 or later is
36 recommended.  If you are using Sun's compiler, be careful *not* to
37 select /usr/ucb/cc; use /opt/SUNWspro/bin/cc.
38
39
40 2) Why do I get problems when building with OpenSSL support?
41
42 When you build PostgreSQL with OpenSSL support you might get
43 compilation errors in the following files:
44
45 src/backend/libpq/crypt.c
46 src/backend/libpq/password.c
47 src/interfaces/libpq/fe-auth.c
48 src/interfaces/libpq/fe-connect.c
49
50 This is because of a namespace conflict between the standard
51 /usr/include/crypt.h header and the header files provided by OpenSSL.
52
53 Upgrading your OpenSSL installation to version 0.9.6a fixes this
54 problem.
55
56
57 3) Why does configure complain about a failed test program?
58
59 This is probably a case of the run-time linker being unable to find
60 libz or some other non-standard library, such as libssl.  To point it
61 to the right location, set the LD_LIBRARY_PATH environment variable,
62 e.g.,
63
64 LD_LIBRARY_PATH=/usr/local/lib:/usr/local/ssl/lib
65 export LD_LIBRARY_PATH
66
67 and restart configure.  You will also have to keep this setting
68 whenever you run any of the installed PostgreSQL programs.
69
70 Alternatively, set the environment variable LD_RUN_PATH.  See the
71 ld(1) man page for more information.
72
73
74 4) Why does my 64-bit build sometimes crash?
75
76 On Solaris 7 and older, the 64-bit version of libc has a buggy vsnprintf
77 routine, which leads to erratic core dumps in PostgreSQL.  The simplest known
78 workaround is to force PostgreSQL to use its own version of vsnprintf rather
79 than the library copy.  To do this, after you run 'configure' edit a file
80 produced by configure:
81
82 In src/Makefile.global, change the line
83     LIBOBJS =
84 to read
85     LIBOBJS = snprintf.o
86
87 (There might be other files already listed in this variable.  Order
88 does not matter.)
89
90 Then build as usual.
91
92
93 5) How can I compile for optimum performance?
94
95 Try using the "-fast" compile flag.  The binaries might not be portable to
96 other Solaris systems, and you might need to compile everything that links
97 to PostgreSQL with "-fast", but PostgreSQL will run significantly faster,
98 50% faster on some tests.
99
100
101