FAQ_Solaris 3.35 KB
Newer Older
Peter Eisentraut's avatar
Peter Eisentraut committed
1
============================================================
Peter Eisentraut's avatar
Peter Eisentraut committed
2
Frequently Asked Questions (FAQ) for PostgreSQL 7.2
Peter Eisentraut's avatar
Peter Eisentraut committed
3 4 5
Sun Solaris specific
to be read in conjunction with the installation instructions
============================================================
6
last updated:        $Date: 2002/03/04 17:47:11 $
Bruce Momjian's avatar
Bruce Momjian committed
7

Peter Eisentraut's avatar
Peter Eisentraut committed
8
current maintainer:  Peter Eisentraut <peter_e@gmx.net>
Bruce Momjian's avatar
Bruce Momjian committed
9 10 11 12


Contents:

Peter Eisentraut's avatar
Peter Eisentraut committed
13 14
1) What tools do I need to build and install PostgreSQL on Solaris?
2) Why do I get problems when building with OpenSSL support?
Peter Eisentraut's avatar
Peter Eisentraut committed
15
3) Why does configure complain about a failed test program?
16
4) How do I ensure that pg_dump and pg_restore can handle files > 2 Gb?
17
5) Why does my 64-bit build sometimes crash?
18 19


Peter Eisentraut's avatar
Peter Eisentraut committed
20
1) What tools do I need to build and install PostgreSQL on Solaris?
Bruce Momjian's avatar
Bruce Momjian committed
21 22 23

You will need

Peter Eisentraut's avatar
Peter Eisentraut committed
24
- GNU zip (for installing the documentation)
Bruce Momjian's avatar
Bruce Momjian committed
25
- GNU make
Peter Eisentraut's avatar
Peter Eisentraut committed
26
- GNU readline library (optional)
27
- GCC (if you don't have Sun's compiler)
Bruce Momjian's avatar
Bruce Momjian committed
28 29 30 31 32 33 34

If you like Solaris packages, you can find these tools here:
http://www.sunfreeware.com

If you prefer sources, look here:
http://www.gnu.org/order/ftp.html

35 36 37 38
You can build with either GCC or Sun's compiler suite.  We have heard reports
of problems when using gcc 2.95.1; gcc 2.95.3 is recommended.  If you are
using Sun's compiler, be careful *not* to select /usr/ucb/cc; use
/opt/SUNWspro/bin/cc.
39

Bruce Momjian's avatar
Bruce Momjian committed
40

Peter Eisentraut's avatar
Peter Eisentraut committed
41
2) Why do I get problems when building with OpenSSL support?
Bruce Momjian's avatar
Bruce Momjian committed
42

43
When you build PostgreSQL with OpenSSL support you might get
Peter Eisentraut's avatar
Peter Eisentraut committed
44
compilation errors in the following files:
Bruce Momjian's avatar
Bruce Momjian committed
45

Peter Eisentraut's avatar
Peter Eisentraut committed
46 47 48 49
src/backend/libpq/crypt.c
src/backend/libpq/password.c
src/interfaces/libpq/fe-auth.c
src/interfaces/libpq/fe-connect.c
Bruce Momjian's avatar
Bruce Momjian committed
50

Peter Eisentraut's avatar
Peter Eisentraut committed
51 52
This is because of a namespace conflict between the standard
/usr/include/crypt.h header and the header files provided by OpenSSL.
Bruce Momjian's avatar
Bruce Momjian committed
53

54 55
Upgrading your OpenSSL installation to version 0.9.6a fixes this
problem.
Peter Eisentraut's avatar
Peter Eisentraut committed
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70


3) Why does configure complain about a failed test program?

This is probably a case of the run-time linker being unable to find
libz or some other non-standard library, such as libssl.  To point it
to the right location, set the LD_LIBRARY_PATH environment variable,
e.g.,

LD_LIBRARY_PATH=/usr/local/lib:/usr/local/ssl/lib
export LD_LIBRARY_PATH

and restart configure.  You will also have to keep this setting
whenever you run any of the installed PostgreSQL programs.

Peter Eisentraut's avatar
Peter Eisentraut committed
71 72
Alternatively, set the environment variable LD_RUN_PATH.  See the
ld(1) man page for more information.
73 74 75 76 77 78 79 80 81 82 83


4) How do I ensure that pg_dump and pg_restore can handle files > 2 Gb?

By default, gcc will build programs that only handle 32-bit file offsets.
This is not a real problem for the server but can easily be trouble for
pg_dump and pg_restore.  Before running 'configure', set your CFLAGS variable
to specify support for files with 64-bit offsets.  This has been verified
to work on Solaris 7:

     CFLAGS="`getconf LFS_CFLAGS`"; export CFLAGS
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102


5) Why does my 64-bit build sometimes crash?

On Solaris 7 and older, the 64-bit version of libc has a buggy vsnprintf
routine, which leads to erratic core dumps in PostgreSQL.  The simplest known
workaround is to force PostgreSQL to use its own version of vsnprintf rather
than the library copy.  To do this, after you run 'configure' edit two files
produced by configure:

(1) In src/Makefile.global, change the line
	SNPRINTF = 
to read
	SNPRINTF = snprintf.o

(2) In src/backend/port/Makefile, add "snprintf.o" to OBJS.  (Skip this
step if you see "$(SNPRINTF)" already listed in OBJS.)

Then build as usual.